@atlaskit/contextual-survey 6.0.9 → 6.0.11
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/afm-cc/tsconfig.json +3 -0
- package/afm-products/tsconfig.json +3 -0
- package/dist/cjs/components/SurveyForm.js +30 -35
- package/dist/cjs/components/SurveyFormExpandedFeedback.js +50 -0
- package/dist/cjs/components/SurveyMarshal.compiled.css +1 -0
- package/dist/cjs/components/SurveyMarshal.js +25 -0
- package/dist/cjs/new-survey/SurveyForm.js +3 -3
- package/dist/es2019/components/SurveyForm.js +27 -34
- package/dist/es2019/components/SurveyFormExpandedFeedback.js +42 -0
- package/dist/es2019/components/SurveyMarshal.compiled.css +1 -0
- package/dist/es2019/components/SurveyMarshal.js +22 -0
- package/dist/es2019/new-survey/SurveyForm.js +3 -3
- package/dist/esm/components/SurveyForm.js +31 -36
- package/dist/esm/components/SurveyFormExpandedFeedback.js +43 -0
- package/dist/esm/components/SurveyMarshal.compiled.css +1 -0
- package/dist/esm/components/SurveyMarshal.js +24 -0
- package/dist/esm/new-survey/SurveyForm.js +3 -3
- package/dist/types/components/FeedbackScoreButtons.d.ts +1 -1
- package/dist/types/components/SignUpPrompt.d.ts +1 -1
- package/dist/types/components/SuccessContainer.d.ts +1 -1
- package/dist/types/components/SurveyContainer.d.ts +1 -1
- package/dist/types/components/SurveyForm.d.ts +1 -1
- package/dist/types/components/SurveyFormExpandedFeedback.d.ts +13 -0
- package/dist/types/components/SurveyMarshal.d.ts +1 -1
- package/dist/types/new-survey/FeedbackScoreButtons.d.ts +1 -1
- package/dist/types/new-survey/SignUpPrompt.d.ts +1 -1
- package/dist/types/new-survey/SuccessContainer.d.ts +1 -1
- package/dist/types/new-survey/SurveyContainer.d.ts +1 -1
- package/dist/types/new-survey/SurveyForm.d.ts +1 -1
- package/dist/types-ts4.5/components/FeedbackScoreButtons.d.ts +1 -1
- package/dist/types-ts4.5/components/SignUpPrompt.d.ts +1 -1
- package/dist/types-ts4.5/components/SuccessContainer.d.ts +1 -1
- package/dist/types-ts4.5/components/SurveyContainer.d.ts +1 -1
- package/dist/types-ts4.5/components/SurveyForm.d.ts +1 -1
- package/dist/types-ts4.5/components/SurveyFormExpandedFeedback.d.ts +13 -0
- package/dist/types-ts4.5/components/SurveyMarshal.d.ts +1 -1
- package/dist/types-ts4.5/new-survey/FeedbackScoreButtons.d.ts +1 -1
- package/dist/types-ts4.5/new-survey/SignUpPrompt.d.ts +1 -1
- package/dist/types-ts4.5/new-survey/SuccessContainer.d.ts +1 -1
- package/dist/types-ts4.5/new-survey/SurveyContainer.d.ts +1 -1
- package/dist/types-ts4.5/new-survey/SurveyForm.d.ts +1 -1
- package/package.json +12 -6
package/CHANGELOG.md
CHANGED
package/afm-cc/tsconfig.json
CHANGED
|
@@ -14,13 +14,13 @@ var _runtime = require("@compiled/react/runtime");
|
|
|
14
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
15
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
16
|
var _reactTransitionGroup = require("react-transition-group");
|
|
17
|
-
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
18
|
-
var _checkbox = require("@atlaskit/checkbox");
|
|
19
17
|
var _form = _interopRequireWildcard(require("@atlaskit/form"));
|
|
20
18
|
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
19
|
+
var _motion = require("@atlaskit/motion");
|
|
20
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
21
21
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
22
|
-
var _textarea = _interopRequireDefault(require("@atlaskit/textarea"));
|
|
23
22
|
var _FeedbackScoreButtons = _interopRequireDefault(require("./FeedbackScoreButtons"));
|
|
23
|
+
var _SurveyFormExpandedFeedback = require("./SurveyFormExpandedFeedback");
|
|
24
24
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
25
25
|
var transitionBaseStyles = null;
|
|
26
26
|
var getExpandedHeight = function getExpandedHeight(ref, state) {
|
|
@@ -37,7 +37,7 @@ var getExpandedHeight = function getExpandedHeight(ref, state) {
|
|
|
37
37
|
return '0';
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
|
-
var
|
|
40
|
+
var TRANSITION_DURATION = 200;
|
|
41
41
|
var _default = exports.default = function _default(_ref) {
|
|
42
42
|
var question = _ref.question,
|
|
43
43
|
statement = _ref.statement,
|
|
@@ -68,6 +68,14 @@ var _default = exports.default = function _default(_ref) {
|
|
|
68
68
|
hasAutoFilledCanContactRef.current = true;
|
|
69
69
|
setCanContactDefault(true);
|
|
70
70
|
}, []);
|
|
71
|
+
var resizingHeightProps = (0, _motion.useResizingHeight)({
|
|
72
|
+
duration: function duration() {
|
|
73
|
+
return TRANSITION_DURATION;
|
|
74
|
+
},
|
|
75
|
+
timingFunction: function timingFunction() {
|
|
76
|
+
return 'ease-in-out';
|
|
77
|
+
}
|
|
78
|
+
});
|
|
71
79
|
return /*#__PURE__*/React.createElement("section", {
|
|
72
80
|
"aria-labelledby": "contextualSurveyQuestion"
|
|
73
81
|
}, /*#__PURE__*/React.createElement(_compiled.Stack, {
|
|
@@ -96,46 +104,33 @@ var _default = exports.default = function _default(_ref) {
|
|
|
96
104
|
onScoreSelect();
|
|
97
105
|
}
|
|
98
106
|
}));
|
|
99
|
-
}), /*#__PURE__*/React.createElement(
|
|
107
|
+
}), (0, _platformFeatureFlags.fg)('platform_contextual_survey_use_atlaskit_motion') ? /*#__PURE__*/React.createElement("div", (0, _extends2.default)({}, resizingHeightProps, {
|
|
108
|
+
className: (0, _runtime.ax)(["_1reo15vq _18m915vq"])
|
|
109
|
+
}), expanded ? /*#__PURE__*/React.createElement(_SurveyFormExpandedFeedback.SurveyFormExpandedFeedback, {
|
|
110
|
+
canContactDefault: canContactDefault,
|
|
111
|
+
onFeedbackChange: onFeedbackChange,
|
|
112
|
+
submitting: submitting,
|
|
113
|
+
textLabel: textLabel,
|
|
114
|
+
textPlaceholder: textPlaceholder
|
|
115
|
+
}) : null) : /*#__PURE__*/React.createElement(_reactTransitionGroup.Transition, {
|
|
100
116
|
in: expanded,
|
|
101
|
-
timeout:
|
|
117
|
+
timeout: TRANSITION_DURATION,
|
|
102
118
|
mountOnEnter: true
|
|
103
119
|
}, function (state) {
|
|
104
120
|
return /*#__PURE__*/React.createElement("div", {
|
|
105
121
|
style: {
|
|
106
|
-
transition: "max-height ".concat(
|
|
122
|
+
transition: "max-height ".concat(TRANSITION_DURATION, "ms ease-in-out"),
|
|
107
123
|
maxHeight: getExpandedHeight(expandedAreaRef, state)
|
|
108
124
|
},
|
|
109
125
|
ref: expandedAreaRef,
|
|
110
126
|
className: (0, _runtime.ax)(["_1reo15vq _18m915vq"])
|
|
111
|
-
}, /*#__PURE__*/React.createElement(
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
"aria-label": textLabel,
|
|
119
|
-
placeholder: textPlaceholder,
|
|
120
|
-
onChange: function onChange(event) {
|
|
121
|
-
fieldProps.onChange(event);
|
|
122
|
-
onFeedbackChange();
|
|
123
|
-
}
|
|
124
|
-
}));
|
|
125
|
-
}), /*#__PURE__*/React.createElement(_form.CheckboxField, {
|
|
126
|
-
name: "canContact",
|
|
127
|
-
isDisabled: submitting,
|
|
128
|
-
defaultIsChecked: canContactDefault
|
|
129
|
-
}, function (_ref5) {
|
|
130
|
-
var fieldProps = _ref5.fieldProps;
|
|
131
|
-
return /*#__PURE__*/React.createElement(_checkbox.Checkbox, (0, _extends2.default)({}, fieldProps, {
|
|
132
|
-
label: "Atlassian can contact me about this feedback"
|
|
133
|
-
}));
|
|
134
|
-
}), /*#__PURE__*/React.createElement(_form.FormFooter, null, /*#__PURE__*/React.createElement(_new.default, {
|
|
135
|
-
type: "submit",
|
|
136
|
-
appearance: "primary",
|
|
137
|
-
isLoading: submitting
|
|
138
|
-
}, "Submit")));
|
|
127
|
+
}, /*#__PURE__*/React.createElement(_SurveyFormExpandedFeedback.SurveyFormExpandedFeedback, {
|
|
128
|
+
canContactDefault: canContactDefault,
|
|
129
|
+
onFeedbackChange: onFeedbackChange,
|
|
130
|
+
submitting: submitting,
|
|
131
|
+
textLabel: textLabel,
|
|
132
|
+
textPlaceholder: textPlaceholder
|
|
133
|
+
}));
|
|
139
134
|
}));
|
|
140
135
|
}));
|
|
141
136
|
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* SurveyFormExpandedFeedback.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.SurveyFormExpandedFeedback = SurveyFormExpandedFeedback;
|
|
9
|
+
var _runtime = require("@compiled/react/runtime");
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var _react = _interopRequireDefault(require("react"));
|
|
12
|
+
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
13
|
+
var _checkbox = require("@atlaskit/checkbox");
|
|
14
|
+
var _form = require("@atlaskit/form");
|
|
15
|
+
var _textarea = _interopRequireDefault(require("@atlaskit/textarea"));
|
|
16
|
+
function SurveyFormExpandedFeedback(_ref) {
|
|
17
|
+
var canContactDefault = _ref.canContactDefault,
|
|
18
|
+
onFeedbackChange = _ref.onFeedbackChange,
|
|
19
|
+
submitting = _ref.submitting,
|
|
20
|
+
textLabel = _ref.textLabel,
|
|
21
|
+
textPlaceholder = _ref.textPlaceholder;
|
|
22
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_form.Field, {
|
|
23
|
+
name: "writtenFeedback",
|
|
24
|
+
defaultValue: "",
|
|
25
|
+
isDisabled: submitting
|
|
26
|
+
}, function (_ref2) {
|
|
27
|
+
var fieldProps = _ref2.fieldProps;
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement(_textarea.default, (0, _extends2.default)({}, fieldProps, {
|
|
29
|
+
"aria-label": textLabel,
|
|
30
|
+
placeholder: textPlaceholder,
|
|
31
|
+
onChange: function onChange(event) {
|
|
32
|
+
fieldProps.onChange(event);
|
|
33
|
+
onFeedbackChange();
|
|
34
|
+
}
|
|
35
|
+
}));
|
|
36
|
+
}), /*#__PURE__*/_react.default.createElement(_form.CheckboxField, {
|
|
37
|
+
name: "canContact",
|
|
38
|
+
isDisabled: submitting,
|
|
39
|
+
defaultIsChecked: canContactDefault
|
|
40
|
+
}, function (_ref3) {
|
|
41
|
+
var fieldProps = _ref3.fieldProps;
|
|
42
|
+
return /*#__PURE__*/_react.default.createElement(_checkbox.Checkbox, (0, _extends2.default)({}, fieldProps, {
|
|
43
|
+
label: "Atlassian can contact me about this feedback"
|
|
44
|
+
}));
|
|
45
|
+
}), /*#__PURE__*/_react.default.createElement(_form.FormFooter, null, /*#__PURE__*/_react.default.createElement(_new.default, {
|
|
46
|
+
type: "submit",
|
|
47
|
+
appearance: "primary",
|
|
48
|
+
isLoading: submitting
|
|
49
|
+
}, "Submit")));
|
|
50
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* SurveyMarshal.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
5
|
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
6
|
Object.defineProperty(exports, "__esModule", {
|
|
6
7
|
value: true
|
|
@@ -10,6 +11,9 @@ require("./SurveyMarshal.compiled.css");
|
|
|
10
11
|
var React = _interopRequireWildcard(require("react"));
|
|
11
12
|
var _runtime = require("@compiled/react/runtime");
|
|
12
13
|
var _reactTransitionGroup = require("react-transition-group");
|
|
14
|
+
var _exitingPersistence = _interopRequireDefault(require("@atlaskit/motion/exiting-persistence"));
|
|
15
|
+
var _slideIn = _interopRequireDefault(require("@atlaskit/motion/slide-in"));
|
|
16
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
17
|
var _constants = require("@atlaskit/theme/constants");
|
|
14
18
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
15
19
|
// 8px is the base unit in pixels
|
|
@@ -40,9 +44,30 @@ var getAnimationProps = function getAnimationProps(state) {
|
|
|
40
44
|
}
|
|
41
45
|
};
|
|
42
46
|
var transitionBaseStyles = null;
|
|
47
|
+
var marshalLayoutStyles = null;
|
|
48
|
+
var marshalMotionLayerStyles = null;
|
|
43
49
|
function SurveyMarshal(props) {
|
|
44
50
|
var children = props.children,
|
|
45
51
|
shouldShow = props.shouldShow;
|
|
52
|
+
if ((0, _platformFeatureFlags.fg)('platform_contextual_survey_use_atlaskit_motion')) {
|
|
53
|
+
return /*#__PURE__*/React.createElement(_exitingPersistence.default, {
|
|
54
|
+
appear: true
|
|
55
|
+
}, shouldShow && /*#__PURE__*/React.createElement(_slideIn.default, {
|
|
56
|
+
key: "contextual-survey-marshal",
|
|
57
|
+
enterFrom: "right",
|
|
58
|
+
fade: "inout",
|
|
59
|
+
duration: "medium"
|
|
60
|
+
}, function (motionProps) {
|
|
61
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
62
|
+
ref: motionProps.ref
|
|
63
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- motion keyframes
|
|
64
|
+
,
|
|
65
|
+
className: (0, _runtime.ax)(["_kqsw1n9t _1xi2oahv _94n5oahv", "_1pbyni7l", motionProps.className]),
|
|
66
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- motion animation styles
|
|
67
|
+
style: motionProps.style
|
|
68
|
+
}, children());
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
46
71
|
return /*#__PURE__*/React.createElement(_reactTransitionGroup.Transition, {
|
|
47
72
|
in: shouldShow,
|
|
48
73
|
timeout: animationDuration,
|
|
@@ -41,7 +41,7 @@ var getExpandedHeight = function getExpandedHeight(ref, state) {
|
|
|
41
41
|
return '0';
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
var
|
|
44
|
+
var TRANSITION_DURATION = 200;
|
|
45
45
|
var _default = exports.default = function _default(_ref) {
|
|
46
46
|
var question = _ref.question,
|
|
47
47
|
statement = _ref.statement,
|
|
@@ -106,12 +106,12 @@ var _default = exports.default = function _default(_ref) {
|
|
|
106
106
|
}));
|
|
107
107
|
}), /*#__PURE__*/React.createElement(_reactTransitionGroup.Transition, {
|
|
108
108
|
in: expanded,
|
|
109
|
-
timeout:
|
|
109
|
+
timeout: TRANSITION_DURATION,
|
|
110
110
|
mountOnEnter: true
|
|
111
111
|
}, function (state) {
|
|
112
112
|
return /*#__PURE__*/React.createElement("div", {
|
|
113
113
|
style: {
|
|
114
|
-
transition: "max-height ".concat(
|
|
114
|
+
transition: "max-height ".concat(TRANSITION_DURATION, "ms ease-in-out"),
|
|
115
115
|
maxHeight: getExpandedHeight(expandedAreaRef, state)
|
|
116
116
|
},
|
|
117
117
|
ref: expandedAreaRef,
|
|
@@ -5,13 +5,13 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { useCallback, useRef, useState } from 'react';
|
|
7
7
|
import { Transition } from 'react-transition-group';
|
|
8
|
-
import
|
|
9
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
10
|
-
import Form, { CheckboxField, Field, FormFooter } from '@atlaskit/form';
|
|
8
|
+
import Form, { Field } from '@atlaskit/form';
|
|
11
9
|
import Heading from '@atlaskit/heading';
|
|
10
|
+
import { useResizingHeight } from '@atlaskit/motion';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
12
|
import { Stack, Text } from '@atlaskit/primitives/compiled';
|
|
13
|
-
import Textarea from '@atlaskit/textarea';
|
|
14
13
|
import FeedbackScoreButtons from './FeedbackScoreButtons';
|
|
14
|
+
import { SurveyFormExpandedFeedback } from './SurveyFormExpandedFeedback';
|
|
15
15
|
const transitionBaseStyles = null;
|
|
16
16
|
const getExpandedHeight = (ref, state) => {
|
|
17
17
|
if (!ref.current) {
|
|
@@ -27,7 +27,7 @@ const getExpandedHeight = (ref, state) => {
|
|
|
27
27
|
return '0';
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
-
const
|
|
30
|
+
const TRANSITION_DURATION = 200;
|
|
31
31
|
export default (({
|
|
32
32
|
question,
|
|
33
33
|
statement,
|
|
@@ -53,6 +53,10 @@ export default (({
|
|
|
53
53
|
hasAutoFilledCanContactRef.current = true;
|
|
54
54
|
setCanContactDefault(true);
|
|
55
55
|
}, []);
|
|
56
|
+
const resizingHeightProps = useResizingHeight({
|
|
57
|
+
duration: () => TRANSITION_DURATION,
|
|
58
|
+
timingFunction: () => 'ease-in-out'
|
|
59
|
+
});
|
|
56
60
|
return /*#__PURE__*/React.createElement("section", {
|
|
57
61
|
"aria-labelledby": "contextualSurveyQuestion"
|
|
58
62
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
@@ -80,41 +84,30 @@ export default (({
|
|
|
80
84
|
fieldProps.onChange(score);
|
|
81
85
|
onScoreSelect();
|
|
82
86
|
}
|
|
83
|
-
}))), /*#__PURE__*/React.createElement(
|
|
87
|
+
}))), fg('platform_contextual_survey_use_atlaskit_motion') ? /*#__PURE__*/React.createElement("div", _extends({}, resizingHeightProps, {
|
|
88
|
+
className: ax(["_1reo15vq _18m915vq"])
|
|
89
|
+
}), expanded ? /*#__PURE__*/React.createElement(SurveyFormExpandedFeedback, {
|
|
90
|
+
canContactDefault: canContactDefault,
|
|
91
|
+
onFeedbackChange: onFeedbackChange,
|
|
92
|
+
submitting: submitting,
|
|
93
|
+
textLabel: textLabel,
|
|
94
|
+
textPlaceholder: textPlaceholder
|
|
95
|
+
}) : null) : /*#__PURE__*/React.createElement(Transition, {
|
|
84
96
|
in: expanded,
|
|
85
|
-
timeout:
|
|
97
|
+
timeout: TRANSITION_DURATION,
|
|
86
98
|
mountOnEnter: true
|
|
87
99
|
}, state => /*#__PURE__*/React.createElement("div", {
|
|
88
100
|
style: {
|
|
89
|
-
transition: `max-height ${
|
|
101
|
+
transition: `max-height ${TRANSITION_DURATION}ms ease-in-out`,
|
|
90
102
|
maxHeight: getExpandedHeight(expandedAreaRef, state)
|
|
91
103
|
},
|
|
92
104
|
ref: expandedAreaRef,
|
|
93
105
|
className: ax(["_1reo15vq _18m915vq"])
|
|
94
|
-
}, /*#__PURE__*/React.createElement(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
})
|
|
101
|
-
"aria-label": textLabel,
|
|
102
|
-
placeholder: textPlaceholder,
|
|
103
|
-
onChange: event => {
|
|
104
|
-
fieldProps.onChange(event);
|
|
105
|
-
onFeedbackChange();
|
|
106
|
-
}
|
|
107
|
-
}))), /*#__PURE__*/React.createElement(CheckboxField, {
|
|
108
|
-
name: "canContact",
|
|
109
|
-
isDisabled: submitting,
|
|
110
|
-
defaultIsChecked: canContactDefault
|
|
111
|
-
}, ({
|
|
112
|
-
fieldProps
|
|
113
|
-
}) => /*#__PURE__*/React.createElement(Checkbox, _extends({}, fieldProps, {
|
|
114
|
-
label: "Atlassian can contact me about this feedback"
|
|
115
|
-
}))), /*#__PURE__*/React.createElement(FormFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
116
|
-
type: "submit",
|
|
117
|
-
appearance: "primary",
|
|
118
|
-
isLoading: submitting
|
|
119
|
-
}, "Submit")))))));
|
|
106
|
+
}, /*#__PURE__*/React.createElement(SurveyFormExpandedFeedback, {
|
|
107
|
+
canContactDefault: canContactDefault,
|
|
108
|
+
onFeedbackChange: onFeedbackChange,
|
|
109
|
+
submitting: submitting,
|
|
110
|
+
textLabel: textLabel,
|
|
111
|
+
textPlaceholder: textPlaceholder
|
|
112
|
+
}))))));
|
|
120
113
|
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/* SurveyFormExpandedFeedback.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import Button from '@atlaskit/button/new';
|
|
6
|
+
import { Checkbox } from '@atlaskit/checkbox';
|
|
7
|
+
import { CheckboxField, Field, FormFooter } from '@atlaskit/form';
|
|
8
|
+
import Textarea from '@atlaskit/textarea';
|
|
9
|
+
export function SurveyFormExpandedFeedback({
|
|
10
|
+
canContactDefault,
|
|
11
|
+
onFeedbackChange,
|
|
12
|
+
submitting,
|
|
13
|
+
textLabel,
|
|
14
|
+
textPlaceholder
|
|
15
|
+
}) {
|
|
16
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Field, {
|
|
17
|
+
name: "writtenFeedback",
|
|
18
|
+
defaultValue: "",
|
|
19
|
+
isDisabled: submitting
|
|
20
|
+
}, ({
|
|
21
|
+
fieldProps
|
|
22
|
+
}) => /*#__PURE__*/React.createElement(Textarea, _extends({}, fieldProps, {
|
|
23
|
+
"aria-label": textLabel,
|
|
24
|
+
placeholder: textPlaceholder,
|
|
25
|
+
onChange: event => {
|
|
26
|
+
fieldProps.onChange(event);
|
|
27
|
+
onFeedbackChange();
|
|
28
|
+
}
|
|
29
|
+
}))), /*#__PURE__*/React.createElement(CheckboxField, {
|
|
30
|
+
name: "canContact",
|
|
31
|
+
isDisabled: submitting,
|
|
32
|
+
defaultIsChecked: canContactDefault
|
|
33
|
+
}, ({
|
|
34
|
+
fieldProps
|
|
35
|
+
}) => /*#__PURE__*/React.createElement(Checkbox, _extends({}, fieldProps, {
|
|
36
|
+
label: "Atlassian can contact me about this feedback"
|
|
37
|
+
}))), /*#__PURE__*/React.createElement(FormFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
38
|
+
type: "submit",
|
|
39
|
+
appearance: "primary",
|
|
40
|
+
isLoading: submitting
|
|
41
|
+
}, "Submit")));
|
|
42
|
+
}
|
|
@@ -3,6 +3,9 @@ import "./SurveyMarshal.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { Transition } from 'react-transition-group';
|
|
6
|
+
import ExitingPersistence from '@atlaskit/motion/exiting-persistence';
|
|
7
|
+
import SlideIn from '@atlaskit/motion/slide-in';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
9
|
import { layers } from '@atlaskit/theme/constants';
|
|
7
10
|
// 8px is the base unit in pixels
|
|
8
11
|
const surveyOffset = "var(--ds-space-600, 48px)";
|
|
@@ -32,11 +35,30 @@ const getAnimationProps = state => {
|
|
|
32
35
|
}
|
|
33
36
|
};
|
|
34
37
|
const transitionBaseStyles = null;
|
|
38
|
+
const marshalLayoutStyles = null;
|
|
39
|
+
const marshalMotionLayerStyles = null;
|
|
35
40
|
export default function SurveyMarshal(props) {
|
|
36
41
|
const {
|
|
37
42
|
children,
|
|
38
43
|
shouldShow
|
|
39
44
|
} = props;
|
|
45
|
+
if (fg('platform_contextual_survey_use_atlaskit_motion')) {
|
|
46
|
+
return /*#__PURE__*/React.createElement(ExitingPersistence, {
|
|
47
|
+
appear: true
|
|
48
|
+
}, shouldShow && /*#__PURE__*/React.createElement(SlideIn, {
|
|
49
|
+
key: "contextual-survey-marshal",
|
|
50
|
+
enterFrom: "right",
|
|
51
|
+
fade: "inout",
|
|
52
|
+
duration: "medium"
|
|
53
|
+
}, motionProps => /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
ref: motionProps.ref
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- motion keyframes
|
|
56
|
+
,
|
|
57
|
+
className: ax(["_kqsw1n9t _1xi2oahv _94n5oahv", "_1pbyni7l", motionProps.className]),
|
|
58
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- motion animation styles
|
|
59
|
+
style: motionProps.style
|
|
60
|
+
}, children())));
|
|
61
|
+
}
|
|
40
62
|
return /*#__PURE__*/React.createElement(Transition, {
|
|
41
63
|
in: shouldShow,
|
|
42
64
|
timeout: animationDuration,
|
|
@@ -31,7 +31,7 @@ const getExpandedHeight = (ref, state) => {
|
|
|
31
31
|
return '0';
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
-
const
|
|
34
|
+
const TRANSITION_DURATION = 200;
|
|
35
35
|
export default (({
|
|
36
36
|
question,
|
|
37
37
|
statement,
|
|
@@ -90,11 +90,11 @@ export default (({
|
|
|
90
90
|
}
|
|
91
91
|
}))), /*#__PURE__*/React.createElement(Transition, {
|
|
92
92
|
in: expanded,
|
|
93
|
-
timeout:
|
|
93
|
+
timeout: TRANSITION_DURATION,
|
|
94
94
|
mountOnEnter: true
|
|
95
95
|
}, state => /*#__PURE__*/React.createElement("div", {
|
|
96
96
|
style: {
|
|
97
|
-
transition: `max-height ${
|
|
97
|
+
transition: `max-height ${TRANSITION_DURATION}ms ease-in-out`,
|
|
98
98
|
maxHeight: getExpandedHeight(expandedAreaRef, state)
|
|
99
99
|
},
|
|
100
100
|
ref: expandedAreaRef,
|
|
@@ -6,13 +6,13 @@ import * as React from 'react';
|
|
|
6
6
|
import { ax, ix } from "@compiled/react/runtime";
|
|
7
7
|
import { useCallback, useRef, useState } from 'react';
|
|
8
8
|
import { Transition } from 'react-transition-group';
|
|
9
|
-
import
|
|
10
|
-
import { Checkbox } from '@atlaskit/checkbox';
|
|
11
|
-
import Form, { CheckboxField, Field, FormFooter } from '@atlaskit/form';
|
|
9
|
+
import Form, { Field } from '@atlaskit/form';
|
|
12
10
|
import Heading from '@atlaskit/heading';
|
|
11
|
+
import { useResizingHeight } from '@atlaskit/motion';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
13
|
import { Stack, Text } from '@atlaskit/primitives/compiled';
|
|
14
|
-
import Textarea from '@atlaskit/textarea';
|
|
15
14
|
import FeedbackScoreButtons from './FeedbackScoreButtons';
|
|
15
|
+
import { SurveyFormExpandedFeedback } from './SurveyFormExpandedFeedback';
|
|
16
16
|
var transitionBaseStyles = null;
|
|
17
17
|
var getExpandedHeight = function getExpandedHeight(ref, state) {
|
|
18
18
|
if (!ref.current) {
|
|
@@ -28,7 +28,7 @@ var getExpandedHeight = function getExpandedHeight(ref, state) {
|
|
|
28
28
|
return '0';
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
var
|
|
31
|
+
var TRANSITION_DURATION = 200;
|
|
32
32
|
export default (function (_ref) {
|
|
33
33
|
var question = _ref.question,
|
|
34
34
|
statement = _ref.statement,
|
|
@@ -59,6 +59,14 @@ export default (function (_ref) {
|
|
|
59
59
|
hasAutoFilledCanContactRef.current = true;
|
|
60
60
|
setCanContactDefault(true);
|
|
61
61
|
}, []);
|
|
62
|
+
var resizingHeightProps = useResizingHeight({
|
|
63
|
+
duration: function duration() {
|
|
64
|
+
return TRANSITION_DURATION;
|
|
65
|
+
},
|
|
66
|
+
timingFunction: function timingFunction() {
|
|
67
|
+
return 'ease-in-out';
|
|
68
|
+
}
|
|
69
|
+
});
|
|
62
70
|
return /*#__PURE__*/React.createElement("section", {
|
|
63
71
|
"aria-labelledby": "contextualSurveyQuestion"
|
|
64
72
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
@@ -87,46 +95,33 @@ export default (function (_ref) {
|
|
|
87
95
|
onScoreSelect();
|
|
88
96
|
}
|
|
89
97
|
}));
|
|
90
|
-
}), /*#__PURE__*/React.createElement(
|
|
98
|
+
}), fg('platform_contextual_survey_use_atlaskit_motion') ? /*#__PURE__*/React.createElement("div", _extends({}, resizingHeightProps, {
|
|
99
|
+
className: ax(["_1reo15vq _18m915vq"])
|
|
100
|
+
}), expanded ? /*#__PURE__*/React.createElement(SurveyFormExpandedFeedback, {
|
|
101
|
+
canContactDefault: canContactDefault,
|
|
102
|
+
onFeedbackChange: onFeedbackChange,
|
|
103
|
+
submitting: submitting,
|
|
104
|
+
textLabel: textLabel,
|
|
105
|
+
textPlaceholder: textPlaceholder
|
|
106
|
+
}) : null) : /*#__PURE__*/React.createElement(Transition, {
|
|
91
107
|
in: expanded,
|
|
92
|
-
timeout:
|
|
108
|
+
timeout: TRANSITION_DURATION,
|
|
93
109
|
mountOnEnter: true
|
|
94
110
|
}, function (state) {
|
|
95
111
|
return /*#__PURE__*/React.createElement("div", {
|
|
96
112
|
style: {
|
|
97
|
-
transition: "max-height ".concat(
|
|
113
|
+
transition: "max-height ".concat(TRANSITION_DURATION, "ms ease-in-out"),
|
|
98
114
|
maxHeight: getExpandedHeight(expandedAreaRef, state)
|
|
99
115
|
},
|
|
100
116
|
ref: expandedAreaRef,
|
|
101
117
|
className: ax(["_1reo15vq _18m915vq"])
|
|
102
|
-
}, /*#__PURE__*/React.createElement(
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
"aria-label": textLabel,
|
|
110
|
-
placeholder: textPlaceholder,
|
|
111
|
-
onChange: function onChange(event) {
|
|
112
|
-
fieldProps.onChange(event);
|
|
113
|
-
onFeedbackChange();
|
|
114
|
-
}
|
|
115
|
-
}));
|
|
116
|
-
}), /*#__PURE__*/React.createElement(CheckboxField, {
|
|
117
|
-
name: "canContact",
|
|
118
|
-
isDisabled: submitting,
|
|
119
|
-
defaultIsChecked: canContactDefault
|
|
120
|
-
}, function (_ref5) {
|
|
121
|
-
var fieldProps = _ref5.fieldProps;
|
|
122
|
-
return /*#__PURE__*/React.createElement(Checkbox, _extends({}, fieldProps, {
|
|
123
|
-
label: "Atlassian can contact me about this feedback"
|
|
124
|
-
}));
|
|
125
|
-
}), /*#__PURE__*/React.createElement(FormFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
126
|
-
type: "submit",
|
|
127
|
-
appearance: "primary",
|
|
128
|
-
isLoading: submitting
|
|
129
|
-
}, "Submit")));
|
|
118
|
+
}, /*#__PURE__*/React.createElement(SurveyFormExpandedFeedback, {
|
|
119
|
+
canContactDefault: canContactDefault,
|
|
120
|
+
onFeedbackChange: onFeedbackChange,
|
|
121
|
+
submitting: submitting,
|
|
122
|
+
textLabel: textLabel,
|
|
123
|
+
textPlaceholder: textPlaceholder
|
|
124
|
+
}));
|
|
130
125
|
}));
|
|
131
126
|
}));
|
|
132
127
|
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* SurveyFormExpandedFeedback.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import Button from '@atlaskit/button/new';
|
|
6
|
+
import { Checkbox } from '@atlaskit/checkbox';
|
|
7
|
+
import { CheckboxField, Field, FormFooter } from '@atlaskit/form';
|
|
8
|
+
import Textarea from '@atlaskit/textarea';
|
|
9
|
+
export function SurveyFormExpandedFeedback(_ref) {
|
|
10
|
+
var canContactDefault = _ref.canContactDefault,
|
|
11
|
+
onFeedbackChange = _ref.onFeedbackChange,
|
|
12
|
+
submitting = _ref.submitting,
|
|
13
|
+
textLabel = _ref.textLabel,
|
|
14
|
+
textPlaceholder = _ref.textPlaceholder;
|
|
15
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Field, {
|
|
16
|
+
name: "writtenFeedback",
|
|
17
|
+
defaultValue: "",
|
|
18
|
+
isDisabled: submitting
|
|
19
|
+
}, function (_ref2) {
|
|
20
|
+
var fieldProps = _ref2.fieldProps;
|
|
21
|
+
return /*#__PURE__*/React.createElement(Textarea, _extends({}, fieldProps, {
|
|
22
|
+
"aria-label": textLabel,
|
|
23
|
+
placeholder: textPlaceholder,
|
|
24
|
+
onChange: function onChange(event) {
|
|
25
|
+
fieldProps.onChange(event);
|
|
26
|
+
onFeedbackChange();
|
|
27
|
+
}
|
|
28
|
+
}));
|
|
29
|
+
}), /*#__PURE__*/React.createElement(CheckboxField, {
|
|
30
|
+
name: "canContact",
|
|
31
|
+
isDisabled: submitting,
|
|
32
|
+
defaultIsChecked: canContactDefault
|
|
33
|
+
}, function (_ref3) {
|
|
34
|
+
var fieldProps = _ref3.fieldProps;
|
|
35
|
+
return /*#__PURE__*/React.createElement(Checkbox, _extends({}, fieldProps, {
|
|
36
|
+
label: "Atlassian can contact me about this feedback"
|
|
37
|
+
}));
|
|
38
|
+
}), /*#__PURE__*/React.createElement(FormFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
39
|
+
type: "submit",
|
|
40
|
+
appearance: "primary",
|
|
41
|
+
isLoading: submitting
|
|
42
|
+
}, "Submit")));
|
|
43
|
+
}
|
|
@@ -3,6 +3,9 @@ import "./SurveyMarshal.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { Transition } from 'react-transition-group';
|
|
6
|
+
import ExitingPersistence from '@atlaskit/motion/exiting-persistence';
|
|
7
|
+
import SlideIn from '@atlaskit/motion/slide-in';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
9
|
import { layers } from '@atlaskit/theme/constants';
|
|
7
10
|
// 8px is the base unit in pixels
|
|
8
11
|
var surveyOffset = "var(--ds-space-600, 48px)";
|
|
@@ -32,9 +35,30 @@ var getAnimationProps = function getAnimationProps(state) {
|
|
|
32
35
|
}
|
|
33
36
|
};
|
|
34
37
|
var transitionBaseStyles = null;
|
|
38
|
+
var marshalLayoutStyles = null;
|
|
39
|
+
var marshalMotionLayerStyles = null;
|
|
35
40
|
export default function SurveyMarshal(props) {
|
|
36
41
|
var children = props.children,
|
|
37
42
|
shouldShow = props.shouldShow;
|
|
43
|
+
if (fg('platform_contextual_survey_use_atlaskit_motion')) {
|
|
44
|
+
return /*#__PURE__*/React.createElement(ExitingPersistence, {
|
|
45
|
+
appear: true
|
|
46
|
+
}, shouldShow && /*#__PURE__*/React.createElement(SlideIn, {
|
|
47
|
+
key: "contextual-survey-marshal",
|
|
48
|
+
enterFrom: "right",
|
|
49
|
+
fade: "inout",
|
|
50
|
+
duration: "medium"
|
|
51
|
+
}, function (motionProps) {
|
|
52
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
53
|
+
ref: motionProps.ref
|
|
54
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- motion keyframes
|
|
55
|
+
,
|
|
56
|
+
className: ax(["_kqsw1n9t _1xi2oahv _94n5oahv", "_1pbyni7l", motionProps.className]),
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- motion animation styles
|
|
58
|
+
style: motionProps.style
|
|
59
|
+
}, children());
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
38
62
|
return /*#__PURE__*/React.createElement(Transition, {
|
|
39
63
|
in: shouldShow,
|
|
40
64
|
timeout: animationDuration,
|
|
@@ -32,7 +32,7 @@ var getExpandedHeight = function getExpandedHeight(ref, state) {
|
|
|
32
32
|
return '0';
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
var
|
|
35
|
+
var TRANSITION_DURATION = 200;
|
|
36
36
|
export default (function (_ref) {
|
|
37
37
|
var question = _ref.question,
|
|
38
38
|
statement = _ref.statement,
|
|
@@ -97,12 +97,12 @@ export default (function (_ref) {
|
|
|
97
97
|
}));
|
|
98
98
|
}), /*#__PURE__*/React.createElement(Transition, {
|
|
99
99
|
in: expanded,
|
|
100
|
-
timeout:
|
|
100
|
+
timeout: TRANSITION_DURATION,
|
|
101
101
|
mountOnEnter: true
|
|
102
102
|
}, function (state) {
|
|
103
103
|
return /*#__PURE__*/React.createElement("div", {
|
|
104
104
|
style: {
|
|
105
|
-
transition: "max-height ".concat(
|
|
105
|
+
transition: "max-height ".concat(TRANSITION_DURATION, "ms ease-in-out"),
|
|
106
106
|
maxHeight: getExpandedHeight(expandedAreaRef, state)
|
|
107
107
|
},
|
|
108
108
|
ref: expandedAreaRef,
|
|
@@ -7,5 +7,5 @@ interface Props {
|
|
|
7
7
|
textLabel: string;
|
|
8
8
|
textPlaceholder: string;
|
|
9
9
|
}
|
|
10
|
-
declare const _default: ({ question, statement, textPlaceholder, textLabel, onSubmit, }: Props) => JSX.Element;
|
|
10
|
+
declare const _default: ({ question, statement, textPlaceholder, textLabel, onSubmit, }: Props) => React.JSX.Element;
|
|
11
11
|
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export type SurveyFormExpandedFeedbackProps = {
|
|
7
|
+
canContactDefault: boolean;
|
|
8
|
+
onFeedbackChange: () => void;
|
|
9
|
+
submitting: boolean;
|
|
10
|
+
textLabel: string;
|
|
11
|
+
textPlaceholder: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function SurveyFormExpandedFeedback({ canContactDefault, onFeedbackChange, submitting, textLabel, textPlaceholder, }: SurveyFormExpandedFeedbackProps): React.JSX.Element;
|
|
@@ -7,5 +7,5 @@ interface Props {
|
|
|
7
7
|
scoreSubtext?: Array<string>;
|
|
8
8
|
value: number | undefined;
|
|
9
9
|
}
|
|
10
|
-
declare const _default: ({ onChange, value, scoreSubtext }: Props) => JSX.Element;
|
|
10
|
+
declare const _default: ({ onChange, value, scoreSubtext }: Props) => React.JSX.Element;
|
|
11
11
|
export default _default;
|
|
@@ -7,5 +7,5 @@ interface Props {
|
|
|
7
7
|
headerImage?: string;
|
|
8
8
|
onDismiss: () => void;
|
|
9
9
|
}
|
|
10
|
-
declare const _default: ({ children, onDismiss, headerImage }: Props) => JSX.Element;
|
|
10
|
+
declare const _default: ({ children, onDismiss, headerImage }: Props) => React.JSX.Element;
|
|
11
11
|
export default _default;
|
|
@@ -7,5 +7,5 @@ interface Props {
|
|
|
7
7
|
statement?: string;
|
|
8
8
|
textLabel: string;
|
|
9
9
|
}
|
|
10
|
-
declare const _default: ({ question, statement, textLabel, scoreSubtext, onSubmit }: Props) => JSX.Element;
|
|
10
|
+
declare const _default: ({ question, statement, textLabel, scoreSubtext, onSubmit, }: Props) => React.JSX.Element;
|
|
11
11
|
export default _default;
|
|
@@ -7,5 +7,5 @@ interface Props {
|
|
|
7
7
|
textLabel: string;
|
|
8
8
|
textPlaceholder: string;
|
|
9
9
|
}
|
|
10
|
-
declare const _default: ({ question, statement, textPlaceholder, textLabel, onSubmit, }: Props) => JSX.Element;
|
|
10
|
+
declare const _default: ({ question, statement, textPlaceholder, textLabel, onSubmit, }: Props) => React.JSX.Element;
|
|
11
11
|
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export type SurveyFormExpandedFeedbackProps = {
|
|
7
|
+
canContactDefault: boolean;
|
|
8
|
+
onFeedbackChange: () => void;
|
|
9
|
+
submitting: boolean;
|
|
10
|
+
textLabel: string;
|
|
11
|
+
textPlaceholder: string;
|
|
12
|
+
};
|
|
13
|
+
export declare function SurveyFormExpandedFeedback({ canContactDefault, onFeedbackChange, submitting, textLabel, textPlaceholder, }: SurveyFormExpandedFeedbackProps): React.JSX.Element;
|
|
@@ -7,5 +7,5 @@ interface Props {
|
|
|
7
7
|
scoreSubtext?: Array<string>;
|
|
8
8
|
value: number | undefined;
|
|
9
9
|
}
|
|
10
|
-
declare const _default: ({ onChange, value, scoreSubtext }: Props) => JSX.Element;
|
|
10
|
+
declare const _default: ({ onChange, value, scoreSubtext }: Props) => React.JSX.Element;
|
|
11
11
|
export default _default;
|
|
@@ -7,5 +7,5 @@ interface Props {
|
|
|
7
7
|
headerImage?: string;
|
|
8
8
|
onDismiss: () => void;
|
|
9
9
|
}
|
|
10
|
-
declare const _default: ({ children, onDismiss, headerImage }: Props) => JSX.Element;
|
|
10
|
+
declare const _default: ({ children, onDismiss, headerImage }: Props) => React.JSX.Element;
|
|
11
11
|
export default _default;
|
|
@@ -7,5 +7,5 @@ interface Props {
|
|
|
7
7
|
statement?: string;
|
|
8
8
|
textLabel: string;
|
|
9
9
|
}
|
|
10
|
-
declare const _default: ({ question, statement, textLabel, scoreSubtext, onSubmit }: Props) => JSX.Element;
|
|
10
|
+
declare const _default: ({ question, statement, textLabel, scoreSubtext, onSubmit, }: Props) => React.JSX.Element;
|
|
11
11
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/contextual-survey",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.11",
|
|
4
4
|
"description": "A React component used to ask the user for feedback",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,19 +31,20 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/button": "^23.
|
|
34
|
+
"@atlaskit/button": "^23.11.0",
|
|
35
35
|
"@atlaskit/checkbox": "^17.3.0",
|
|
36
36
|
"@atlaskit/css": "^0.19.0",
|
|
37
37
|
"@atlaskit/form": "^15.5.0",
|
|
38
|
-
"@atlaskit/heading": "^5.
|
|
38
|
+
"@atlaskit/heading": "^5.4.0",
|
|
39
39
|
"@atlaskit/icon": "^34.0.0",
|
|
40
40
|
"@atlaskit/image": "^3.0.0",
|
|
41
|
-
"@atlaskit/link": "^3.
|
|
41
|
+
"@atlaskit/link": "^3.4.0",
|
|
42
|
+
"@atlaskit/motion": "^5.5.0",
|
|
42
43
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
43
44
|
"@atlaskit/primitives": "^18.1.0",
|
|
44
45
|
"@atlaskit/textarea": "^8.2.0",
|
|
45
|
-
"@atlaskit/theme": "^
|
|
46
|
-
"@atlaskit/tokens": "^
|
|
46
|
+
"@atlaskit/theme": "^23.0.0",
|
|
47
|
+
"@atlaskit/tokens": "^12.0.0",
|
|
47
48
|
"@atlaskit/tooltip": "^21.1.0",
|
|
48
49
|
"@babel/runtime": "^7.0.0",
|
|
49
50
|
"@compiled/react": "^0.20.0",
|
|
@@ -72,5 +73,10 @@
|
|
|
72
73
|
"spacing"
|
|
73
74
|
]
|
|
74
75
|
}
|
|
76
|
+
},
|
|
77
|
+
"platform-feature-flags": {
|
|
78
|
+
"platform_contextual_survey_use_atlaskit_motion": {
|
|
79
|
+
"type": "boolean"
|
|
80
|
+
}
|
|
75
81
|
}
|
|
76
82
|
}
|