@atlaskit/contextual-survey 3.1.2 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/cjs/components/FeedbackAcknowledgement.js +2 -7
- package/dist/cjs/components/FeedbackScoreButtons.js +21 -45
- package/dist/cjs/components/SignUpPrompt.js +24 -29
- package/dist/cjs/components/SignUpSuccess.js +5 -10
- package/dist/cjs/components/SuccessContainer.js +14 -19
- package/dist/cjs/components/SurveyContainer.js +23 -33
- package/dist/cjs/components/SurveyForm.js +26 -31
- package/dist/cjs/components/SurveyMarshal.js +16 -23
- package/dist/cjs/index.js +8 -4
- package/dist/es2019/components/FeedbackAcknowledgement.js +2 -7
- package/dist/es2019/components/FeedbackScoreButtons.js +18 -44
- package/dist/es2019/components/SignUpPrompt.js +20 -29
- package/dist/es2019/components/SignUpSuccess.js +5 -10
- package/dist/es2019/components/SuccessContainer.js +11 -19
- package/dist/es2019/components/SurveyContainer.js +16 -33
- package/dist/es2019/components/SurveyForm.js +25 -29
- package/dist/es2019/components/SurveyMarshal.js +12 -22
- package/dist/es2019/index.js +2 -3
- package/dist/esm/components/FeedbackAcknowledgement.js +2 -7
- package/dist/esm/components/FeedbackScoreButtons.js +18 -44
- package/dist/esm/components/SignUpPrompt.js +20 -29
- package/dist/esm/components/SignUpSuccess.js +5 -10
- package/dist/esm/components/SuccessContainer.js +11 -19
- package/dist/esm/components/SurveyContainer.js +20 -33
- package/dist/esm/components/SurveyForm.js +25 -29
- package/dist/esm/components/SurveyMarshal.js +13 -22
- package/dist/esm/index.js +2 -3
- package/dist/types/components/ContextualSurvey.d.ts +1 -1
- package/dist/types/components/FeedbackAcknowledgement.d.ts +2 -6
- package/dist/types/components/FeedbackScoreButtons.d.ts +2 -2
- package/dist/types/components/SignUpPrompt.d.ts +6 -2
- package/dist/types/components/SignUpSuccess.d.ts +2 -6
- package/dist/types/components/SuccessContainer.d.ts +1 -6
- package/dist/types/components/SurveyContainer.d.ts +2 -3
- package/dist/types/components/SurveyForm.d.ts +2 -2
- package/dist/types/components/SurveyMarshal.d.ts +3 -3
- package/dist/types/index.d.ts +2 -3
- package/dist/types-ts4.5/components/ContextualSurvey.d.ts +1 -1
- package/dist/types-ts4.5/components/FeedbackAcknowledgement.d.ts +2 -6
- package/dist/types-ts4.5/components/FeedbackScoreButtons.d.ts +2 -2
- package/dist/types-ts4.5/components/SignUpPrompt.d.ts +6 -2
- package/dist/types-ts4.5/components/SignUpSuccess.d.ts +2 -6
- package/dist/types-ts4.5/components/SuccessContainer.d.ts +1 -6
- package/dist/types-ts4.5/components/SurveyContainer.d.ts +1 -2
- package/dist/types-ts4.5/components/SurveyForm.d.ts +2 -2
- package/dist/types-ts4.5/components/SurveyMarshal.d.ts +3 -3
- package/dist/types-ts4.5/index.d.ts +2 -3
- package/package.json +7 -12
- package/dist/cjs/compiled/ContextualSurvey.js +0 -231
- package/dist/cjs/compiled/FeedbackAcknowledgement.js +0 -15
- package/dist/cjs/compiled/FeedbackScoreButtons.js +0 -64
- package/dist/cjs/compiled/SignUpPrompt.js +0 -80
- package/dist/cjs/compiled/SignUpSuccess.js +0 -22
- package/dist/cjs/compiled/SuccessContainer.js +0 -32
- package/dist/cjs/compiled/SurveyContainer.js +0 -39
- package/dist/cjs/compiled/SurveyForm.js +0 -141
- package/dist/cjs/compiled/SurveyMarshal.js +0 -63
- package/dist/cjs/compiled/useEscapeToDismiss.js +0 -71
- package/dist/cjs/fg-components.js +0 -27
- package/dist/es2019/compiled/ContextualSurvey.js +0 -176
- package/dist/es2019/compiled/FeedbackAcknowledgement.js +0 -6
- package/dist/es2019/compiled/FeedbackScoreButtons.js +0 -51
- package/dist/es2019/compiled/SignUpPrompt.js +0 -47
- package/dist/es2019/compiled/SignUpSuccess.js +0 -11
- package/dist/es2019/compiled/SuccessContainer.js +0 -21
- package/dist/es2019/compiled/SurveyContainer.js +0 -26
- package/dist/es2019/compiled/SurveyForm.js +0 -119
- package/dist/es2019/compiled/SurveyMarshal.js +0 -56
- package/dist/es2019/compiled/useEscapeToDismiss.js +0 -65
- package/dist/es2019/fg-components.js +0 -13
- package/dist/esm/compiled/ContextualSurvey.js +0 -221
- package/dist/esm/compiled/FeedbackAcknowledgement.js +0 -8
- package/dist/esm/compiled/FeedbackScoreButtons.js +0 -54
- package/dist/esm/compiled/SignUpPrompt.js +0 -70
- package/dist/esm/compiled/SignUpSuccess.js +0 -15
- package/dist/esm/compiled/SuccessContainer.js +0 -22
- package/dist/esm/compiled/SurveyContainer.js +0 -29
- package/dist/esm/compiled/SurveyForm.js +0 -131
- package/dist/esm/compiled/SurveyMarshal.js +0 -54
- package/dist/esm/compiled/useEscapeToDismiss.js +0 -64
- package/dist/esm/fg-components.js +0 -19
- package/dist/types/compiled/ContextualSurvey.d.ts +0 -40
- package/dist/types/compiled/FeedbackAcknowledgement.d.ts +0 -3
- package/dist/types/compiled/FeedbackScoreButtons.d.ts +0 -11
- package/dist/types/compiled/SignUpPrompt.d.ts +0 -10
- package/dist/types/compiled/SignUpSuccess.d.ts +0 -5
- package/dist/types/compiled/SuccessContainer.d.ts +0 -6
- package/dist/types/compiled/SurveyContainer.d.ts +0 -11
- package/dist/types/compiled/SurveyForm.d.ts +0 -12
- package/dist/types/compiled/SurveyMarshal.d.ts +0 -16
- package/dist/types/compiled/useEscapeToDismiss.d.ts +0 -6
- package/dist/types/fg-components.d.ts +0 -5
- package/dist/types-ts4.5/compiled/ContextualSurvey.d.ts +0 -40
- package/dist/types-ts4.5/compiled/FeedbackAcknowledgement.d.ts +0 -3
- package/dist/types-ts4.5/compiled/FeedbackScoreButtons.d.ts +0 -11
- package/dist/types-ts4.5/compiled/SignUpPrompt.d.ts +0 -10
- package/dist/types-ts4.5/compiled/SignUpSuccess.d.ts +0 -5
- package/dist/types-ts4.5/compiled/SuccessContainer.d.ts +0 -6
- package/dist/types-ts4.5/compiled/SurveyContainer.d.ts +0 -11
- package/dist/types-ts4.5/compiled/SurveyForm.d.ts +0 -12
- package/dist/types-ts4.5/compiled/SurveyMarshal.d.ts +0 -16
- package/dist/types-ts4.5/compiled/useEscapeToDismiss.d.ts +0 -6
- package/dist/types-ts4.5/fg-components.d.ts +0 -5
- /package/dist/cjs/{compiled → components}/FeedbackScoreButtons.compiled.css +0 -0
- /package/dist/cjs/{compiled → components}/SignUpPrompt.compiled.css +0 -0
- /package/dist/cjs/{compiled → components}/SuccessContainer.compiled.css +0 -0
- /package/dist/cjs/{compiled → components}/SurveyContainer.compiled.css +0 -0
- /package/dist/cjs/{compiled → components}/SurveyForm.compiled.css +0 -0
- /package/dist/cjs/{compiled → components}/SurveyMarshal.compiled.css +0 -0
- /package/dist/es2019/{compiled → components}/FeedbackScoreButtons.compiled.css +0 -0
- /package/dist/es2019/{compiled → components}/SignUpPrompt.compiled.css +0 -0
- /package/dist/es2019/{compiled → components}/SuccessContainer.compiled.css +0 -0
- /package/dist/es2019/{compiled → components}/SurveyContainer.compiled.css +0 -0
- /package/dist/es2019/{compiled → components}/SurveyForm.compiled.css +0 -0
- /package/dist/es2019/{compiled → components}/SurveyMarshal.compiled.css +0 -0
- /package/dist/esm/{compiled → components}/FeedbackScoreButtons.compiled.css +0 -0
- /package/dist/esm/{compiled → components}/SignUpPrompt.compiled.css +0 -0
- /package/dist/esm/{compiled → components}/SuccessContainer.compiled.css +0 -0
- /package/dist/esm/{compiled → components}/SurveyContainer.compiled.css +0 -0
- /package/dist/esm/{compiled → components}/SurveyForm.compiled.css +0 -0
- /package/dist/esm/{compiled → components}/SurveyMarshal.compiled.css +0 -0
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
/* SurveyForm.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
Object.defineProperty(exports, "__esModule", {
|
|
7
|
-
value: true
|
|
8
|
-
});
|
|
9
|
-
exports.default = void 0;
|
|
10
|
-
require("./SurveyForm.compiled.css");
|
|
11
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
-
var React = _react;
|
|
13
|
-
var _runtime = require("@compiled/react/runtime");
|
|
14
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
15
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
16
|
-
var _reactTransitionGroup = require("react-transition-group");
|
|
17
|
-
var _new = _interopRequireDefault(require("@atlaskit/button/new"));
|
|
18
|
-
var _checkbox = require("@atlaskit/checkbox");
|
|
19
|
-
var _form = _interopRequireWildcard(require("@atlaskit/form"));
|
|
20
|
-
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
21
|
-
var _compiled = require("@atlaskit/primitives/compiled");
|
|
22
|
-
var _textarea = _interopRequireDefault(require("@atlaskit/textarea"));
|
|
23
|
-
var _FeedbackScoreButtons = _interopRequireDefault(require("./FeedbackScoreButtons"));
|
|
24
|
-
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); }
|
|
25
|
-
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 && {}.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; }
|
|
26
|
-
var transitionBaseStyles = null;
|
|
27
|
-
var getExpandedHeight = function getExpandedHeight(ref, state) {
|
|
28
|
-
if (!ref.current) {
|
|
29
|
-
return '0';
|
|
30
|
-
}
|
|
31
|
-
switch (state) {
|
|
32
|
-
case 'entering':
|
|
33
|
-
return "".concat(ref.current.scrollHeight, "px");
|
|
34
|
-
case 'entered':
|
|
35
|
-
// needed for TextField auto height expand
|
|
36
|
-
return "none";
|
|
37
|
-
default:
|
|
38
|
-
return '0';
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
var transitionDuration = 200;
|
|
42
|
-
var _default = exports.default = function _default(_ref) {
|
|
43
|
-
var question = _ref.question,
|
|
44
|
-
statement = _ref.statement,
|
|
45
|
-
textPlaceholder = _ref.textPlaceholder,
|
|
46
|
-
textLabel = _ref.textLabel,
|
|
47
|
-
onSubmit = _ref.onSubmit;
|
|
48
|
-
var _useState = (0, _react.useState)(false),
|
|
49
|
-
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
50
|
-
expanded = _useState2[0],
|
|
51
|
-
setExpanded = _useState2[1];
|
|
52
|
-
var _useState3 = (0, _react.useState)(false),
|
|
53
|
-
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
54
|
-
canContactDefault = _useState4[0],
|
|
55
|
-
setCanContactDefault = _useState4[1];
|
|
56
|
-
var hasAutoFilledCanContactRef = (0, _react.useRef)(false);
|
|
57
|
-
var expandedAreaRef = (0, _react.useRef)(null);
|
|
58
|
-
var onScoreSelect = (0, _react.useCallback)(function () {
|
|
59
|
-
setExpanded(true);
|
|
60
|
-
}, [setExpanded]);
|
|
61
|
-
|
|
62
|
-
// On the first type the user types some feedback we auto select
|
|
63
|
-
// the option for allowing feedback. This automatic selection only
|
|
64
|
-
// happens once. After that it is up to the user to control
|
|
65
|
-
var onFeedbackChange = (0, _react.useCallback)(function () {
|
|
66
|
-
if (hasAutoFilledCanContactRef.current) {
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
hasAutoFilledCanContactRef.current = true;
|
|
70
|
-
setCanContactDefault(true);
|
|
71
|
-
}, []);
|
|
72
|
-
return /*#__PURE__*/React.createElement("section", {
|
|
73
|
-
"aria-labelledby": "contextualSurveyQuestion"
|
|
74
|
-
}, /*#__PURE__*/React.createElement(_compiled.Stack, {
|
|
75
|
-
space: "space.150"
|
|
76
|
-
}, /*#__PURE__*/React.createElement(_heading.default, {
|
|
77
|
-
id: "contextualSurveyQuestion",
|
|
78
|
-
size: "xsmall"
|
|
79
|
-
}, question), statement && /*#__PURE__*/React.createElement(_compiled.Text, {
|
|
80
|
-
as: "p",
|
|
81
|
-
id: "contextualSurveyStatement"
|
|
82
|
-
}, statement)), /*#__PURE__*/React.createElement(_form.default, {
|
|
83
|
-
onSubmit: onSubmit
|
|
84
|
-
}, function (_ref2) {
|
|
85
|
-
var formProps = _ref2.formProps,
|
|
86
|
-
submitting = _ref2.submitting;
|
|
87
|
-
return /*#__PURE__*/React.createElement("form", formProps, /*#__PURE__*/React.createElement(_form.Field, {
|
|
88
|
-
name: "feedbackScore",
|
|
89
|
-
isDisabled: submitting,
|
|
90
|
-
isRequired: true
|
|
91
|
-
}, function (_ref3) {
|
|
92
|
-
var fieldProps = _ref3.fieldProps;
|
|
93
|
-
return /*#__PURE__*/React.createElement(_FeedbackScoreButtons.default, (0, _extends2.default)({}, fieldProps, {
|
|
94
|
-
onChange: function onChange(score) {
|
|
95
|
-
fieldProps.onChange(score);
|
|
96
|
-
onScoreSelect();
|
|
97
|
-
}
|
|
98
|
-
}));
|
|
99
|
-
}), /*#__PURE__*/React.createElement(_reactTransitionGroup.Transition, {
|
|
100
|
-
in: expanded,
|
|
101
|
-
timeout: transitionDuration,
|
|
102
|
-
mountOnEnter: true
|
|
103
|
-
}, function (state) {
|
|
104
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
105
|
-
style: {
|
|
106
|
-
transition: "max-height ".concat(transitionDuration, "ms ease-in-out"),
|
|
107
|
-
maxHeight: getExpandedHeight(expandedAreaRef, state)
|
|
108
|
-
},
|
|
109
|
-
ref: expandedAreaRef,
|
|
110
|
-
className: (0, _runtime.ax)(["_1reo15vq _18m915vq"])
|
|
111
|
-
}, /*#__PURE__*/React.createElement(_form.Field, {
|
|
112
|
-
name: "writtenFeedback",
|
|
113
|
-
defaultValue: "",
|
|
114
|
-
isDisabled: submitting
|
|
115
|
-
}, function (_ref4) {
|
|
116
|
-
var fieldProps = _ref4.fieldProps;
|
|
117
|
-
return /*#__PURE__*/React.createElement(_textarea.default, (0, _extends2.default)({}, fieldProps, {
|
|
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")));
|
|
139
|
-
}));
|
|
140
|
-
}));
|
|
141
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/* SurveyMarshal.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
-
"use strict";
|
|
3
|
-
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = SurveyMarshal;
|
|
9
|
-
require("./SurveyMarshal.compiled.css");
|
|
10
|
-
var React = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _runtime = require("@compiled/react/runtime");
|
|
12
|
-
var _reactTransitionGroup = require("react-transition-group");
|
|
13
|
-
var _constants = require("@atlaskit/theme/constants");
|
|
14
|
-
var _constants2 = require("../constants");
|
|
15
|
-
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); }
|
|
16
|
-
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 && {}.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; }
|
|
17
|
-
var animationDuration = 300;
|
|
18
|
-
var offscreen = {
|
|
19
|
-
translateX: "".concat(_constants2.surveyInnerWidth + _constants2.surveyOffset, "px"),
|
|
20
|
-
opacity: '0'
|
|
21
|
-
};
|
|
22
|
-
var getAnimationProps = function getAnimationProps(state) {
|
|
23
|
-
switch (state) {
|
|
24
|
-
case 'entered':
|
|
25
|
-
{
|
|
26
|
-
return {
|
|
27
|
-
translateX: '0',
|
|
28
|
-
opacity: '1'
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
case 'entering':
|
|
32
|
-
case 'unmounted':
|
|
33
|
-
case 'exited':
|
|
34
|
-
case 'exiting':
|
|
35
|
-
{
|
|
36
|
-
return offscreen;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
var transitionBaseStyles = null;
|
|
41
|
-
function SurveyMarshal(props) {
|
|
42
|
-
var children = props.children,
|
|
43
|
-
shouldShow = props.shouldShow;
|
|
44
|
-
return /*#__PURE__*/React.createElement(_reactTransitionGroup.Transition, {
|
|
45
|
-
in: shouldShow,
|
|
46
|
-
timeout: animationDuration,
|
|
47
|
-
unmountOnExit: true
|
|
48
|
-
}, function (state) {
|
|
49
|
-
var _getAnimationProps = getAnimationProps(state),
|
|
50
|
-
translateX = _getAnimationProps.translateX,
|
|
51
|
-
opacity = _getAnimationProps.opacity;
|
|
52
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
53
|
-
className: (0, _runtime.ax)(["_kqsw1n9t _1xi28err _94n58err _k8m01rjc"]),
|
|
54
|
-
style: {
|
|
55
|
-
opacity: opacity,
|
|
56
|
-
transition: "all ".concat(animationDuration, "ms ease-in-out"),
|
|
57
|
-
zIndex: _constants.layers.flag(),
|
|
58
|
-
transform: "translateX(".concat(translateX, ")"),
|
|
59
|
-
"--_1hx5ohh": (0, _runtime.ix)("".concat(_constants2.surveyOffset, "px"))
|
|
60
|
-
}
|
|
61
|
-
}, children());
|
|
62
|
-
});
|
|
63
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = useEscapeToDismiss;
|
|
7
|
-
exports.escape = void 0;
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
var escape = exports.escape = 27;
|
|
10
|
-
function bind(target, eventName, handler, options) {
|
|
11
|
-
target.addEventListener(eventName, handler, options);
|
|
12
|
-
return function unbind() {
|
|
13
|
-
target.removeEventListener(eventName, handler, options);
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
function shouldDismiss(target) {
|
|
17
|
-
if (!target) {
|
|
18
|
-
return true;
|
|
19
|
-
}
|
|
20
|
-
if (!(target instanceof HTMLElement)) {
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Closest doesn't exist for ie11
|
|
25
|
-
// Because we cannot be sure if in a text area - just don't allow dismissing
|
|
26
|
-
if (!target.closest) {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
var inTextArea = Boolean(target.closest('textarea'));
|
|
30
|
-
|
|
31
|
-
// Allow dismissing if not in a textarea
|
|
32
|
-
return !inTextArea;
|
|
33
|
-
}
|
|
34
|
-
function useEscapeToDismiss(_ref) {
|
|
35
|
-
var onDismiss = _ref.onDismiss;
|
|
36
|
-
var onDismissRef = (0, _react.useRef)(onDismiss);
|
|
37
|
-
|
|
38
|
-
// Defensively accounting for consumer passing in a new function
|
|
39
|
-
// each time. We just want to call the latest one
|
|
40
|
-
(0, _react.useEffect)(function () {
|
|
41
|
-
onDismissRef.current = onDismiss;
|
|
42
|
-
}, [onDismiss]);
|
|
43
|
-
(0, _react.useEffect)(function () {
|
|
44
|
-
var unbind;
|
|
45
|
-
function onKeyDown(event) {
|
|
46
|
-
if (event.keyCode !== escape) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// Escape pressed
|
|
51
|
-
|
|
52
|
-
// We don't want to close if the user is typing in the text area
|
|
53
|
-
if (!shouldDismiss(event.target)) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
if (unbind) {
|
|
57
|
-
// only want to call dismiss once
|
|
58
|
-
unbind();
|
|
59
|
-
}
|
|
60
|
-
onDismissRef.current();
|
|
61
|
-
}
|
|
62
|
-
unbind = bind(window, 'keydown',
|
|
63
|
-
// @ts-ignore: the typescript for this is lame
|
|
64
|
-
onKeyDown, {
|
|
65
|
-
passive: true
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
// double calls to unbind is fine
|
|
69
|
-
return unbind;
|
|
70
|
-
}, []);
|
|
71
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.SurveyMarshal = exports.ContextualSurvey = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
10
|
-
var _ContextualSurvey = _interopRequireDefault(require("./compiled/ContextualSurvey"));
|
|
11
|
-
var _SurveyMarshal = _interopRequireDefault(require("./compiled/SurveyMarshal"));
|
|
12
|
-
var _ContextualSurvey2 = _interopRequireDefault(require("./components/ContextualSurvey"));
|
|
13
|
-
var _SurveyMarshal2 = _interopRequireDefault(require("./components/SurveyMarshal"));
|
|
14
|
-
// exported props for FG check
|
|
15
|
-
|
|
16
|
-
var ContextualSurvey = exports.ContextualSurvey = function ContextualSurvey(props) {
|
|
17
|
-
return (
|
|
18
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
19
|
-
(0, _platformFeatureFlags.fg)('platform_contextual_survey_enable_compiled_fg') ? /*#__PURE__*/_react.default.createElement(_ContextualSurvey.default, props) : /*#__PURE__*/_react.default.createElement(_ContextualSurvey2.default, props)
|
|
20
|
-
);
|
|
21
|
-
};
|
|
22
|
-
var SurveyMarshal = exports.SurveyMarshal = function SurveyMarshal(props) {
|
|
23
|
-
return (
|
|
24
|
-
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
25
|
-
(0, _platformFeatureFlags.fg)('platform_contextual_survey_enable_compiled_fg') ? /*#__PURE__*/_react.default.createElement(_SurveyMarshal.default, props) : /*#__PURE__*/_react.default.createElement(_SurveyMarshal2.default, props)
|
|
26
|
-
);
|
|
27
|
-
};
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
-
import FeedbackAcknowledgement from './FeedbackAcknowledgement';
|
|
3
|
-
import SignUpPrompt from './SignUpPrompt';
|
|
4
|
-
import SignUpSuccess from './SignUpSuccess';
|
|
5
|
-
import SurveyContainer from './SurveyContainer';
|
|
6
|
-
import SurveyForm from './SurveyForm';
|
|
7
|
-
import useEscapeToDismiss from './useEscapeToDismiss';
|
|
8
|
-
export let DismissTrigger = /*#__PURE__*/function (DismissTrigger) {
|
|
9
|
-
DismissTrigger["AutoDismiss"] = "AUTO_DISMISS";
|
|
10
|
-
DismissTrigger["Manual"] = "MANUAL";
|
|
11
|
-
DismissTrigger["Finished"] = "FINISHED";
|
|
12
|
-
DismissTrigger["Unmount"] = "UNMOUNT";
|
|
13
|
-
return DismissTrigger;
|
|
14
|
-
}({});
|
|
15
|
-
export const AUTO_DISAPPEAR_DURATION = 8000;
|
|
16
|
-
export default (({
|
|
17
|
-
question,
|
|
18
|
-
statement,
|
|
19
|
-
onDismiss,
|
|
20
|
-
onSubmit,
|
|
21
|
-
onMailingListAnswer,
|
|
22
|
-
getUserHasAnsweredMailingList,
|
|
23
|
-
textLabel = 'Why did you give that rating',
|
|
24
|
-
textPlaceholder = 'Tell us why'
|
|
25
|
-
}) => {
|
|
26
|
-
const autoDisappearTimeoutRef = useRef(null);
|
|
27
|
-
|
|
28
|
-
// only allow a single dismiss for a component
|
|
29
|
-
const isDismissedRef = useRef(false);
|
|
30
|
-
const tryDismiss = useCallback(trigger => {
|
|
31
|
-
// Already called dismiss once
|
|
32
|
-
if (isDismissedRef.current) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
isDismissedRef.current = true;
|
|
36
|
-
onDismissRef.current({
|
|
37
|
-
trigger
|
|
38
|
-
});
|
|
39
|
-
}, []);
|
|
40
|
-
const [currentStep, setCurrentStep] = useState('SURVEY');
|
|
41
|
-
const trySetCurrentStep = useCallback(step => {
|
|
42
|
-
// Already dismissed - cannot update the step
|
|
43
|
-
if (isDismissedRef.current) {
|
|
44
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
45
|
-
// eslint-disable-next-line no-console
|
|
46
|
-
console.log(`not setting step "${step}" as survey is already dismissed`);
|
|
47
|
-
}
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
setCurrentStep(step);
|
|
51
|
-
}, [setCurrentStep]);
|
|
52
|
-
|
|
53
|
-
// using a ref so that we don't break all of our caches if a consumer is using an arrow function
|
|
54
|
-
const onDismissRef = useRef(onDismiss);
|
|
55
|
-
useEffect(() => {
|
|
56
|
-
onDismissRef.current = onDismiss;
|
|
57
|
-
}, [onDismiss]);
|
|
58
|
-
|
|
59
|
-
// reset isDismissedRef.current on mount to be compatible with double render in react18 strict mode
|
|
60
|
-
useEffect(() => {
|
|
61
|
-
isDismissedRef.current = false;
|
|
62
|
-
}, []);
|
|
63
|
-
const tryClearTimeout = useCallback(() => {
|
|
64
|
-
const id = autoDisappearTimeoutRef.current;
|
|
65
|
-
if (id) {
|
|
66
|
-
clearTimeout(id);
|
|
67
|
-
autoDisappearTimeoutRef.current = null;
|
|
68
|
-
}
|
|
69
|
-
}, []);
|
|
70
|
-
|
|
71
|
-
// Cleanup any auto dismiss after dismiss
|
|
72
|
-
useEffect(() => {
|
|
73
|
-
return function unmount() {
|
|
74
|
-
tryClearTimeout();
|
|
75
|
-
tryDismiss(DismissTrigger.Unmount);
|
|
76
|
-
};
|
|
77
|
-
}, [tryClearTimeout, tryDismiss]);
|
|
78
|
-
const onSurveySubmit = useCallback(async (formValues, form, callback = () => {}) => {
|
|
79
|
-
// Submitting form: Phase 1 complete
|
|
80
|
-
await onSubmit(formValues);
|
|
81
|
-
|
|
82
|
-
// Note: need to call callback just before we navigate away
|
|
83
|
-
// It cleans up the form (required)
|
|
84
|
-
|
|
85
|
-
// Optional Phase 2: Asking to join Atlassian Research Group
|
|
86
|
-
// Only enter phase 2 if:
|
|
87
|
-
// 1. not already dismissed; AND
|
|
88
|
-
// 2. permission given to contact; AND
|
|
89
|
-
// 3. user has previously not answered mailing list question (getUserHasAnsweredMailingList returns false)
|
|
90
|
-
|
|
91
|
-
// Not entering phase 2: User has dismissed while the submit promise was resolving
|
|
92
|
-
if (isDismissedRef.current) {
|
|
93
|
-
callback();
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// Not entering phase 2: no permission given to respond to feedback
|
|
98
|
-
if (!formValues.canContact) {
|
|
99
|
-
callback();
|
|
100
|
-
trySetCurrentStep('POST_SURVEY_NO_CONSENT');
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
const userHasAnswered = await getUserHasAnsweredMailingList();
|
|
104
|
-
callback();
|
|
105
|
-
|
|
106
|
-
// Not entering phase 2: user has already answered this question
|
|
107
|
-
if (userHasAnswered) {
|
|
108
|
-
trySetCurrentStep('POST_SURVEY_HAS_SIGN_UP');
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// Enter phase 2
|
|
113
|
-
trySetCurrentStep('SIGN_UP_PROMPT');
|
|
114
|
-
}, [getUserHasAnsweredMailingList, onSubmit, trySetCurrentStep]);
|
|
115
|
-
const onMailingListResponse = useCallback(async answer => {
|
|
116
|
-
await onMailingListAnswer(answer);
|
|
117
|
-
if (answer) {
|
|
118
|
-
trySetCurrentStep('SIGN_UP_SUCCESS');
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
// We have already thanked to user, we can simply close
|
|
122
|
-
tryDismiss(DismissTrigger.Finished);
|
|
123
|
-
},
|
|
124
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125
|
-
[tryDismiss, trySetCurrentStep]);
|
|
126
|
-
|
|
127
|
-
// Start the auto disappear when we are finished
|
|
128
|
-
useEffect(() => {
|
|
129
|
-
// Already dismissed
|
|
130
|
-
if (isDismissedRef.current) {
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
// Timeout already scheduled
|
|
135
|
-
if (autoDisappearTimeoutRef.current) {
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
138
|
-
if (['SIGN_UP_SUCCESS', 'POST_SURVEY_NO_CONSENT', 'POST_SURVEY_HAS_SIGN_UP'].includes(currentStep)) {
|
|
139
|
-
autoDisappearTimeoutRef.current = window.setTimeout(() => tryDismiss(DismissTrigger.AutoDismiss), AUTO_DISAPPEAR_DURATION);
|
|
140
|
-
}
|
|
141
|
-
}, [currentStep, tryDismiss]);
|
|
142
|
-
useEscapeToDismiss({
|
|
143
|
-
onDismiss: () => tryDismiss(DismissTrigger.Manual)
|
|
144
|
-
});
|
|
145
|
-
const content = (() => {
|
|
146
|
-
if (currentStep === 'SURVEY') {
|
|
147
|
-
return /*#__PURE__*/React.createElement(SurveyForm, {
|
|
148
|
-
question: question,
|
|
149
|
-
statement: statement,
|
|
150
|
-
textLabel: textLabel,
|
|
151
|
-
textPlaceholder: textPlaceholder,
|
|
152
|
-
onSubmit: onSurveySubmit
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
if (currentStep === 'SIGN_UP_PROMPT') {
|
|
156
|
-
return /*#__PURE__*/React.createElement(SignUpPrompt, {
|
|
157
|
-
onAnswer: onMailingListResponse
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
if (currentStep === 'SIGN_UP_SUCCESS') {
|
|
161
|
-
return /*#__PURE__*/React.createElement(SignUpSuccess, null);
|
|
162
|
-
}
|
|
163
|
-
if (currentStep === 'POST_SURVEY_NO_CONSENT' || currentStep === 'POST_SURVEY_HAS_SIGN_UP') {
|
|
164
|
-
return /*#__PURE__*/React.createElement(FeedbackAcknowledgement, null);
|
|
165
|
-
}
|
|
166
|
-
return null;
|
|
167
|
-
})();
|
|
168
|
-
const manualDismiss = useCallback(() => {
|
|
169
|
-
// clear any pending timers
|
|
170
|
-
tryClearTimeout();
|
|
171
|
-
tryDismiss(DismissTrigger.Manual);
|
|
172
|
-
}, [tryDismiss, tryClearTimeout]);
|
|
173
|
-
return /*#__PURE__*/React.createElement(SurveyContainer, {
|
|
174
|
-
onDismiss: manualDismiss
|
|
175
|
-
}, content);
|
|
176
|
-
});
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Heading from '@atlaskit/heading';
|
|
3
|
-
import SuccessContainer from './SuccessContainer';
|
|
4
|
-
export default (() => /*#__PURE__*/React.createElement(SuccessContainer, null, /*#__PURE__*/React.createElement(Heading, {
|
|
5
|
-
size: "xsmall"
|
|
6
|
-
}, "Thanks for your feedback")));
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/* FeedbackScoreButtons.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
-
import "./FeedbackScoreButtons.compiled.css";
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import Button from '@atlaskit/button/new';
|
|
6
|
-
import { Text } from '@atlaskit/primitives/compiled';
|
|
7
|
-
import Tooltip from '@atlaskit/tooltip';
|
|
8
|
-
const tooltipMessage = ['Strongly disagree', 'Disagree', 'Slightly disagree', 'Neutral', 'Slightly agree', 'Agree', 'Strongly agree'];
|
|
9
|
-
const buttonWrapperStyles = null;
|
|
10
|
-
const descriptionWrapperStyles = null;
|
|
11
|
-
export default (({
|
|
12
|
-
onChange,
|
|
13
|
-
value
|
|
14
|
-
}) => /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
15
|
-
className: ax(["_1e0c1txw _1bah1yb4 _zdxokb7n _v5ynkb7n _13lsf1ug _1o0a1h6o _pof3u2gc"])
|
|
16
|
-
}, Array.from({
|
|
17
|
-
length: 7
|
|
18
|
-
}, (_, i) => {
|
|
19
|
-
const score = i + 1;
|
|
20
|
-
const isSelected = value === score;
|
|
21
|
-
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
22
|
-
content: tooltipMessage[i],
|
|
23
|
-
key: score,
|
|
24
|
-
hideTooltipOnClick: true
|
|
25
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
26
|
-
onClick: () => onChange(score),
|
|
27
|
-
isSelected: isSelected,
|
|
28
|
-
"aria-pressed": isSelected,
|
|
29
|
-
"aria-describedby": "contextualSurveyStatement",
|
|
30
|
-
"aria-label": tooltipMessage[i],
|
|
31
|
-
shouldFitContainer: true
|
|
32
|
-
}, score));
|
|
33
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
34
|
-
"aria-hidden": true,
|
|
35
|
-
className: ax(["_1e0c1txw _19pku2gc _otyr1ejb _1bah1yb4 _nbgx1epz"])
|
|
36
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
37
|
-
color: "color.text.subtlest",
|
|
38
|
-
size: "UNSAFE_small",
|
|
39
|
-
weight: "semibold",
|
|
40
|
-
align: "start"
|
|
41
|
-
}, "Strongly disagree"), /*#__PURE__*/React.createElement(Text, {
|
|
42
|
-
color: "color.text.subtlest",
|
|
43
|
-
size: "UNSAFE_small",
|
|
44
|
-
weight: "semibold",
|
|
45
|
-
align: "center"
|
|
46
|
-
}, "Neutral"), /*#__PURE__*/React.createElement(Text, {
|
|
47
|
-
color: "color.text.subtlest",
|
|
48
|
-
size: "UNSAFE_small",
|
|
49
|
-
weight: "semibold",
|
|
50
|
-
align: "end"
|
|
51
|
-
}, "Strongly agree"))));
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/* SignUpPrompt.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
-
import "./SignUpPrompt.compiled.css";
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { useCallback, useState } from 'react';
|
|
6
|
-
import Button from '@atlaskit/button/new';
|
|
7
|
-
import Heading from '@atlaskit/heading';
|
|
8
|
-
import Link from '@atlaskit/link';
|
|
9
|
-
import { Box, Stack, Text } from '@atlaskit/primitives/compiled';
|
|
10
|
-
import SuccessContainer from './SuccessContainer';
|
|
11
|
-
const buttonContainerStyles = null;
|
|
12
|
-
export default (({
|
|
13
|
-
onAnswer
|
|
14
|
-
}) => {
|
|
15
|
-
const [pending, setPending] = useState(null);
|
|
16
|
-
const answeredWith = useCallback(async answer => {
|
|
17
|
-
setPending(answer ? 'yes' : 'no');
|
|
18
|
-
await onAnswer(answer);
|
|
19
|
-
}, [setPending, onAnswer]);
|
|
20
|
-
const isDisabled = Boolean(pending);
|
|
21
|
-
return /*#__PURE__*/React.createElement(SuccessContainer, null, /*#__PURE__*/React.createElement(Heading, {
|
|
22
|
-
size: "xsmall"
|
|
23
|
-
}, "Thanks for your feedback"), /*#__PURE__*/React.createElement(Box, {
|
|
24
|
-
paddingBlockStart: "space.150"
|
|
25
|
-
}, /*#__PURE__*/React.createElement(Stack, {
|
|
26
|
-
space: "space.150"
|
|
27
|
-
}, /*#__PURE__*/React.createElement(Text, {
|
|
28
|
-
as: "p"
|
|
29
|
-
}, "Are you interested in participating in our research?"), /*#__PURE__*/React.createElement(Text, {
|
|
30
|
-
as: "p"
|
|
31
|
-
}, "Sign up for the", ' ', /*#__PURE__*/React.createElement(Link, {
|
|
32
|
-
href: "https://www.atlassian.com/research-group",
|
|
33
|
-
target: "_blank"
|
|
34
|
-
}, "Atlassian Research Group"), ' ', "and we may contact you in the future with research opportunities."))), /*#__PURE__*/React.createElement("div", {
|
|
35
|
-
className: ax(["_19pkxy5q _1e0c1txw _1bahesu3 _pof3u2gc"])
|
|
36
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
37
|
-
appearance: "subtle",
|
|
38
|
-
onClick: () => answeredWith(false),
|
|
39
|
-
isDisabled: isDisabled,
|
|
40
|
-
isLoading: pending === 'no'
|
|
41
|
-
}, "No, thanks"), /*#__PURE__*/React.createElement(Button, {
|
|
42
|
-
appearance: "primary",
|
|
43
|
-
onClick: () => answeredWith(true),
|
|
44
|
-
isDisabled: isDisabled,
|
|
45
|
-
isLoading: pending === 'yes'
|
|
46
|
-
}, "Yes, sign me up")));
|
|
47
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Heading from '@atlaskit/heading';
|
|
3
|
-
import { Stack, Text } from '@atlaskit/primitives/compiled';
|
|
4
|
-
import SuccessContainer from './SuccessContainer';
|
|
5
|
-
export default (({}) => /*#__PURE__*/React.createElement(SuccessContainer, null, /*#__PURE__*/React.createElement(Stack, {
|
|
6
|
-
space: "space.150"
|
|
7
|
-
}, /*#__PURE__*/React.createElement(Heading, {
|
|
8
|
-
size: "xsmall"
|
|
9
|
-
}, "Thanks for signing up"), /*#__PURE__*/React.createElement(Text, {
|
|
10
|
-
as: "p"
|
|
11
|
-
}, "We may reach out to you in the future to participate in additional research."))));
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/* SuccessContainer.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
-
import "./SuccessContainer.compiled.css";
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import CheckCircleIcon from '@atlaskit/icon/core/migration/success--check-circle';
|
|
6
|
-
import { G300 } from '@atlaskit/theme/colors';
|
|
7
|
-
const sectionStyles = null;
|
|
8
|
-
const iconContainerStyles = null;
|
|
9
|
-
export default (({
|
|
10
|
-
children
|
|
11
|
-
}) => /*#__PURE__*/React.createElement("section", {
|
|
12
|
-
className: ax(["_18u01jfw"])
|
|
13
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
14
|
-
className: ax(["_kqswstnw _154iv47k _1ltv1ejb"])
|
|
15
|
-
}, /*#__PURE__*/React.createElement(CheckCircleIcon, {
|
|
16
|
-
spacing: "spacious",
|
|
17
|
-
label: "",
|
|
18
|
-
"aria-hidden": true,
|
|
19
|
-
color: `var(--ds-icon-success, ${G300})`,
|
|
20
|
-
LEGACY_margin: "4px 0 0 0"
|
|
21
|
-
})), children));
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/* SurveyContainer.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
-
import "./SurveyContainer.compiled.css";
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { IconButton as Button } from '@atlaskit/button/new';
|
|
6
|
-
import CrossIcon from '@atlaskit/icon/core/migration/close--cross';
|
|
7
|
-
import { N0, N50A, N60A } from '@atlaskit/theme/colors';
|
|
8
|
-
import { surveyInnerWidth } from '../constants';
|
|
9
|
-
const containerStyles = null;
|
|
10
|
-
const buttonWrapperStyles = null;
|
|
11
|
-
export default (({
|
|
12
|
-
children,
|
|
13
|
-
onDismiss
|
|
14
|
-
}) => {
|
|
15
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
16
|
-
style: {},
|
|
17
|
-
className: ax(["_2rko1sit _bfhk1bhr _ca0q1ejb _u5f31ejb _n3td1ejb _19bv1ejb _16qsuzq3 _1bsb1vif"])
|
|
18
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
19
|
-
className: ax(["_kqswstnw _154ipxbi _1xi2pxbi"])
|
|
20
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
21
|
-
icon: CrossIcon,
|
|
22
|
-
label: "Dismiss",
|
|
23
|
-
appearance: "subtle",
|
|
24
|
-
onClick: onDismiss
|
|
25
|
-
})), children);
|
|
26
|
-
});
|