@atlaskit/tile 1.1.0 → 2.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,31 @@
1
1
  # @atlaskit/tile
2
2
 
3
+ ## 2.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
8
+ Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
9
+
10
+ Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
11
+
12
+ Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
13
+
14
+ ```diff
15
+ - "typesVersions": {
16
+ - ">=4.5 <4.9": {
17
+ - "*": [
18
+ - "dist/types-ts4.5/*",
19
+ - "dist/types-ts4.5/index.d.ts"
20
+ - ]
21
+ - }
22
+ - },
23
+ ```
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies
28
+
3
29
  ## 1.1.0
4
30
 
5
31
  ### Minor Changes
@@ -142,6 +142,7 @@
142
142
  ._pkaxa982 .emoji-common-emoji-sprite{min-height:24px!important}
143
143
  ._pkaxmccc .emoji-common-emoji-sprite{min-height:9pt!important}
144
144
  ._pkaxwk7l .emoji-common-emoji-sprite{min-height:14px!important}
145
+ ._s7n4nkob{vertical-align:middle}
145
146
  ._vchhusvi{box-sizing:border-box}
146
147
  ._w8l519bv svg{width:10px}
147
148
  ._w8l51crf svg{width:9pt}
package/dist/cjs/tile.js CHANGED
@@ -12,7 +12,7 @@ var React = _interopRequireWildcard(require("react"));
12
12
  var _runtime = require("@compiled/react/runtime");
