@atlaskit/contextual-survey 2.0.9 → 2.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/build/tsconfig.json +10 -3
  3. package/dist/cjs/components/ContextualSurvey.js +7 -3
  4. package/dist/cjs/components/FeedbackAcknowledgement.js +2 -10
  5. package/dist/cjs/components/FeedbackScoreButtons.js +7 -43
  6. package/dist/cjs/components/SignUpPrompt.js +3 -21
  7. package/dist/cjs/components/SignUpSuccess.js +2 -10
  8. package/dist/cjs/components/SuccessContainer.js +5 -21
  9. package/dist/cjs/components/SurveyContainer.js +5 -23
  10. package/dist/cjs/components/SurveyForm.js +7 -21
  11. package/dist/cjs/components/SurveyMarshal.js +2 -10
  12. package/dist/cjs/index.js +6 -2
  13. package/dist/cjs/types.js +5 -1
  14. package/dist/cjs/version.json +1 -1
  15. package/dist/es2019/components/FeedbackScoreButtons.js +2 -1
  16. package/dist/es2019/components/SuccessContainer.js +2 -1
  17. package/dist/es2019/components/SurveyContainer.js +5 -5
  18. package/dist/es2019/types.js +1 -0
  19. package/dist/es2019/version.json +1 -1
  20. package/dist/esm/components/FeedbackAcknowledgement.js +2 -10
  21. package/dist/esm/components/FeedbackScoreButtons.js +6 -43
  22. package/dist/esm/components/SignUpPrompt.js +3 -21
  23. package/dist/esm/components/SignUpSuccess.js +2 -10
  24. package/dist/esm/components/SuccessContainer.js +5 -22
  25. package/dist/esm/components/SurveyContainer.js +6 -24
  26. package/dist/esm/components/SurveyForm.js +3 -21
  27. package/dist/esm/components/SurveyMarshal.js +2 -10
  28. package/dist/esm/types.js +1 -0
  29. package/dist/esm/version.json +1 -1
  30. package/dist/types/components/ContextualSurvey.d.ts +1 -0
  31. package/dist/types/components/FeedbackAcknowledgement.d.ts +1 -0
  32. package/dist/types/components/FeedbackScoreButtons.d.ts +1 -0
  33. package/dist/types/components/SignUpPrompt.d.ts +1 -0
  34. package/dist/types/components/SignUpSuccess.d.ts +1 -0
  35. package/dist/types/components/SurveyForm.d.ts +1 -0
  36. package/package.json +14 -8
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @atlaskit/contextual-survey
2
2
 
3
+ ## 2.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`d943a822f6a`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d943a822f6a) - [ux] Instrumented `@atlaskit/contextual-survey` with the new theming package, `@atlaskit/tokens`.
8
+
9
+ New tokens will be visible only in applications configured to use the new Tokens API (currently in alpha).
10
+ These changes are intended to be interoperable with the legacy theme implementation. Legacy dark mode users should expect no visual or breaking changes.
11
+
12
+ ## 2.0.11
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies
17
+
18
+ ## 2.0.10
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies
23
+
3
24
  ## 2.0.9
4
25
 
5
26
  ### Patch Changes
@@ -5,6 +5,13 @@
5
5
  "target": "es5",
6
6
  "paths": {}
7
7
  },
8
- "include": ["../src/**/*.ts", "../src/**/*.tsx"],
9
- "exclude": ["../src/**/__tests__/*"]
10
- }
8
+ "include": [
9
+ "../src/**/*.ts",
10
+ "../src/**/*.tsx"
11
+ ],
12
+ "exclude": [
13
+ "../src/**/__tests__/*",
14
+ "../src/**/*.test.*",
15
+ "../src/**/test.*"
16
+ ]
17
+ }
@@ -1,13 +1,13 @@
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
  });
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
 
@@ -29,6 +29,10 @@ var _SurveyForm = _interopRequireDefault(require("./SurveyForm"));
29
29
 
30
30
  var _useEscapeToDismiss = _interopRequireDefault(require("./useEscapeToDismiss"));
31
31
 
32
+ 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); }
33
+
34
+ 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; }
35
+
32
36
  var DismissTrigger;
33
37
  exports.DismissTrigger = DismissTrigger;
34
38
 
@@ -15,19 +15,11 @@ var _constants = require("@atlaskit/theme/constants");
15
15
 
16
16
  var _SuccessContainer = _interopRequireDefault(require("./SuccessContainer"));
17
17
 
18
- function _templateObject() {
19
- var data = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n font-weight: 600;\n margin-top: 0;\n line-height: ", "px;\n "]);
20
-
21
- _templateObject = function _templateObject() {
22
- return data;
23
- };
24
-
25
- return data;
26
- }
18
+ var _templateObject;
27
19
 
