@atlaskit/tile 0.1.4 → 0.2.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 +7 -0
- package/dist/cjs/entry-point/skeleton.js +13 -0
- package/dist/cjs/index.js +8 -1
- package/dist/cjs/skeleton.js +37 -0
- package/dist/cjs/tile.compiled.css +1 -0
- package/dist/cjs/tile.js +2 -0
- package/dist/es2019/entry-point/skeleton.js +1 -0
- package/dist/es2019/index.js +2 -1
- package/dist/es2019/skeleton.js +30 -0
- package/dist/es2019/tile.compiled.css +1 -0
- package/dist/es2019/tile.js +2 -0
- package/dist/esm/entry-point/skeleton.js +1 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/skeleton.js +30 -0
- package/dist/esm/tile.compiled.css +1 -0
- package/dist/esm/tile.js +2 -0
- package/dist/types/entry-point/skeleton.d.ts +2 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/skeleton.d.ts +9 -0
- package/dist/types/types.d.ts +22 -1
- package/dist/types-ts4.5/entry-point/skeleton.d.ts +2 -0
- package/dist/types-ts4.5/index.d.ts +1 -0
- package/dist/types-ts4.5/skeleton.d.ts +9 -0
- package/dist/types-ts4.5/types.d.ts +22 -1
- package/package.json +3 -2
- package/skeleton/package.json +17 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/tile
|
|
2
2
|
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`f20393c20ed30`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f20393c20ed30) -
|
|
8
|
+
Added new Tile Skeleton to act as a placeholder while content loads.
|
|
9
|
+
|
|
3
10
|
## 0.1.4
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _skeleton.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _skeleton = _interopRequireDefault(require("../skeleton"));
|
package/dist/cjs/index.js
CHANGED
|
@@ -4,10 +4,17 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
+
Object.defineProperty(exports, "Skeleton", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _skeleton.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
7
13
|
Object.defineProperty(exports, "default", {
|
|
8
14
|
enumerable: true,
|
|
9
15
|
get: function get() {
|
|
10
16
|
return _tile.default;
|
|
11
17
|
}
|
|
12
18
|
});
|
|
13
|
-
var _tile = _interopRequireDefault(require("./tile"));
|
|
19
|
+
var _tile = _interopRequireDefault(require("./tile"));
|
|
20
|
+
var _skeleton = _interopRequireDefault(require("./entry-point/skeleton"));
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = TileSkeleton;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _skeleton = _interopRequireDefault(require("@atlaskit/skeleton"));
|
|
10
|
+
var _tile = _interopRequireDefault(require("./tile"));
|
|
11
|
+
/**
|
|
12
|
+
* __Skeleton__
|
|
13
|
+
*
|
|
14
|
+
* A skeleton is the loading state for the tile component.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
function TileSkeleton(_ref) {
|
|
18
|
+
var color = _ref.color,
|
|
19
|
+
isShimmering = _ref.isShimmering,
|
|
20
|
+
shimmeringEndColor = _ref.shimmeringEndColor,
|
|
21
|
+
_ref$size = _ref.size,
|
|
22
|
+
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
23
|
+
testId = _ref.testId;
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement(_tile.default, {
|
|
25
|
+
label: "",
|
|
26
|
+
size: size,
|
|
27
|
+
testId: testId,
|
|
28
|
+
backgroundColor: "transparent"
|
|
29
|
+
}, /*#__PURE__*/_react.default.createElement(_skeleton.default, {
|
|
30
|
+
color: color,
|
|
31
|
+
isShimmering: isShimmering,
|
|
32
|
+
ShimmeringEndColor: shimmeringEndColor,
|
|
33
|
+
width: '100%',
|
|
34
|
+
height: '100%',
|
|
35
|
+
testId: testId ? "".concat(testId, "--skeleton") : undefined
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
._bfhk1g3m{background-color:var(--ds-background-accent-orange-subtlest,#fff3eb)}
|
|
52
52
|
._bfhk1g6e{background-color:var(--ds-background-accent-orange-subtle,#fea362)}
|
|
53
53
|
._bfhk1gly{background-color:var(--ds-background-danger,#ffeceb)}
|
|
54
|
+
._bfhk1j28{background-color:transparent}
|
|
54
55
|
._bfhk1j89{background-color:var(--ds-background-accent-blue-subtle,#579dff)}
|
|
55
56
|
._bfhk1jkz{background-color:var(--ds-background-accent-purple-subtler,#dfd8fd)}
|
|
56
57
|
._bfhk1lri{background-color:var(--ds-background-discovery-bold,#6e5dc6)}
|
package/dist/cjs/tile.js
CHANGED
|
@@ -35,6 +35,7 @@ var insetSizeMap = {
|
|
|
35
35
|
var backgroundColorMap = {
|
|
36
36
|
white: "_bfhku67f",
|
|
37
37
|
black: "_bfhkr3uz",
|
|
38
|
+
transparent: "_bfhk1j28",
|
|
38
39
|
'color.background.accent.lime.subtlest': "_bfhkm890",
|
|
39
40
|
'color.background.accent.lime.subtler': "_bfhkz2ec",
|
|
40
41
|
'color.background.accent.lime.subtle': "_bfhkbq5w",
|
|
@@ -111,6 +112,7 @@ function Tile(props) {
|
|
|
111
112
|
testId = props.testId;
|
|
112
113
|
return /*#__PURE__*/React.createElement("span", {
|
|
113
114
|
"data-testid": testId,
|
|
115
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-jsx
|
|
114
116
|
"aria-label": label !== '' ? label : undefined,
|
|
115
117
|
role: label !== '' ? 'img' : undefined,
|
|
116
118
|
className: (0, _runtime.ax)([styles.root, sizeMap[size], isInset ? styles.inset : styles.nonInset, isInset && insetSizeMap[size], backgroundColorMap[backgroundColor || 'color.background.neutral'], hasBorder && styles.border])
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../skeleton';
|
package/dist/es2019/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default } from './tile';
|
|
1
|
+
export { default } from './tile';
|
|
2
|
+
export { default as Skeleton } from './entry-point/skeleton';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Skeleton from '@atlaskit/skeleton';
|
|
3
|
+
import Tile from './tile';
|
|
4
|
+
/**
|
|
5
|
+
* __Skeleton__
|
|
6
|
+
*
|
|
7
|
+
* A skeleton is the loading state for the tile component.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export default function TileSkeleton({
|
|
11
|
+
color,
|
|
12
|
+
isShimmering,
|
|
13
|
+
shimmeringEndColor,
|
|
14
|
+
size = 'medium',
|
|
15
|
+
testId
|
|
16
|
+
}) {
|
|
17
|
+
return /*#__PURE__*/React.createElement(Tile, {
|
|
18
|
+
label: "",
|
|
19
|
+
size: size,
|
|
20
|
+
testId: testId,
|
|
21
|
+
backgroundColor: "transparent"
|
|
22
|
+
}, /*#__PURE__*/React.createElement(Skeleton, {
|
|
23
|
+
color: color,
|
|
24
|
+
isShimmering: isShimmering,
|
|
25
|
+
ShimmeringEndColor: shimmeringEndColor,
|
|
26
|
+
width: '100%',
|
|
27
|
+
height: '100%',
|
|
28
|
+
testId: testId ? `${testId}--skeleton` : undefined
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
._bfhk1g3m{background-color:var(--ds-background-accent-orange-subtlest,#fff3eb)}
|
|
52
52
|
._bfhk1g6e{background-color:var(--ds-background-accent-orange-subtle,#fea362)}
|
|
53
53
|
._bfhk1gly{background-color:var(--ds-background-danger,#ffeceb)}
|
|
54
|
+
._bfhk1j28{background-color:transparent}
|
|
54
55
|
._bfhk1j89{background-color:var(--ds-background-accent-blue-subtle,#579dff)}
|
|
55
56
|
._bfhk1jkz{background-color:var(--ds-background-accent-purple-subtler,#dfd8fd)}
|
|
56
57
|
._bfhk1lri{background-color:var(--ds-background-discovery-bold,#6e5dc6)}
|
package/dist/es2019/tile.js
CHANGED
|
@@ -27,6 +27,7 @@ const insetSizeMap = {
|
|
|
27
27
|
const backgroundColorMap = {
|
|
28
28
|
white: "_bfhku67f",
|
|
29
29
|
black: "_bfhkr3uz",
|
|
30
|
+
transparent: "_bfhk1j28",
|
|
30
31
|
'color.background.accent.lime.subtlest': "_bfhkm890",
|
|
31
32
|
'color.background.accent.lime.subtler': "_bfhkz2ec",
|
|
32
33
|
'color.background.accent.lime.subtle': "_bfhkbq5w",
|
|
@@ -103,6 +104,7 @@ export default function Tile(props) {
|
|
|
103
104
|
} = props;
|
|
104
105
|
return /*#__PURE__*/React.createElement("span", {
|
|
105
106
|
"data-testid": testId,
|
|
107
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-jsx
|
|
106
108
|
"aria-label": label !== '' ? label : undefined,
|
|
107
109
|
role: label !== '' ? 'img' : undefined,
|
|
108
110
|
className: ax([styles.root, sizeMap[size], isInset ? styles.inset : styles.nonInset, isInset && insetSizeMap[size], backgroundColorMap[backgroundColor || 'color.background.neutral'], hasBorder && styles.border])
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../skeleton';
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default } from './tile';
|
|
1
|
+
export { default } from './tile';
|
|
2
|
+
export { default as Skeleton } from './entry-point/skeleton';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Skeleton from '@atlaskit/skeleton';
|
|
3
|
+
import Tile from './tile';
|
|
4
|
+
/**
|
|
5
|
+
* __Skeleton__
|
|
6
|
+
*
|
|
7
|
+
* A skeleton is the loading state for the tile component.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export default function TileSkeleton(_ref) {
|
|
11
|
+
var color = _ref.color,
|
|
12
|
+
isShimmering = _ref.isShimmering,
|
|
13
|
+
shimmeringEndColor = _ref.shimmeringEndColor,
|
|
14
|
+
_ref$size = _ref.size,
|
|
15
|
+
size = _ref$size === void 0 ? 'medium' : _ref$size,
|
|
16
|
+
testId = _ref.testId;
|
|
17
|
+
return /*#__PURE__*/React.createElement(Tile, {
|
|
18
|
+
label: "",
|
|
19
|
+
size: size,
|
|
20
|
+
testId: testId,
|
|
21
|
+
backgroundColor: "transparent"
|
|
22
|
+
}, /*#__PURE__*/React.createElement(Skeleton, {
|
|
23
|
+
color: color,
|
|
24
|
+
isShimmering: isShimmering,
|
|
25
|
+
ShimmeringEndColor: shimmeringEndColor,
|
|
26
|
+
width: '100%',
|
|
27
|
+
height: '100%',
|
|
28
|
+
testId: testId ? "".concat(testId, "--skeleton") : undefined
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
._bfhk1g3m{background-color:var(--ds-background-accent-orange-subtlest,#fff3eb)}
|
|
52
52
|
._bfhk1g6e{background-color:var(--ds-background-accent-orange-subtle,#fea362)}
|
|
53
53
|
._bfhk1gly{background-color:var(--ds-background-danger,#ffeceb)}
|
|
54
|
+
._bfhk1j28{background-color:transparent}
|
|
54
55
|
._bfhk1j89{background-color:var(--ds-background-accent-blue-subtle,#579dff)}
|
|
55
56
|
._bfhk1jkz{background-color:var(--ds-background-accent-purple-subtler,#dfd8fd)}
|
|
56
57
|
._bfhk1lri{background-color:var(--ds-background-discovery-bold,#6e5dc6)}
|
package/dist/esm/tile.js
CHANGED
|
@@ -27,6 +27,7 @@ var insetSizeMap = {
|
|
|
27
27
|
var backgroundColorMap = {
|
|
28
28
|
white: "_bfhku67f",
|
|
29
29
|
black: "_bfhkr3uz",
|
|
30
|
+
transparent: "_bfhk1j28",
|
|
30
31
|
'color.background.accent.lime.subtlest': "_bfhkm890",
|
|
31
32
|
'color.background.accent.lime.subtler': "_bfhkz2ec",
|
|
32
33
|
'color.background.accent.lime.subtle': "_bfhkbq5w",
|
|
@@ -103,6 +104,7 @@ export default function Tile(props) {
|
|
|
103
104
|
testId = props.testId;
|
|
104
105
|
return /*#__PURE__*/React.createElement("span", {
|
|
105
106
|
"data-testid": testId,
|
|
107
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-jsx
|
|
106
108
|
"aria-label": label !== '' ? label : undefined,
|
|
107
109
|
role: label !== '' ? 'img' : undefined,
|
|
108
110
|
className: ax([styles.root, sizeMap[size], isInset ? styles.inset : styles.nonInset, isInset && insetSizeMap[size], backgroundColorMap[backgroundColor || 'color.background.neutral'], hasBorder && styles.border])
|
package/dist/types/index.d.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SkeletonProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* __Skeleton__
|
|
5
|
+
*
|
|
6
|
+
* A skeleton is the loading state for the tile component.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
export default function TileSkeleton({ color, isShimmering, shimmeringEndColor, size, testId, }: SkeletonProps): React.JSX.Element;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
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' | 'white' | 'black';
|
|
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
3
|
export type TileProps = {
|
|
4
4
|
/**
|
|
5
5
|
* The label for the icon.
|
|
@@ -47,3 +47,24 @@ export type TileProps = {
|
|
|
47
47
|
*/
|
|
48
48
|
testId?: string;
|
|
49
49
|
};
|
|
50
|
+
export type SkeletonProps = {
|
|
51
|
+
/**
|
|
52
|
+
* Overrides the default color of skeleton, and overrides the default shimmering start color if ShimmeringEndColor 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
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SkeletonProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* __Skeleton__
|
|
5
|
+
*
|
|
6
|
+
* A skeleton is the loading state for the tile component.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
export default function TileSkeleton({ color, isShimmering, shimmeringEndColor, size, testId, }: SkeletonProps): React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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' | 'white' | 'black';
|
|
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
3
|
export type TileProps = {
|
|
4
4
|
/**
|
|
5
5
|
* The label for the icon.
|
|
@@ -47,3 +47,24 @@ export type TileProps = {
|
|
|
47
47
|
*/
|
|
48
48
|
testId?: string;
|
|
49
49
|
};
|
|
50
|
+
export type SkeletonProps = {
|
|
51
|
+
/**
|
|
52
|
+
* Overrides the default color of skeleton, and overrides the default shimmering start color if ShimmeringEndColor 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
|
+
};
|
package/package.json
CHANGED
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
],
|
|
29
29
|
"atlaskit:src": "src/index.tsx",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@atlaskit/
|
|
31
|
+
"@atlaskit/skeleton": "^2.1.0",
|
|
32
|
+
"@atlaskit/tokens": "^6.4.0",
|
|
32
33
|
"@babel/runtime": "^7.0.0",
|
|
33
34
|
"@compiled/react": "^0.18.3"
|
|
34
35
|
},
|
|
@@ -82,7 +83,7 @@
|
|
|
82
83
|
}
|
|
83
84
|
},
|
|
84
85
|
"name": "@atlaskit/tile",
|
|
85
|
-
"version": "0.
|
|
86
|
+
"version": "0.2.0",
|
|
86
87
|
"description": "A tile is a rounded square that takes an asset (Image, Icon, Logo) and represents a noun.",
|
|
87
88
|
"author": "Atlassian Pty Ltd",
|
|
88
89
|
"license": "Apache-2.0",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/tile/skeleton",
|
|
3
|
+
"main": "../dist/cjs/entry-point/skeleton.js",
|
|
4
|
+
"module": "../dist/esm/entry-point/skeleton.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/entry-point/skeleton.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/entry-point/skeleton.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/entry-point/skeleton.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|