@atlaskit/contextual-survey 2.2.7 → 2.2.9
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 +12 -0
- package/dist/cjs/components/FeedbackAcknowledgement.js +3 -3
- package/dist/cjs/components/FeedbackScoreButtons.js +11 -11
- package/dist/cjs/components/SignUpPrompt.js +8 -8
- package/dist/cjs/components/SignUpSuccess.js +4 -4
- package/dist/cjs/components/SuccessContainer.js +6 -6
- package/dist/cjs/components/SurveyContainer.js +7 -7
- package/dist/cjs/components/SurveyForm.js +16 -16
- package/dist/cjs/components/SurveyMarshal.js +4 -4
- package/dist/es2019/components/FeedbackAcknowledgement.js +1 -1
- package/dist/es2019/components/FeedbackScoreButtons.js +1 -1
- package/dist/es2019/components/SignUpPrompt.js +1 -1
- package/dist/es2019/components/SignUpSuccess.js +1 -1
- package/dist/es2019/components/SuccessContainer.js +1 -1
- package/dist/es2019/components/SurveyContainer.js +1 -1
- package/dist/es2019/components/SurveyForm.js +1 -1
- package/dist/es2019/components/SurveyMarshal.js +1 -1
- package/dist/esm/components/FeedbackAcknowledgement.js +1 -1
- package/dist/esm/components/FeedbackScoreButtons.js +1 -1
- package/dist/esm/components/SignUpPrompt.js +1 -1
- package/dist/esm/components/SignUpSuccess.js +1 -1
- package/dist/esm/components/SuccessContainer.js +1 -1
- package/dist/esm/components/SurveyContainer.js +1 -1
- package/dist/esm/components/SurveyForm.js +1 -1
- package/dist/esm/components/SurveyMarshal.js +1 -1
- package/dist/types/components/FeedbackAcknowledgement.d.ts +3 -2
- package/dist/types/components/FeedbackScoreButtons.d.ts +3 -2
- package/dist/types/components/SignUpPrompt.d.ts +2 -2
- package/dist/types/components/SignUpSuccess.d.ts +3 -2
- package/dist/types/components/SuccessContainer.d.ts +3 -1
- package/dist/types/components/SurveyContainer.d.ts +3 -1
- package/dist/types/components/SurveyForm.d.ts +2 -2
- package/dist/types/components/SurveyMarshal.d.ts +2 -1
- package/dist/types-ts4.5/components/FeedbackAcknowledgement.d.ts +3 -2
- package/dist/types-ts4.5/components/FeedbackScoreButtons.d.ts +3 -2
- package/dist/types-ts4.5/components/SignUpPrompt.d.ts +2 -2
- package/dist/types-ts4.5/components/SignUpSuccess.d.ts +3 -2
- package/dist/types-ts4.5/components/SuccessContainer.d.ts +3 -1
- package/dist/types-ts4.5/components/SurveyContainer.d.ts +3 -1
- package/dist/types-ts4.5/components/SurveyForm.d.ts +2 -2
- package/dist/types-ts4.5/components/SurveyMarshal.d.ts +2 -1
- package/package.json +5 -5
- package/tmp/api-report-tmp.d.ts +0 -61
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/contextual-survey
|
|
2
2
|
|
|
3
|
+
## 2.2.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#57124](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/57124) [`7ee324f9de67`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7ee324f9de67) - Upgrade Emotion v10 (@emotion/core) to Emotion v11 (@emotion/react). No behaviour change expected.
|
|
8
|
+
|
|
9
|
+
## 2.2.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
3
15
|
## 2.2.7
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
-
var
|
|
9
|
+
var _react = require("@emotion/react");
|
|
10
10
|
var _constants = require("@atlaskit/theme/constants");
|
|
11
11
|
var _SuccessContainer = _interopRequireDefault(require("./SuccessContainer"));
|
|
12
12
|
var _templateObject;
|
|
13
13
|
/** @jsx jsx */
|
|
14
14
|
var _default = exports.default = function _default() {
|
|
15
|
-
return (0,
|
|
16
|
-
css: (0,
|
|
15
|
+
return (0, _react.jsx)(_SuccessContainer.default, null, (0, _react.jsx)("h1", {
|
|
16
|
+
css: (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n font-weight: 600;\n margin-top: 0;\n line-height: ", ";\n "])), (0, _constants.fontSize)(), "var(--ds-font-lineHeight-300, 24px)")
|
|
17
17
|
}, "Thanks for your feedback"));
|
|
18
18
|
};
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
-
var
|
|
9
|
+
var _react = require("@emotion/react");
|
|
10
10
|
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
|
|
11
11
|
var _colors = require("@atlaskit/theme/colors");
|
|
12
12
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
@@ -16,18 +16,18 @@ var tooltipMessage = ['Strongly disagree', 'Disagree', 'Slightly disagree', 'Neu
|
|
|
16
16
|
var _default = exports.default = function _default(_ref) {
|
|
17
17
|
var onChange = _ref.onChange,
|
|
18
18
|
value = _ref.value;
|
|
19
|
-
return (0,
|
|
20
|
-
css: (0,
|
|
19
|
+
return (0, _react.jsx)("div", null, (0, _react.jsx)("div", {
|
|
20
|
+
css: (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: space-between;\n\n & > * + * {\n margin-left: ", ";\n }\n\n & > * {\n flex: 1;\n\n & > button {\n justify-content: center;\n }\n }\n "])), "var(--ds-space-100, 8px)")
|
|
21
21
|
}, Array.from({
|
|
22
22
|
length: 7
|
|
23
23
|
}, function (_, i) {
|
|
24
24
|
var score = i + 1;
|
|
25
25
|
var isSelected = value === score;
|
|
26
|
-
return (0,
|
|
26
|
+
return (0, _react.jsx)(_tooltip.default, {
|
|
27
27
|
content: tooltipMessage[i],
|
|
28
28
|
key: score,
|
|
29
29
|
hideTooltipOnClick: true
|
|
30
|
-
}, (0,
|
|
30
|
+
}, (0, _react.jsx)(_customThemeButton.default, {
|
|
31
31
|
onClick: function onClick() {
|
|
32
32
|
return onChange(score);
|
|
33
33
|
},
|
|
@@ -37,12 +37,12 @@ var _default = exports.default = function _default(_ref) {
|
|
|
37
37
|
"aria-label": tooltipMessage[i],
|
|
38
38
|
shouldFitContainer: true
|
|
39
39
|
}, score));
|
|
40
|
-
})), (0,
|
|
41
|
-
css: (0,
|
|
40
|
+
})), (0, _react.jsx)("div", {
|
|
41
|
+
css: (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n font-size: 12px;\n font-weight: 600;\n color: ", ";\n display: flex;\n margin-top: ", ";\n margin-bottom: ", ";\n\n & > span {\n width: ", ";\n }\n "])), "var(--ds-text-subtlest, ".concat(_colors.N200, ")"), "var(--ds-space-100, 8px)", "var(--ds-space-300, 24px)", "var(--ds-space-1000, 80px)"),
|
|
42
42
|
"aria-hidden": true
|
|
43
|
-
}, (0,
|
|
44
|
-
css: (0,
|
|
45
|
-
}, "Neutral"), (0,
|
|
46
|
-
css: (0,
|
|
43
|
+
}, (0, _react.jsx)("span", null, "Strongly disagree"), (0, _react.jsx)("span", {
|
|
44
|
+
css: (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n text-align: center;\n margin: 0 auto;\n padding: 0 ", ";\n "])), "var(--ds-space-600, 48px)")
|
|
45
|
+
}, "Neutral"), (0, _react.jsx)("span", {
|
|
46
|
+
css: (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n text-align: right;\n "])))
|
|
47
47
|
}, "Strongly agree")));
|
|
48
48
|
};
|
|
@@ -10,7 +10,7 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
|
|
|
10
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
12
|
var _react = require("react");
|
|
13
|
-
var
|
|
13
|
+
var _react2 = require("@emotion/react");
|
|
14
14
|
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
|
|
15
15
|
var _constants = require("@atlaskit/theme/constants");
|
|
16
16
|
var _SuccessContainer = _interopRequireDefault(require("./SuccessContainer"));
|
|
@@ -41,20 +41,20 @@ var _default = exports.default = function _default(_ref) {
|
|
|
41
41
|
};
|
|
42
42
|
}(), [setPending, onAnswer]);
|
|
43
43
|
var isDisabled = Boolean(pending);
|
|
44
|
-
return (0,
|
|
45
|
-
css: (0,
|
|
46
|
-
}, "Thanks for your feedback"), (0,
|
|
44
|
+
return (0, _react2.jsx)(_SuccessContainer.default, null, (0, _react2.jsx)("h1", {
|
|
45
|
+
css: (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n font-weight: 600;\n margin: 0;\n line-height: ", ";\n "])), (0, _constants.fontSize)(), "var(--ds-font-lineHeight-300, 24px)")
|
|
46
|
+
}, "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
47
|
href: "https://www.atlassian.com/research-group"
|
|
48
|
-
}, "Atlassian Research Group"), ' ', "and we may contact you in the future with research opportunities."), (0,
|
|
49
|
-
css: (0,
|
|
50
|
-
}, (0,
|
|
48
|
+
}, "Atlassian Research Group"), ' ', "and we may contact you in the future with research opportunities."), (0, _react2.jsx)("div", {
|
|
49
|
+
css: (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin-top: ", ";\n display: flex;\n justify-content: flex-end;\n\n & > * + * {\n margin-left: ", ";\n }\n "])), "var(--ds-space-400, 32px)", "var(--ds-space-100, 8px)")
|
|
50
|
+
}, (0, _react2.jsx)(_customThemeButton.default, {
|
|
51
51
|
appearance: "subtle",
|
|
52
52
|
onClick: function onClick() {
|
|
53
53
|
return answeredWith(false);
|
|
54
54
|
},
|
|
55
55
|
isDisabled: isDisabled,
|
|
56
56
|
isLoading: pending === 'no'
|
|
57
|
-
}, "No, thanks"), (0,
|
|
57
|
+
}, "No, thanks"), (0, _react2.jsx)(_customThemeButton.default, {
|
|
58
58
|
appearance: "primary",
|
|
59
59
|
onClick: function onClick() {
|
|
60
60
|
return answeredWith(true);
|
|
@@ -7,14 +7,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime/helpers/objectDestructuringEmpty"));
|
|
10
|
-
var
|
|
10
|
+
var _react = require("@emotion/react");
|
|
11
11
|
var _constants = require("@atlaskit/theme/constants");
|
|
12
12
|
var _SuccessContainer = _interopRequireDefault(require("./SuccessContainer"));
|
|
13
13
|
var _templateObject;
|
|
14
14
|
/** @jsx jsx */
|
|
15
15
|
var _default = exports.default = function _default(_ref) {
|
|
16
16
|
(0, _objectDestructuringEmpty2.default)(_ref);
|
|
17
|
-
return (0,
|
|
18
|
-
css: (0,
|
|
19
|
-
}, "Thanks for signing up"), (0,
|
|
17
|
+
return (0, _react.jsx)(_SuccessContainer.default, null, (0, _react.jsx)("h1", {
|
|
18
|
+
css: (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n font-weight: 600;\n line-height: ", ";\n margin: 0;\n "])), (0, _constants.fontSize)(), "var(--ds-font-lineHeight-300, 24px)")
|
|
19
|
+
}, "Thanks for signing up"), (0, _react.jsx)("p", null, "We may reach out to you in the future to participate in additional research."));
|
|
20
20
|
};
|
|
@@ -6,18 +6,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
-
var
|
|
9
|
+
var _react = require("@emotion/react");
|
|
10
10
|
var _checkCircle = _interopRequireDefault(require("@atlaskit/icon/glyph/check-circle"));
|
|
11
11
|
var _colors = require("@atlaskit/theme/colors");
|
|
12
12
|
var _templateObject, _templateObject2;
|
|
13
13
|
/** @jsx jsx */
|
|
14
14
|
var _default = exports.default = function _default(_ref) {
|
|
15
15
|
var children = _ref.children;
|
|
16
|
-
return (0,
|
|
17
|
-
css: (0,
|
|
18
|
-
}, (0,
|
|
19
|
-
css: (0,
|
|
20
|
-
}, (0,
|
|
16
|
+
return (0, _react.jsx)("section", {
|
|
17
|
+
css: (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n margin-left: ", ";\n "])), "var(--ds-space-500, 40px)")
|
|
18
|
+
}, (0, _react.jsx)("div", {
|
|
19
|
+
css: (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n top: ", ";\n left: ", ";\n "])), "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)")
|
|
20
|
+
}, (0, _react.jsx)(_checkCircle.default, {
|
|
21
21
|
label: "",
|
|
22
22
|
"aria-hidden": true,
|
|
23
23
|
primaryColor: "var(--ds-icon-success, ".concat(_colors.G300, ")")
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
-
var
|
|
9
|
+
var _react = require("@emotion/react");
|
|
10
10
|
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
|
|
11
11
|
var _cross = _interopRequireDefault(require("@atlaskit/icon/glyph/cross"));
|
|
12
12
|
var _colors = require("@atlaskit/theme/colors");
|
|
@@ -17,12 +17,12 @@ var _templateObject, _templateObject2;
|
|
|
17
17
|
var _default = exports.default = function _default(_ref) {
|
|
18
18
|
var children = _ref.children,
|
|
19
19
|
onDismiss = _ref.onDismiss;
|
|
20
|
-
return (0,
|
|
21
|
-
css: (0,
|
|
22
|
-
}, (0,
|
|
23
|
-
css: (0,
|
|
24
|
-
}, (0,
|
|
25
|
-
iconBefore: (0,
|
|
20
|
+
return (0, _react.jsx)("div", {
|
|
21
|
+
css: (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n border-radius: ", "px;\n padding: ", ";\n box-shadow: ", ";\n width: ", "px;\n "])), "var(--ds-surface-overlay, ".concat(_colors.N0, ")"), (0, _constants.borderRadius)(), "var(--ds-space-300, 24px)", "var(--ds-shadow-overlay, ".concat("0 20px 32px -8px ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A), ")"), _constants2.surveyInnerWidth)
|
|
22
|
+
}, (0, _react.jsx)("div", {
|
|
23
|
+
css: (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n top: ", ";\n right: ", ";\n "])), "var(--ds-space-200, 16px)", "var(--ds-space-200, 16px)")
|
|
24
|
+
}, (0, _react.jsx)(_customThemeButton.default, {
|
|
25
|
+
iconBefore: (0, _react.jsx)(_cross.default, {
|
|
26
26
|
label: "",
|
|
27
27
|
primaryColor: "var(--ds-icon-subtle, ".concat(_colors.N50, ")")
|
|
28
28
|
}),
|
|
@@ -10,7 +10,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
10
10
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
11
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
12
|
var _react = require("react");
|
|
13
|
-
var
|
|
13
|
+
var _react2 = require("@emotion/react");
|
|
14
14
|
var _reactTransitionGroup = require("react-transition-group");
|
|
15
15
|
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
|
|
16
16
|
var _checkbox = require("@atlaskit/checkbox");
|
|
@@ -67,45 +67,45 @@ var _default = exports.default = function _default(_ref) {
|
|
|
67
67
|
hasAutoFilledCanContactRef.current = true;
|
|
68
68
|
setCanContactDefault(true);
|
|
69
69
|
}, []);
|
|
70
|
-
return (0,
|
|
70
|
+
return (0, _react2.jsx)("section", {
|
|
71
71
|
"aria-labelledby": "contextualSurveyQuestion"
|
|
72
|
-
}, (0,
|
|
72
|
+
}, (0, _react2.jsx)("h1", {
|
|
73
73
|
id: "contextualSurveyQuestion",
|
|
74
|
-
css: (0,
|
|
75
|
-
}, question), statement && (0,
|
|
74
|
+
css: (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n font-size: ", "px;\n font-weight: 600;\n "])), (0, _constants.fontSize)())
|
|
75
|
+
}, question), statement && (0, _react2.jsx)("p", {
|
|
76
76
|
id: "contextualSurveyStatement"
|
|
77
|
-
}, statement), (0,
|
|
77
|
+
}, statement), (0, _react2.jsx)(_form.default, {
|
|
78
78
|
onSubmit: onSubmit
|
|
79
79
|
}, function (_ref2) {
|
|
80
80
|
var formProps = _ref2.formProps,
|
|
81
81
|
submitting = _ref2.submitting;
|
|
82
|
-
return (0,
|
|
82
|
+
return (0, _react2.jsx)("form", formProps, (0, _react2.jsx)(_form.Field, {
|
|
83
83
|
name: "feedbackScore",
|
|
84
84
|
isDisabled: submitting,
|
|
85
85
|
isRequired: true
|
|
86
86
|
}, function (_ref3) {
|
|
87
87
|
var fieldProps = _ref3.fieldProps;
|
|
88
|
-
return (0,
|
|
88
|
+
return (0, _react2.jsx)(_FeedbackScoreButtons.default, (0, _extends2.default)({}, fieldProps, {
|
|
89
89
|
onChange: function onChange(score) {
|
|
90
90
|
fieldProps.onChange(score);
|
|
91
91
|
onScoreSelect();
|
|
92
92
|
}
|
|
93
93
|
}));
|
|
94
|
-
}), (0,
|
|
94
|
+
}), (0, _react2.jsx)(_reactTransitionGroup.Transition, {
|
|
95
95
|
in: expanded,
|
|
96
96
|
timeout: transitionDuration,
|
|
97
97
|
mountOnEnter: true
|
|
98
98
|
}, function (state) {
|
|
99
|
-
return (0,
|
|
100
|
-
css: (0,
|
|
99
|
+
return (0, _react2.jsx)("div", {
|
|
100
|
+
css: (0, _react2.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)),
|
|
101
101
|
ref: expandedAreaRef
|
|
102
|
-
}, (0,
|
|
102
|
+
}, (0, _react2.jsx)(_form.Field, {
|
|
103
103
|
name: "writtenFeedback",
|
|
104
104
|
defaultValue: "",
|
|
105
105
|
isDisabled: submitting
|
|
106
106
|
}, function (_ref4) {
|
|
107
107
|
var fieldProps = _ref4.fieldProps;
|
|
108
|
-
return (0,
|
|
108
|
+
return (0, _react2.jsx)(_textarea.default, (0, _extends2.default)({}, fieldProps, {
|
|
109
109
|
"aria-label": textLabel,
|
|
110
110
|
placeholder: textPlaceholder,
|
|
111
111
|
onChange: function onChange(event) {
|
|
@@ -113,16 +113,16 @@ var _default = exports.default = function _default(_ref) {
|
|
|
113
113
|
onFeedbackChange();
|
|
114
114
|
}
|
|
115
115
|
}));
|
|
116
|
-
}), (0,
|
|
116
|
+
}), (0, _react2.jsx)(_form.CheckboxField, {
|
|
117
117
|
name: "canContact",
|
|
118
118
|
isDisabled: submitting,
|
|
119
119
|
defaultIsChecked: canContactDefault
|
|
120
120
|
}, function (_ref5) {
|
|
121
121
|
var fieldProps = _ref5.fieldProps;
|
|
122
|
-
return (0,
|
|
122
|
+
return (0, _react2.jsx)(_checkbox.Checkbox, (0, _extends2.default)({}, fieldProps, {
|
|
123
123
|
label: "Atlassian can contact me about this feedback"
|
|
124
124
|
}));
|
|
125
|
-
}), (0,
|
|
125
|
+
}), (0, _react2.jsx)(_form.FormFooter, null, (0, _react2.jsx)(_customThemeButton.default, {
|
|
126
126
|
type: "submit",
|
|
127
127
|
appearance: "primary",
|
|
128
128
|
isLoading: submitting
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = SurveyMarshal;
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
-
var
|
|
9
|
+
var _react = require("@emotion/react");
|
|
10
10
|
var _reactTransitionGroup = require("react-transition-group");
|
|
11
11
|
var _constants = require("@atlaskit/theme/constants");
|
|
12
12
|
var _constants2 = require("../constants");
|
|
@@ -40,7 +40,7 @@ var getAnimationProps = function getAnimationProps(state) {
|
|
|
40
40
|
function SurveyMarshal(props) {
|
|
41
41
|
var children = props.children,
|
|
42
42
|
shouldShow = props.shouldShow;
|
|
43
|
-
return (0,
|
|
43
|
+
return (0, _react.jsx)(_reactTransitionGroup.Transition, {
|
|
44
44
|
in: shouldShow,
|
|
45
45
|
timeout: animationDuration,
|
|
46
46
|
unmountOnExit: true
|
|
@@ -48,8 +48,8 @@ function SurveyMarshal(props) {
|
|
|
48
48
|
var _getAnimationProps = getAnimationProps(state),
|
|
49
49
|
translateX = _getAnimationProps.translateX,
|
|
50
50
|
opacity = _getAnimationProps.opacity;
|
|
51
|
-
return (0,
|
|
52
|
-
css: (0,
|
|
51
|
+
return (0, _react.jsx)("div", {
|
|
52
|
+
css: (0, _react.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)
|
|
53
53
|
}, children());
|
|
54
54
|
});
|
|
55
55
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { css, jsx } from '@emotion/
|
|
2
|
+
import { css, jsx } from '@emotion/react';
|
|
3
3
|
import { fontSize } from '@atlaskit/theme/constants';
|
|
4
4
|
import SuccessContainer from './SuccessContainer';
|
|
5
5
|
export default (() => jsx(SuccessContainer, null, jsx("h1", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { useCallback, useState } from 'react';
|
|
3
|
-
import { css, jsx } from '@emotion/
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
5
5
|
import { fontSize } from '@atlaskit/theme/constants';
|
|
6
6
|
import SuccessContainer from './SuccessContainer';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { css, jsx } from '@emotion/
|
|
2
|
+
import { css, jsx } from '@emotion/react';
|
|
3
3
|
import { fontSize } from '@atlaskit/theme/constants';
|
|
4
4
|
import SuccessContainer from './SuccessContainer';
|
|
5
5
|
export default (({}) => jsx(SuccessContainer, null, jsx("h1", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { css, jsx } from '@emotion/
|
|
2
|
+
import { css, jsx } from '@emotion/react';
|
|
3
3
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
4
4
|
import CrossIcon from '@atlaskit/icon/glyph/cross';
|
|
5
5
|
import { N0, N50, N50A, N60A } from '@atlaskit/theme/colors';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
/** @jsx jsx */
|
|
3
3
|
import { useCallback, useRef, useState } from 'react';
|
|
4
|
-
import { css, jsx } from '@emotion/
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import { Transition } from 'react-transition-group';
|
|
6
6
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
7
7
|
import { Checkbox } from '@atlaskit/checkbox';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
|
|
3
|
-
import { css, jsx } from '@emotion/
|
|
3
|
+
import { css, jsx } from '@emotion/react';
|
|
4
4
|
import { Transition } from 'react-transition-group';
|
|
5
5
|
import { layers } from '@atlaskit/theme/constants';
|
|
6
6
|
import { surveyInnerWidth, surveyOffset } from '../constants';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject;
|
|
3
3
|
/** @jsx jsx */
|
|
4
|
-
import { css, jsx } from '@emotion/
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import { fontSize } from '@atlaskit/theme/constants';
|
|
6
6
|
import SuccessContainer from './SuccessContainer';
|
|
7
7
|
export default (function () {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
3
3
|
/** @jsx jsx */
|
|
4
|
-
import { css, jsx } from '@emotion/
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
6
6
|
import { N200 } from '@atlaskit/theme/colors';
|
|
7
7
|
import Tooltip from '@atlaskit/tooltip';
|
|
@@ -5,7 +5,7 @@ var _templateObject, _templateObject2;
|
|
|
5
5
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
6
6
|
/** @jsx jsx */
|
|
7
7
|
import { useCallback, useState } from 'react';
|
|
8
|
-
import { css, jsx } from '@emotion/
|
|
8
|
+
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
10
10
|
import { fontSize } from '@atlaskit/theme/constants';
|
|
11
11
|
import SuccessContainer from './SuccessContainer';
|
|
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
|
|
3
3
|
var _templateObject;
|
|
4
4
|
/** @jsx jsx */
|
|
5
|
-
import { css, jsx } from '@emotion/
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
6
6
|
import { fontSize } from '@atlaskit/theme/constants';
|
|
7
7
|
import SuccessContainer from './SuccessContainer';
|
|
8
8
|
export default (function (_ref) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2;
|
|
3
3
|
/** @jsx jsx */
|
|
4
|
-
import { css, jsx } from '@emotion/
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import CheckCircleIcon from '@atlaskit/icon/glyph/check-circle';
|
|
6
6
|
import { G300 } from '@atlaskit/theme/colors';
|
|
7
7
|
export default (function (_ref) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2;
|
|
3
3
|
/** @jsx jsx */
|
|
4
|
-
import { css, jsx } from '@emotion/
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
6
6
|
import CrossIcon from '@atlaskit/icon/glyph/cross';
|
|
7
7
|
import { N0, N50, N50A, N60A } from '@atlaskit/theme/colors';
|
|
@@ -4,7 +4,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
4
4
|
var _templateObject, _templateObject2;
|
|
5
5
|
/** @jsx jsx */
|
|
6
6
|
import { useCallback, useRef, useState } from 'react';
|
|
7
|
-
import { css, jsx } from '@emotion/
|
|
7
|
+
import { css, jsx } from '@emotion/react';
|
|
8
8
|
import { Transition } from 'react-transition-group';
|
|
9
9
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
10
10
|
import { Checkbox } from '@atlaskit/checkbox';
|
|
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
|
|
|
2
2
|
var _templateObject;
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
|
|
5
|
-
import { css, jsx } from '@emotion/
|
|
5
|
+
import { css, jsx } from '@emotion/react';
|
|
6
6
|
import { Transition } from 'react-transition-group';
|
|
7
7
|
import { layers } from '@atlaskit/theme/constants';
|
|
8
8
|
import { surveyInnerWidth, surveyOffset } from '../constants';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
2
3
|
interface Props {
|
|
3
4
|
onChange: (value: number) => void;
|
|
4
5
|
value: number | undefined;
|
|
5
6
|
}
|
|
6
|
-
declare const _default: ({ onChange, value }: Props) => JSX.Element;
|
|
7
|
+
declare const _default: ({ onChange, value }: Props) => jsx.JSX.Element;
|
|
7
8
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
2
|
interface Props {
|
|
3
3
|
onAnswer: (answer: boolean) => Promise<void>;
|
|
4
4
|
}
|
|
5
|
-
declare const _default: ({ onAnswer }: Props) => JSX.Element;
|
|
5
|
+
declare const _default: ({ onAnswer }: Props) => jsx.JSX.Element;
|
|
6
6
|
export default _default;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
interface Props {
|
|
3
5
|
children: React.ReactNode;
|
|
4
6
|
}
|
|
5
|
-
declare const _default: ({ children }: Props) => JSX.Element;
|
|
7
|
+
declare const _default: ({ children }: Props) => jsx.JSX.Element;
|
|
6
8
|
export default _default;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
interface Props {
|
|
3
5
|
children: React.ReactNode;
|
|
4
6
|
onDismiss: () => void;
|
|
5
7
|
}
|
|
6
|
-
declare const _default: ({ children, onDismiss }: Props) => JSX.Element;
|
|
8
|
+
declare const _default: ({ children, onDismiss }: Props) => jsx.JSX.Element;
|
|
7
9
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
2
|
import { OnSubmitHandler } from '@atlaskit/form';
|
|
3
3
|
import { FormValues } from '../types';
|
|
4
4
|
interface Props {
|
|
@@ -8,5 +8,5 @@ interface Props {
|
|
|
8
8
|
textLabel: string;
|
|
9
9
|
onSubmit: OnSubmitHandler<FormValues>;
|
|
10
10
|
}
|
|
11
|
-
declare const _default: ({ question, statement, textPlaceholder, textLabel, onSubmit, }: Props) => JSX.Element;
|
|
11
|
+
declare const _default: ({ question, statement, textPlaceholder, textLabel, onSubmit, }: Props) => jsx.JSX.Element;
|
|
12
12
|
export default _default;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
3
4
|
type Props = {
|
|
4
5
|
/** Whether the form should be rendered */
|
|
5
6
|
shouldShow: boolean;
|
|
@@ -9,5 +10,5 @@ type Props = {
|
|
|
9
10
|
*/
|
|
10
11
|
children: () => ReactNode;
|
|
11
12
|
};
|
|
12
|
-
export default function SurveyMarshal(props: Props): JSX.Element;
|
|
13
|
+
export default function SurveyMarshal(props: Props): jsx.JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
2
3
|
interface Props {
|
|
3
4
|
onChange: (value: number) => void;
|
|
4
5
|
value: number | undefined;
|
|
5
6
|
}
|
|
6
|
-
declare const _default: ({ onChange, value }: Props) => JSX.Element;
|
|
7
|
+
declare const _default: ({ onChange, value }: Props) => jsx.JSX.Element;
|
|
7
8
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
2
|
interface Props {
|
|
3
3
|
onAnswer: (answer: boolean) => Promise<void>;
|
|
4
4
|
}
|
|
5
|
-
declare const _default: ({ onAnswer }: Props) => JSX.Element;
|
|
5
|
+
declare const _default: ({ onAnswer }: Props) => jsx.JSX.Element;
|
|
6
6
|
export default _default;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
interface Props {
|
|
3
5
|
children: React.ReactNode;
|
|
4
6
|
}
|
|
5
|
-
declare const _default: ({ children }: Props) => JSX.Element;
|
|
7
|
+
declare const _default: ({ children }: Props) => jsx.JSX.Element;
|
|
6
8
|
export default _default;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/** @jsx jsx */
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
2
4
|
interface Props {
|
|
3
5
|
children: React.ReactNode;
|
|
4
6
|
onDismiss: () => void;
|
|
5
7
|
}
|
|
6
|
-
declare const _default: ({ children, onDismiss }: Props) => JSX.Element;
|
|
8
|
+
declare const _default: ({ children, onDismiss }: Props) => jsx.JSX.Element;
|
|
7
9
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { jsx } from '@emotion/react';
|
|
2
2
|
import { OnSubmitHandler } from '@atlaskit/form';
|
|
3
3
|
import { FormValues } from '../types';
|
|
4
4
|
interface Props {
|
|
@@ -8,5 +8,5 @@ interface Props {
|
|
|
8
8
|
textLabel: string;
|
|
9
9
|
onSubmit: OnSubmitHandler<FormValues>;
|
|
10
10
|
}
|
|
11
|
-
declare const _default: ({ question, statement, textPlaceholder, textLabel, onSubmit, }: Props) => JSX.Element;
|
|
11
|
+
declare const _default: ({ question, statement, textPlaceholder, textLabel, onSubmit, }: Props) => jsx.JSX.Element;
|
|
12
12
|
export default _default;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
3
4
|
type Props = {
|
|
4
5
|
/** Whether the form should be rendered */
|
|
5
6
|
shouldShow: boolean;
|
|
@@ -9,5 +10,5 @@ type Props = {
|
|
|
9
10
|
*/
|
|
10
11
|
children: () => ReactNode;
|
|
11
12
|
};
|
|
12
|
-
export default function SurveyMarshal(props: Props): JSX.Element;
|
|
13
|
+
export default function SurveyMarshal(props: Props): jsx.JSX.Element;
|
|
13
14
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/contextual-survey",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.9",
|
|
4
4
|
"description": "A React component used to ask the user for feedback",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,16 +31,16 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/button": "^16.
|
|
34
|
+
"@atlaskit/button": "^16.17.0",
|
|
35
35
|
"@atlaskit/checkbox": "^13.0.0",
|
|
36
36
|
"@atlaskit/form": "^9.0.0",
|
|
37
|
-
"@atlaskit/icon": "^
|
|
37
|
+
"@atlaskit/icon": "^22.0.0",
|
|
38
38
|
"@atlaskit/textarea": "^5.0.0",
|
|
39
39
|
"@atlaskit/theme": "^12.6.0",
|
|
40
|
-
"@atlaskit/tokens": "^1.
|
|
40
|
+
"@atlaskit/tokens": "^1.29.0",
|
|
41
41
|
"@atlaskit/tooltip": "^18.0.0",
|
|
42
42
|
"@babel/runtime": "^7.0.0",
|
|
43
|
-
"@emotion/
|
|
43
|
+
"@emotion/react": "^11.7.1",
|
|
44
44
|
"react-transition-group": "^4.4.1"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/contextual-survey"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
/// <reference types="react" />
|
|
8
|
-
|
|
9
|
-
import { ReactNode } from 'react';
|
|
10
|
-
|
|
11
|
-
// @public (undocumented)
|
|
12
|
-
export const ContextualSurvey: ({ question, statement, onDismiss, onSubmit, onMailingListAnswer, getUserHasAnsweredMailingList, textLabel, textPlaceholder, }: Props) => JSX.Element;
|
|
13
|
-
|
|
14
|
-
// @public (undocumented)
|
|
15
|
-
export enum DismissTrigger {
|
|
16
|
-
// (undocumented)
|
|
17
|
-
AutoDismiss = "AUTO_DISMISS",
|
|
18
|
-
// (undocumented)
|
|
19
|
-
Finished = "FINISHED",
|
|
20
|
-
// (undocumented)
|
|
21
|
-
Manual = "MANUAL",
|
|
22
|
-
// (undocumented)
|
|
23
|
-
Unmount = "UNMOUNT"
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// @public (undocumented)
|
|
27
|
-
type FormValues = {
|
|
28
|
-
feedbackScore: number;
|
|
29
|
-
canContact: boolean;
|
|
30
|
-
writtenFeedback: string;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
// @public (undocumented)
|
|
34
|
-
export type OnDismissArgs = {
|
|
35
|
-
trigger: DismissTrigger;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
// @public (undocumented)
|
|
39
|
-
interface Props {
|
|
40
|
-
getUserHasAnsweredMailingList: () => Promise<boolean>;
|
|
41
|
-
onDismiss: (args: OnDismissArgs) => void;
|
|
42
|
-
onMailingListAnswer: (answer: boolean) => Promise<void>;
|
|
43
|
-
onSubmit: (formValues: FormValues) => Promise<void>;
|
|
44
|
-
question: string;
|
|
45
|
-
statement?: string;
|
|
46
|
-
textLabel?: string;
|
|
47
|
-
textPlaceholder?: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// @public (undocumented)
|
|
51
|
-
type Props_2 = {
|
|
52
|
-
shouldShow: boolean;
|
|
53
|
-
children: () => ReactNode;
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
// @public (undocumented)
|
|
57
|
-
export function SurveyMarshal(props: Props_2): JSX.Element;
|
|
58
|
-
|
|
59
|
-
// (No @packageDocumentation comment for this package)
|
|
60
|
-
|
|
61
|
-
```
|