13
13
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
14
14
  var styles = {
15
- root: "_2rkol0p1 _1reo15vq _18m915vq _kqswh2mm _1e0c116y _vchhusvi _4cvr1h6o _1bah1h6o _1o9zidpf _16jlidpf _1ul9idpf _1tkeidpf",
15
+ root: "_2rkol0p1 _1reo15vq _18m915vq _kqswh2mm _1e0c116y _vchhusvi _4cvr1h6o _1bah1h6o _1o9zidpf _16jlidpf _1ul9idpf _1tkeidpf _s7n4nkob",
16
16
  border: "_189ee4h9 _1dqonqa1 _1h6d1l7x",
17
17
  inset: "_1iia1wug _bna71wug _1xjx1wug _17521wug",
18
18
  nonInset: "_1qwg1osq _mezj1osq _e2oo1osq _w8l51osq _1iia1osq _bna71osq _1xjx1osq _17521osq"
@@ -142,6 +142,7 @@
142
142
  ._pkaxa982 .emoji-common-emoji-sprite{min-height:24px!important}
143
143
  ._pkaxmccc .emoji-common-emoji-sprite{min-height:9pt!important}
144
144
  ._pkaxwk7l .emoji-common-emoji-sprite{min-height:14px!important}
145
+ ._s7n4nkob{vertical-align:middle}
145
146
  ._vchhusvi{box-sizing:border-box}
146
147
  ._w8l519bv svg{width:10px}
147
148
  ._w8l51crf svg{width:9pt}
@@ -4,7 +4,7 @@ import "./tile.compiled.css";
4
4
  import * as React from 'react';
5
5
  import { ax, ix } from "@compiled/react/runtime";
6
6
  const styles = {
7
- root: "_2rkol0p1 _1reo15vq _18m915vq _kqswh2mm _1e0c116y _vchhusvi _4cvr1h6o _1bah1h6o _1o9zidpf _16jlidpf _1ul9idpf _1tkeidpf",
7
+ root: "_2rkol0p1 _1reo15vq _18m915vq _kqswh2mm _1e0c116y _vchhusvi _4cvr1h6o _1bah1h6o _1o9zidpf _16jlidpf _1ul9idpf _1tkeidpf _s7n4nkob",
8
8
  border: "_189ee4h9 _1dqonqa1 _1h6d1l7x",
9
9
  inset: "_1iia1wug _bna71wug _1xjx1wug _17521wug",
10
10
  nonInset: "_1qwg1osq _mezj1osq _e2oo1osq _w8l51osq _1iia1osq _bna71osq _1xjx1osq _17521osq"
@@ -142,6 +142,7 @@
142
142
  ._pkaxa982 .emoji-common-emoji-sprite{min-height:24px!important}
143
143
  ._pkaxmccc .emoji-common-emoji-sprite{min-height:9pt!important}
144
144
  ._pkaxwk7l .emoji-common-emoji-sprite{min-height:14px!important}
145
+ ._s7n4nkob{vertical-align:middle}
145
146
  ._vchhusvi{box-sizing:border-box}
146
147
  ._w8l519bv svg{width:10px}
147
148
  ._w8l51crf svg{width:9pt}
package/dist/esm/tile.js CHANGED
@@ -4,7 +4,7 @@ import "./tile.compiled.css";
4
4
  import * as React from 'react';
5
5
  import { ax, ix } from "@compiled/react/runtime";
6
6
  var styles = {
7
- root: "_2rkol0p1 _1reo15vq _18m915vq _kqswh2mm _1e0c116y _vchhusvi _4cvr1h6o _1bah1h6o _1o9zidpf _16jlidpf _1ul9idpf _1tkeidpf",
7
+ root: "_2rkol0p1 _1reo15vq _18m915vq _kqswh2mm _1e0c116y _vchhusvi _4cvr1h6o _1bah1h6o _1o9zidpf _16jlidpf _1ul9idpf _1tkeidpf _s7n4nkob",
8
8
  border: "_189ee4h9 _1dqonqa1 _1h6d1l7x",
9
9
  inset: "_1iia1wug _bna71wug _1xjx1wug _17521wug",
10
10
  nonInset: "_1qwg1osq _mezj1osq _e2oo1osq _w8l51osq _1iia1osq _bna71osq _1xjx1osq _17521osq"
package/package.json CHANGED
@@ -19,21 +19,13 @@
19
19
  "module": "dist/esm/index.js",
20
20
  "module:es2019": "dist/es2019/index.js",
21
21
  "types": "dist/types/index.d.ts",
22
- "typesVersions": {
23
- ">=4.5 <5.9": {
24
- "*": [
25
- "dist/types-ts4.5/*",
26
- "dist/types-ts4.5/index.d.ts"
27
- ]
28
- }
29
- },
30
22
  "sideEffects": [
31
23
  "*.compiled.css"
32
24
  ],
33
25
  "atlaskit:src": "src/index.tsx",
34
26
  "dependencies": {
35
- "@atlaskit/skeleton": "^2.1.0",
36
- "@atlaskit/tokens": "^13.0.0",
27
+ "@atlaskit/skeleton": "^3.0.0",
28
+ "@atlaskit/tokens": "^14.0.0",
37
29
  "@babel/runtime": "^7.0.0",
38
30
  "@compiled/react": "^0.20.0"
39
31
  },
@@ -43,11 +35,12 @@
43
35
  "devDependencies": {
44
36
  "@af/accessibility-testing": "workspace:^",
45
37
  "@af/visual-regression": "workspace:^",
46
- "@atlaskit/ds-lib": "^7.0.0",
38
+ "@atlaskit/ds-lib": "^8.0.0",
47
39
  "@atlaskit/ssr": "workspace:^",
48
40
  "@atlassian/react-compiler-gating": "workspace:^",
49
41
  "@atlassian/structured-docs-types": "workspace:^",
50
42
  "@testing-library/react": "^16.3.0",
43
+ "react": "^18.2.0",
51
44
  "react-dom": "^18.2.0"
52
45
  },
53
46
  "techstack": {
@@ -88,7 +81,7 @@
88
81
  }
89
82
  },
90
83
  "name": "@atlaskit/tile",
91
- "version": "1.1.0",
84
+ "version": "2.0.0",
92
85
  "description": "A tile is a rounded square that takes an asset and represents a noun.",
93
86
  "author": "Atlassian Pty Ltd",
94
87
  "license": "Apache-2.0",
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/skeleton.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/skeleton.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/skeleton.d.ts"
17
10
  }
package/tile/package.json CHANGED
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/tile.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/tile.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/tile.d.ts"
17
10
  }
