@atlaskit/contextual-survey 2.2.13 → 2.2.15
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 +13 -0
- package/dist/cjs/components/FeedbackAcknowledgement.js +7 -4
- package/dist/cjs/components/SignUpPrompt.js +15 -5
- package/dist/cjs/components/SignUpSuccess.js +7 -4
- package/dist/cjs/components/SurveyForm.js +12 -5
- package/dist/cjs/components/SurveyMarshal.js +13 -8
- package/dist/es2019/components/FeedbackAcknowledgement.js +6 -7
- package/dist/es2019/components/SignUpPrompt.js +14 -16
- package/dist/es2019/components/SignUpSuccess.js +6 -7
- package/dist/es2019/components/SurveyForm.js +10 -9
- package/dist/es2019/components/SurveyMarshal.js +12 -14
- package/dist/esm/components/FeedbackAcknowledgement.js +6 -4
- package/dist/esm/components/SignUpPrompt.js +14 -5
- package/dist/esm/components/SignUpSuccess.js +6 -4
- package/dist/esm/components/SurveyForm.js +10 -4
- package/dist/esm/components/SurveyMarshal.js +12 -7
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/contextual-survey
|
|
2
2
|
|
|
3
|
+
## 2.2.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#84829](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/84829) [`a6299ec57bc3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a6299ec57bc3) - Internal change to replace hardcoded font fallback values with an exported constant. There is no expected visual difference.
|
|
8
|
+
|
|
9
|
+
## 2.2.14
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#83176](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83176) [`5c64e4657ef3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/5c64e4657ef3) - [ux] Minor changes to replace deprecated font tokens with new tokens. There may be some very slight differences in font size if the previous value was incorrectly applied, and slight differences in line height to match the new typography system.
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 2.2.13
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -5,14 +5,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
8
|
var _react = require("@emotion/react");
|
|
10
|
-
var
|
|
9
|
+
var _typography = require("@atlaskit/theme/typography");
|
|
11
10
|
var _SuccessContainer = _interopRequireDefault(require("./SuccessContainer"));
|
|
12
|
-
var _templateObject;
|
|
13
11
|
/** @jsx jsx */
|
|
12
|
+
|
|
13
|
+
var styles = (0, _react.css)({
|
|
14
|
+
font: "var(--ds-font-heading-xsmall, ".concat(_typography.fontFallback.heading.xsmall, ")"),
|
|
15
|
+
marginTop: 0
|
|
16
|
+
});
|
|
14
17
|
var _default = exports.default = function _default() {
|
|
15
18
|
return (0, _react.jsx)(_SuccessContainer.default, null, (0, _react.jsx)("h1", {
|
|
16
|
-
css:
|
|
19
|
+
css: styles
|
|
17
20
|
}, "Thanks for your feedback"));
|
|
18
21
|
};
|
|
@@ -5,17 +5,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
8
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
9
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
11
|
var _react = require("react");
|
|
13
12
|
var _react2 = require("@emotion/react");
|
|
14
13
|
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
|
|
15
|
-
var
|
|
14
|
+
var _typography = require("@atlaskit/theme/typography");
|
|
16
15
|
var _SuccessContainer = _interopRequireDefault(require("./SuccessContainer"));
|
|
17
|
-
var _templateObject, _templateObject2;
|
|
18
16
|
/** @jsx jsx */
|
|
17
|
+
|
|
18
|
+
var styles = (0, _react2.css)({
|
|
19
|
+
font: "var(--ds-font-heading-xsmall, ".concat(_typography.fontFallback.heading.xsmall, ")"),
|
|
20
|
+
margin: 0
|
|
21
|
+
});
|
|
19
22
|
var _default = exports.default = function _default(_ref) {
|
|
20
23
|
var onAnswer = _ref.onAnswer;
|
|
21
24
|
var _useState = (0, _react.useState)(null),
|
|
@@ -42,11 +45,18 @@ var _default = exports.default = function _default(_ref) {
|
|
|
42
45
|
}(), [setPending, onAnswer]);
|
|
43
46
|
var isDisabled = Boolean(pending);
|
|
44
47
|
return (0, _react2.jsx)(_SuccessContainer.default, null, (0, _react2.jsx)("h1", {
|
|
45
|
-
css:
|
|
48
|
+
css: styles
|
|
46
49
|
}, "Thanks for your feedback"), (0, _react2.jsx)("p", null, "Are you interested in participating in our research?"), (0, _react2.jsx)("p", null, "Sign up for the", ' ', (0, _react2.jsx)("a", {
|
|
47
50
|
href: "https://www.atlassian.com/research-group"
|
|
48
51
|
}, "Atlassian Research Group"), ' ', "and we may contact you in the future with research opportunities."), (0, _react2.jsx)("div", {
|
|
49
|
-
css: (0, _react2.css)(
|
|
52
|
+
css: (0, _react2.css)({
|
|
53
|
+
marginTop: "var(--ds-space-400, 32px)",
|
|
54
|
+
display: 'flex',
|
|
55
|
+
justifyContent: 'flex-end',
|
|
56
|
+
'& > * + *': {
|
|
57
|
+
marginLeft: "var(--ds-space-100, 8px)"
|
|
58
|
+
}
|
|
59
|
+
})
|
|
50
60
|
}, (0, _react2.jsx)(_customThemeButton.default, {
|
|
51
61
|
appearance: "subtle",
|
|
52
62
|
onClick: function onClick() {
|
|
@@ -5,16 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
8
|
var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime/helpers/objectDestructuringEmpty"));
|
|
10
9
|
var _react = require("@emotion/react");
|
|
11
|
-
var
|
|
10
|
+
var _typography = require("@atlaskit/theme/typography");
|
|
12
11
|
var _SuccessContainer = _interopRequireDefault(require("./SuccessContainer"));
|
|
13
|
-
var _templateObject;
|
|
14
12
|
/** @jsx jsx */
|
|
13
|
+
|
|
14
|
+
var styles = (0, _react.css)({
|
|
15
|
+
font: "var(--ds-font-heading-xsmall, ".concat(_typography.fontFallback.heading.xsmall, ")"),
|
|
16
|
+
margin: 0
|
|
17
|
+
});
|
|
15
18
|
var _default = exports.default = function _default(_ref) {
|
|
16
19
|
(0, _objectDestructuringEmpty2.default)(_ref);
|
|
17
20
|
return (0, _react.jsx)(_SuccessContainer.default, null, (0, _react.jsx)("h1", {
|
|
18
|
-
css:
|
|
21
|
+
css: styles
|
|
19
22
|
}, "Thanks for signing up"), (0, _react.jsx)("p", null, "We may reach out to you in the future to participate in additional research."));
|
|
20
23
|
};
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
11
|
var _react = require("react");
|
|
13
12
|
var _react2 = require("@emotion/react");
|
|
@@ -18,10 +17,14 @@ var _form = _interopRequireWildcard(require("@atlaskit/form"));
|
|
|
18
17
|
var _textarea = _interopRequireDefault(require("@atlaskit/textarea"));
|
|
19
18
|
var _constants = require("@atlaskit/theme/constants");
|
|
20
19
|
var _FeedbackScoreButtons = _interopRequireDefault(require("./FeedbackScoreButtons"));
|
|
21
|
-
var _templateObject, _templateObject2;
|
|
22
|
-
/** @jsx jsx */
|
|
23
20
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
24
21
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
|
+
/** @jsx jsx */
|
|
23
|
+
|
|
24
|
+
var headingStyles = (0, _react2.css)({
|
|
25
|
+
fontSize: "".concat((0, _constants.fontSize)(), "px"),
|
|
26
|
+
fontWeight: 600
|
|
27
|
+
});
|
|
25
28
|
var getExpandedHeight = function getExpandedHeight(ref, state) {
|
|
26
29
|
if (!ref.current) {
|
|
27
30
|
return '0';
|
|
@@ -71,7 +74,7 @@ var _default = exports.default = function _default(_ref) {
|
|
|
71
74
|
"aria-labelledby": "contextualSurveyQuestion"
|
|
72
75
|
}, (0, _react2.jsx)("h1", {
|
|
73
76
|
id: "contextualSurveyQuestion",
|
|
74
|
-
css:
|
|
77
|
+
css: headingStyles
|
|
75
78
|
}, question), statement && (0, _react2.jsx)("p", {
|
|
76
79
|
id: "contextualSurveyStatement"
|
|
77
80
|
}, statement), (0, _react2.jsx)(_form.default, {
|
|
@@ -97,7 +100,11 @@ var _default = exports.default = function _default(_ref) {
|
|
|
97
100
|
mountOnEnter: true
|
|
98
101
|
}, function (state) {
|
|
99
102
|
return (0, _react2.jsx)("div", {
|
|
100
|
-
css: (0, _react2.css)(
|
|
103
|
+
css: (0, _react2.css)({
|
|
104
|
+
transition: "max-height ".concat(transitionDuration, "ms ease-in-out"),
|
|
105
|
+
overflow: 'hidden',
|
|
106
|
+
maxHeight: getExpandedHeight(expandedAreaRef, state)
|
|
107
|
+
}),
|
|
101
108
|
ref: expandedAreaRef
|
|
102
109
|
}, (0, _react2.jsx)(_form.Field, {
|
|
103
110
|
name: "writtenFeedback",
|
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.default = SurveyMarshal;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
7
|
var _react = require("@emotion/react");
|
|
10
8
|
var _reactTransitionGroup = require("react-transition-group");
|
|
11
9
|
var _constants = require("@atlaskit/theme/constants");
|
|
12
10
|
var _constants2 = require("../constants");
|
|
13
|
-
var _templateObject;
|
|
14
11
|
/** @jsx jsx */
|
|
12
|
+
|
|
15
13
|
var animationDuration = 300;
|
|
16
14
|
var offscreen = {
|
|
17
15
|
translateX: "".concat(_constants2.surveyInnerWidth + _constants2.surveyOffset, "px"),
|
|
@@ -19,10 +17,6 @@ var offscreen = {
|
|
|
19
17
|
};
|
|
20
18
|
var getAnimationProps = function getAnimationProps(state) {
|
|
21
19
|
switch (state) {
|
|
22
|
-
case 'entering':
|
|
23
|
-
{
|
|
24
|
-
return offscreen;
|
|
25
|
-
}
|
|
26
20
|
case 'entered':
|
|
27
21
|
{
|
|
28
22
|
return {
|
|
@@ -30,6 +24,8 @@ var getAnimationProps = function getAnimationProps(state) {
|
|
|
30
24
|
opacity: '1'
|
|
31
25
|
};
|
|
32
26
|
}
|
|
27
|
+
case 'entering':
|
|
28
|
+
case 'unmounted':
|
|
33
29
|
case 'exited':
|
|
34
30
|
case 'exiting':
|
|
35
31
|
{
|
|
@@ -49,7 +45,16 @@ function SurveyMarshal(props) {
|
|
|
49
45
|
translateX = _getAnimationProps.translateX,
|
|
50
46
|
opacity = _getAnimationProps.opacity;
|
|
51
47
|
return (0, _react.jsx)("div", {
|
|
52
|
-
css: (0, _react.css)(
|
|
48
|
+
css: (0, _react.css)({
|
|
49
|
+
position: 'fixed',
|
|
50
|
+
right: "".concat(_constants2.surveyOffset, "px"),
|
|
51
|
+
bottom: "".concat(_constants2.surveyOffset, "px"),
|
|
52
|
+
zIndex: _constants.layers.flag(),
|
|
53
|
+
transform: "translateX(".concat(translateX, ")"),
|
|
54
|
+
opacity: opacity,
|
|
55
|
+
transition: "all ".concat(animationDuration, "ms ease-in-out"),
|
|
56
|
+
transitionProperty: 'transform, opacity'
|
|
57
|
+
})
|
|
53
58
|
}, children());
|
|
54
59
|
});
|
|
55
60
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { css, jsx } from '@emotion/react';
|
|
3
|
-
import {
|
|
3
|
+
import { fontFallback } from '@atlaskit/theme/typography';
|
|
4
4
|
import SuccessContainer from './SuccessContainer';
|
|
5
|
+
const styles = css({
|
|
6
|
+
font: `var(--ds-font-heading-xsmall, ${fontFallback.heading.xsmall})`,
|
|
7
|
+
marginTop: 0
|
|
8
|
+
});
|
|
5
9
|
export default (() => jsx(SuccessContainer, null, jsx("h1", {
|
|
6
|
-
css:
|
|
7
|
-
font-size: ${fontSize()}px;
|
|
8
|
-
font-weight: 600;
|
|
9
|
-
margin-top: 0;
|
|
10
|
-
line-height: ${"var(--ds-font-lineHeight-300, 24px)"};
|
|
11
|
-
`
|
|
10
|
+
css: styles
|
|
12
11
|
}, "Thanks for your feedback")));
|
|
@@ -2,8 +2,12 @@
|
|
|
2
2
|
import { useCallback, useState } from 'react';
|
|
3
3
|
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
5
|
-
import {
|
|
5
|
+
import { fontFallback } from '@atlaskit/theme/typography';
|
|
6
6
|
import SuccessContainer from './SuccessContainer';
|
|
7
|
+
const styles = css({
|
|
8
|
+
font: `var(--ds-font-heading-xsmall, ${fontFallback.heading.xsmall})`,
|
|
9
|
+
margin: 0
|
|
10
|
+
});
|
|
7
11
|
export default (({
|
|
8
12
|
onAnswer
|
|
9
13
|
}) => {
|
|
@@ -14,24 +18,18 @@ export default (({
|
|
|
14
18
|
}, [setPending, onAnswer]);
|
|
15
19
|
const isDisabled = Boolean(pending);
|
|
16
20
|
return jsx(SuccessContainer, null, jsx("h1", {
|
|
17
|
-
css:
|
|
18
|
-
font-size: ${fontSize()}px;
|
|
19
|
-
font-weight: 600;
|
|
20
|
-
margin: 0;
|
|
21
|
-
line-height: ${"var(--ds-font-lineHeight-300, 24px)"};
|
|
22
|
-
`
|
|
21
|
+
css: styles
|
|
23
22
|
}, "Thanks for your feedback"), jsx("p", null, "Are you interested in participating in our research?"), jsx("p", null, "Sign up for the", ' ', jsx("a", {
|
|
24
23
|
href: "https://www.atlassian.com/research-group"
|
|
25
24
|
}, "Atlassian Research Group"), ' ', "and we may contact you in the future with research opportunities."), jsx("div", {
|
|
26
|
-
css: css
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
`
|
|
25
|
+
css: css({
|
|
26
|
+
marginTop: "var(--ds-space-400, 32px)",
|
|
27
|
+
display: 'flex',
|
|
28
|
+
justifyContent: 'flex-end',
|
|
29
|
+
'& > * + *': {
|
|
30
|
+
marginLeft: "var(--ds-space-100, 8px)"
|
|
31
|
+
}
|
|
32
|
+
})
|
|
35
33
|
}, jsx(Button, {
|
|
36
34
|
appearance: "subtle",
|
|
37
35
|
onClick: () => answeredWith(false),
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { css, jsx } from '@emotion/react';
|
|
3
|
-
import {
|
|
3
|
+
import { fontFallback } from '@atlaskit/theme/typography';
|
|
4
4
|
import SuccessContainer from './SuccessContainer';
|
|
5
|
+
const styles = css({
|
|
6
|
+
font: `var(--ds-font-heading-xsmall, ${fontFallback.heading.xsmall})`,
|
|
7
|
+
margin: 0
|
|
8
|
+
});
|
|
5
9
|
export default (({}) => jsx(SuccessContainer, null, jsx("h1", {
|
|
6
|
-
css:
|
|
7
|
-
font-size: ${fontSize()}px;
|
|
8
|
-
font-weight: 600;
|
|
9
|
-
line-height: ${"var(--ds-font-lineHeight-300, 24px)"};
|
|
10
|
-
margin: 0;
|
|
11
|
-
`
|
|
10
|
+
css: styles
|
|
12
11
|
}, "Thanks for signing up"), jsx("p", null, "We may reach out to you in the future to participate in additional research.")));
|
|
@@ -9,6 +9,10 @@ import Form, { CheckboxField, Field, FormFooter } from '@atlaskit/form';
|
|
|
9
9
|
import Textarea from '@atlaskit/textarea';
|
|
10
10
|
import { fontSize } from '@atlaskit/theme/constants';
|
|
11
11
|
import FeedbackScoreButtons from './FeedbackScoreButtons';
|
|
12
|
+
const headingStyles = css({
|
|
13
|
+
fontSize: `${fontSize()}px`,
|
|
14
|
+
fontWeight: 600
|
|
15
|
+
});
|
|
12
16
|
const getExpandedHeight = (ref, state) => {
|
|
13
17
|
if (!ref.current) {
|
|
14
18
|
return '0';
|
|
@@ -53,10 +57,7 @@ export default (({
|
|
|
53
57
|
"aria-labelledby": "contextualSurveyQuestion"
|
|
54
58
|
}, jsx("h1", {
|
|
55
59
|
id: "contextualSurveyQuestion",
|
|
56
|
-
css:
|
|
57
|
-
font-size: ${fontSize()}px;
|
|
58
|
-
font-weight: 600;
|
|
59
|
-
`
|
|
60
|
+
css: headingStyles
|
|
60
61
|
}, question), statement && jsx("p", {
|
|
61
62
|
id: "contextualSurveyStatement"
|
|
62
63
|
}, statement), jsx(Form, {
|
|
@@ -80,11 +81,11 @@ export default (({
|
|
|
80
81
|
timeout: transitionDuration,
|
|
81
82
|
mountOnEnter: true
|
|
82
83
|
}, state => jsx("div", {
|
|
83
|
-
css: css
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
css: css({
|
|
85
|
+
transition: `max-height ${transitionDuration}ms ease-in-out`,
|
|
86
|
+
overflow: 'hidden',
|
|
87
|
+
maxHeight: getExpandedHeight(expandedAreaRef, state)
|
|
88
|
+
}),
|
|
88
89
|
ref: expandedAreaRef
|
|
89
90
|
}, jsx(Field, {
|
|
90
91
|
name: "writtenFeedback",
|
|
@@ -11,10 +11,6 @@ const offscreen = {
|
|
|
11
11
|
};
|
|
12
12
|
const getAnimationProps = state => {
|
|
13
13
|
switch (state) {
|
|
14
|
-
case 'entering':
|
|
15
|
-
{
|
|
16
|
-
return offscreen;
|
|
17
|
-
}
|
|
18
14
|
case 'entered':
|
|
19
15
|
{
|
|
20
16
|
return {
|
|
@@ -22,6 +18,8 @@ const getAnimationProps = state => {
|
|
|
22
18
|
opacity: '1'
|
|
23
19
|
};
|
|
24
20
|
}
|
|
21
|
+
case 'entering':
|
|
22
|
+
case 'unmounted':
|
|
25
23
|
case 'exited':
|
|
26
24
|
case 'exiting':
|
|
27
25
|
{
|
|
@@ -44,16 +42,16 @@ export default function SurveyMarshal(props) {
|
|
|
44
42
|
opacity
|
|
45
43
|
} = getAnimationProps(state);
|
|
46
44
|
return jsx("div", {
|
|
47
|
-
css: css
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
45
|
+
css: css({
|
|
46
|
+
position: 'fixed',
|
|
47
|
+
right: `${surveyOffset}px`,
|
|
48
|
+
bottom: `${surveyOffset}px`,
|
|
49
|
+
zIndex: layers.flag(),
|
|
50
|
+
transform: `translateX(${translateX})`,
|
|
51
|
+
opacity: opacity,
|
|
52
|
+
transition: `all ${animationDuration}ms ease-in-out`,
|
|
53
|
+
transitionProperty: 'transform, opacity'
|
|
54
|
+
})
|
|
57
55
|
}, children());
|
|
58
56
|
});
|
|
59
57
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
/** @jsx jsx */
|
|
4
2
|
import { css, jsx } from '@emotion/react';
|
|
5
|
-
import {
|
|
3
|
+
import { fontFallback } from '@atlaskit/theme/typography';
|
|
6
4
|
import SuccessContainer from './SuccessContainer';
|
|
5
|
+
var styles = css({
|
|
6
|
+
font: "var(--ds-font-heading-xsmall, ".concat(fontFallback.heading.xsmall, ")"),
|
|
7
|
+
marginTop: 0
|
|
8
|
+
});
|
|
7
9
|
export default (function () {
|
|
8
10
|
return jsx(SuccessContainer, null, jsx("h1", {
|
|
9
|
-
css:
|
|
11
|
+
css: styles
|
|
10
12
|
}, "Thanks for your feedback"));
|
|
11
13
|
});
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
3
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
|
-
var _templateObject, _templateObject2;
|
|
5
3
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
4
|
/** @jsx jsx */
|
|
7
5
|
import { useCallback, useState } from 'react';
|
|
8
6
|
import { css, jsx } from '@emotion/react';
|
|
9
7
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
10
|
-
import {
|
|
8
|
+
import { fontFallback } from '@atlaskit/theme/typography';
|
|
11
9
|
import SuccessContainer from './SuccessContainer';
|
|
10
|
+
var styles = css({
|
|
11
|
+
font: "var(--ds-font-heading-xsmall, ".concat(fontFallback.heading.xsmall, ")"),
|
|
12
|
+
margin: 0
|
|
13
|
+
});
|
|
12
14
|
export default (function (_ref) {
|
|
13
15
|
var onAnswer = _ref.onAnswer;
|
|
14
16
|
var _useState = useState(null),
|
|
@@ -35,11 +37,18 @@ export default (function (_ref) {
|
|
|
35
37
|
}(), [setPending, onAnswer]);
|
|
36
38
|
var isDisabled = Boolean(pending);
|
|
37
39
|
return jsx(SuccessContainer, null, jsx("h1", {
|
|
38
|
-
css:
|
|
40
|
+
css: styles
|
|
39
41
|
}, "Thanks for your feedback"), jsx("p", null, "Are you interested in participating in our research?"), jsx("p", null, "Sign up for the", ' ', jsx("a", {
|
|
40
42
|
href: "https://www.atlassian.com/research-group"
|
|
41
43
|
}, "Atlassian Research Group"), ' ', "and we may contact you in the future with research opportunities."), jsx("div", {
|
|
42
|
-
css: css(
|
|
44
|
+
css: css({
|
|
45
|
+
marginTop: "var(--ds-space-400, 32px)",
|
|
46
|
+
display: 'flex',
|
|
47
|
+
justifyContent: 'flex-end',
|
|
48
|
+
'& > * + *': {
|
|
49
|
+
marginLeft: "var(--ds-space-100, 8px)"
|
|
50
|
+
}
|
|
51
|
+
})
|
|
43
52
|
}, jsx(Button, {
|
|
44
53
|
appearance: "subtle",
|
|
45
54
|
onClick: function onClick() {
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
1
|
import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
|
|
3
|
-
var _templateObject;
|
|
4
2
|
/** @jsx jsx */
|
|
5
3
|
import { css, jsx } from '@emotion/react';
|
|
6
|
-
import {
|
|
4
|
+
import { fontFallback } from '@atlaskit/theme/typography';
|
|
7
5
|
import SuccessContainer from './SuccessContainer';
|
|
6
|
+
var styles = css({
|
|
7
|
+
font: "var(--ds-font-heading-xsmall, ".concat(fontFallback.heading.xsmall, ")"),
|
|
8
|
+
margin: 0
|
|
9
|
+
});
|
|
8
10
|
export default (function (_ref) {
|
|
9
11
|
_objectDestructuringEmpty(_ref);
|
|
10
12
|
return jsx(SuccessContainer, null, jsx("h1", {
|
|
11
|
-
css:
|
|
13
|
+
css: styles
|
|
12
14
|
}, "Thanks for signing up"), jsx("p", null, "We may reach out to you in the future to participate in additional research."));
|
|
13
15
|
});
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
|
-
var _templateObject, _templateObject2;
|
|
5
3
|
/** @jsx jsx */
|
|
6
4
|
import { useCallback, useRef, useState } from 'react';
|
|
7
5
|
import { css, jsx } from '@emotion/react';
|
|
@@ -12,6 +10,10 @@ import Form, { CheckboxField, Field, FormFooter } from '@atlaskit/form';
|
|
|
12
10
|
import Textarea from '@atlaskit/textarea';
|
|
13
11
|
import { fontSize } from '@atlaskit/theme/constants';
|
|
14
12
|
import FeedbackScoreButtons from './FeedbackScoreButtons';
|
|
13
|
+
var headingStyles = css({
|
|
14
|
+
fontSize: "".concat(fontSize(), "px"),
|
|
15
|
+
fontWeight: 600
|
|
16
|
+
});
|
|
15
17
|
var getExpandedHeight = function getExpandedHeight(ref, state) {
|
|
16
18
|
if (!ref.current) {
|
|
17
19
|
return '0';
|
|
@@ -61,7 +63,7 @@ export default (function (_ref) {
|
|
|
61
63
|
"aria-labelledby": "contextualSurveyQuestion"
|
|
62
64
|
}, jsx("h1", {
|
|
63
65
|
id: "contextualSurveyQuestion",
|
|
64
|
-
css:
|
|
66
|
+
css: headingStyles
|
|
65
67
|
}, question), statement && jsx("p", {
|
|
66
68
|
id: "contextualSurveyStatement"
|
|
67
69
|
}, statement), jsx(Form, {
|
|
@@ -87,7 +89,11 @@ export default (function (_ref) {
|
|
|
87
89
|
mountOnEnter: true
|
|
88
90
|
}, function (state) {
|
|
89
91
|
return jsx("div", {
|
|
90
|
-
css: css(
|
|
92
|
+
css: css({
|
|
93
|
+
transition: "max-height ".concat(transitionDuration, "ms ease-in-out"),
|
|
94
|
+
overflow: 'hidden',
|
|
95
|
+
maxHeight: getExpandedHeight(expandedAreaRef, state)
|
|
96
|
+
}),
|
|
91
97
|
ref: expandedAreaRef
|
|
92
98
|
}, jsx(Field, {
|
|
93
99
|
name: "writtenFeedback",
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
var _templateObject;
|
|
3
1
|
/** @jsx jsx */
|
|
4
2
|
|
|
5
3
|
import { css, jsx } from '@emotion/react';
|
|
@@ -13,10 +11,6 @@ var offscreen = {
|
|
|
13
11
|
};
|
|
14
12
|
var getAnimationProps = function getAnimationProps(state) {
|
|
15
13
|
switch (state) {
|
|
16
|
-
case 'entering':
|
|
17
|
-
{
|
|
18
|
-
return offscreen;
|
|
19
|
-
}
|
|
20
14
|
case 'entered':
|
|
21
15
|
{
|
|
22
16
|
return {
|
|
@@ -24,6 +18,8 @@ var getAnimationProps = function getAnimationProps(state) {
|
|
|
24
18
|
opacity: '1'
|
|
25
19
|
};
|
|
26
20
|
}
|
|
21
|
+
case 'entering':
|
|
22
|
+
case 'unmounted':
|
|
27
23
|
case 'exited':
|
|
28
24
|
case 'exiting':
|
|
29
25
|
{
|
|
@@ -43,7 +39,16 @@ export default function SurveyMarshal(props) {
|
|
|
43
39
|
translateX = _getAnimationProps.translateX,
|
|
44
40
|
opacity = _getAnimationProps.opacity;
|
|
45
41
|
return jsx("div", {
|
|
46
|
-
css: css(
|
|
42
|
+
css: css({
|
|
43
|
+
position: 'fixed',
|
|
44
|
+
right: "".concat(surveyOffset, "px"),
|
|
45
|
+
bottom: "".concat(surveyOffset, "px"),
|
|
46
|
+
zIndex: layers.flag(),
|
|
47
|
+
transform: "translateX(".concat(translateX, ")"),
|
|
48
|
+
opacity: opacity,
|
|
49
|
+
transition: "all ".concat(animationDuration, "ms ease-in-out"),
|
|
50
|
+
transitionProperty: 'transform, opacity'
|
|
51
|
+
})
|
|
47
52
|
}, children());
|
|
48
53
|
});
|
|
49
54
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/contextual-survey",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.15",
|
|
4
4
|
"description": "A React component used to ask the user for feedback",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@atlaskit/button": "^17.
|
|
38
|
+
"@atlaskit/button": "^17.8.0",
|
|
39
39
|
"@atlaskit/checkbox": "^13.1.0",
|
|
40
|
-
"@atlaskit/form": "^9.0
|
|
40
|
+
"@atlaskit/form": "^9.1.0",
|
|
41
41
|
"@atlaskit/icon": "^22.1.0",
|
|
42
|
-
"@atlaskit/textarea": "^5.
|
|
43
|
-
"@atlaskit/theme": "^12.
|
|
42
|
+
"@atlaskit/textarea": "^5.2.0",
|
|
43
|
+
"@atlaskit/theme": "^12.7.0",
|
|
44
44
|
"@atlaskit/tokens": "^1.42.0",
|
|
45
45
|
"@atlaskit/tooltip": "^18.1.0",
|
|
46
46
|
"@babel/runtime": "^7.0.0",
|