@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,11 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
import React from 'react';
|
|
7
2
|
import Heading from '@atlaskit/heading';
|
|
8
3
|
import SuccessContainer from './SuccessContainer';
|
|
9
|
-
export default (() =>
|
|
4
|
+
export default (() => /*#__PURE__*/React.createElement(SuccessContainer, null, /*#__PURE__*/React.createElement(Heading, {
|
|
10
5
|
size: "xsmall"
|
|
11
6
|
}, "Thanks for your feedback")));
|
|
@@ -1,44 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
import Button from '@atlaskit/button/custom-theme-button';
|
|
8
|
-
import { Text } from '@atlaskit/primitives';
|
|
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';
|
|
9
7
|
import Tooltip from '@atlaskit/tooltip';
|
|
10
8
|
const tooltipMessage = ['Strongly disagree', 'Disagree', 'Slightly disagree', 'Neutral', 'Slightly agree', 'Agree', 'Strongly agree'];
|
|
9
|
+
const buttonWrapperStyles = null;
|
|
10
|
+
const descriptionWrapperStyles = null;
|
|
11
11
|
export default (({
|
|
12
12
|
onChange,
|
|
13
13
|
value
|
|
14
|
-
}) =>
|
|
15
|
-
|
|
16
|
-
css: css({
|
|
17
|
-
display: 'flex',
|
|
18
|
-
justifyContent: 'space-between',
|
|
19
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
20
|
-
'& > * + *': {
|
|
21
|
-
marginLeft: "var(--ds-space-100, 8px)"
|
|
22
|
-
},
|
|
23
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
24
|
-
'& > *': {
|
|
25
|
-
flex: 1,
|
|
26
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
27
|
-
'& > button': {
|
|
28
|
-
justifyContent: 'center'
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
})
|
|
14
|
+
}) => /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
15
|
+
className: ax(["_1e0c1txw _1bah1yb4 _zdxokb7n _v5ynkb7n _13lsf1ug _1o0a1h6o _pof3u2gc"])
|
|
32
16
|
}, Array.from({
|
|
33
17
|
length: 7
|
|
34
18
|
}, (_, i) => {
|
|
35
19
|
const score = i + 1;
|
|
36
20
|
const isSelected = value === score;
|
|
37
|
-
return
|
|
21
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
38
22
|
content: tooltipMessage[i],
|
|
39
23
|
key: score,
|
|
40
24
|
hideTooltipOnClick: true
|
|
41
|
-
},
|
|
25
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
42
26
|
onClick: () => onChange(score),
|
|
43
27
|
isSelected: isSelected,
|
|
44
28
|
"aria-pressed": isSelected,
|
|
@@ -46,30 +30,20 @@ export default (({
|
|
|
46
30
|
"aria-label": tooltipMessage[i],
|
|
47
31
|
shouldFitContainer: true
|
|
48
32
|
}, score));
|
|
49
|
-
})),
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
marginTop: "var(--ds-space-100, 8px)",
|
|
54
|
-
marginBottom: "var(--ds-space-300, 24px)",
|
|
55
|
-
justifyContent: 'space-between',
|
|
56
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
57
|
-
'& > span': {
|
|
58
|
-
width: "var(--ds-space-1000, 80px)"
|
|
59
|
-
}
|
|
60
|
-
}),
|
|
61
|
-
"aria-hidden": true
|
|
62
|
-
}, jsx(Text, {
|
|
33
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
34
|
+
"aria-hidden": true,
|
|
35
|
+
className: ax(["_1e0c1txw _19pku2gc _otyr1ejb _1bah1yb4 _nbgx1epz"])
|
|
36
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
63
37
|
color: "color.text.subtlest",
|
|
64
38
|
size: "UNSAFE_small",
|
|
65
39
|
weight: "semibold",
|
|
66
40
|
align: "start"
|
|
67
|
-
}, "Strongly disagree"),
|
|
41
|
+
}, "Strongly disagree"), /*#__PURE__*/React.createElement(Text, {
|
|
68
42
|
color: "color.text.subtlest",
|
|
69
43
|
size: "UNSAFE_small",
|
|
70
44
|
weight: "semibold",
|
|
71
45
|
align: "center"
|
|
72
|
-
}, "Neutral"),
|
|
46
|
+
}, "Neutral"), /*#__PURE__*/React.createElement(Text, {
|
|
73
47
|
color: "color.text.subtlest",
|
|
74
48
|
size: "UNSAFE_small",
|
|
75
49
|
weight: "semibold",
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
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
5
|
import { useCallback, useState } from 'react';
|
|
6
|
-
|
|
7
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
|
-
import { css, jsx } from '@emotion/react';
|
|
9
|
-
import Button from '@atlaskit/button/custom-theme-button';
|
|
6
|
+
import Button from '@atlaskit/button/new';
|
|
10
7
|
import Heading from '@atlaskit/heading';
|
|
11
|
-
import
|
|
8
|
+
import Link from '@atlaskit/link';
|
|
9
|
+
import { Box, Stack, Text } from '@atlaskit/primitives/compiled';
|
|
12
10
|
import SuccessContainer from './SuccessContainer';
|
|
11
|
+
const buttonContainerStyles = null;
|
|
13
12
|
export default (({
|
|
14
13
|
onAnswer
|
|
15
14
|
}) => {
|
|
@@ -19,35 +18,27 @@ export default (({
|
|
|
19
18
|
await onAnswer(answer);
|
|
20
19
|
}, [setPending, onAnswer]);
|
|
21
20
|
const isDisabled = Boolean(pending);
|
|
22
|
-
return
|
|
21
|
+
return /*#__PURE__*/React.createElement(SuccessContainer, null, /*#__PURE__*/React.createElement(Heading, {
|
|
23
22
|
size: "xsmall"
|
|
24
|
-
}, "Thanks for your feedback"),
|
|
23
|
+
}, "Thanks for your feedback"), /*#__PURE__*/React.createElement(Box, {
|
|
25
24
|
paddingBlockStart: "space.150"
|
|
26
|
-
},
|
|
25
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
27
26
|
space: "space.150"
|
|
28
|
-
},
|
|
27
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
29
28
|
as: "p"
|
|
30
|
-
}, "Are you interested in participating in our research?"),
|
|
29
|
+
}, "Are you interested in participating in our research?"), /*#__PURE__*/React.createElement(Text, {
|
|
31
30
|
as: "p"
|
|
32
|
-
}, "Sign up for the", ' ',
|
|
33
|
-
href: "https://www.atlassian.com/research-group"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
display: 'flex',
|
|
39
|
-
justifyContent: 'flex-end',
|
|
40
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
41
|
-
'& > * + *': {
|
|
42
|
-
marginLeft: "var(--ds-space-100, 8px)"
|
|
43
|
-
}
|
|
44
|
-
})
|
|
45
|
-
}, jsx(Button, {
|
|
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, {
|
|
46
37
|
appearance: "subtle",
|
|
47
38
|
onClick: () => answeredWith(false),
|
|
48
39
|
isDisabled: isDisabled,
|
|
49
40
|
isLoading: pending === 'no'
|
|
50
|
-
}, "No, thanks"),
|
|
41
|
+
}, "No, thanks"), /*#__PURE__*/React.createElement(Button, {
|
|
51
42
|
appearance: "primary",
|
|
52
43
|
onClick: () => answeredWith(true),
|
|
53
44
|
isDisabled: isDisabled,
|
|
@@ -1,16 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
import React from 'react';
|
|
7
2
|
import Heading from '@atlaskit/heading';
|
|
8
|
-
import { Stack, Text } from '@atlaskit/primitives';
|
|
3
|
+
import { Stack, Text } from '@atlaskit/primitives/compiled';
|
|
9
4
|
import SuccessContainer from './SuccessContainer';
|
|
10
|
-
export default (({}) =>
|
|
5
|
+
export default (({}) => /*#__PURE__*/React.createElement(SuccessContainer, null, /*#__PURE__*/React.createElement(Stack, {
|
|
11
6
|
space: "space.150"
|
|
12
|
-
},
|
|
7
|
+
}, /*#__PURE__*/React.createElement(Heading, {
|
|
13
8
|
size: "xsmall"
|
|
14
|
-
}, "Thanks for signing up"),
|
|
9
|
+
}, "Thanks for signing up"), /*#__PURE__*/React.createElement(Text, {
|
|
15
10
|
as: "p"
|
|
16
11
|
}, "We may reach out to you in the future to participate in additional research."))));
|
|
@@ -1,26 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { css, jsx } from '@emotion/react';
|
|
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";
|
|
7
5
|
import CheckCircleIcon from '@atlaskit/icon/core/migration/success--check-circle';
|
|
8
6
|
import { G300 } from '@atlaskit/theme/colors';
|
|
7
|
+
const sectionStyles = null;
|
|
8
|
+
const iconContainerStyles = null;
|
|
9
9
|
export default (({
|
|
10
10
|
children
|
|
11
|
-
}) =>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}, jsx("div", {
|
|
17
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
18
|
-
css: css({
|
|
19
|
-
position: 'absolute',
|
|
20
|
-
top: "var(--ds-space-250, 20px)",
|
|
21
|
-
left: "var(--ds-space-300, 24px)"
|
|
22
|
-
})
|
|
23
|
-
}, jsx(CheckCircleIcon, {
|
|
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, {
|
|
24
16
|
spacing: "spacious",
|
|
25
17
|
label: "",
|
|
26
18
|
"aria-hidden": true,
|
|
@@ -1,42 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { css, jsx } from '@emotion/react';
|
|
7
|
-
import Button from '@atlaskit/button/custom-theme-button';
|
|
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';
|
|
8
6
|
import CrossIcon from '@atlaskit/icon/core/migration/close--cross';
|
|
9
|
-
import { N0,
|
|
10
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
7
|
+
import { N0, N50A, N60A } from '@atlaskit/theme/colors';
|
|
11
8
|
import { surveyInnerWidth } from '../constants';
|
|
9
|
+
const containerStyles = null;
|
|
10
|
+
const buttonWrapperStyles = null;
|
|
12
11
|
export default (({
|
|
13
12
|
children,
|
|
14
13
|
onDismiss
|
|
15
14
|
}) => {
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
25
|
-
width: `${surveyInnerWidth}px`
|
|
26
|
-
})
|
|
27
|
-
}, jsx("div", {
|
|
28
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
29
|
-
css: css({
|
|
30
|
-
position: 'absolute',
|
|
31
|
-
top: "var(--ds-space-200, 16px)",
|
|
32
|
-
right: "var(--ds-space-200, 16px)"
|
|
33
|
-
})
|
|
34
|
-
}, jsx(Button, {
|
|
35
|
-
iconBefore: jsx(CrossIcon, {
|
|
36
|
-
label: "",
|
|
37
|
-
color: `var(--ds-icon-subtle, ${N50})`
|
|
38
|
-
}),
|
|
39
|
-
"aria-label": "Dismiss",
|
|
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",
|
|
40
23
|
appearance: "subtle",
|
|
41
24
|
onClick: onDismiss
|
|
42
25
|
})), children);
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
+
/* SurveyForm.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
*/
|
|
3
|
+
import "./SurveyForm.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { useCallback, useRef, useState } from 'react';
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
-
import { css, jsx } from '@emotion/react';
|
|
10
7
|
import { Transition } from 'react-transition-group';
|
|
11
|
-
import
|
|
8
|
+
import Button from '@atlaskit/button/new';
|
|
12
9
|
import { Checkbox } from '@atlaskit/checkbox';
|
|
13
10
|
import Form, { CheckboxField, Field, FormFooter } from '@atlaskit/form';
|
|
14
11
|
import Heading from '@atlaskit/heading';
|
|
15
|
-
import { Stack, Text } from '@atlaskit/primitives';
|
|
12
|
+
import { Stack, Text } from '@atlaskit/primitives/compiled';
|
|
16
13
|
import Textarea from '@atlaskit/textarea';
|
|
17
14
|
import FeedbackScoreButtons from './FeedbackScoreButtons';
|
|
15
|
+
const transitionBaseStyles = null;
|
|
18
16
|
const getExpandedHeight = (ref, state) => {
|
|
19
17
|
if (!ref.current) {
|
|
20
18
|
return '0';
|
|
@@ -55,67 +53,65 @@ export default (({
|
|
|
55
53
|
hasAutoFilledCanContactRef.current = true;
|
|
56
54
|
setCanContactDefault(true);
|
|
57
55
|
}, []);
|
|
58
|
-
return
|
|
56
|
+
return /*#__PURE__*/React.createElement("section", {
|
|
59
57
|
"aria-labelledby": "contextualSurveyQuestion"
|
|
60
|
-
},
|
|
58
|
+
}, /*#__PURE__*/React.createElement(Stack, {
|
|
61
59
|
space: "space.150"
|
|
62
|
-
},
|
|
60
|
+
}, /*#__PURE__*/React.createElement(Heading, {
|
|
63
61
|
id: "contextualSurveyQuestion",
|
|
64
62
|
size: "xsmall"
|
|
65
|
-
}, question), statement &&
|
|
63
|
+
}, question), statement && /*#__PURE__*/React.createElement(Text, {
|
|
66
64
|
as: "p",
|
|
67
65
|
id: "contextualSurveyStatement"
|
|
68
|
-
}, statement)),
|
|
66
|
+
}, statement)), /*#__PURE__*/React.createElement(Form, {
|
|
69
67
|
onSubmit: onSubmit
|
|
70
68
|
}, ({
|
|
71
69
|
formProps,
|
|
72
70
|
submitting
|
|
73
|
-
}) =>
|
|
71
|
+
}) => /*#__PURE__*/React.createElement("form", formProps, /*#__PURE__*/React.createElement(Field, {
|
|
74
72
|
name: "feedbackScore",
|
|
75
73
|
isDisabled: submitting,
|
|
76
74
|
isRequired: true
|
|
77
75
|
}, ({
|
|
78
76
|
fieldProps
|
|
79
|
-
}) =>
|
|
77
|
+
}) => /*#__PURE__*/React.createElement(FeedbackScoreButtons, _extends({}, fieldProps, {
|
|
80
78
|
onChange: score => {
|
|
81
79
|
fieldProps.onChange(score);
|
|
82
80
|
onScoreSelect();
|
|
83
81
|
}
|
|
84
|
-
}))),
|
|
82
|
+
}))), /*#__PURE__*/React.createElement(Transition, {
|
|
85
83
|
in: expanded,
|
|
86
84
|
timeout: transitionDuration,
|
|
87
85
|
mountOnEnter: true
|
|
88
|
-
}, state =>
|
|
89
|
-
|
|
90
|
-
css: css({
|
|
86
|
+
}, state => /*#__PURE__*/React.createElement("div", {
|
|
87
|
+
style: {
|
|
91
88
|
transition: `max-height ${transitionDuration}ms ease-in-out`,
|
|
92
|
-
overflow: 'hidden',
|
|
93
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
94
89
|
maxHeight: getExpandedHeight(expandedAreaRef, state)
|
|
95
|
-
}
|
|
96
|
-
ref: expandedAreaRef
|
|
97
|
-
|
|
90
|
+
},
|
|
91
|
+
ref: expandedAreaRef,
|
|
92
|
+
className: ax(["_1reo15vq _18m915vq"])
|
|
93
|
+
}, /*#__PURE__*/React.createElement(Field, {
|
|
98
94
|
name: "writtenFeedback",
|
|
99
95
|
defaultValue: "",
|
|
100
96
|
isDisabled: submitting
|
|
101
97
|
}, ({
|
|
102
98
|
fieldProps
|
|
103
|
-
}) =>
|
|
99
|
+
}) => /*#__PURE__*/React.createElement(Textarea, _extends({}, fieldProps, {
|
|
104
100
|
"aria-label": textLabel,
|
|
105
101
|
placeholder: textPlaceholder,
|
|
106
102
|
onChange: event => {
|
|
107
103
|
fieldProps.onChange(event);
|
|
108
104
|
onFeedbackChange();
|
|
109
105
|
}
|
|
110
|
-
}))),
|
|
106
|
+
}))), /*#__PURE__*/React.createElement(CheckboxField, {
|
|
111
107
|
name: "canContact",
|
|
112
108
|
isDisabled: submitting,
|
|
113
109
|
defaultIsChecked: canContactDefault
|
|
114
110
|
}, ({
|
|
115
111
|
fieldProps
|
|
116
|
-
}) =>
|
|
112
|
+
}) => /*#__PURE__*/React.createElement(Checkbox, _extends({}, fieldProps, {
|
|
117
113
|
label: "Atlassian can contact me about this feedback"
|
|
118
|
-
}))),
|
|
114
|
+
}))), /*#__PURE__*/React.createElement(FormFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
119
115
|
type: "submit",
|
|
120
116
|
appearance: "primary",
|
|
121
117
|
isLoading: submitting
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
7
|
-
import { css, jsx } from '@emotion/react';
|
|
1
|
+
/* SurveyMarshal.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import "./SurveyMarshal.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
8
5
|
import { Transition } from 'react-transition-group';
|
|
9
6
|
import { layers } from '@atlaskit/theme/constants';
|
|
10
7
|
import { surveyInnerWidth, surveyOffset } from '../constants';
|
|
@@ -31,12 +28,13 @@ const getAnimationProps = state => {
|
|
|
31
28
|
}
|
|
32
29
|
}
|
|
33
30
|
};
|
|
31
|
+
const transitionBaseStyles = null;
|
|
34
32
|
export default function SurveyMarshal(props) {
|
|
35
33
|
const {
|
|
36
34
|
children,
|
|
37
35
|
shouldShow
|
|
38
36
|
} = props;
|
|
39
|
-
return
|
|
37
|
+
return /*#__PURE__*/React.createElement(Transition, {
|
|
40
38
|
in: shouldShow,
|
|
41
39
|
timeout: animationDuration,
|
|
42
40
|
unmountOnExit: true
|
|
@@ -45,22 +43,14 @@ export default function SurveyMarshal(props) {
|
|
|
45
43
|
translateX,
|
|
46
44
|
opacity
|
|
47
45
|
} = getAnimationProps(state);
|
|
48
|
-
return
|
|
49
|
-
|
|
50
|
-
css: css({
|
|
51
|
-
position: 'fixed',
|
|
52
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
53
|
-
right: `${surveyOffset}px`,
|
|
54
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
55
|
-
bottom: `${surveyOffset}px`,
|
|
56
|
-
zIndex: layers.flag(),
|
|
57
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
58
|
-
transform: `translateX(${translateX})`,
|
|
59
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
46
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
47
|
+
style: {
|
|
60
48
|
opacity: opacity,
|
|
61
49
|
transition: `all ${animationDuration}ms ease-in-out`,
|
|
62
|
-
|
|
63
|
-
|
|
50
|
+
zIndex: layers.flag(),
|
|
51
|
+
transform: `translateX(${translateX})`
|
|
52
|
+
},
|
|
53
|
+
className: ax(["_kqsw1n9t _1xi2ckbl _94n5ckbl _k8m01rjc"])
|
|
64
54
|
}, children());
|
|
65
55
|
});
|
|
66
56
|
}
|
package/dist/es2019/index.js
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
export { DismissTrigger } from './components/ContextualSurvey';
|
|
2
|
-
export {
|
|
3
|
-
export { SurveyMarshal } from './fg-components';
|
|
1
|
+
export { default as ContextualSurvey, DismissTrigger } from './components/ContextualSurvey';
|
|
2
|
+
export { default as SurveyMarshal } from './components/SurveyMarshal';
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
import React from 'react';
|
|
7
2
|
import Heading from '@atlaskit/heading';
|
|
8
3
|
import SuccessContainer from './SuccessContainer';
|
|
9
4
|
export default (function () {
|
|
10
|
-
return
|
|
5
|
+
return /*#__PURE__*/React.createElement(SuccessContainer, null, /*#__PURE__*/React.createElement(Heading, {
|
|
11
6
|
size: "xsmall"
|
|
12
7
|
}, "Thanks for your feedback"));
|
|
13
8
|
});
|
|
@@ -1,44 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
import Button from '@atlaskit/button/custom-theme-button';
|
|
8
|
-
import { Text } from '@atlaskit/primitives';
|
|
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';
|
|
9
7
|
import Tooltip from '@atlaskit/tooltip';
|
|
10
8
|
var tooltipMessage = ['Strongly disagree', 'Disagree', 'Slightly disagree', 'Neutral', 'Slightly agree', 'Agree', 'Strongly agree'];
|
|
9
|
+
var buttonWrapperStyles = null;
|
|
10
|
+
var descriptionWrapperStyles = null;
|
|
11
11
|
export default (function (_ref) {
|
|
12
12
|
var onChange = _ref.onChange,
|
|
13
13
|
value = _ref.value;
|
|
14
|
-
return
|
|
15
|
-
|
|
16
|
-
css: css({
|
|
17
|
-
display: 'flex',
|
|
18
|
-
justifyContent: 'space-between',
|
|
19
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
20
|
-
'& > * + *': {
|
|
21
|
-
marginLeft: "var(--ds-space-100, 8px)"
|
|
22
|
-
},
|
|
23
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
24
|
-
'& > *': {
|
|
25
|
-
flex: 1,
|
|
26
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
27
|
-
'& > button': {
|
|
28
|
-
justifyContent: 'center'
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
})
|
|
14
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
15
|
+
className: ax(["_1e0c1txw _1bah1yb4 _zdxokb7n _v5ynkb7n _13lsf1ug _1o0a1h6o _pof3u2gc"])
|
|
32
16
|
}, Array.from({
|
|
33
17
|
length: 7
|
|
34
18
|
}, function (_, i) {
|
|
35
19
|
var score = i + 1;
|
|
36
20
|
var isSelected = value === score;
|
|
37
|
-
return
|
|
21
|
+
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
38
22
|
content: tooltipMessage[i],
|
|
39
23
|
key: score,
|
|
40
24
|
hideTooltipOnClick: true
|
|
41
|
-
},
|
|
25
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
42
26
|
onClick: function onClick() {
|
|
43
27
|
return onChange(score);
|
|
44
28
|
},
|
|
@@ -48,30 +32,20 @@ export default (function (_ref) {
|
|
|
48
32
|
"aria-label": tooltipMessage[i],
|
|
49
33
|
shouldFitContainer: true
|
|
50
34
|
}, score));
|
|
51
|
-
})),
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
marginTop: "var(--ds-space-100, 8px)",
|
|
56
|
-
marginBottom: "var(--ds-space-300, 24px)",
|
|
57
|
-
justifyContent: 'space-between',
|
|
58
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
59
|
-
'& > span': {
|
|
60
|
-
width: "var(--ds-space-1000, 80px)"
|
|
61
|
-
}
|
|
62
|
-
}),
|
|
63
|
-
"aria-hidden": true
|
|
64
|
-
}, jsx(Text, {
|
|
35
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
36
|
+
"aria-hidden": true,
|
|
37
|
+
className: ax(["_1e0c1txw _19pku2gc _otyr1ejb _1bah1yb4 _nbgx1epz"])
|
|
38
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
65
39
|
color: "color.text.subtlest",
|
|
66
40
|
size: "UNSAFE_small",
|
|
67
41
|
weight: "semibold",
|
|
68
42
|
align: "start"
|
|
69
|
-
}, "Strongly disagree"),
|
|
43
|
+
}, "Strongly disagree"), /*#__PURE__*/React.createElement(Text, {
|
|
70
44
|
color: "color.text.subtlest",
|
|
71
45
|
size: "UNSAFE_small",
|
|
72
46
|
weight: "semibold",
|
|
73
47
|
align: "center"
|
|
74
|
-
}, "Neutral"),
|
|
48
|
+
}, "Neutral"), /*#__PURE__*/React.createElement(Text, {
|
|
75
49
|
color: "color.text.subtlest",
|
|
76
50
|
size: "UNSAFE_small",
|
|
77
51
|
weight: "semibold",
|