@atlaskit/contextual-survey 2.2.20 → 2.3.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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/contextual-survey
2
2
 
3
+ ## 2.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#129844](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/129844)
8
+ [`654f46d9b38cc`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/654f46d9b38cc) -
9
+ Typography migration (https://product-fabric.atlassian.net/browse/PYX-881) for engagement-platform
10
+ package
11
+
3
12
  ## 2.2.20
4
13
 
5
14
  ### Patch Changes
@@ -27,9 +27,15 @@
27
27
  {
28
28
  "path": "../../../design-system/form/afm-cc/tsconfig.json"
29
29
  },
30
+ {
31
+ "path": "../../../design-system/heading/afm-cc/tsconfig.json"
32
+ },
30
33
  {
31
34
  "path": "../../../design-system/icon/afm-cc/tsconfig.json"
32
35
  },
36
+ {
37
+ "path": "../../../design-system/primitives/afm-cc/tsconfig.json"
38
+ },
33
39
  {
34
40
  "path": "../../../design-system/textarea/afm-cc/tsconfig.json"
35
41
  },
@@ -6,21 +6,15 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.default = void 0;
8
8
  var _react = require("@emotion/react");
9
- var _typography = require("@atlaskit/theme/typography");
9
+ var _heading = _interopRequireDefault(require("@atlaskit/heading"));
10
10
  var _SuccessContainer = _interopRequireDefault(require("./SuccessContainer"));
11
11
  /**
12
12
  * @jsxRuntime classic
13
13
  * @jsx jsx
14
14
  */
15
15
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
16
-
17
- var styles = (0, _react.css)({
18
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
19
- font: "var(--ds-font-heading-xsmall, ".concat(_typography.fontFallback.heading.xsmall, ")"),
20
- marginTop: 0
21
- });
22
16
  var _default = exports.default = function _default() {
23
- return (0, _react.jsx)(_SuccessContainer.default, null, (0, _react.jsx)("h1", {
24
- css: styles
17
+ return (0, _react.jsx)(_SuccessContainer.default, null, (0, _react.jsx)(_heading.default, {
18
+ size: "xsmall"
25
19
  }, "Thanks for your feedback"));
26
20
  };
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  var _react = require("@emotion/react");
9
9
  var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
10
- var _colors = require("@atlaskit/theme/colors");
10
+ var _primitives = require("@atlaskit/primitives");
11
11
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
12
12
  /**
13
13
  * @jsxRuntime classic
@@ -15,9 +15,6 @@ var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
15
15
  */
16
16
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
17
17
 
18
- var styles = (0, _react.css)({
19
- textAlign: 'right'
20
- });
21
18
  var tooltipMessage = ['Strongly disagree', 'Disagree', 'Slightly disagree', 'Neutral', 'Slightly agree', 'Agree', 'Strongly agree'];
22
19
  var _default = exports.default = function _default(_ref) {
23
20
  var onChange = _ref.onChange,
@@ -62,26 +59,30 @@ var _default = exports.default = function _default(_ref) {
62
59
  })), (0, _react.jsx)("div", {
63
60
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
64
61
  css: (0, _react.css)({
65
- fontSize: '12px',
66
- fontWeight: 600,
67
- color: "var(--ds-text-subtlest, ".concat(_colors.N200, ")"),
68
62
  display: 'flex',
69
63
  marginTop: "var(--ds-space-100, 8px)",
70
64
  marginBottom: "var(--ds-space-300, 24px)",
65
+ justifyContent: 'space-between',
71
66
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
72
67
  '& > span': {
73
68
  width: "var(--ds-space-1000, 80px)"
74
69
  }
75
70
  }),
76
71
  "aria-hidden": true
77
- }, (0, _react.jsx)("span", null, "Strongly disagree"), (0, _react.jsx)("span", {
78
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
79
- css: (0, _react.css)({
80
- textAlign: 'center',
81
- margin: '0 auto',
82
- padding: "0 ".concat("var(--ds-space-600, 48px)")
83
- })
84
- }, "Neutral"), (0, _react.jsx)("span", {
85
- css: styles
72
+ }, (0, _react.jsx)(_primitives.Text, {
73
+ color: "color.text.subtlest",
74
+ size: "UNSAFE_small",
75
+ weight: "semibold",
76
+ align: "start"
77
+ }, "Strongly disagree"), (0, _react.jsx)(_primitives.Text, {
78
+ color: "color.text.subtlest",
79
+ size: "UNSAFE_small",
80
+ weight: "semibold",
81
+ align: "center"
82
+ }, "Neutral"), (0, _react.jsx)(_primitives.Text, {
83
+ color: "color.text.subtlest",
84
+ size: "UNSAFE_small",
85
+ weight: "semibold",
86
+ align: "end"
86
87
  }, "Strongly agree")));
87
88
  };
@@ -11,20 +11,14 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
11
11
  var _react = require("react");
12
12
  var _react2 = require("@emotion/react");
13
13
  var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
14
- var _typography = require("@atlaskit/theme/typography");
14
+ var _heading = _interopRequireDefault(require("@atlaskit/heading"));
15
+ var _primitives = require("@atlaskit/primitives");
15
16
  var _SuccessContainer = _interopRequireDefault(require("./SuccessContainer"));
16
17
  /**
17
18
  * @jsxRuntime classic
18
19
  * @jsx jsx
19
20
  */
20
-
21
21
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
22
-
23
- var styles = (0, _react2.css)({
24
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
25
- font: "var(--ds-font-heading-xsmall, ".concat(_typography.fontFallback.heading.xsmall, ")"),
26
- margin: 0
27
- });
28
22
  var _default = exports.default = function _default(_ref) {
29
23
  var onAnswer = _ref.onAnswer;
30
24
  var _useState = (0, _react.useState)(null),
@@ -50,11 +44,19 @@ var _default = exports.default = function _default(_ref) {
50
44
  };
51
45
  }(), [setPending, onAnswer]);
52
46
  var isDisabled = Boolean(pending);
53
- return (0, _react2.jsx)(_SuccessContainer.default, null, (0, _react2.jsx)("h1", {
54
- css: styles
55
- }, "Thanks for your feedback"), (0, _react2.jsx)("p", null, "Are you interested in participating in our research?"), (0, _react2.jsx)("p", null, "Sign up for the", ' ', (0, _react2.jsx)("a", {
47
+ return (0, _react2.jsx)(_SuccessContainer.default, null, (0, _react2.jsx)(_heading.default, {
48
+ size: "xsmall"
49
+ }, "Thanks for your feedback"), (0, _react2.jsx)(_primitives.Box, {
50
+ paddingBlockStart: "space.150"
51
+ }, (0, _react2.jsx)(_primitives.Stack, {
52
+ space: "space.150"
53
+ }, (0, _react2.jsx)(_primitives.Text, {
54
+ as: "p"
55
+ }, "Are you interested in participating in our research?"), (0, _react2.jsx)(_primitives.Text, {
56
+ as: "p"
57
+ }, "Sign up for the", ' ', (0, _react2.jsx)("a", {
56
58
  href: "https://www.atlassian.com/research-group"
57
- }, "Atlassian Research Group"), " and we may contact you in the future with research opportunities."), (0, _react2.jsx)("div", {
59
+ }, "Atlassian Research Group"), " and we may contact you in the future with research opportunities."))), (0, _react2.jsx)("div", {
58
60
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
59
61
  css: (0, _react2.css)({
60
62
  marginTop: "var(--ds-space-400, 32px)",
@@ -7,22 +7,21 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime/helpers/objectDestructuringEmpty"));
9
9
  var _react = require("@emotion/react");
10
- var _typography = require("@atlaskit/theme/typography");
10
+ var _heading = _interopRequireDefault(require("@atlaskit/heading"));
11
+ var _primitives = require("@atlaskit/primitives");
11
12
  var _SuccessContainer = _interopRequireDefault(require("./SuccessContainer"));
12
13
  /**
13
14
  * @jsxRuntime classic
14
15
  * @jsx jsx
15
16
  */
16
17
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
17
-
18
- var styles = (0, _react.css)({
19
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
20
- font: "var(--ds-font-heading-xsmall, ".concat(_typography.fontFallback.heading.xsmall, ")"),
21
- margin: 0
22
- });
23
18
  var _default = exports.default = function _default(_ref) {
24
19
  (0, _objectDestructuringEmpty2.default)(_ref);
25
- return (0, _react.jsx)(_SuccessContainer.default, null, (0, _react.jsx)("h1", {
26
- css: styles
27
- }, "Thanks for signing up"), (0, _react.jsx)("p", null, "We may reach out to you in the future to participate in additional research."));
20
+ return (0, _react.jsx)(_SuccessContainer.default, null, (0, _react.jsx)(_primitives.Stack, {
21
+ space: "space.150"
22
+ }, (0, _react.jsx)(_heading.default, {
23
+ size: "xsmall"
24
+ }, "Thanks for signing up"), (0, _react.jsx)(_primitives.Text, {
25
+ as: "p"
26
+ }, "We may reach out to you in the future to participate in additional research.")));
28
27
  };
@@ -14,8 +14,9 @@ var _reactTransitionGroup = require("react-transition-group");
14
14
  var _button = require("@atlaskit/button");
15
15
  var _checkbox = require("@atlaskit/checkbox");
16
16
  var _form = _interopRequireWildcard(require("@atlaskit/form"));
17
+ var _heading = _interopRequireDefault(require("@atlaskit/heading"));
18
+ var _primitives = require("@atlaskit/primitives");
17
19
  var _textarea = _interopRequireDefault(require("@atlaskit/textarea"));
18
- var _constants = require("@atlaskit/theme/constants");
19
20
  var _FeedbackScoreButtons = _interopRequireDefault(require("./FeedbackScoreButtons"));
20
21
  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); }
21
22
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -26,10 +27,6 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
26
27
 
27
28
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
28
29
 
29
- var headingStyles = (0, _react2.css)({
30
- fontSize: "".concat((0, _constants.fontSize)(), "px"),
31
- fontWeight: 600
32
- });
33
30
  var getExpandedHeight = function getExpandedHeight(ref, state) {
34
31
  if (!ref.current) {
35
32
  return '0';
@@ -77,12 +74,15 @@ var _default = exports.default = function _default(_ref) {
77
74
  }, []);
78
75
  return (0, _react2.jsx)("section", {
79
76
  "aria-labelledby": "contextualSurveyQuestion"
80
- }, (0, _react2.jsx)("h1", {
77
+ }, (0, _react2.jsx)(_primitives.Stack, {
78
+ space: "space.150"
79
+ }, (0, _react2.jsx)(_heading.default, {
81
80
  id: "contextualSurveyQuestion",
82
- css: headingStyles
83
- }, question), statement && (0, _react2.jsx)("p", {
81
+ size: "xsmall"
82
+ }, question), statement && (0, _react2.jsx)(_primitives.Text, {
83
+ as: "p",
84
84
  id: "contextualSurveyStatement"
85
- }, statement), (0, _react2.jsx)(_form.default, {
85
+ }, statement)), (0, _react2.jsx)(_form.default, {
86
86
  onSubmit: onSubmit
87
87
  }, function (_ref2) {
88
88
  var formProps = _ref2.formProps,
@@ -3,14 +3,9 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
- import { css, jsx } from '@emotion/react';
7
- import { fontFallback } from '@atlaskit/theme/typography';
6
+ import { jsx } from '@emotion/react';
7
+ import Heading from '@atlaskit/heading';
8
8
  import SuccessContainer from './SuccessContainer';
9
- const styles = css({
10
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
11
- font: `var(--ds-font-heading-xsmall, ${fontFallback.heading.xsmall})`,
12
- marginTop: 0
13
- });
14
- export default (() => jsx(SuccessContainer, null, jsx("h1", {
15
- css: styles
9
+ export default (() => jsx(SuccessContainer, null, jsx(Heading, {
10
+ size: "xsmall"
16
11
  }, "Thanks for your feedback")));
@@ -5,11 +5,8 @@
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
6
  import { css, jsx } from '@emotion/react';
7
7
  import Button from '@atlaskit/button/custom-theme-button';
8
- import { N200 } from '@atlaskit/theme/colors';
8
+ import { Text } from '@atlaskit/primitives';
9
9
  import Tooltip from '@atlaskit/tooltip';
10
- const styles = css({
11
- textAlign: 'right'
12
- });
13
10
  const tooltipMessage = ['Strongly disagree', 'Disagree', 'Slightly disagree', 'Neutral', 'Slightly agree', 'Agree', 'Strongly agree'];
14
11
  export default (({
15
12
  onChange,
@@ -52,25 +49,29 @@ export default (({
52
49
  })), jsx("div", {
53
50
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
54
51
  css: css({
55
- fontSize: '12px',
56
- fontWeight: 600,
57
- color: `var(--ds-text-subtlest, ${N200})`,
58
52
  display: 'flex',
59
53
  marginTop: "var(--ds-space-100, 8px)",
60
54
  marginBottom: "var(--ds-space-300, 24px)",
55
+ justifyContent: 'space-between',
61
56
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
62
57
  '& > span': {
63
58
  width: "var(--ds-space-1000, 80px)"
64
59
  }
65
60
  }),
66
61
  "aria-hidden": true
67
- }, jsx("span", null, "Strongly disagree"), jsx("span", {
68
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
69
- css: css({
70
- textAlign: 'center',
71
- margin: '0 auto',
72
- padding: `0 ${"var(--ds-space-600, 48px)"}`
73
- })
74
- }, "Neutral"), jsx("span", {
75
- css: styles
62
+ }, jsx(Text, {
63
+ color: "color.text.subtlest",
64
+ size: "UNSAFE_small",
65
+ weight: "semibold",
66
+ align: "start"
67
+ }, "Strongly disagree"), jsx(Text, {
68
+ color: "color.text.subtlest",
69
+ size: "UNSAFE_small",
70
+ weight: "semibold",
71
+ align: "center"
72
+ }, "Neutral"), jsx(Text, {
73
+ color: "color.text.subtlest",
74
+ size: "UNSAFE_small",
75
+ weight: "semibold",
76
+ align: "end"
76
77
  }, "Strongly agree"))));
@@ -7,13 +7,9 @@ import { useCallback, useState } from 'react';
7
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
8
  import { css, jsx } from '@emotion/react';
9
9
  import Button from '@atlaskit/button/custom-theme-button';
10
- import { fontFallback } from '@atlaskit/theme/typography';
10
+ import Heading from '@atlaskit/heading';
11
+ import { Box, Stack, Text } from '@atlaskit/primitives';
11
12
  import SuccessContainer from './SuccessContainer';
12
- const styles = css({
13
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
14
- font: `var(--ds-font-heading-xsmall, ${fontFallback.heading.xsmall})`,
15
- margin: 0
16
- });
17
13
  export default (({
18
14
  onAnswer
19
15
  }) => {
@@ -23,11 +19,19 @@ export default (({
23
19
  await onAnswer(answer);
24
20
  }, [setPending, onAnswer]);
25
21
  const isDisabled = Boolean(pending);
26
- return jsx(SuccessContainer, null, jsx("h1", {
27
- css: styles
28
- }, "Thanks for your feedback"), jsx("p", null, "Are you interested in participating in our research?"), jsx("p", null, "Sign up for the", ' ', jsx("a", {
22
+ return jsx(SuccessContainer, null, jsx(Heading, {
23
+ size: "xsmall"
24
+ }, "Thanks for your feedback"), jsx(Box, {
25
+ paddingBlockStart: "space.150"
26
+ }, jsx(Stack, {
27
+ space: "space.150"
28
+ }, jsx(Text, {
29
+ as: "p"
30
+ }, "Are you interested in participating in our research?"), jsx(Text, {
31
+ as: "p"
32
+ }, "Sign up for the", ' ', jsx("a", {
29
33
  href: "https://www.atlassian.com/research-group"
30
- }, "Atlassian Research Group"), " and we may contact you in the future with research opportunities."), jsx("div", {
34
+ }, "Atlassian Research Group"), " and we may contact you in the future with research opportunities."))), jsx("div", {
31
35
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
32
36
  css: css({
33
37
  marginTop: "var(--ds-space-400, 32px)",
@@ -3,14 +3,14 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
- import { css, jsx } from '@emotion/react';
7
- import { fontFallback } from '@atlaskit/theme/typography';
6
+ import { jsx } from '@emotion/react';
7
+ import Heading from '@atlaskit/heading';
8
+ import { Stack, Text } from '@atlaskit/primitives';
8
9
  import SuccessContainer from './SuccessContainer';
9
- const styles = css({
10
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
11
- font: `var(--ds-font-heading-xsmall, ${fontFallback.heading.xsmall})`,
12
- margin: 0
13
- });
14
- export default (({}) => jsx(SuccessContainer, null, jsx("h1", {
15
- css: styles
16
- }, "Thanks for signing up"), jsx("p", null, "We may reach out to you in the future to participate in additional research.")));
10
+ export default (({}) => jsx(SuccessContainer, null, jsx(Stack, {
11
+ space: "space.150"
12
+ }, jsx(Heading, {
13
+ size: "xsmall"
14
+ }, "Thanks for signing up"), jsx(Text, {
15
+ as: "p"
16
+ }, "We may reach out to you in the future to participate in additional research."))));
@@ -11,13 +11,10 @@ import { Transition } from 'react-transition-group';
11
11
  import { LoadingButton as Button } from '@atlaskit/button';
12
12
  import { Checkbox } from '@atlaskit/checkbox';
13
13
  import Form, { CheckboxField, Field, FormFooter } from '@atlaskit/form';
14
+ import Heading from '@atlaskit/heading';
15
+ import { Stack, Text } from '@atlaskit/primitives';
14
16
  import Textarea from '@atlaskit/textarea';
15
- import { fontSize } from '@atlaskit/theme/constants';
16
17
  import FeedbackScoreButtons from './FeedbackScoreButtons';
17
- const headingStyles = css({
18
- fontSize: `${fontSize()}px`,
19
- fontWeight: 600
20
- });
21
18
  const getExpandedHeight = (ref, state) => {
22
19
  if (!ref.current) {
23
20
  return '0';
@@ -60,12 +57,15 @@ export default (({
60
57
  }, []);
61
58
  return jsx("section", {
62
59
  "aria-labelledby": "contextualSurveyQuestion"
63
- }, jsx("h1", {
60
+ }, jsx(Stack, {
61
+ space: "space.150"
62
+ }, jsx(Heading, {
64
63
  id: "contextualSurveyQuestion",
65
- css: headingStyles
66
- }, question), statement && jsx("p", {
64
+ size: "xsmall"
65
+ }, question), statement && jsx(Text, {
66
+ as: "p",
67
67
  id: "contextualSurveyStatement"
68
- }, statement), jsx(Form, {
68
+ }, statement)), jsx(Form, {
69
69
  onSubmit: onSubmit
70
70
  }, ({
71
71
  formProps,
@@ -3,16 +3,11 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
- import { css, jsx } from '@emotion/react';
7
- import { fontFallback } from '@atlaskit/theme/typography';
6
+ import { jsx } from '@emotion/react';
7
+ import Heading from '@atlaskit/heading';
8
8
  import SuccessContainer from './SuccessContainer';
9
- var styles = css({
10
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
11
- font: "var(--ds-font-heading-xsmall, ".concat(fontFallback.heading.xsmall, ")"),
12
- marginTop: 0
13
- });
14
9
  export default (function () {
15
- return jsx(SuccessContainer, null, jsx("h1", {
16
- css: styles
10
+ return jsx(SuccessContainer, null, jsx(Heading, {
11
+ size: "xsmall"
17
12
  }, "Thanks for your feedback"));
18
13
  });
@@ -5,11 +5,8 @@
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
6
  import { css, jsx } from '@emotion/react';
7
7
  import Button from '@atlaskit/button/custom-theme-button';
8
- import { N200 } from '@atlaskit/theme/colors';
8
+ import { Text } from '@atlaskit/primitives';
9
9
  import Tooltip from '@atlaskit/tooltip';
10
- var styles = css({
11
- textAlign: 'right'
12
- });
13
10
  var tooltipMessage = ['Strongly disagree', 'Disagree', 'Slightly disagree', 'Neutral', 'Slightly agree', 'Agree', 'Strongly agree'];
14
11
  export default (function (_ref) {
15
12
  var onChange = _ref.onChange,
@@ -54,26 +51,30 @@ export default (function (_ref) {
54
51
  })), jsx("div", {
55
52
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
56
53
  css: css({
57
- fontSize: '12px',
58
- fontWeight: 600,
59
- color: "var(--ds-text-subtlest, ".concat(N200, ")"),
60
54
  display: 'flex',
61
55
  marginTop: "var(--ds-space-100, 8px)",
62
56
  marginBottom: "var(--ds-space-300, 24px)",
57
+ justifyContent: 'space-between',
63
58
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
64
59
  '& > span': {
65
60
  width: "var(--ds-space-1000, 80px)"
66
61
  }
67
62
  }),
68
63
  "aria-hidden": true
69
- }, jsx("span", null, "Strongly disagree"), jsx("span", {
70
- // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
71
- css: css({
72
- textAlign: 'center',
73
- margin: '0 auto',
74
- padding: "0 ".concat("var(--ds-space-600, 48px)")
75
- })
76
- }, "Neutral"), jsx("span", {
77
- css: styles
64
+ }, jsx(Text, {
65
+ color: "color.text.subtlest",
66
+ size: "UNSAFE_small",
67
+ weight: "semibold",
68
+ align: "start"
69
+ }, "Strongly disagree"), jsx(Text, {
70
+ color: "color.text.subtlest",
71
+ size: "UNSAFE_small",
72
+ weight: "semibold",
73
+ align: "center"
74
+ }, "Neutral"), jsx(Text, {
75
+ color: "color.text.subtlest",
76
+ size: "UNSAFE_small",
77
+ weight: "semibold",
78
+ align: "end"
78
79
  }, "Strongly agree")));
79
80
  });
@@ -10,13 +10,9 @@ import { useCallback, useState } from 'react';
10
10
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
11
11
  import { css, jsx } from '@emotion/react';
12
12
  import Button from '@atlaskit/button/custom-theme-button';
13
- import { fontFallback } from '@atlaskit/theme/typography';
13
+ import Heading from '@atlaskit/heading';
14
+ import { Box, Stack, Text } from '@atlaskit/primitives';
14
15
  import SuccessContainer from './SuccessContainer';
15
- var styles = css({
16
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
17
- font: "var(--ds-font-heading-xsmall, ".concat(fontFallback.heading.xsmall, ")"),
18
- margin: 0
19
- });
20
16
  export default (function (_ref) {
21
17
  var onAnswer = _ref.onAnswer;
22
18
  var _useState = useState(null),
@@ -42,11 +38,19 @@ export default (function (_ref) {
42
38
  };
43
39
  }(), [setPending, onAnswer]);
44
40
  var isDisabled = Boolean(pending);
45
- return jsx(SuccessContainer, null, jsx("h1", {
46
- css: styles
47
- }, "Thanks for your feedback"), jsx("p", null, "Are you interested in participating in our research?"), jsx("p", null, "Sign up for the", ' ', jsx("a", {
41
+ return jsx(SuccessContainer, null, jsx(Heading, {
42
+ size: "xsmall"
43
+ }, "Thanks for your feedback"), jsx(Box, {
44
+ paddingBlockStart: "space.150"
45
+ }, jsx(Stack, {
46
+ space: "space.150"
47
+ }, jsx(Text, {
48
+ as: "p"
49
+ }, "Are you interested in participating in our research?"), jsx(Text, {
50
+ as: "p"
51
+ }, "Sign up for the", ' ', jsx("a", {
48
52
  href: "https://www.atlassian.com/research-group"
49
- }, "Atlassian Research Group"), " and we may contact you in the future with research opportunities."), jsx("div", {
53
+ }, "Atlassian Research Group"), " and we may contact you in the future with research opportunities."))), jsx("div", {
50
54
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
51
55
  css: css({
52
56
  marginTop: "var(--ds-space-400, 32px)",
@@ -4,17 +4,17 @@ import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructurin
4
4
  * @jsx jsx
5
5
  */
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
- import { css, jsx } from '@emotion/react';
8
- import { fontFallback } from '@atlaskit/theme/typography';
7
+ import { jsx } from '@emotion/react';
8
+ import Heading from '@atlaskit/heading';
9
+ import { Stack, Text } from '@atlaskit/primitives';
9
10
  import SuccessContainer from './SuccessContainer';
10
- var styles = css({
11
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
12
- font: "var(--ds-font-heading-xsmall, ".concat(fontFallback.heading.xsmall, ")"),
13
- margin: 0
14
- });
15
11
  export default (function (_ref) {
16
12
  _objectDestructuringEmpty(_ref);
17
- return jsx(SuccessContainer, null, jsx("h1", {
18
- css: styles
19
- }, "Thanks for signing up"), jsx("p", null, "We may reach out to you in the future to participate in additional research."));
13
+ return jsx(SuccessContainer, null, jsx(Stack, {
14
+ space: "space.150"
15
+ }, jsx(Heading, {
16
+ size: "xsmall"
17
+ }, "Thanks for signing up"), jsx(Text, {
18
+ as: "p"
19
+ }, "We may reach out to you in the future to participate in additional research.")));
20
20
  });
@@ -12,13 +12,10 @@ import { Transition } from 'react-transition-group';
12
12
  import { LoadingButton as Button } from '@atlaskit/button';
13
13
  import { Checkbox } from '@atlaskit/checkbox';
14
14
  import Form, { CheckboxField, Field, FormFooter } from '@atlaskit/form';
15
+ import Heading from '@atlaskit/heading';
16
+ import { Stack, Text } from '@atlaskit/primitives';
15
17
  import Textarea from '@atlaskit/textarea';
16
- import { fontSize } from '@atlaskit/theme/constants';
17
18
  import FeedbackScoreButtons from './FeedbackScoreButtons';
18
- var headingStyles = css({
19
- fontSize: "".concat(fontSize(), "px"),
20
- fontWeight: 600
21
- });
22
19
  var getExpandedHeight = function getExpandedHeight(ref, state) {
23
20
  if (!ref.current) {
24
21
  return '0';
@@ -66,12 +63,15 @@ export default (function (_ref) {
66
63
  }, []);
67
64
  return jsx("section", {
68
65
  "aria-labelledby": "contextualSurveyQuestion"
69
- }, jsx("h1", {
66
+ }, jsx(Stack, {
67
+ space: "space.150"
68
+ }, jsx(Heading, {
70
69
  id: "contextualSurveyQuestion",
71
- css: headingStyles
72
- }, question), statement && jsx("p", {
70
+ size: "xsmall"
71
+ }, question), statement && jsx(Text, {
72
+ as: "p",
73
73
  id: "contextualSurveyStatement"
74
- }, statement), jsx(Form, {
74
+ }, statement)), jsx(Form, {
75
75
  onSubmit: onSubmit
76
76
  }, function (_ref2) {
77
77
  var formProps = _ref2.formProps,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/contextual-survey",
3
- "version": "2.2.20",
3
+ "version": "2.3.0",
4
4
  "description": "A React component used to ask the user for feedback",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -38,7 +38,9 @@
38
38
  "@atlaskit/button": "^19.2.0",
39
39
  "@atlaskit/checkbox": "^13.7.0",
40
40
  "@atlaskit/form": "^10.5.0",
41
+ "@atlaskit/heading": "^2.4.0",
41
42
  "@atlaskit/icon": "^22.12.0",
43
+ "@atlaskit/primitives": "^12.0.1",
42
44
  "@atlaskit/textarea": "^5.6.0",
43
45
  "@atlaskit/theme": "^13.0.0",
44
46
  "@atlaskit/tokens": "^1.58.0",