@atlaskit/rating 0.1.6 → 0.1.10

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,29 @@
1
1
  # @atlaskit/rating
2
2
 
3
+ ## 0.1.10
4
+
5
+ ### Patch Changes
6
+
7
+ - [`e1901ffa79d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e1901ffa79d) - Internal changes to disable linting rules.
8
+
9
+ ## 0.1.9
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 0.1.8
16
+
17
+ ### Patch Changes
18
+
19
+ - [`378d1cef00f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/378d1cef00f) - Bump `@atlaskit/theme` to version `^11.3.0`.
20
+
21
+ ## 0.1.7
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies
26
+
3
27
  ## 0.1.6
4
28
 
5
29
  ### Patch Changes
@@ -17,15 +17,7 @@ var _core = require("@emotion/core");
17
17
 
18
18
  var _constants = require("@atlaskit/theme/constants");
19
19
 
20
- function _templateObject() {
21
- var data = (0, _taggedTemplateLiteral2.default)(["\n display: inline-flex;\n /* Because some children are inline-block we make the font-size zero to eliminate the implicit space between them. */\n font-size: 0;\n\n /* This implementation does some interesting tricks to keep it flowing LTR and ensuring accessibility. */\n /* Instead of it starting in an empty state - it starts filled - and then uses the CSS sibling select \"~\" */\n /* to then display the empty state for the star rating. */\n\n [data-rating-icon-checked] {\n display: inline-block;\n }\n\n [data-rating-icon] {\n display: none;\n }\n\n label:hover\n ~ label\n [data-rating-icon-checked][data-rating-icon-checked],\n input:checked ~ label [data-rating-icon-checked] {\n display: none;\n }\n\n label:hover ~ label [data-rating-icon][data-rating-icon],\n input:checked ~ label [data-rating-icon] {\n display: inline-block;\n }\n\n /* When hovering reset all elements back to filled state. */\n &:hover [data-rating-icon-checked][data-rating-icon-checked] {\n display: inline-block;\n }\n\n &:hover [data-rating-icon][data-rating-icon] {\n display: none;\n }\n "]);
22
-
23
- _templateObject = function _templateObject() {
24
- return data;
25
- };
26
-
27
- return data;
28
- }
20
+ var _templateObject;
29
21
 
