@atlaskit/tile 0.1.3 → 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 CHANGED
@@ -1,5 +1,19 @@
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
+
10
+ ## 0.1.4
11
+
12
+ ### Patch Changes
13
+
14
+ - [`99f4f441fac8c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/99f4f441fac8c) -
15
+ Removed unused dependencies.
16
+
3
17
  ## 0.1.3
4
18
 
5
19
  ### 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
+ }
@@ -3,6 +3,8 @@
3
3
  ._189ee4h9{border-width:var(--ds-border-width,1px)}
4
4
  ._1dqonqa1{border-style:solid}
5
5
  ._1h6dmuej{border-color:var(--ds-border,#091e4224)}._16jlidpf{flex-grow:0}
6
+ ._17521osq svg{height:100%}
7
+ ._17521wug svg{height:auto}
6
8
  ._18m915vq{overflow-y:hidden}
7
9
  ._1bah1h6o{justify-content:center}
8
10
  ._1bsb1tcg{width:24px}
@@ -12,16 +14,16 @@
12
14
  ._1bsbgktf{width:20px}
13
15
  ._1bsbzwfg{width:2pc}
14
16
  ._1e0c116y{display:inline-flex}
15
- ._1iia1osq div, ._bna71osq img, ._1xjx1osq span, ._17521osq svg{height:100%}
16
- ._1iia1wug div, ._bna71wug img, ._1xjx1wug span, ._17521wug svg{height:auto}
17
+ ._1iia1osq div{height:100%}
18
+ ._1iia1wug div{height:auto}
17
19
  ._1o9zidpf{flex-shrink:0}
18
- ._1qwg19bv div, ._mezj19bv img, ._e2oo19bv span, ._w8l519bv svg{width:10px}
19
- ._1qwg1crf div, ._mezj1crf img, ._e2oo1crf span, ._w8l51crf svg{width:9pt}
20
- ._1qwg1osq div, ._mezj1osq img, ._e2oo1osq span, ._w8l51osq svg{width:100%}
21
- ._1qwg1tcg div, ._mezj1tcg img, ._e2oo1tcg span, ._w8l51tcg svg{width:24px}
22
- ._1qwg7vkz div, ._mezj7vkz img, ._e2oo7vkz span, ._w8l57vkz svg{width:1pc}
23
- ._1qwgdlk8 div, ._mezjdlk8 img, ._e2oodlk8 span, ._w8l5dlk8 svg{width:14px}
24
- ._1qwggktf div, ._mezjgktf img, ._e2oogktf span, ._w8l5gktf svg{width:20px}
20
+ ._1qwg19bv div{width:10px}
21
+ ._1qwg1crf div{width:9pt}
22
+ ._1qwg1osq div{width:100%}
23
+ ._1qwg1tcg div{width:24px}
24
+ ._1qwg7vkz div{width:1pc}
25
+ ._1qwgdlk8 div{width:14px}
26
+ ._1qwggktf div{width:20px}
25
27
  ._1reo15vq{overflow-x:hidden}
26
28
  ._1tkeidpf{min-height:0}
27
29
  ._1ul9idpf{min-width:0}
@@ -31,6 +33,8 @@
31
33
  ._1wyb7vkz{font-size:1pc}
32
34
  ._1wybdlk8{font-size:14px}
33
35
  ._1wybgktf{font-size:20px}
36
+ ._1xjx1osq span{height:100%}
37
+ ._1xjx1wug span{height:auto}
34
38
  ._4cvr1h6o{align-items:center}
35
39
  ._4t3i1tcg{height:24px}
36
40
  ._4t3i1ylp{height:40px}
@@ -47,6 +51,7 @@
47
51
  ._bfhk1g3m{background-color:var(--ds-background-accent-orange-subtlest,#fff3eb)}
48
52
  ._bfhk1g6e{background-color:var(--ds-background-accent-orange-subtle,#fea362)}
49
53
  ._bfhk1gly{background-color:var(--ds-background-danger,#ffeceb)}
54
+ ._bfhk1j28{background-color:transparent}
50
55
  ._bfhk1j89{background-color:var(--ds-background-accent-blue-subtle,#579dff)}
51
56
  ._bfhk1jkz{background-color:var(--ds-background-accent-purple-subtler,#dfd8fd)}
52
57
  ._bfhk1lri{background-color:var(--ds-background-discovery-bold,#6e5dc6)}
@@ -96,5 +101,28 @@
96
101
  ._bfhkybec{background-color:var(--ds-background-danger-bold,#c9372c)}
97
102
  ._bfhkygwo{background-color:var(--ds-background-accent-purple-bolder,#6e5dc6)}
98
103
  ._bfhkz2ec{background-color:var(--ds-background-accent-lime-subtler,#d3f1a7)}
104
+ ._bna71osq img{height:100%}
105
+ ._bna71wug img{height:auto}
106
+ ._e2oo19bv span{width:10px}
107
+ ._e2oo1crf span{width:9pt}
108
+ ._e2oo1osq span{width:100%}
109
+ ._e2oo1tcg span{width:24px}
110
+ ._e2oo7vkz span{width:1pc}
111
+ ._e2oodlk8 span{width:14px}
112
+ ._e2oogktf span{width:20px}
99
113
  ._kqswh2mm{position:relative}
100
- ._vchhusvi{box-sizing:border-box}
114
+ ._mezj19bv img{width:10px}
115
+ ._mezj1crf img{width:9pt}
116
+ ._mezj1osq img{width:100%}
117
+ ._mezj1tcg img{width:24px}
118
+ ._mezj7vkz img{width:1pc}
119
+ ._mezjdlk8 img{width:14px}
120
+ ._mezjgktf img{width:20px}
121
+ ._vchhusvi{box-sizing:border-box}
122
+ ._w8l519bv svg{width:10px}
123
+ ._w8l51crf svg{width:9pt}
124
+ ._w8l51osq svg{width:100%}
125
+ ._w8l51tcg svg{width:24px}
126
+ ._w8l57vkz svg{width:1pc}
127
+ ._w8l5dlk8 svg{width:14px}
128
+ ._w8l5gktf svg{width:20px}
package/dist/cjs/tile.js CHANGED
@@ -1,4 +1,4 @@
1
- /* tile.tsx generated by @compiled/babel-plugin v0.36.1 */
1
+ /* tile.tsx generated by @compiled/babel-plugin v0.38.1 */
2
2
  "use strict";
3
3
 
4
4
  var _typeof = require("@babel/runtime/helpers/typeof");
@@ -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';
@@ -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
+ }
@@ -3,6 +3,8 @@
3
3
  ._189ee4h9{border-width:var(--ds-border-width,1px)}
4
4
  ._1dqonqa1{border-style:solid}
5
5
  ._1h6dmuej{border-color:var(--ds-border,#091e4224)}._16jlidpf{flex-grow:0}
6
+ ._17521osq svg{height:100%}
7
+ ._17521wug svg{height:auto}
6
8
  ._18m915vq{overflow-y:hidden}
7
9
  ._1bah1h6o{justify-content:center}
8
10
  ._1bsb1tcg{width:24px}
@@ -12,16 +14,16 @@
12
14
  ._1bsbgktf{width:20px}
13
15
  ._1bsbzwfg{width:2pc}
14
16
  ._1e0c116y{display:inline-flex}
15
- ._1iia1osq div, ._bna71osq img, ._1xjx1osq span, ._17521osq svg{height:100%}
16
- ._1iia1wug div, ._bna71wug img, ._1xjx1wug span, ._17521wug svg{height:auto}
17
+ ._1iia1osq div{height:100%}
18
+ ._1iia1wug div{height:auto}
17
19
  ._1o9zidpf{flex-shrink:0}
18
- ._1qwg19bv div, ._mezj19bv img, ._e2oo19bv span, ._w8l519bv svg{width:10px}
19
- ._1qwg1crf div, ._mezj1crf img, ._e2oo1crf span, ._w8l51crf svg{width:9pt}
20
- ._1qwg1osq div, ._mezj1osq img, ._e2oo1osq span, ._w8l51osq svg{width:100%}
21
- ._1qwg1tcg div, ._mezj1tcg img, ._e2oo1tcg span, ._w8l51tcg svg{width:24px}
22
- ._1qwg7vkz div, ._mezj7vkz img, ._e2oo7vkz span, ._w8l57vkz svg{width:1pc}
23
- ._1qwgdlk8 div, ._mezjdlk8 img, ._e2oodlk8 span, ._w8l5dlk8 svg{width:14px}
24
- ._1qwggktf div, ._mezjgktf img, ._e2oogktf span, ._w8l5gktf svg{width:20px}
20
+ ._1qwg19bv div{width:10px}
21
+ ._1qwg1crf div{width:9pt}
22
+ ._1qwg1osq div{width:100%}
23
+ ._1qwg1tcg div{width:24px}
24
+ ._1qwg7vkz div{width:1pc}
25
+ ._1qwgdlk8 div{width:14px}
26
+ ._1qwggktf div{width:20px}
25
27
  ._1reo15vq{overflow-x:hidden}
26
28
  ._1tkeidpf{min-height:0}
27
29
  ._1ul9idpf{min-width:0}
@@ -31,6 +33,8 @@
31
33
  ._1wyb7vkz{font-size:1pc}
32
34
  ._1wybdlk8{font-size:14px}
33
35
  ._1wybgktf{font-size:20px}
36
+ ._1xjx1osq span{height:100%}
37
+ ._1xjx1wug span{height:auto}
34
38
  ._4cvr1h6o{align-items:center}
35
39
  ._4t3i1tcg{height:24px}
36
40
  ._4t3i1ylp{height:40px}
@@ -47,6 +51,7 @@
47
51
  ._bfhk1g3m{background-color:var(--ds-background-accent-orange-subtlest,#fff3eb)}
48
52
  ._bfhk1g6e{background-color:var(--ds-background-accent-orange-subtle,#fea362)}
49
53
  ._bfhk1gly{background-color:var(--ds-background-danger,#ffeceb)}
54
+ ._bfhk1j28{background-color:transparent}
50
55
  ._bfhk1j89{background-color:var(--ds-background-accent-blue-subtle,#579dff)}
51
56
  ._bfhk1jkz{background-color:var(--ds-background-accent-purple-subtler,#dfd8fd)}
52
57
  ._bfhk1lri{background-color:var(--ds-background-discovery-bold,#6e5dc6)}
@@ -96,5 +101,28 @@
96
101
  ._bfhkybec{background-color:var(--ds-background-danger-bold,#c9372c)}
97
102
  ._bfhkygwo{background-color:var(--ds-background-accent-purple-bolder,#6e5dc6)}
98
103
  ._bfhkz2ec{background-color:var(--ds-background-accent-lime-subtler,#d3f1a7)}
104
+ ._bna71osq img{height:100%}
105
+ ._bna71wug img{height:auto}
106
+ ._e2oo19bv span{width:10px}
107
+ ._e2oo1crf span{width:9pt}
108
+ ._e2oo1osq span{width:100%}
109
+ ._e2oo1tcg span{width:24px}
110
+ ._e2oo7vkz span{width:1pc}
111
+ ._e2oodlk8 span{width:14px}
112
+ ._e2oogktf span{width:20px}
99
113
  ._kqswh2mm{position:relative}
100
- ._vchhusvi{box-sizing:border-box}
114
+ ._mezj19bv img{width:10px}
115
+ ._mezj1crf img{width:9pt}
116
+ ._mezj1osq img{width:100%}
117
+ ._mezj1tcg img{width:24px}
118
+ ._mezj7vkz img{width:1pc}
119
+ ._mezjdlk8 img{width:14px}
120
+ ._mezjgktf img{width:20px}
121
+ ._vchhusvi{box-sizing:border-box}
122
+ ._w8l519bv svg{width:10px}
123
+ ._w8l51crf svg{width:9pt}
124
+ ._w8l51osq svg{width:100%}
125
+ ._w8l51tcg svg{width:24px}
126
+ ._w8l57vkz svg{width:1pc}
127
+ ._w8l5dlk8 svg{width:14px}
128
+ ._w8l5gktf svg{width:20px}
@@ -1,4 +1,4 @@
1
- /* tile.tsx generated by @compiled/babel-plugin v0.36.1 */
1
+ /* tile.tsx generated by @compiled/babel-plugin v0.38.1 */
2
2
  import "./tile.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -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
+ }
@@ -3,6 +3,8 @@
3
3
  ._189ee4h9{border-width:var(--ds-border-width,1px)}
4
4
  ._1dqonqa1{border-style:solid}
5
5
  ._1h6dmuej{border-color:var(--ds-border,#091e4224)}._16jlidpf{flex-grow:0}
6
+ ._17521osq svg{height:100%}
7
+ ._17521wug svg{height:auto}
6
8
  ._18m915vq{overflow-y:hidden}
7
9
  ._1bah1h6o{justify-content:center}
8
10
  ._1bsb1tcg{width:24px}
@@ -12,16 +14,16 @@
12
14
  ._1bsbgktf{width:20px}
13
15
  ._1bsbzwfg{width:2pc}
14
16
  ._1e0c116y{display:inline-flex}
15
- ._1iia1osq div, ._bna71osq img, ._1xjx1osq span, ._17521osq svg{height:100%}
16
- ._1iia1wug div, ._bna71wug img, ._1xjx1wug span, ._17521wug svg{height:auto}
17
+ ._1iia1osq div{height:100%}
18
+ ._1iia1wug div{height:auto}
17
19
  ._1o9zidpf{flex-shrink:0}
18
- ._1qwg19bv div, ._mezj19bv img, ._e2oo19bv span, ._w8l519bv svg{width:10px}
19
- ._1qwg1crf div, ._mezj1crf img, ._e2oo1crf span, ._w8l51crf svg{width:9pt}
20
- ._1qwg1osq div, ._mezj1osq img, ._e2oo1osq span, ._w8l51osq svg{width:100%}
21
- ._1qwg1tcg div, ._mezj1tcg img, ._e2oo1tcg span, ._w8l51tcg svg{width:24px}
22
- ._1qwg7vkz div, ._mezj7vkz img, ._e2oo7vkz span, ._w8l57vkz svg{width:1pc}
23
- ._1qwgdlk8 div, ._mezjdlk8 img, ._e2oodlk8 span, ._w8l5dlk8 svg{width:14px}
24
- ._1qwggktf div, ._mezjgktf img, ._e2oogktf span, ._w8l5gktf svg{width:20px}
20
+ ._1qwg19bv div{width:10px}
21
+ ._1qwg1crf div{width:9pt}
22
+ ._1qwg1osq div{width:100%}
23
+ ._1qwg1tcg div{width:24px}
24
+ ._1qwg7vkz div{width:1pc}
25
+ ._1qwgdlk8 div{width:14px}
26
+ ._1qwggktf div{width:20px}
25
27
  ._1reo15vq{overflow-x:hidden}
26
28
  ._1tkeidpf{min-height:0}
27
29
  ._1ul9idpf{min-width:0}
@@ -31,6 +33,8 @@
31
33
  ._1wyb7vkz{font-size:1pc}
32
34
  ._1wybdlk8{font-size:14px}
33
35
  ._1wybgktf{font-size:20px}
36
+ ._1xjx1osq span{height:100%}
37
+ ._1xjx1wug span{height:auto}
34
38
  ._4cvr1h6o{align-items:center}
35
39
  ._4t3i1tcg{height:24px}
36
40
  ._4t3i1ylp{height:40px}
@@ -47,6 +51,7 @@
47
51
  ._bfhk1g3m{background-color:var(--ds-background-accent-orange-subtlest,#fff3eb)}
48
52
  ._bfhk1g6e{background-color:var(--ds-background-accent-orange-subtle,#fea362)}
49
53
  ._bfhk1gly{background-color:var(--ds-background-danger,#ffeceb)}
54
+ ._bfhk1j28{background-color:transparent}
50
55
  ._bfhk1j89{background-color:var(--ds-background-accent-blue-subtle,#579dff)}
51
56
  ._bfhk1jkz{background-color:var(--ds-background-accent-purple-subtler,#dfd8fd)}
52
57
  ._bfhk1lri{background-color:var(--ds-background-discovery-bold,#6e5dc6)}
@@ -96,5 +101,28 @@
96
101
  ._bfhkybec{background-color:var(--ds-background-danger-bold,#c9372c)}
97
102
  ._bfhkygwo{background-color:var(--ds-background-accent-purple-bolder,#6e5dc6)}
98
103
  ._bfhkz2ec{background-color:var(--ds-background-accent-lime-subtler,#d3f1a7)}
104
+ ._bna71osq img{height:100%}
105
+ ._bna71wug img{height:auto}
106
+ ._e2oo19bv span{width:10px}
107
+ ._e2oo1crf span{width:9pt}
108
+ ._e2oo1osq span{width:100%}
109
+ ._e2oo1tcg span{width:24px}
110
+ ._e2oo7vkz span{width:1pc}
111
+ ._e2oodlk8 span{width:14px}
112
+ ._e2oogktf span{width:20px}
99
113
  ._kqswh2mm{position:relative}
100
- ._vchhusvi{box-sizing:border-box}
114
+ ._mezj19bv img{width:10px}
115
+ ._mezj1crf img{width:9pt}
116
+ ._mezj1osq img{width:100%}
117
+ ._mezj1tcg img{width:24px}
118
+ ._mezj7vkz img{width:1pc}
119
+ ._mezjdlk8 img{width:14px}
120
+ ._mezjgktf img{width:20px}
121
+ ._vchhusvi{box-sizing:border-box}
122
+ ._w8l519bv svg{width:10px}
123
+ ._w8l51crf svg{width:9pt}
124
+ ._w8l51osq svg{width:100%}
125
+ ._w8l51tcg svg{width:24px}
126
+ ._w8l57vkz svg{width:1pc}
127
+ ._w8l5dlk8 svg{width:14px}
128
+ ._w8l5gktf svg{width:20px}
package/dist/esm/tile.js CHANGED
@@ -1,4 +1,4 @@
1
- /* tile.tsx generated by @compiled/babel-plugin v0.36.1 */
1
+ /* tile.tsx generated by @compiled/babel-plugin v0.38.1 */
2
2
  import "./tile.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -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])
@@ -0,0 +1,2 @@
1
+ export { default } from '../skeleton';
2
+ export { type SkeletonProps } from '../types';
@@ -1,2 +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';
@@ -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
+ };
@@ -0,0 +1,2 @@
1
+ export { default } from '../skeleton';
2
+ export { type SkeletonProps } from '../types';
@@ -1,2 +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';
@@ -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
@@ -27,13 +27,9 @@
27
27
  "*.compiled.css"
28
28
  ],
29
29
  "atlaskit:src": "src/index.tsx",
30
- "af:exports": {
31
- ".": "./src/index.tsx"
32
- },
33
30
  "dependencies": {
34
- "@atlaskit/css": "^0.14.0",
35
- "@atlaskit/primitives": "^14.14.0",
36
- "@atlaskit/tokens": "^6.3.0",
31
+ "@atlaskit/skeleton": "^2.1.0",
32
+ "@atlaskit/tokens": "^6.4.0",
37
33
  "@babel/runtime": "^7.0.0",
38
34
  "@compiled/react": "^0.18.3"
39
35
  },
@@ -44,7 +40,7 @@
44
40
  "@af/accessibility-testing": "workspace:^",
45
41
  "@af/integration-testing": "workspace:^",
46
42
  "@af/visual-regression": "workspace:^",
47
- "@atlaskit/ds-lib": "^5.0.0",
43
+ "@atlaskit/ds-lib": "^5.1.0",
48
44
  "@atlaskit/ssr": "workspace:^",
49
45
  "@testing-library/react": "^13.4.0",
50
46
  "react-dom": "^18.2.0"
@@ -87,7 +83,7 @@
87
83
  }
88
84
  },
89
85
  "name": "@atlaskit/tile",
90
- "version": "0.1.3",
86
+ "version": "0.2.0",
91
87
  "description": "A tile is a rounded square that takes an asset (Image, Icon, Logo) and represents a noun.",
92
88
  "author": "Atlassian Pty Ltd",
93
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
+ }