@atlaskit/skeleton 2.1.1 → 2.1.3

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/skeleton
2
2
 
3
+ ## 2.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 2.1.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`f0662cd7a143e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f0662cd7a143e) -
14
+ Internal changes to how borders are applied.
15
+ - Updated dependencies
16
+
3
17
  ## 2.1.1
4
18
 
5
19
  ### Patch Changes
@@ -4,4 +4,4 @@
4
4
  ._bfhkn82g{background-color:var(--ds-skeleton,#091e420f)}
5
5
  ._j7hq586c{animation-name:kskr1ph}
6
6
  ._tip812c5{animation-iteration-count:infinite}
7
- @keyframes kskr1ph{0%{background-color:var(--_wenvhl)}to{background-color:var(--_1soe2er)}}
7
+ @keyframes kskr1ph{0%{background-color:var(--ds-skeleton-from-color,var(--ds-skeleton,#091e420f))}to{background-color:var(--ds-skeleton-to-color,var(--ds-skeleton-subtle,#091e4208))}}
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.36.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -13,8 +13,6 @@ var _runtime = require("@compiled/react/runtime");
13
13
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
14
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
15
  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); }
16
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
17
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18
16
  var shimmerKeyframes = null;
19
17
  var skeletonStyles = null;
20
18
  var activeShimmerStyles = null;
@@ -31,7 +29,7 @@ var Skeleton = function Skeleton(_ref) {
31
29
  var width = _ref.width,
32
30
  height = _ref.height,
33
31
  _ref$borderRadius = _ref.borderRadius,
34
- borderRadius = _ref$borderRadius === void 0 ? '4px' : _ref$borderRadius,
32
+ borderRadius = _ref$borderRadius === void 0 ? "var(--ds-radius-small, 4px)" : _ref$borderRadius,
35
33
  color = _ref.color,
36
34
  ShimmeringEndColor = _ref.ShimmeringEndColor,
37
35
  _ref$isShimmering = _ref.isShimmering,
@@ -40,10 +38,8 @@ var Skeleton = function Skeleton(_ref) {
40
38
  testId = _ref.testId;
41
39
  var groupDataAttribute = groupName && "data-".concat(groupName);
42
40
  return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
43
- "data-testid": testId
44
- }, groupDataAttribute && (0, _defineProperty2.default)({}, groupDataAttribute, 'true'), {
45
- className: (0, _runtime.ax)(["_7hjf1yy8 _5sag12o8 _tip812c5 _1pglp3kn _bfhkn82g", isShimmering && "", isShimmering && "_j7hq586c"]),
46
- style: _objectSpread(_objectSpread({}, {
41
+ "data-testid": testId,
42
+ style: {
47
43
  width: width,
48
44
  height: height,
49
45
  borderRadius: borderRadius,
@@ -51,10 +47,9 @@ var Skeleton = function Skeleton(_ref) {
51
47
  // Override the keyframes if both colors are provided, otherwise use the CSS variable fallbacks in our keyframes
52
48
  '--ds-skeleton-from-color': color && ShimmeringEndColor ? color : undefined,
53
49
  '--ds-skeleton-to-color': color && ShimmeringEndColor ? ShimmeringEndColor : undefined
54
- }), {}, {
55
- "--_wenvhl": (0, _runtime.ix)("var(--ds-skeleton-from-color, ".concat("var(--ds-skeleton, #091E420F)", ")")),
56
- "--_1soe2er": (0, _runtime.ix)("var(--ds-skeleton-to-color, ".concat("var(--ds-skeleton-subtle, #091E4208)", ")"))
57
- })
50
+ }
51
+ }, groupDataAttribute && (0, _defineProperty2.default)({}, groupDataAttribute, 'true'), {
52
+ className: (0, _runtime.ax)(["_7hjf1yy8 _5sag12o8 _tip812c5 _1pglp3kn _bfhkn82g", isShimmering && "", isShimmering && "_j7hq586c"])
58
53
  }));
59
54
  };
60
55
  var _default = exports.default = Skeleton;
@@ -1,4 +1,4 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.36.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./index.compiled.css";
4
4
  import * as React from 'react';
@@ -18,7 +18,7 @@ const activeShimmerStyles = null;
18
18
  const Skeleton = ({
19
19
  width,
20
20
  height,
21
- borderRadius = '4px',
21
+ borderRadius = "var(--ds-radius-small, 4px)",
22
22
  color,
23
23
  ShimmeringEndColor,
24
24
  isShimmering = false,
@@ -4,4 +4,4 @@
4
4
  ._bfhkn82g{background-color:var(--ds-skeleton,#091e420f)}
5
5
  ._j7hq586c{animation-name:kskr1ph}
6
6
  ._tip812c5{animation-iteration-count:infinite}
7
- @keyframes kskr1ph{0%{background-color:var(--_wenvhl)}to{background-color:var(--_1soe2er)}}
7
+ @keyframes kskr1ph{0%{background-color:var(--ds-skeleton-from-color,var(--ds-skeleton,#091e420f))}to{background-color:var(--ds-skeleton-to-color,var(--ds-skeleton-subtle,#091e4208))}}
@@ -1,11 +1,9 @@
1
- /* index.tsx generated by @compiled/babel-plugin v0.36.1 */
1
+ /* index.tsx generated by @compiled/babel-plugin v0.38.1 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import "./index.compiled.css";
5
5
  import * as React from 'react';
6
6
  import { ax, ix } from "@compiled/react/runtime";
7
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
8
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
9
7
  var shimmerKeyframes = null;
10
8
  var skeletonStyles = null;
11
9
  var activeShimmerStyles = null;
@@ -22,7 +20,7 @@ var Skeleton = function Skeleton(_ref) {
22
20
  var width = _ref.width,
23
21
  height = _ref.height,
24
22
  _ref$borderRadius = _ref.borderRadius,
25
- borderRadius = _ref$borderRadius === void 0 ? '4px' : _ref$borderRadius,
23
+ borderRadius = _ref$borderRadius === void 0 ? "var(--ds-radius-small, 4px)" : _ref$borderRadius,
26
24
  color = _ref.color,
27
25
  ShimmeringEndColor = _ref.ShimmeringEndColor,
28
26
  _ref$isShimmering = _ref.isShimmering,
@@ -31,10 +29,8 @@ var Skeleton = function Skeleton(_ref) {
31
29
  testId = _ref.testId;
32
30
  var groupDataAttribute = groupName && "data-".concat(groupName);
33
31
  return /*#__PURE__*/React.createElement("div", _extends({
34
- "data-testid": testId
35
- }, groupDataAttribute && _defineProperty({}, groupDataAttribute, 'true'), {
36
- className: ax(["_7hjf1yy8 _5sag12o8 _tip812c5 _1pglp3kn _bfhkn82g", isShimmering && "", isShimmering && "_j7hq586c"]),
37
- style: _objectSpread(_objectSpread({}, {
32
+ "data-testid": testId,
33
+ style: {
38
34
  width: width,
39
35
  height: height,
40
36
  borderRadius: borderRadius,
@@ -42,10 +38,9 @@ var Skeleton = function Skeleton(_ref) {
42
38
  // Override the keyframes if both colors are provided, otherwise use the CSS variable fallbacks in our keyframes
43
39
  '--ds-skeleton-from-color': color && ShimmeringEndColor ? color : undefined,
44
40
  '--ds-skeleton-to-color': color && ShimmeringEndColor ? ShimmeringEndColor : undefined
45
- }), {}, {
46
- "--_wenvhl": ix("var(--ds-skeleton-from-color, ".concat("var(--ds-skeleton, #091E420F)", ")")),
47
- "--_1soe2er": ix("var(--ds-skeleton-to-color, ".concat("var(--ds-skeleton-subtle, #091E4208)", ")"))
48
- })
41
+ }
42
+ }, groupDataAttribute && _defineProperty({}, groupDataAttribute, 'true'), {
43
+ className: ax(["_7hjf1yy8 _5sag12o8 _tip812c5 _1pglp3kn _bfhkn82g", isShimmering && "", isShimmering && "_j7hq586c"])
49
44
  }));
50
45
  };
51
46
  export default Skeleton;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type SkeletonProps = {
3
2
  width: string | number;
4
3
  height: string | number;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type SkeletonProps = {
3
2
  width: string | number;
4
3
  height: string | number;
package/offerings.json ADDED
@@ -0,0 +1,36 @@
1
+ [
2
+ {
3
+ "name": "Skeleton",
4
+ "package": "@atlaskit/skeleton",
5
+ "import": {
6
+ "name": "Skeleton",
7
+ "package": "@atlaskit/skeleton",
8
+ "type": "default"
9
+ },
10
+ "keywords": ["skeleton", "placeholder", "loading", "content", "shimmer", "animation"],
11
+ "categories": ["loading"],
12
+ "shortDescription": "A skeleton acts as a placeholder for content, usually while the content loads.",
13
+ "status": "early-access",
14
+ "accessibilityGuidelines": [
15
+ "Provide appropriate loading announcements",
16
+ "Use skeleton patterns that match actual content structure",
17
+ "Ensure skeleton content is not announced as actual content",
18
+ "Consider screen reader experience during loading states"
19
+ ],
20
+ "usageGuidelines": [
21
+ "Use to indicate content is loading",
22
+ "Match skeleton structure to actual content layout",
23
+ "Use appropriate animation and timing",
24
+ "Replace with actual content when ready",
25
+ "Consider different skeleton patterns for different content types"
26
+ ],
27
+ "contentGuidelines": [
28
+ "Use skeleton patterns that represent actual content structure",
29
+ "Maintain consistent skeleton styling",
30
+ "Consider content hierarchy in skeleton design",
31
+ "Use appropriate animation timing"
32
+ ],
33
+ "generativeInstructions": "./docs/ai/skeleton-instructions.md",
34
+ "examples": ["./examples/ai/skeleton.tsx"]
35
+ }
36
+ ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/skeleton",
3
- "version": "2.1.1",
3
+ "version": "2.1.3",
4
4
  "description": "A skeleton acts as a placeholder for content, usually while the content loads.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -27,9 +27,9 @@
27
27
  }
28
28
  },
29
29
  "dependencies": {
30
- "@atlaskit/tokens": "^6.0.0",
30
+ "@atlaskit/tokens": "^7.0.0",
31
31
  "@babel/runtime": "^7.0.0",
32
- "@compiled/react": "^0.18.3"
32
+ "@compiled/react": "^0.18.6"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "react": "^18.2.0"
@@ -38,13 +38,12 @@
38
38
  "@af/accessibility-testing": "workspace:^",
39
39
  "@af/integration-testing": "workspace:^",
40
40
  "@af/visual-regression": "workspace:^",
41
- "@atlaskit/docs": "^11.0.0",
41
+ "@atlaskit/docs": "^11.2.0",
42
42
  "@atlaskit/link": "^3.2.0",
43
- "@atlaskit/primitives": "^14.11.0",
44
- "@atlaskit/section-message": "^8.5.0",
43
+ "@atlaskit/primitives": "^15.0.0",
44
+ "@atlaskit/section-message": "^8.7.0",
45
45
  "@testing-library/react": "^13.4.0",
46
- "react-dom": "^18.2.0",
47
- "typescript": "~5.4.2"
46
+ "react-dom": "^18.2.0"
48
47
  },
49
48
  "techstack": {
50
49
  "@atlassian/frontend": {
@@ -89,8 +88,5 @@
89
88
  "dist/types-ts4.5/index.d.ts"
90
89
  ]
91
90
  }
92
- },
93
- "af:exports": {
94
- ".": "./src/index.tsx"
95
91
  }
96
92
  }