package/tile.docs.tsx CHANGED
@@ -1,30 +1,32 @@
1
1
  import path from 'path';
2
2
 
3
- import type { ComponentStructuredContentSource } from '@atlassian/structured-docs-types';
3
+ import type { StructuredContentSource } from '@atlassian/structured-docs-types/types';
4
4
 
5
- const documentation: ComponentStructuredContentSource[] = [
6
- {
7
- name: 'Tile',
8
- description:
9
- 'A tile is a versatile, foundational container with baked-in sizing and radii properties for displaying elements in a tile shape.',
10
- status: 'general-availability',
11
- import: {
5
+ const documentation: StructuredContentSource = {
6
+ components: [
7
+ {
12
8
  name: 'Tile',
13
- package: '@atlaskit/tile',
14
- type: 'default',
15
- packagePath: path.resolve(__dirname),
16
- packageJson: require('./package.json'),
17
- },
18
- examples: [
19
- {
20
- name: 'Basic',
21
- description: 'Basic tile example',
22
- source: path.resolve(__dirname, './examples/basic.tsx'),
9
+ description:
10
+ 'A tile is a versatile, foundational container with baked-in sizing and radii properties for displaying elements in a tile shape.',
11
+ status: 'general-availability',
12
+ import: {
13
+ name: 'Tile',
14
+ package: '@atlaskit/tile',
15
+ type: 'default',
16
+ packagePath: path.resolve(__dirname),
17
+ packageJson: require('./package.json'),
23
18
  },
24
- ],
25
- keywords: ['tile', 'icon', 'container', 'avatar', 'asset', 'emoji', 'logo', 'shape'],
26
- categories: ['images and icons', 'layout'],
27
- },
28
- ];
19
+ examples: [
20
+ {
21
+ name: 'Basic',
22
+ description: 'Basic tile example',
23
+ source: path.resolve(__dirname, './examples/basic.tsx'),
24
+ },
25
+ ],
26
+ keywords: ['tile', 'icon', 'container', 'avatar', 'asset', 'emoji', 'logo', 'shape'],
27
+ categories: ['images and icons', 'layout'],
28
+ },
29
+ ],
30
+ };
29
31
 
30
32
  export default documentation;
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/entry-points/types.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/entry-points/types.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/entry-points/types.d.ts"
17
10
  }
