@atlaskit/contextual-survey 2.0.11 → 2.1.2

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,27 @@
1
1
  # @atlaskit/contextual-survey
2
2
 
3
+ ## 2.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
8
+ - Updated dependencies
9
+
10
+ ## 2.1.1
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
16
+ ## 2.1.0
17
+
18
+ ### Minor Changes
19
+
20
+ - [`d943a822f6a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d943a822f6a) - [ux] Instrumented `@atlaskit/contextual-survey` with the new theming package, `@atlaskit/tokens`.
21
+
22
+ New tokens will be visible only in applications configured to use the new Tokens API (currently in alpha).
23
+ These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
24
+
3
25
  ## 2.0.11
4
26
 
5
27
  ### Patch Changes
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
7
7
  Object.defineProperty(exports, "__esModule", {
8
8
  value: true
9
9
  });
10
- exports.default = exports.AUTO_DISAPPEAR_DURATION = exports.DismissTrigger = void 0;
10
+ exports.default = exports.DismissTrigger = exports.AUTO_DISAPPEAR_DURATION = void 0;
11
11
 
12
12
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
13
13
 
@@ -17,6 +17,8 @@ var _colors = require("@atlaskit/theme/colors");
17
17
 
18
18
  var _constants = require("@atlaskit/theme/constants");
19
19
 
20
+ var _tokens = require("@atlaskit/tokens");
21
+
20
22
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
21
23
 
22
24
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
@@ -48,7 +50,7 @@ var _default = function _default(_ref) {
48
50
  shouldFitContainer: true
49
51
  }, score));
50
52
  })), (0, _core.jsx)("div", {
51
- css: (0, _core.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 12px;\n font-weight: 600;\n color: ", ";\n display: flex;\n margin-top: ", "px;\n margin-bottom: ", "px;\n\n & > span {\n width: ", "px;\n }\n "])), _colors.N200, (0, _constants.gridSize)(), (0, _constants.gridSize)() * 3, (0, _constants.gridSize)() * 10),
53
+ css: (0, _core.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 12px;\n font-weight: 600;\n color: ", ";\n display: flex;\n margin-top: ", "px;\n margin-bottom: ", "px;\n\n & > span {\n width: ", "px;\n }\n "])), (0, _tokens.token)('color.text.subtlest', _colors.N200), (0, _constants.gridSize)(), (0, _constants.gridSize)() * 3, (0, _constants.gridSize)() * 10),
52
54
  "aria-hidden": true
53
55
  }, (0, _core.jsx)("span", null, "Strongly disagree"), (0, _core.jsx)("span", {
54
56
  css: (0, _core.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n text-align: center;\n margin: 0 auto;\n padding: 0 ", "px;\n "])), (0, _constants.gridSize)() * 6)
@@ -17,6 +17,8 @@ var _colors = require("@atlaskit/theme/colors");
17
17
 
18
18
  var _constants = require("@atlaskit/theme/constants");
19
19
 
20
+ var _tokens = require("@atlaskit/tokens");
21
+
20
22
  var _templateObject, _templateObject2;
21
23
 
22
24
  var _default = function _default(_ref) {
@@ -28,7 +30,7 @@ var _default = function _default(_ref) {
28
30
  }, (0, _core.jsx)(_checkCircle.default, {
29
31
  label: "",
30
32
  "aria-hidden": true,
31
- primaryColor: _colors.G300
33
+ primaryColor: (0, _tokens.token)('color.icon.success', _colors.G300)
32
34
  })), children);
33
35
  };
34
36
 
@@ -19,7 +19,7 @@ var _colors = require("@atlaskit/theme/colors");
19
19
 
20
20
  var _constants = require("@atlaskit/theme/constants");
21
21
 
22
- var _elevation = require("@atlaskit/theme/elevation");
22
+ var _tokens = require("@atlaskit/tokens");
23
23
 
24
24
  var _constants2 = require("../constants");
25
25
 
@@ -31,13 +31,13 @@ var _default = function _default(_ref) {
31
31
  var children = _ref.children,
32
32
  onDismiss = _ref.onDismiss;
33
33
  return (0, _core.jsx)("div", {
34
- css: (0, _core.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", "px;\n padding: ", "px;\n ", "\n width: ", "px;\n "])), _colors.N0, (0, _constants.borderRadius)(), padding, (0, _elevation.e500)(), _constants2.surveyInnerWidth)
34
+ css: (0, _core.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", "px;\n padding: ", "px;\n box-shadow: ", ";\n width: ", "px;\n "])), (0, _tokens.token)('elevation.surface.overlay', _colors.N0), (0, _constants.borderRadius)(), padding, (0, _tokens.token)('elevation.shadow.overlay', "0 20px 32px -8px ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A)), _constants2.surveyInnerWidth)
35
35
  }, (0, _core.jsx)("div", {
36
36
  css: (0, _core.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n top: ", "px;\n right: ", "px;\n "])), padding - (0, _constants.gridSize)(), padding - (0, _constants.gridSize)())
37
37
  }, (0, _core.jsx)(_customThemeButton.default, {
38
38
  iconBefore: (0, _core.jsx)(_cross.default, {
39
39
  label: "",
40
- primaryColor: _colors.N50
40
+ primaryColor: (0, _tokens.token)('color.icon.subtle', _colors.N50)
41
41
  }),
42
42
  "aria-label": "Dismiss",
43
43
  appearance: "subtle",
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/contextual-survey",
3
- "version": "2.0.11",
3
+ "version": "2.1.2",
4
4
  "sideEffects": false
5
5
  }
@@ -3,6 +3,7 @@ import { css, jsx } from '@emotion/core';
3
3
  import Button from '@atlaskit/button/custom-theme-button';
4
4
  import { N200 } from '@atlaskit/theme/colors';
5
5
  import { gridSize } from '@atlaskit/theme/constants';
6
+ import { token } from '@atlaskit/tokens';
6
7
  import Tooltip from '@atlaskit/tooltip';
7
8
  const tooltipMessage = ['Strongly disagree', 'Disagree', 'Slightly disagree', 'Neutral', 'Slightly agree', 'Agree', 'Strongly agree'];
8
9
  export default (({
@@ -46,7 +47,7 @@ export default (({
46
47
  css: css`
47
48
  font-size: 12px;
48
49
  font-weight: 600;
49
- color: ${N200};
50
+ color: ${token('color.text.subtlest', N200)};
50
51
  display: flex;
51
52
  margin-top: ${gridSize()}px;
52
53
  margin-bottom: ${gridSize() * 3}px;
@@ -3,6 +3,7 @@ import { css, jsx } from '@emotion/core';
3
3
  import CheckCircleIcon from '@atlaskit/icon/glyph/check-circle';
4
4
  import { G300 } from '@atlaskit/theme/colors';
5
5
  import { gridSize } from '@atlaskit/theme/constants';
6
+ import { token } from '@atlaskit/tokens';
6
7
  export default (({
7
8
  children
8
9
  }) => jsx("section", {
@@ -18,5 +19,5 @@ export default (({
18
19
  }, jsx(CheckCircleIcon, {
19
20
  label: "",
20
21
  "aria-hidden": true,
21
- primaryColor: G300
22
+ primaryColor: token('color.icon.success', G300)
22
23
  })), children));
@@ -2,9 +2,9 @@
2
2
  import { css, jsx } from '@emotion/core';
3
3
  import Button from '@atlaskit/button/custom-theme-button';
4
4
  import CrossIcon from '@atlaskit/icon/glyph/cross';
5
- import { N0, N50 } from '@atlaskit/theme/colors';
5
+ import { N0, N50, N50A, N60A } from '@atlaskit/theme/colors';
6
6
  import { borderRadius, gridSize } from '@atlaskit/theme/constants';
7
- import { e500 } from '@atlaskit/theme/elevation';
7
+ import { token } from '@atlaskit/tokens';
8
8
  import { surveyInnerWidth } from '../constants';
9
9
  const padding = gridSize() * 3;
10
10
  export default (({
@@ -13,10 +13,10 @@ export default (({
13
13
  }) => {
14
14
  return jsx("div", {
15
15
  css: css`
16
- background-color: ${N0};
16
+ background-color: ${token('elevation.surface.overlay', N0)};
17
17
  border-radius: ${borderRadius()}px;
18
18
  padding: ${padding}px;
19
- ${e500()}
19
+ box-shadow: ${token('elevation.shadow.overlay', `0 20px 32px -8px ${N50A}, 0 0 1px ${N60A}`)};
20
20
  width: ${surveyInnerWidth}px;
21
21
  `
22
22
  }, jsx("div", {
@@ -28,7 +28,7 @@ export default (({
28
28
  }, jsx(Button, {
29
29
  iconBefore: jsx(CrossIcon, {
30
30
  label: "",
31
- primaryColor: N50
31
+ primaryColor: token('color.icon.subtle', N50)
32
32
  }),
33
33
  "aria-label": "Dismiss",
34
34
  appearance: "subtle",
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/contextual-survey",
3
- "version": "2.0.11",
3
+ "version": "2.1.2",
4
4
  "sideEffects": false
5
5
  }
@@ -7,6 +7,7 @@ import { css, jsx } from '@emotion/core';
7
7
  import Button from '@atlaskit/button/custom-theme-button';
8
8
  import { N200 } from '@atlaskit/theme/colors';
9
9
  import { gridSize } from '@atlaskit/theme/constants';
10
+ import { token } from '@atlaskit/tokens';
10
11
  import Tooltip from '@atlaskit/tooltip';
11
12
  var tooltipMessage = ['Strongly disagree', 'Disagree', 'Slightly disagree', 'Neutral', 'Slightly agree', 'Agree', 'Strongly agree'];
12
13
  export default (function (_ref) {
@@ -34,7 +35,7 @@ export default (function (_ref) {
34
35
  shouldFitContainer: true
35
36
  }, score));
36
37
  })), jsx("div", {
37
- css: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: 12px;\n font-weight: 600;\n color: ", ";\n display: flex;\n margin-top: ", "px;\n margin-bottom: ", "px;\n\n & > span {\n width: ", "px;\n }\n "])), N200, gridSize(), gridSize() * 3, gridSize() * 10),
38
+ css: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n font-size: 12px;\n font-weight: 600;\n color: ", ";\n display: flex;\n margin-top: ", "px;\n margin-bottom: ", "px;\n\n & > span {\n width: ", "px;\n }\n "])), token('color.text.subtlest', N200), gridSize(), gridSize() * 3, gridSize() * 10),
38
39
  "aria-hidden": true
39
40
  }, jsx("span", null, "Strongly disagree"), jsx("span", {
40
41
  css: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n text-align: center;\n margin: 0 auto;\n padding: 0 ", "px;\n "])), gridSize() * 6)
@@ -7,6 +7,7 @@ import { css, jsx } from '@emotion/core';
7
7
  import CheckCircleIcon from '@atlaskit/icon/glyph/check-circle';
8
8
  import { G300 } from '@atlaskit/theme/colors';
9
9
  import { gridSize } from '@atlaskit/theme/constants';
10
+ import { token } from '@atlaskit/tokens';
10
11
  export default (function (_ref) {
11
12
  var children = _ref.children;
12
13
  return jsx("section", {
@@ -16,6 +17,6 @@ export default (function (_ref) {
16
17
  }, jsx(CheckCircleIcon, {
17
18
  label: "",
18
19
  "aria-hidden": true,
19
- primaryColor: G300
20
+ primaryColor: token('color.icon.success', G300)
20
21
  })), children);
21
22
  });
@@ -6,22 +6,22 @@ var _templateObject, _templateObject2;
6
6
  import { css, jsx } from '@emotion/core';
7
7
  import Button from '@atlaskit/button/custom-theme-button';
8
8
  import CrossIcon from '@atlaskit/icon/glyph/cross';
9
- import { N0, N50 } from '@atlaskit/theme/colors';
9
+ import { N0, N50, N50A, N60A } from '@atlaskit/theme/colors';
10
10
  import { borderRadius, gridSize } from '@atlaskit/theme/constants';
11
- import { e500 } from '@atlaskit/theme/elevation';
11
+ import { token } from '@atlaskit/tokens';
12
12
  import { surveyInnerWidth } from '../constants';
13
13
  var padding = gridSize() * 3;
14
14
  export default (function (_ref) {
15
15
  var children = _ref.children,
16
16
  onDismiss = _ref.onDismiss;
17
17
  return jsx("div", {
18
- css: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: ", "px;\n padding: ", "px;\n ", "\n width: ", "px;\n "])), N0, borderRadius(), padding, e500(), surveyInnerWidth)
18
+ css: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: ", "px;\n padding: ", "px;\n box-shadow: ", ";\n width: ", "px;\n "])), token('elevation.surface.overlay', N0), borderRadius(), padding, token('elevation.shadow.overlay', "0 20px 32px -8px ".concat(N50A, ", 0 0 1px ").concat(N60A)), surveyInnerWidth)
19
19
  }, jsx("div", {
20
20
  css: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n top: ", "px;\n right: ", "px;\n "])), padding - gridSize(), padding - gridSize())
21
21
  }, jsx(Button, {
22
22
  iconBefore: jsx(CrossIcon, {
23
23
  label: "",
24
- primaryColor: N50
24
+ primaryColor: token('color.icon.subtle', N50)
25
25
  }),
26
26
  "aria-label": "Dismiss",
27
27
  appearance: "subtle",
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/contextual-survey",
3
- "version": "2.0.11",
3
+ "version": "2.1.2",
4
4
  "sideEffects": false
5
5
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FormValues } from '../types';
2
3
  export declare enum DismissTrigger {
3
4
  AutoDismiss = "AUTO_DISMISS",
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const _default: () => JSX.Element;
2
3
  export default _default;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface Props {
2
3
  onChange: (value: number) => void;
3
4
  value: number | undefined;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface Props {
2
3
  onAnswer: (answer: boolean) => Promise<void>;
3
4
  }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface Props {
2
3
  }
3
4
  declare const _default: ({}: Props) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { OnSubmitHandler } from '@atlaskit/form';
2
3
  import { FormValues } from '../types';
3
4
  interface Props {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/contextual-survey",
3
- "version": "2.0.11",
3
+ "version": "2.1.2",
4
4
  "description": "A React component used to ask the user for feedback",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -23,12 +23,13 @@
23
23
  }
24
24
  },
25
25
  "dependencies": {
26
- "@atlaskit/button": "^16.0.0",
26
+ "@atlaskit/button": "^16.3.0",
27
27
  "@atlaskit/checkbox": "^12.1.0",
28
- "@atlaskit/form": "^8.4.0",
29
- "@atlaskit/icon": "^21.9.0",
30
- "@atlaskit/textarea": "^4.0.0",
31
- "@atlaskit/theme": "^12.0.0",
28
+ "@atlaskit/form": "^8.5.0",
29
+ "@atlaskit/icon": "^21.10.0",
30
+ "@atlaskit/textarea": "^4.3.0",
31
+ "@atlaskit/theme": "^12.1.0",
32
+ "@atlaskit/tokens": "^0.9.0",
32
33
  "@atlaskit/tooltip": "^17.5.0",
33
34
  "@babel/runtime": "^7.0.0",
34
35
  "@emotion/core": "^10.0.9",
@@ -42,7 +43,7 @@
42
43
  "@atlaskit/docs": "*",
43
44
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
44
45
  "@testing-library/react": "^8.0.1",
45
- "typescript": "3.9.6"
46
+ "typescript": "4.2.4"
46
47
  },
47
48
  "keywords": [
48
49
  "atlaskit",
@@ -52,6 +53,9 @@
52
53
  "techstack": {
53
54
  "@atlassian/frontend": {
54
55
  "import-structure": "atlassian-conventions"
56
+ },
57
+ "@repo/internal": {
58
+ "theming": "tokens"
55
59
  }
56
60
  },
57
61
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"