30
22
  function RatingGroup(_ref) {
31
23
  var _ref$groupName = _ref.groupName,
@@ -64,7 +56,7 @@ function RatingGroup(_ref) {
64
56
 
65
57
  return (0, _core.jsx)("div", {
66
58
  "data-testid": testId && "".concat(testId, "--root"),
67
- css: (0, _core.css)(_templateObject())
59
+ css: (0, _core.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: inline-flex;\n /* Because some children are inline-block we make the font-size zero to eliminate the implicit space between them. */\n font-size: 0;\n\n /* This implementation does some interesting tricks to keep it flowing LTR and ensuring accessibility. */\n /* Instead of it starting in an empty state - it starts filled - and then uses the CSS sibling select \"~\" */\n /* to then display the empty state for the star rating. */\n\n [data-rating-icon-checked] {\n display: inline-block;\n }\n\n [data-rating-icon] {\n display: none;\n }\n\n label:hover\n ~ label\n [data-rating-icon-checked][data-rating-icon-checked],\n input:checked ~ label [data-rating-icon-checked] {\n display: none;\n }\n\n label:hover ~ label [data-rating-icon][data-rating-icon],\n input:checked ~ label [data-rating-icon] {\n display: inline-block;\n }\n\n /* When hovering reset all elements back to filled state. */\n &:hover [data-rating-icon-checked][data-rating-icon-checked] {\n display: inline-block;\n }\n\n &:hover [data-rating-icon][data-rating-icon] {\n display: none;\n }\n "])))
68
60
  }, !firstSelectionMade && (0, _core.jsx)(_react.Fragment, null, (0, _core.jsx)("label", {
69
61
  css: _constants.visuallyHidden,
70
62
  htmlFor: "".concat(groupName, "--empty")
@@ -21,7 +21,7 @@ var _constants = require("@atlaskit/theme/constants");
21
21
 
22
22
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
23
23
 
24
- /** @jsx jsx */
24
+ var _excluded = ["isChecked", "name", "testId", "label", "id", "value", "onChange", "render"];
25
25
  var Rating = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
26
26
  var isChecked = _ref.isChecked,
27
27
  name = _ref.name,
@@ -31,7 +31,7 @@ var Rating = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
31
31
  value = _ref.value,
32
32
  onChange = _ref.onChange,
33
33
  render = _ref.render,
34
- props = (0, _objectWithoutProperties2.default)(_ref, ["isChecked", "name", "testId", "label", "id", "value", "onChange", "render"]);
34
+ props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
35
35
  var onChangeHandler = (0, _react.useCallback)(function (e) {
36
36
  onChange && onChange(e.target.checked ? value : undefined);
37
37
  }, [onChange, value]);
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
4
-
5
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
6
4
 
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+
7
7
  Object.defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
@@ -23,12 +23,18 @@ var _colors = require("@atlaskit/theme/colors");
23
23
 
24
24
  var _rating = _interopRequireDefault(require("./rating"));
25
25
 
26
+ var _excluded = ["size", "color"];
27
+
28
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
29
+
30
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
31
+
26
32
  var Star = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
27
33
  var _ref$size = _ref.size,
28
34
  size = _ref$size === void 0 ? 'large' : _ref$size,
29
35
  _ref$color = _ref.color,
30
36
  color = _ref$color === void 0 ? _colors.Y200 : _ref$color,
31
- props = (0, _objectWithoutProperties2.default)(_ref, ["size", "color"]);
37
+ props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
32
38
  var render = (0, _react.useCallback)(function (props) {
33
39
  return props.isChecked ?
34
40
  /*#__PURE__*/
package/dist/cjs/index.js CHANGED
@@ -5,22 +5,22 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- Object.defineProperty(exports, "RatingGroup", {
8
+ Object.defineProperty(exports, "Rating", {
9
9
  enumerable: true,
10
10
  get: function get() {
11
- return _ratingGroup.default;
11
+ return _rating.default;
12
12
  }
13
13
  });
14
- Object.defineProperty(exports, "Star", {
14
+ Object.defineProperty(exports, "RatingGroup", {
15
15
  enumerable: true,
16
16
  get: function get() {
17
- return _star.default;
17
+ return _ratingGroup.default;
18
18
  }
19
19
  });
20
- Object.defineProperty(exports, "Rating", {
20
+ Object.defineProperty(exports, "Star", {
21
21
  enumerable: true,
22
22
  get: function get() {
23
- return _rating.default;
23
+ return _star.default;
24
24
  }
25
25
  });
26
26
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/rating",
3
- "version": "0.1.6",
3
+ "version": "0.1.10",
4
4
  "sideEffects": false
5
5
  }
@@ -1,6 +1,10 @@
1
+ /* eslint-disable @atlaskit/design-system/use-visually-hidden */
2
+
1
3
  /** @jsx jsx */
2
4
  import { Children, cloneElement, Fragment, useState } from 'react';
3
- import { css, jsx } from '@emotion/core';
5
+ import { css, jsx } from '@emotion/core'; // eslint-disable-next-line @atlaskit/design-system/use-visually-hidden
6
+ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
7
+
4
8
  import { visuallyHidden } from '@atlaskit/theme/constants';
5
9
  export default function RatingGroup({
6
10
  groupName = 'ak--rating-group',
@@ -1,9 +1,13 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
 
3
+ /* eslint-disable @atlaskit/design-system/use-visually-hidden */
4
+
3
5
  /** @jsx jsx */
4
6
  import { forwardRef, Fragment, useCallback } from 'react';
5
7
  import { jsx } from '@emotion/core';
6
- import { easeInOut, smallDurationMs } from '@atlaskit/motion';
8
+ import { easeInOut, smallDurationMs } from '@atlaskit/motion'; // eslint-disable-next-line @atlaskit/design-system/use-visually-hidden
9
+ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
10
+
7
11
  import { visuallyHidden } from '@atlaskit/theme/constants';
8
12
  import Tooltip from '@atlaskit/tooltip';
9
13
  const Rating = /*#__PURE__*/forwardRef(({
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/rating",
3
- "version": "0.1.6",
3
+ "version": "0.1.10",
4
4
  "sideEffects": false
5
5
  }
@@ -1,19 +1,15 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
 
4
- function _templateObject() {
5
- var data = _taggedTemplateLiteral(["\n display: inline-flex;\n /* Because some children are inline-block we make the font-size zero to eliminate the implicit space between them. */\n font-size: 0;\n\n /* This implementation does some interesting tricks to keep it flowing LTR and ensuring accessibility. */\n /* Instead of it starting in an empty state - it starts filled - and then uses the CSS sibling select \"~\" */\n /* to then display the empty state for the star rating. */\n\n [data-rating-icon-checked] {\n display: inline-block;\n }\n\n [data-rating-icon] {\n display: none;\n }\n\n label:hover\n ~ label\n [data-rating-icon-checked][data-rating-icon-checked],\n input:checked ~ label [data-rating-icon-checked] {\n display: none;\n }\n\n label:hover ~ label [data-rating-icon][data-rating-icon],\n input:checked ~ label [data-rating-icon] {\n display: inline-block;\n }\n\n /* When hovering reset all elements back to filled state. */\n &:hover [data-rating-icon-checked][data-rating-icon-checked] {\n display: inline-block;\n }\n\n &:hover [data-rating-icon][data-rating-icon] {\n display: none;\n }\n "]);
4
+ var _templateObject;
6
5
 
7
- _templateObject = function _templateObject() {
8
- return data;
9
- };
10
-
11
- return data;
12
- }
6
+ /* eslint-disable @atlaskit/design-system/use-visually-hidden */
13
7
 
14
8
  /** @jsx jsx */
15
9
  import { Children, cloneElement, Fragment, useState } from 'react';
16
- import { css, jsx } from '@emotion/core';
10
+ import { css, jsx } from '@emotion/core'; // eslint-disable-next-line @atlaskit/design-system/use-visually-hidden
11
+ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
12
+
17
13
  import { visuallyHidden } from '@atlaskit/theme/constants';
18
14
  export default function RatingGroup(_ref) {
19
15
  var _ref$groupName = _ref.groupName,
@@ -52,7 +48,7 @@ export default function RatingGroup(_ref) {
52
48
 
53
49
  return jsx("div", {
54
50
  "data-testid": testId && "".concat(testId, "--root"),
55
- css: css(_templateObject())
51
+ css: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: inline-flex;\n /* Because some children are inline-block we make the font-size zero to eliminate the implicit space between them. */\n font-size: 0;\n\n /* This implementation does some interesting tricks to keep it flowing LTR and ensuring accessibility. */\n /* Instead of it starting in an empty state - it starts filled - and then uses the CSS sibling select \"~\" */\n /* to then display the empty state for the star rating. */\n\n [data-rating-icon-checked] {\n display: inline-block;\n }\n\n [data-rating-icon] {\n display: none;\n }\n\n label:hover\n ~ label\n [data-rating-icon-checked][data-rating-icon-checked],\n input:checked ~ label [data-rating-icon-checked] {\n display: none;\n }\n\n label:hover ~ label [data-rating-icon][data-rating-icon],\n input:checked ~ label [data-rating-icon] {\n display: inline-block;\n }\n\n /* When hovering reset all elements back to filled state. */\n &:hover [data-rating-icon-checked][data-rating-icon-checked] {\n display: inline-block;\n }\n\n &:hover [data-rating-icon][data-rating-icon] {\n display: none;\n }\n "])))
56
52
  }, !firstSelectionMade && jsx(Fragment, null, jsx("label", {
57
53
  css: visuallyHidden,
58
54
  htmlFor: "".concat(groupName, "--empty")
@@ -1,10 +1,15 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["isChecked", "name", "testId", "label", "id", "value", "onChange", "render"];
4
+
5
+ /* eslint-disable @atlaskit/design-system/use-visually-hidden */
3
6
 
4
7
  /** @jsx jsx */
5
8
  import { forwardRef, Fragment, useCallback } from 'react';
6
9
  import { jsx } from '@emotion/core';
7
- import { easeInOut, smallDurationMs } from '@atlaskit/motion';
10
+ import { easeInOut, smallDurationMs } from '@atlaskit/motion'; // eslint-disable-next-line @atlaskit/design-system/use-visually-hidden
11
+ // eslint-disable-next-line @atlaskit/design-system/no-deprecated-imports
12
+
8
13
  import { visuallyHidden } from '@atlaskit/theme/constants';
9
14
  import Tooltip from '@atlaskit/tooltip';
10
15
  var Rating = /*#__PURE__*/forwardRef(function (_ref, ref) {
@@ -16,7 +21,7 @@ var Rating = /*#__PURE__*/forwardRef(function (_ref, ref) {
16
21
  value = _ref.value,
17
22
  onChange = _ref.onChange,
18
23
  render = _ref.render,
19
- props = _objectWithoutProperties(_ref, ["isChecked", "name", "testId", "label", "id", "value", "onChange", "render"]);
24
+ props = _objectWithoutProperties(_ref, _excluded);
20
25
 
21
26
  var onChangeHandler = useCallback(function (e) {
22
27
  onChange && onChange(e.target.checked ? value : undefined);
@@ -1,5 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["size", "color"];
3
4
  import React, { forwardRef, useCallback } from 'react';
4
5
  import StarIcon from '@atlaskit/icon/glyph/star';
5
6
  import StarFilledIcon from '@atlaskit/icon/glyph/star-filled';
@@ -10,7 +11,7 @@ var Star = /*#__PURE__*/forwardRef(function (_ref, ref) {
10
11
  size = _ref$size === void 0 ? 'large' : _ref$size,
11
12
  _ref$color = _ref.color,
12
13
  color = _ref$color === void 0 ? Y200 : _ref$color,
13
- props = _objectWithoutProperties(_ref, ["size", "color"]);
14
+ props = _objectWithoutProperties(_ref, _excluded);
14
15
 
15
16
  var render = useCallback(function (props) {
16
17
  return props.isChecked ?
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/rating",
3
- "version": "0.1.6",
3
+ "version": "0.1.10",
4
4
  "sideEffects": false
5
5
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface RatingGroupProps {
2
3
  /**
3
4
  * Callback that is called everytime the rating changes.
@@ -1,4 +1,4 @@
1
- import { InternalRatingProps } from './rating';
1
+ import { InternalRatingProps } from '../components/rating';
2
2
  /**
3
3
  * This gets around extract-react-types not supporting forwardRef.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { StarProps } from './star';
1
+ import { StarProps } from '../components/star';
2
2
  /**
3
3
  * This gets around extract-react-types not supporting forwardRef.
4
4
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rating",
3
- "version": "0.1.6",
3
+ "version": "0.1.10",
4
4
  "description": "An accessible rating component that can be heavily customized.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -17,17 +17,16 @@
17
17
  "atlassian": {
18
18
  "team": "Design System Team",
19
19
  "deprecatedAutoEntryPoints": true,
20
- "inPublicMirror": true,
21
20
  "releaseModel": "scheduled",
22
21
  "website": {
23
22
  "name": "Rating"
24
23
  }
25
24
  },
26
25
  "dependencies": {
27
- "@atlaskit/icon": "^21.1.0",
28
- "@atlaskit/motion": "^0.4.0",
29
- "@atlaskit/theme": "^11.0.0",
30
- "@atlaskit/tooltip": "^17.0.0",
26
+ "@atlaskit/icon": "^21.10.0",
27
+ "@atlaskit/motion": "^1.0.0",
28
+ "@atlaskit/theme": "^12.1.0",
29
+ "@atlaskit/tooltip": "^17.5.0",
31
30
  "@babel/runtime": "^7.0.0",
32
31
  "@emotion/core": "^10.0.9"
33
32
  },
@@ -36,16 +35,24 @@
36
35
  "react-dom": "^16.8.0"
37
36
  },
38
37
  "devDependencies": {
39
- "@atlaskit/button": "^15.1.0",
38
+ "@atlaskit/button": "^16.0.0",
40
39
  "@atlaskit/docs": "*",
41
40
  "@atlaskit/ssr": "*",
42
41
  "@atlaskit/visual-regression": "*",
42
+ "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
43
43
  "@testing-library/react": "^8.0.1",
44
44
  "typescript": "3.9.6"
45
45
  },
46
46
  "techstack": {
47
47
  "@atlassian/frontend": {
48
48
  "import-structure": "atlassian-conventions"
49
+ },
50
+ "@repo/internal": {
51
+ "deprecation": "no-deprecated-imports",
52
+ "styling": [
53
+ "emotion"
54
+ ]
49
55
  }
50
- }
56
+ },
57
+ "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
51
58
  }