28
20
  var _default = function _default() {
29
21
  return (0, _core.jsx)(_SuccessContainer.default, null, (0, _core.jsx)("h1", {
30
- css: (0, _core.css)(_templateObject(), (0, _constants.fontSize)(), (0, _constants.gridSize)() * 3)
22
+ css: (0, _core.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n font-weight: 600;\n margin-top: 0;\n line-height: ", "px;\n "])), (0, _constants.fontSize)(), (0, _constants.gridSize)() * 3)
31
23
  }, "Thanks for your feedback"));
32
24
  };
33
25
 
@@ -17,47 +17,11 @@ var _colors = require("@atlaskit/theme/colors");
17
17
 
18
18
  var _constants = require("@atlaskit/theme/constants");
19
19
 
20
- var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
21
-
22
- function _templateObject4() {
23
- var data = (0, _taggedTemplateLiteral2.default)(["\n text-align: right;\n "]);
24
-
25
- _templateObject4 = function _templateObject4() {
26
- return data;
27
- };
28
-
29
- return data;
30
- }
31
-
32
- function _templateObject3() {
33
- var data = (0, _taggedTemplateLiteral2.default)(["\n text-align: center;\n margin: 0 auto;\n padding: 0 ", "px;\n "]);
34
-
35
- _templateObject3 = function _templateObject3() {
36
- return data;
37
- };
20
+ var _tokens = require("@atlaskit/tokens");
38
21
 
39
- return data;
40
- }
41
-
42
- function _templateObject2() {
43
- var data = (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 "]);
44
-
45
- _templateObject2 = function _templateObject2() {
46
- return data;
47
- };
48
-
49
- return data;
50
- }
51
-
52
- function _templateObject() {
53
- var data = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n\n & > * + * {\n margin-left: ", "px;\n }\n\n & > * {\n flex: 1;\n\n & > button {\n justify-content: center;\n }\n }\n "]);
54
-
55
- _templateObject = function _templateObject() {
56
- return data;
57
- };
22
+ var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
58
23
 
59
- return data;
60
- }
24
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
61
25
 
62
26
  var tooltipMessage = ['Strongly disagree', 'Disagree', 'Slightly disagree', 'Neutral', 'Slightly agree', 'Agree', 'Strongly agree'];
63
27
 
@@ -65,7 +29,7 @@ var _default = function _default(_ref) {
65
29
  var onChange = _ref.onChange,
66
30
  value = _ref.value;
67
31
  return (0, _core.jsx)("div", null, (0, _core.jsx)("div", {
68
- css: (0, _core.css)(_templateObject(), (0, _constants.gridSize)())
32
+ css: (0, _core.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n\n & > * + * {\n margin-left: ", "px;\n }\n\n & > * {\n flex: 1;\n\n & > button {\n justify-content: center;\n }\n }\n "])), (0, _constants.gridSize)())
69
33
  }, Array.from({
70
34
  length: 7
71
35
  }, function (_, i) {
@@ -86,12 +50,12 @@ var _default = function _default(_ref) {
86
50
  shouldFitContainer: true
87
51
  }, score));
88
52
  })), (0, _core.jsx)("div", {
89
- css: (0, _core.css)(_templateObject2(), _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),
90
54
  "aria-hidden": true
91
55
  }, (0, _core.jsx)("span", null, "Strongly disagree"), (0, _core.jsx)("span", {
92
- css: (0, _core.css)(_templateObject3(), (0, _constants.gridSize)() * 6)
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)
93
57
  }, "Neutral"), (0, _core.jsx)("span", {
94
- css: (0, _core.css)(_templateObject4())
58
+ css: (0, _core.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n text-align: right;\n "])))
95
59
  }, "Strongly agree")));
96
60
  };
97
61
 
@@ -25,25 +25,7 @@ var _constants = require("@atlaskit/theme/constants");
25
25
 
26
26
  var _SuccessContainer = _interopRequireDefault(require("./SuccessContainer"));
27
27
 
28
- function _templateObject2() {
29
- var data = (0, _taggedTemplateLiteral2.default)(["\n margin-top: ", "px;\n display: flex;\n justify-content: flex-end;\n\n & > * + * {\n margin-left: ", "px;\n }\n "]);
30
-
31
- _templateObject2 = function _templateObject2() {
32
- return data;
33
- };
34
-
35
- return data;
36
- }
37
-
38
- function _templateObject() {
39
- var data = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n font-weight: 600;\n margin: 0;\n line-height: ", "px;\n "]);
40
-
41
- _templateObject = function _templateObject() {
42
- return data;
43
- };
44
-
45
- return data;
46
- }
28
+ var _templateObject, _templateObject2;
47
29
 
48
30
  var _default = function _default(_ref) {
49
31
  var onAnswer = _ref.onAnswer;
@@ -77,11 +59,11 @@ var _default = function _default(_ref) {
77
59
  }(), [setPending, onAnswer]);
78
60
  var isDisabled = Boolean(pending);
79
61
  return (0, _core.jsx)(_SuccessContainer.default, null, (0, _core.jsx)("h1", {
80
- css: (0, _core.css)(_templateObject(), (0, _constants.fontSize)(), (0, _constants.gridSize)() * 3)
62
+ css: (0, _core.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n font-weight: 600;\n margin: 0;\n line-height: ", "px;\n "])), (0, _constants.fontSize)(), (0, _constants.gridSize)() * 3)
81
63
  }, "Thanks for your feedback"), (0, _core.jsx)("p", null, "Are you interested in participating in our research?"), (0, _core.jsx)("p", null, "Sign up for the", ' ', (0, _core.jsx)("a", {
82
64
  href: "https://www.atlassian.com/research-group"
83
65
  }, "Atlassian Research Group"), ' ', "and we may contact you in the future with research opportunities."), (0, _core.jsx)("div", {
84
- css: (0, _core.css)(_templateObject2(), (0, _constants.gridSize)() * 4, (0, _constants.gridSize)())
66
+ css: (0, _core.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: ", "px;\n display: flex;\n justify-content: flex-end;\n\n & > * + * {\n margin-left: ", "px;\n }\n "])), (0, _constants.gridSize)() * 4, (0, _constants.gridSize)())
85
67
  }, (0, _core.jsx)(_customThemeButton.default, {
86
68
  appearance: "subtle",
87
69
  onClick: function onClick() {
@@ -17,20 +17,12 @@ var _constants = require("@atlaskit/theme/constants");
17
17
 
18
18
  var _SuccessContainer = _interopRequireDefault(require("./SuccessContainer"));
19
19
 
20
- function _templateObject() {
21
- var data = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n font-weight: 600;\n line-height: ", "px;\n margin: 0;\n "]);
22
-
23
- _templateObject = function _templateObject() {
24
- return data;
25
- };
26
-
27
- return data;
28
- }
20
+ var _templateObject;
29
21
 
30
22
  var _default = function _default(_ref) {
31
23
  (0, _objectDestructuringEmpty2.default)(_ref);
32
24
  return (0, _core.jsx)(_SuccessContainer.default, null, (0, _core.jsx)("h1", {
33
- css: (0, _core.css)(_templateObject(), (0, _constants.fontSize)(), (0, _constants.gridSize)() * 3)
25
+ css: (0, _core.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n font-weight: 600;\n line-height: ", "px;\n margin: 0;\n "])), (0, _constants.fontSize)(), (0, _constants.gridSize)() * 3)
34
26
  }, "Thanks for signing up"), (0, _core.jsx)("p", null, "We may reach out to you in the future to participate in additional research."));
35
27
  };
36
28
 
@@ -17,36 +17,20 @@ var _colors = require("@atlaskit/theme/colors");
17
17
 
18
18
  var _constants = require("@atlaskit/theme/constants");
19
19
 
20
- function _templateObject2() {
21
- var data = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n top: ", "px;\n left: ", "px;\n "]);
20
+ var _tokens = require("@atlaskit/tokens");
22
21
 
23
- _templateObject2 = function _templateObject2() {
24
- return data;
25
- };
26
-
27
- return data;
28
- }
29
-
30
- function _templateObject() {
31
- var data = (0, _taggedTemplateLiteral2.default)(["\n margin-left: ", "px;\n "]);
32
-
33
- _templateObject = function _templateObject() {
34
- return data;
35
- };
36
-
37
- return data;
38
- }
22
+ var _templateObject, _templateObject2;
39
23
 
40
24
  var _default = function _default(_ref) {
41
25
  var children = _ref.children;
42
26
  return (0, _core.jsx)("section", {
43
- css: (0, _core.css)(_templateObject(), (0, _constants.gridSize)() * 5)
27
+ css: (0, _core.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n margin-left: ", "px;\n "])), (0, _constants.gridSize)() * 5)
44
28
  }, (0, _core.jsx)("div", {
45
- css: (0, _core.css)(_templateObject2(), (0, _constants.gridSize)() * 3, (0, _constants.gridSize)() * 3)
29
+ css: (0, _core.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n top: ", "px;\n left: ", "px;\n "])), (0, _constants.gridSize)() * 3, (0, _constants.gridSize)() * 3)
46
30
  }, (0, _core.jsx)(_checkCircle.default, {
47
31
  label: "",
48
32
  "aria-hidden": true,
49
- primaryColor: _colors.G300
33
+ primaryColor: (0, _tokens.token)('color.icon.success', _colors.G300)
50
34
  })), children);
51
35
  };
52
36
 
@@ -19,29 +19,11 @@ 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
 
26
- function _templateObject2() {
27
- var data = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n top: ", "px;\n right: ", "px;\n "]);
28
-
29
- _templateObject2 = function _templateObject2() {
30
- return data;
31
- };
32
-
33
- return data;
34
- }
35
-
36
- function _templateObject() {
37
- var data = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", "px;\n padding: ", "px;\n ", "\n width: ", "px;\n "]);
38
-
39
- _templateObject = function _templateObject() {
40
- return data;
41
- };
42
-
43
- return data;
44
- }
26
+ var _templateObject, _templateObject2;
45
27
 
46
28
  var padding = (0, _constants.gridSize)() * 3;
47
29
 
@@ -49,13 +31,13 @@ var _default = function _default(_ref) {
49
31
  var children = _ref.children,
50
32
  onDismiss = _ref.onDismiss;
51
33
  return (0, _core.jsx)("div", {
52
- css: (0, _core.css)(_templateObject(), _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)
53
35
  }, (0, _core.jsx)("div", {
54
- css: (0, _core.css)(_templateObject2(), padding - (0, _constants.gridSize)(), padding - (0, _constants.gridSize)())
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)())
55
37
  }, (0, _core.jsx)(_customThemeButton.default, {
56
38
  iconBefore: (0, _core.jsx)(_cross.default, {
57
39
  label: "",
58
- primaryColor: _colors.N50
40
+ primaryColor: (0, _tokens.token)('color.icon.subtle', _colors.N50)
59
41
  }),
60
42
  "aria-label": "Dismiss",
61
43
  appearance: "subtle",
@@ -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
  });
@@ -33,25 +33,11 @@ var _constants = require("@atlaskit/theme/constants");
33
33
 
34
34
  var _FeedbackScoreButtons = _interopRequireDefault(require("./FeedbackScoreButtons"));
35
35
 
36
- function _templateObject2() {
37
- var data = (0, _taggedTemplateLiteral2.default)(["\n transition: max-height ", "ms ease-in-out;\n overflow: hidden;\n max-height: ", ";\n "]);
38
-
39
- _templateObject2 = function _templateObject2() {
40
- return data;
41
- };
42
-
43
- return data;
44
- }
45
-
46
- function _templateObject() {
47
- var data = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n font-weight: 600;\n "]);
36
+ var _templateObject, _templateObject2;
48
37
 
49
- _templateObject = function _templateObject() {
50
- return data;
51
- };
38
+ 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); }
52
39
 
53
- return data;
54
- }
40
+ 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; }
55
41
 
56
42
  var getExpandedHeight = function getExpandedHeight(ref, state) {
57
43
  if (!ref.current) {
@@ -110,7 +96,7 @@ var _default = function _default(_ref) {
110
96
  "aria-labelledby": "contextualSurveyQuestion"
111
97
  }, (0, _core.jsx)("h1", {
112
98
  id: "contextualSurveyQuestion",
113
- css: (0, _core.css)(_templateObject(), (0, _constants.fontSize)())
99
+ css: (0, _core.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n font-weight: 600;\n "])), (0, _constants.fontSize)())
114
100
  }, question), statement && (0, _core.jsx)("p", {
115
101
  id: "contextualSurveyStatement"
116
102
  }, statement), (0, _core.jsx)(_form.default, {
@@ -136,7 +122,7 @@ var _default = function _default(_ref) {
136
122
  mountOnEnter: true
137
123
  }, function (state) {
138
124
  return (0, _core.jsx)("div", {
139
- css: (0, _core.css)(_templateObject2(), transitionDuration, getExpandedHeight(expandedAreaRef, state)),
125
+ css: (0, _core.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n transition: max-height ", "ms ease-in-out;\n overflow: hidden;\n max-height: ", ";\n "])), transitionDuration, getExpandedHeight(expandedAreaRef, state)),
140
126
  ref: expandedAreaRef
141
127
  }, (0, _core.jsx)(_form.Field, {
142
128
  name: "writtenFeedback",
@@ -17,15 +17,7 @@ var _constants = require("@atlaskit/theme/constants");
17
17
 
18
18
  var _constants2 = require("../constants");
19
19
 
20
- function _templateObject() {
21
- var data = (0, _taggedTemplateLiteral2.default)(["\n position: fixed;\n right: ", "px;\n bottom: ", "px;\n z-index: ", ";\n transform: translateX(", ");\n opacity: ", ";\n transition: all ", "ms ease-in-out;\n transition-property: transform, opacity;\n "]);
22
-
23
- _templateObject = function _templateObject() {
24
- return data;
25
- };
26
-
27
- return data;
28
- }
20
+ var _templateObject;
29
21
 
30
22
  var animationDuration = 300;
31
23
  var offscreen = {
@@ -69,7 +61,7 @@ function SurveyMarshal(props) {
69
61
  opacity = _getAnimationProps.opacity;
70
62
 
71
63
  return (0, _core.jsx)("div", {
72
- css: (0, _core.css)(_templateObject(), _constants2.surveyOffset, _constants2.surveyOffset, _constants.layers.flag(), translateX, opacity, animationDuration)
64
+ css: (0, _core.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: fixed;\n right: ", "px;\n bottom: ", "px;\n z-index: ", ";\n transform: translateX(", ");\n opacity: ", ";\n transition: all ", "ms ease-in-out;\n transition-property: transform, opacity;\n "])), _constants2.surveyOffset, _constants2.surveyOffset, _constants.layers.flag(), translateX, opacity, animationDuration)
73
65
  }, children());
74
66
  });
75
67
  }
package/dist/cjs/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
- var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
6
 
7
7
  Object.defineProperty(exports, "__esModule", {
8
8
  value: true
@@ -28,4 +28,8 @@ Object.defineProperty(exports, "SurveyMarshal", {
28
28
 
29
29
  var _ContextualSurvey = _interopRequireWildcard(require("./components/ContextualSurvey"));
30
30
 
31
- var _SurveyMarshal = _interopRequireDefault(require("./components/SurveyMarshal"));
31
+ var _SurveyMarshal = _interopRequireDefault(require("./components/SurveyMarshal"));
32
+
33
+ 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); }
34
+
35
+ 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; }
package/dist/cjs/types.js CHANGED
@@ -1 +1,5 @@
1
- "use strict";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/contextual-survey",
3
- "version": "2.0.9",
3
+ "version": "2.1.0",
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",
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/contextual-survey",
3
- "version": "2.0.9",
3
+ "version": "2.1.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,14 +1,6 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
 
3
- function _templateObject() {
4
- var data = _taggedTemplateLiteral(["\n font-size: ", "px;\n font-weight: 600;\n margin-top: 0;\n line-height: ", "px;\n "]);
5
-
6
- _templateObject = function _templateObject() {
7
- return data;
8
- };
9
-
10
- return data;
11
- }
3
+ var _templateObject;
12
4
 
13
5
  /** @jsx jsx */
14
6
  import { css, jsx } from '@emotion/core';
@@ -16,6 +8,6 @@ import { fontSize, gridSize } from '@atlaskit/theme/constants';
16
8
  import SuccessContainer from './SuccessContainer';
17
9
  export default (function () {
18
10
  return jsx(SuccessContainer, null, jsx("h1", {
19
- css: css(_templateObject(), fontSize(), gridSize() * 3)
11
+ css: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: ", "px;\n font-weight: 600;\n margin-top: 0;\n line-height: ", "px;\n "])), fontSize(), gridSize() * 3)
20
12
  }, "Thanks for your feedback"));
21
13
  });
@@ -1,57 +1,20 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
 
3
- function _templateObject4() {
4
- var data = _taggedTemplateLiteral(["\n text-align: right;\n "]);
5
-
6
- _templateObject4 = function _templateObject4() {
7
- return data;
8
- };
9
-
10
- return data;
11
- }
12
-
13
- function _templateObject3() {
14
- var data = _taggedTemplateLiteral(["\n text-align: center;\n margin: 0 auto;\n padding: 0 ", "px;\n "]);
15
-
16
- _templateObject3 = function _templateObject3() {
17
- return data;
18
- };
19
-
20
- return data;
21
- }
22
-
23
- function _templateObject2() {
24
- var data = _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 "]);
25
-
26
- _templateObject2 = function _templateObject2() {
27
- return data;
28
- };
29
-
30
- return data;
31
- }
32
-
33
- function _templateObject() {
34
- var data = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n\n & > * + * {\n margin-left: ", "px;\n }\n\n & > * {\n flex: 1;\n\n & > button {\n justify-content: center;\n }\n }\n "]);
35
-
36
- _templateObject = function _templateObject() {
37
- return data;
38
- };
39
-
40
- return data;
41
- }
3
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
42
4
 
43
5
  /** @jsx jsx */
44
6
  import { css, jsx } from '@emotion/core';
45
7
  import Button from '@atlaskit/button/custom-theme-button';
46
8
  import { N200 } from '@atlaskit/theme/colors';
47
9
  import { gridSize } from '@atlaskit/theme/constants';
10
+ import { token } from '@atlaskit/tokens';
48
11
  import Tooltip from '@atlaskit/tooltip';
49
12
  var tooltipMessage = ['Strongly disagree', 'Disagree', 'Slightly disagree', 'Neutral', 'Slightly agree', 'Agree', 'Strongly agree'];
50
13
  export default (function (_ref) {
51
14
  var onChange = _ref.onChange,
52
15
  value = _ref.value;
53
16
  return jsx("div", null, jsx("div", {
54
- css: css(_templateObject(), gridSize())
17
+ css: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: space-between;\n\n & > * + * {\n margin-left: ", "px;\n }\n\n & > * {\n flex: 1;\n\n & > button {\n justify-content: center;\n }\n }\n "])), gridSize())
55
18
  }, Array.from({
56
19
  length: 7
57
20
  }, function (_, i) {
@@ -72,11 +35,11 @@ export default (function (_ref) {
72
35
  shouldFitContainer: true
73
36
  }, score));
74
37
  })), jsx("div", {
75
- css: css(_templateObject2(), 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),
76
39
  "aria-hidden": true
77
40
  }, jsx("span", null, "Strongly disagree"), jsx("span", {
78
- css: css(_templateObject3(), gridSize() * 6)
41
+ css: css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n text-align: center;\n margin: 0 auto;\n padding: 0 ", "px;\n "])), gridSize() * 6)
79
42
  }, "Neutral"), jsx("span", {
80
- css: css(_templateObject4())
43
+ css: css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n text-align: right;\n "])))
81
44
  }, "Strongly agree")));
82
45
  });
@@ -3,25 +3,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
3
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
4
4
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
5
5
 
6
- function _templateObject2() {
7
- var data = _taggedTemplateLiteral(["\n margin-top: ", "px;\n display: flex;\n justify-content: flex-end;\n\n & > * + * {\n margin-left: ", "px;\n }\n "]);
8
-
9
- _templateObject2 = function _templateObject2() {
10
- return data;
11
- };
12
-
13
- return data;
14
- }
15
-
16
- function _templateObject() {
17
- var data = _taggedTemplateLiteral(["\n font-size: ", "px;\n font-weight: 600;\n margin: 0;\n line-height: ", "px;\n "]);
18
-
19
- _templateObject = function _templateObject() {
20
- return data;
21
- };
22
-
23
- return data;
24
- }
6
+ var _templateObject, _templateObject2;
25
7
 
26
8
  /** @jsx jsx */
27
9
  import { useCallback, useState } from 'react';
@@ -61,11 +43,11 @@ export default (function (_ref) {
61
43
  }(), [setPending, onAnswer]);
62
44
  var isDisabled = Boolean(pending);
63
45
  return jsx(SuccessContainer, null, jsx("h1", {
64
- css: css(_templateObject(), fontSize(), gridSize() * 3)
46
+ css: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: ", "px;\n font-weight: 600;\n margin: 0;\n line-height: ", "px;\n "])), fontSize(), gridSize() * 3)
65
47
  }, "Thanks for your feedback"), jsx("p", null, "Are you interested in participating in our research?"), jsx("p", null, "Sign up for the", ' ', jsx("a", {
66
48
  href: "https://www.atlassian.com/research-group"
67
49
  }, "Atlassian Research Group"), ' ', "and we may contact you in the future with research opportunities."), jsx("div", {
68
- css: css(_templateObject2(), gridSize() * 4, gridSize())
50
+ css: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n margin-top: ", "px;\n display: flex;\n justify-content: flex-end;\n\n & > * + * {\n margin-left: ", "px;\n }\n "])), gridSize() * 4, gridSize())
69
51
  }, jsx(Button, {
70
52
  appearance: "subtle",
71
53
  onClick: function onClick() {
@@ -1,15 +1,7 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
  import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
3
3
 
4
- function _templateObject() {
5
- var data = _taggedTemplateLiteral(["\n font-size: ", "px;\n font-weight: 600;\n line-height: ", "px;\n margin: 0;\n "]);
6
-
7
- _templateObject = function _templateObject() {
8
- return data;
9
- };
10
-
11
- return data;
12
- }
4
+ var _templateObject;
13
5
 
14
6
  /** @jsx jsx */
15
7
  import { css, jsx } from '@emotion/core';
@@ -19,6 +11,6 @@ export default (function (_ref) {
19
11
  _objectDestructuringEmpty(_ref);
20
12
 
21
13
  return jsx(SuccessContainer, null, jsx("h1", {
22
- css: css(_templateObject(), fontSize(), gridSize() * 3)
14
+ css: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: ", "px;\n font-weight: 600;\n line-height: ", "px;\n margin: 0;\n "])), fontSize(), gridSize() * 3)
23
15
  }, "Thanks for signing up"), jsx("p", null, "We may reach out to you in the future to participate in additional research."));
24
16
  });
@@ -1,39 +1,22 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
 
3
- function _templateObject2() {
4
- var data = _taggedTemplateLiteral(["\n position: absolute;\n top: ", "px;\n left: ", "px;\n "]);
5
-
6
- _templateObject2 = function _templateObject2() {
7
- return data;
8
- };
9
-
10
- return data;
11
- }
12
-
13
- function _templateObject() {
14
- var data = _taggedTemplateLiteral(["\n margin-left: ", "px;\n "]);
15
-
16
- _templateObject = function _templateObject() {
17
- return data;
18
- };
19
-
20
- return data;
21
- }
3
+ var _templateObject, _templateObject2;
22
4
 
23
5
  /** @jsx jsx */
24
6
  import { css, jsx } from '@emotion/core';
25
7
  import CheckCircleIcon from '@atlaskit/icon/glyph/check-circle';
26
8
  import { G300 } from '@atlaskit/theme/colors';
27
9
  import { gridSize } from '@atlaskit/theme/constants';
10
+ import { token } from '@atlaskit/tokens';
28
11
  export default (function (_ref) {
29
12
  var children = _ref.children;
30
13
  return jsx("section", {
31
- css: css(_templateObject(), gridSize() * 5)
14
+ css: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n margin-left: ", "px;\n "])), gridSize() * 5)
32
15
  }, jsx("div", {
33
- css: css(_templateObject2(), gridSize() * 3, gridSize() * 3)
16
+ css: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n top: ", "px;\n left: ", "px;\n "])), gridSize() * 3, gridSize() * 3)
34
17
  }, jsx(CheckCircleIcon, {
35
18
  label: "",
36
19
  "aria-hidden": true,
37
- primaryColor: G300
20
+ primaryColor: token('color.icon.success', G300)
38
21
  })), children);
39
22
  });
@@ -1,45 +1,27 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
 
3
- function _templateObject2() {
4
- var data = _taggedTemplateLiteral(["\n position: absolute;\n top: ", "px;\n right: ", "px;\n "]);
5
-
6
- _templateObject2 = function _templateObject2() {
7
- return data;
8
- };
9
-
10
- return data;
11
- }
12
-
13
- function _templateObject() {
14
- var data = _taggedTemplateLiteral(["\n background-color: ", ";\n border-radius: ", "px;\n padding: ", "px;\n ", "\n width: ", "px;\n "]);
15
-
16
- _templateObject = function _templateObject() {
17
- return data;
18
- };
19
-
20
- return data;
21
- }
3
+ var _templateObject, _templateObject2;
22
4
 
23
5
  /** @jsx jsx */
24
6
  import { css, jsx } from '@emotion/core';
25
7
  import Button from '@atlaskit/button/custom-theme-button';
26
8
  import CrossIcon from '@atlaskit/icon/glyph/cross';
27
- import { N0, N50 } from '@atlaskit/theme/colors';
9
+ import { N0, N50, N50A, N60A } from '@atlaskit/theme/colors';
28
10
  import { borderRadius, gridSize } from '@atlaskit/theme/constants';
29
- import { e500 } from '@atlaskit/theme/elevation';
11
+ import { token } from '@atlaskit/tokens';
30
12
  import { surveyInnerWidth } from '../constants';
31
13
  var padding = gridSize() * 3;
32
14
  export default (function (_ref) {
33
15
  var children = _ref.children,
34
16
  onDismiss = _ref.onDismiss;
35
17
  return jsx("div", {
36
- css: css(_templateObject(), 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)
37
19
  }, jsx("div", {
38
- css: css(_templateObject2(), padding - gridSize(), padding - gridSize())
20
+ css: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: absolute;\n top: ", "px;\n right: ", "px;\n "])), padding - gridSize(), padding - gridSize())
39
21
  }, jsx(Button, {
40
22
  iconBefore: jsx(CrossIcon, {
41
23
  label: "",
42
- primaryColor: N50
24
+ primaryColor: token('color.icon.subtle', N50)
43
25
  }),
44
26
  "aria-label": "Dismiss",
45
27
  appearance: "subtle",
@@ -2,25 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
 
5
- function _templateObject2() {
6
- var data = _taggedTemplateLiteral(["\n transition: max-height ", "ms ease-in-out;\n overflow: hidden;\n max-height: ", ";\n "]);
7
-
8
- _templateObject2 = function _templateObject2() {
9
- return data;
10
- };
11
-
12
- return data;
13
- }
14
-
15
- function _templateObject() {
16
- var data = _taggedTemplateLiteral(["\n font-size: ", "px;\n font-weight: 600;\n "]);
17
-
18
- _templateObject = function _templateObject() {
19
- return data;
20
- };
21
-
22
- return data;
23
- }
5
+ var _templateObject, _templateObject2;
24
6
 
25
7
  /** @jsx jsx */
26
8
  import { useCallback, useRef, useState } from 'react';
@@ -89,7 +71,7 @@ export default (function (_ref) {
89
71
  "aria-labelledby": "contextualSurveyQuestion"
90
72
  }, jsx("h1", {
91
73
  id: "contextualSurveyQuestion",
92
- css: css(_templateObject(), fontSize())
74
+ css: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: ", "px;\n font-weight: 600;\n "])), fontSize())
93
75
  }, question), statement && jsx("p", {
94
76
  id: "contextualSurveyStatement"
95
77
  }, statement), jsx(Form, {
@@ -115,7 +97,7 @@ export default (function (_ref) {
115
97
  mountOnEnter: true
116
98
  }, function (state) {
117
99
  return jsx("div", {
118
- css: css(_templateObject2(), transitionDuration, getExpandedHeight(expandedAreaRef, state)),
100
+ css: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n transition: max-height ", "ms ease-in-out;\n overflow: hidden;\n max-height: ", ";\n "])), transitionDuration, getExpandedHeight(expandedAreaRef, state)),
119
101
  ref: expandedAreaRef
120
102
  }, jsx(Field, {
121
103
  name: "writtenFeedback",
@@ -1,14 +1,6 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
2
 
3
- function _templateObject() {
4
- var data = _taggedTemplateLiteral(["\n position: fixed;\n right: ", "px;\n bottom: ", "px;\n z-index: ", ";\n transform: translateX(", ");\n opacity: ", ";\n transition: all ", "ms ease-in-out;\n transition-property: transform, opacity;\n "]);
5
-
6
- _templateObject = function _templateObject() {
7
- return data;
8
- };
9
-
10
- return data;
11
- }
3
+ var _templateObject;
12
4
 
13
5
  /** @jsx jsx */
14
6
  import { css, jsx } from '@emotion/core';
@@ -57,7 +49,7 @@ export default function SurveyMarshal(props) {
57
49
  opacity = _getAnimationProps.opacity;
58
50
 
59
51
  return jsx("div", {
60
- css: css(_templateObject(), surveyOffset, surveyOffset, layers.flag(), translateX, opacity, animationDuration)
52
+ css: css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: fixed;\n right: ", "px;\n bottom: ", "px;\n z-index: ", ";\n transform: translateX(", ");\n opacity: ", ";\n transition: all ", "ms ease-in-out;\n transition-property: transform, opacity;\n "])), surveyOffset, surveyOffset, layers.flag(), translateX, opacity, animationDuration)
61
53
  }, children());
62
54
  });
63
55
  }
package/dist/esm/types.js CHANGED
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/contextual-survey",
3
- "version": "2.0.9",
3
+ "version": "2.1.0",
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.9",
3
+ "version": "2.1.0",
4
4
  "description": "A React component used to ask the user for feedback",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -23,13 +23,14 @@
23
23
  }
24
24
  },
25
25
  "dependencies": {
26
- "@atlaskit/button": "^15.1.0",
26
+ "@atlaskit/button": "^16.2.0",
27
27
  "@atlaskit/checkbox": "^12.1.0",
28
- "@atlaskit/form": "^8.0.0",
29
- "@atlaskit/icon": "^21.1.0",
30
- "@atlaskit/textarea": "^4.0.0",
31
- "@atlaskit/theme": "^11.0.0",
32
- "@atlaskit/tooltip": "^17.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.8.0",
33
+ "@atlaskit/tooltip": "^17.5.0",
33
34
  "@babel/runtime": "^7.0.0",
34
35
  "@emotion/core": "^10.0.9",
35
36
  "react-transition-group": "^4.4.1"
@@ -40,6 +41,7 @@
40
41
  "devDependencies": {
41
42
  "@atlaskit/checkbox": "^12.1.0",
42
43
  "@atlaskit/docs": "*",
44
+ "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
43
45
  "@testing-library/react": "^8.0.1",
44
46
  "typescript": "3.9.6"
45
47
  },
@@ -51,6 +53,10 @@
51
53
  "techstack": {
52
54
  "@atlassian/frontend": {
53
55
  "import-structure": "atlassian-conventions"
56
+ },
57
+ "@repo/internal": {
58
+ "theming": "tokens"
54
59
  }
55
- }
60
+ },
61
+ "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
56
62
  }