@atlaskit/rating 3.0.13 → 3.1.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,20 @@
|
|
|
1
1
|
# @atlaskit/rating
|
|
2
2
|
|
|
3
|
+
## 3.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`87b12e64ff750`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/87b12e64ff750) -
|
|
8
|
+
Removed usages of LEGACY icon props
|
|
9
|
+
|
|
10
|
+
## 3.0.14
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`6a82d7964a37b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6a82d7964a37b) -
|
|
15
|
+
Icon entrypoint migration
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 3.0.13
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -9,16 +9,14 @@ exports.default = void 0;
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var
|
|
13
|
-
var
|
|
12
|
+
var _starStarred = _interopRequireDefault(require("@atlaskit/icon/core/star-starred"));
|
|
13
|
+
var _starUnstarred = _interopRequireDefault(require("@atlaskit/icon/core/star-unstarred"));
|
|
14
14
|
var _colors = require("@atlaskit/theme/colors");
|
|
15
15
|
var _rating = _interopRequireDefault(require("./rating"));
|
|
16
|
-
var _excluded = ["
|
|
16
|
+
var _excluded = ["color", "spacing"];
|
|
17
17
|
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); }
|
|
18
18
|
var Star = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
19
|
-
var _ref$
|
|
20
|
-
size = _ref$size === void 0 ? 'large' : _ref$size,
|
|
21
|
-
_ref$color = _ref.color,
|
|
19
|
+
var _ref$color = _ref.color,
|
|
22
20
|
color = _ref$color === void 0 ? "var(--ds-icon-accent-yellow, ".concat(_colors.Y200, ")") : _ref$color,
|
|
23
21
|
_ref$spacing = _ref.spacing,
|
|
24
22
|
spacing = _ref$spacing === void 0 ? 'spacious' : _ref$spacing,
|
|
@@ -27,23 +25,19 @@ var Star = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
27
25
|
return props.isChecked ?
|
|
28
26
|
/*#__PURE__*/
|
|
29
27
|
// Labels are set inside Rating - blank them out here to not double up.
|
|
30
|
-
_react.default.createElement(
|
|
31
|
-
LEGACY_size: size,
|
|
32
|
-
LEGACY_primaryColor: color,
|
|
28
|
+
_react.default.createElement(_starStarred.default, {
|
|
33
29
|
color: color,
|
|
34
30
|
spacing: spacing,
|
|
35
31
|
label: ""
|
|
36
32
|
}) :
|
|
37
33
|
/*#__PURE__*/
|
|
38
34
|
// Labels are set inside Rating - blank them out here to not double up.
|
|
39
|
-
_react.default.createElement(
|
|
40
|
-
LEGACY_size: size,
|
|
41
|
-
LEGACY_primaryColor: color,
|
|
35
|
+
_react.default.createElement(_starUnstarred.default, {
|
|
42
36
|
color: color,
|
|
43
37
|
spacing: spacing,
|
|
44
38
|
label: ""
|
|
45
39
|
});
|
|
46
|
-
}, [color,
|
|
40
|
+
}, [color, spacing]);
|
|
47
41
|
return /*#__PURE__*/_react.default.createElement(_rating.default, (0, _extends2.default)({}, props, {
|
|
48
42
|
ref: ref,
|
|
49
43
|
render: render
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { forwardRef, useCallback } from 'react';
|
|
3
|
-
import StarStarredIcon from '@atlaskit/icon/core/
|
|
4
|
-
import StarUnstarredIcon from '@atlaskit/icon/core/
|
|
3
|
+
import StarStarredIcon from '@atlaskit/icon/core/star-starred';
|
|
4
|
+
import StarUnstarredIcon from '@atlaskit/icon/core/star-unstarred';
|
|
5
5
|
import { Y200 } from '@atlaskit/theme/colors';
|
|
6
6
|
import Rating from './rating';
|
|
7
7
|
const Star = /*#__PURE__*/forwardRef(({
|
|
8
|
-
size = 'large',
|
|
9
8
|
color = `var(--ds-icon-accent-yellow, ${Y200})`,
|
|
10
9
|
spacing = 'spacious',
|
|
11
10
|
...props
|
|
@@ -15,8 +14,6 @@ const Star = /*#__PURE__*/forwardRef(({
|
|
|
15
14
|
/*#__PURE__*/
|
|
16
15
|
// Labels are set inside Rating - blank them out here to not double up.
|
|
17
16
|
React.createElement(StarStarredIcon, {
|
|
18
|
-
LEGACY_size: size,
|
|
19
|
-
LEGACY_primaryColor: color,
|
|
20
17
|
color: color,
|
|
21
18
|
spacing: spacing,
|
|
22
19
|
label: ""
|
|
@@ -24,13 +21,11 @@ const Star = /*#__PURE__*/forwardRef(({
|
|
|
24
21
|
/*#__PURE__*/
|
|
25
22
|
// Labels are set inside Rating - blank them out here to not double up.
|
|
26
23
|
React.createElement(StarUnstarredIcon, {
|
|
27
|
-
LEGACY_size: size,
|
|
28
|
-
LEGACY_primaryColor: color,
|
|
29
24
|
color: color,
|
|
30
25
|
spacing: spacing,
|
|
31
26
|
label: ""
|
|
32
27
|
});
|
|
33
|
-
}, [color,
|
|
28
|
+
}, [color, spacing]);
|
|
34
29
|
return /*#__PURE__*/React.createElement(Rating, _extends({}, props, {
|
|
35
30
|
ref: ref,
|
|
36
31
|
render: render
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["
|
|
3
|
+
var _excluded = ["color", "spacing"];
|
|
4
4
|
import React, { forwardRef, useCallback } from 'react';
|
|
5
|
-
import StarStarredIcon from '@atlaskit/icon/core/
|
|
6
|
-
import StarUnstarredIcon from '@atlaskit/icon/core/
|
|
5
|
+
import StarStarredIcon from '@atlaskit/icon/core/star-starred';
|
|
6
|
+
import StarUnstarredIcon from '@atlaskit/icon/core/star-unstarred';
|
|
7
7
|
import { Y200 } from '@atlaskit/theme/colors';
|
|
8
8
|
import Rating from './rating';
|
|
9
9
|
var Star = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
10
|
-
var _ref$
|
|
11
|
-
size = _ref$size === void 0 ? 'large' : _ref$size,
|
|
12
|
-
_ref$color = _ref.color,
|
|
10
|
+
var _ref$color = _ref.color,
|
|
13
11
|
color = _ref$color === void 0 ? "var(--ds-icon-accent-yellow, ".concat(Y200, ")") : _ref$color,
|
|
14
12
|
_ref$spacing = _ref.spacing,
|
|
15
13
|
spacing = _ref$spacing === void 0 ? 'spacious' : _ref$spacing,
|
|
@@ -19,8 +17,6 @@ var Star = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
19
17
|
/*#__PURE__*/
|
|
20
18
|
// Labels are set inside Rating - blank them out here to not double up.
|
|
21
19
|
React.createElement(StarStarredIcon, {
|
|
22
|
-
LEGACY_size: size,
|
|
23
|
-
LEGACY_primaryColor: color,
|
|
24
20
|
color: color,
|
|
25
21
|
spacing: spacing,
|
|
26
22
|
label: ""
|
|
@@ -28,13 +24,11 @@ var Star = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
28
24
|
/*#__PURE__*/
|
|
29
25
|
// Labels are set inside Rating - blank them out here to not double up.
|
|
30
26
|
React.createElement(StarUnstarredIcon, {
|
|
31
|
-
LEGACY_size: size,
|
|
32
|
-
LEGACY_primaryColor: color,
|
|
33
27
|
color: color,
|
|
34
28
|
spacing: spacing,
|
|
35
29
|
label: ""
|
|
36
30
|
});
|
|
37
|
-
}, [color,
|
|
31
|
+
}, [color, spacing]);
|
|
38
32
|
return /*#__PURE__*/React.createElement(Rating, _extends({}, props, {
|
|
39
33
|
ref: ref,
|
|
40
34
|
render: render
|
|
@@ -8,12 +8,6 @@ export interface StarProps extends RatingProps {
|
|
|
8
8
|
* Defaults to `colors.Y200`.
|
|
9
9
|
*/
|
|
10
10
|
color?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Size of the star icon.
|
|
13
|
-
|
|
14
|
-
* Defaults to `"large"`.
|
|
15
|
-
*/
|
|
16
|
-
size?: 'small' | 'medium' | 'large' | 'xlarge';
|
|
17
11
|
/**
|
|
18
12
|
* Spacing between the star and the text.
|
|
19
13
|
*
|
|
@@ -8,12 +8,6 @@ export interface StarProps extends RatingProps {
|
|
|
8
8
|
* Defaults to `colors.Y200`.
|
|
9
9
|
*/
|
|
10
10
|
color?: string;
|
|
11
|
-
/**
|
|
12
|
-
* Size of the star icon.
|
|
13
|
-
|
|
14
|
-
* Defaults to `"large"`.
|
|
15
|
-
*/
|
|
16
|
-
size?: 'small' | 'medium' | 'large' | 'xlarge';
|
|
17
11
|
/**
|
|
18
12
|
* Spacing between the star and the text.
|
|
19
13
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/rating",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "An accessible rating component that can be heavily customized.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/icon": "^29.
|
|
34
|
+
"@atlaskit/icon": "^29.4.0",
|
|
35
35
|
"@atlaskit/motion": "^5.3.0",
|
|
36
36
|
"@atlaskit/theme": "^21.0.0",
|
|
37
|
-
"@atlaskit/tokens": "^
|
|
38
|
-
"@atlaskit/tooltip": "^20.
|
|
37
|
+
"@atlaskit/tokens": "^9.1.0",
|
|
38
|
+
"@atlaskit/tooltip": "^20.12.0",
|
|
39
39
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
40
40
|
"@babel/runtime": "^7.0.0",
|
|
41
41
|
"@compiled/react": "^0.18.6"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"react-dom": "^18.2.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@testing-library/react": "^
|
|
48
|
+
"@testing-library/react": "^16.3.0"
|
|
49
49
|
},
|
|
50
50
|
"techstack": {
|
|
51
51
|
"@atlassian/frontend": {
|