@@ -1,2 +0,0 @@
1
- export { default } from '../skeleton';
2
- export { type TileSkeletonProps } from '../types';
@@ -1 +0,0 @@
1
- export { default } from '../tile';
@@ -1 +0,0 @@
1
- export type { TileProps, TileSkeletonProps } from '../types';
@@ -1,3 +0,0 @@
1
- export { default } from './entry-points/tile';
2
- export { type TileProps } from './entry-points/types';
3
- export { default as TileSkeleton, type TileSkeletonProps } from './entry-points/skeleton';
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import type { TileSkeletonProps } from './types';
3
- /**
4
- * __Tile Skeleton__
5
- *
6
- * A tile skeleton is the loading state for the tile component.
7
- *
8
- */
9
- export default function TileSkeleton({ color, isShimmering, shimmeringEndColor, size, testId, }: TileSkeletonProps): React.JSX.Element;
@@ -1,8 +0,0 @@
1
- import { type TileProps } from './types';
2
- /**
3
- * __Tile__
4
- *
5
- * A tile is a rounded square that takes an asset and represents a noun.
6
- *
7
- */
8
- export default function Tile(props: TileProps): JSX.Element;
@@ -1,70 +0,0 @@
1
- export type TileSize = 'xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
2
- export type TileBackgroundColor = 'color.background.accent.lime.subtlest' | 'color.background.accent.lime.subtler' | 'color.background.accent.lime.subtle' | 'color.background.accent.lime.bolder' | 'color.background.accent.red.subtlest' | 'color.background.accent.red.subtler' | 'color.background.accent.red.subtle' | 'color.background.accent.red.bolder' | 'color.background.accent.orange.subtlest' | 'color.background.accent.orange.subtler' | 'color.background.accent.orange.subtle' | 'color.background.accent.orange.bolder' | 'color.background.accent.yellow.subtlest' | 'color.background.accent.yellow.subtler' | 'color.background.accent.yellow.subtle' | 'color.background.accent.yellow.bolder' | 'color.background.accent.green.subtlest' | 'color.background.accent.green.subtler' | 'color.background.accent.green.subtle' | 'color.background.accent.green.bolder' | 'color.background.accent.teal.subtlest' | 'color.background.accent.teal.subtler' | 'color.background.accent.teal.subtle' | 'color.background.accent.teal.bolder' | 'color.background.accent.blue.subtlest' | 'color.background.accent.blue.subtler' | 'color.background.accent.blue.subtle' | 'color.background.accent.blue.bolder' | 'color.background.accent.purple.subtlest' | 'color.background.accent.purple.subtler' | 'color.background.accent.purple.subtle' | 'color.background.accent.purple.bolder' | 'color.background.accent.magenta.subtlest' | 'color.background.accent.magenta.subtler' | 'color.background.accent.magenta.subtle' | 'color.background.accent.magenta.bolder' | 'color.background.accent.gray.subtlest' | 'color.background.accent.gray.subtler' | 'color.background.accent.gray.subtle' | 'color.background.accent.gray.bolder' | 'color.background.inverse.subtle' | 'color.background.neutral' | 'color.background.neutral.bold' | 'color.background.brand.subtlest' | 'color.background.brand.bold' | 'color.background.brand.boldest' | 'color.background.danger' | 'color.background.danger.bold' | 'color.background.warning' | 'color.background.warning.bold' | 'color.background.success' | 'color.background.success.bold' | 'color.background.discovery' | 'color.background.discovery.bold' | 'color.background.information' | 'color.background.information.bold' | 'transparent' | 'white' | 'black';
3
- export type TileProps = {
4
- /**
5
- * The label for the icon.
6
- *
7
- * If the tile is decorative, this can be set to an empty string.
8
- */
9
- label: string;
10
- /**
11
- * The size of the tile.
12
- *
13
- * - `xxsmall`: 16px
14
- * - `xsmall`: 20px
15
- * - `small`: 24px
16
- * - `medium`: 32px
17
- * - `large`: 40px
18
- * - `xlarge`: 48px
19
- */
20
- size?: TileSize;
21
- /**
22
- * Whether the tile applies internal inset / padding. Used to provide appropriate spacing for assets when needed. Defaults to `true`.
23
- */
24
- isInset?: boolean;
25
- /**
26
- * Whether the tile has a border.
27
- *
28
- * Defaults to `false`.
29
- */
30
- hasBorder?: boolean;
31
- /**
32
- * The background color of the tile.
33
- *
34
- * Accepts design tokens representing background color.
35
- * Defaults to `color.background.neutral`.
36
- */
37
- backgroundColor?: TileBackgroundColor;
38
- /**
39
- * The asset to be displayed inside the tile.
40
- * This should represent a noun.
41
- */
42
- children?: React.ReactNode;
43
- /**
44
- * A `testId` prop is provided for specified elements, which is a unique
45
- * string that appears as a data attribute `data-testid` in the rendered code,
46
- * serving as a hook for automated tests.
47
- */
48
- testId?: string;
49
- };
50
- export type TileSkeletonProps = {
51
- /**
52
- * Overrides the default color of skeleton, and overrides the default shimmering start color if `shimmeringEndColor` is also provided.
53
- */
54
- color?: string;
55
- /**
56
- * Overrides the default shimmering ending color of skeleton.
57
- */
58
- shimmeringEndColor?: string;
59
- /**
60
- * Enables the shimmering animation.
61
- */
62
- isShimmering?: boolean;
63
- size?: TileProps['size'];
64
- /**
65
- * A `testId` prop is provided for specified elements, which is a unique
66
- * string that appears as a data attribute `data-testid` in the rendered code,
67
- * serving as a hook for automated tests.
68
- */
69
- testId?: string;
70
- };