@atlaskit/contextual-survey 4.0.2 → 5.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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/contextual-survey
2
2
 
3
+ ## 5.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#168857](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/168857)
8
+ [`4375440aeaf60`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4375440aeaf60) -
9
+ [ux] This change removes constants exports since compiled constants are not meant to be imported.
10
+ Instead this change has the position values in-file instead.
11
+
12
+ This is a breaking change because we are removing an entry point.
13
+
14
+ Package consumers will need to remove "@atlaskit/contextual-survey/constants" as a dependency.
15
+
3
16
  ## 4.0.2
4
17
 
5
18
  ### Patch Changes
@@ -4,7 +4,7 @@
4
4
  "declaration": true,
5
5
  "target": "es5",
6
6
  "composite": true,
7
- "outDir": "../dist",
7
+ "outDir": "../../../../../confluence/tsDist/@atlaskit__contextual-survey",
8
8
  "rootDir": "../"
9
9
  },
10
10
  "include": [
@@ -2,7 +2,7 @@
2
2
  ._2rko1sit{border-radius:var(--ds-border-radius,3px)}._154ipxbi{top:var(--ds-space-200,1pc)}
3
3
  ._16qs1dt4{box-shadow:var(--_qzf6oc)}
4
4
  ._19bv1ejb{padding-left:var(--ds-space-300,24px)}
5
- ._1bsb1sw3{width:var(--_18gm6wc)}
5
+ ._1bsb1vif{width:440px}
6
6
  ._1xi2pxbi{right:var(--ds-space-200,1pc)}
7
7
  ._bfhk13b4{background-color:var(--_1f6rtr1)}
8
8
  ._ca0q1ejb{padding-top:var(--ds-space-300,24px)}
@@ -13,7 +13,6 @@ var _runtime = require("@compiled/react/runtime");
13
13
  var _new = require("@atlaskit/button/new");
14
14
  var _closeCross = _interopRequireDefault(require("@atlaskit/icon/core/migration/close--cross"));
15
15
  var _colors = require("@atlaskit/theme/colors");
16
- var _constants = require("../constants");
17
16
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
18
17
  var containerStyles = null;
19
18
  var buttonWrapperStyles = null;
@@ -21,11 +20,10 @@ var _default = exports.default = function _default(_ref) {
21
20
  var children = _ref.children,
22
21
  onDismiss = _ref.onDismiss;
23
22
  return /*#__PURE__*/React.createElement("div", {
24
- className: (0, _runtime.ax)(["_2rko1sit _bfhk13b4 _ca0q1ejb _u5f31ejb _n3td1ejb _19bv1ejb _16qs1dt4 _1bsb1sw3"]),
23
+ className: (0, _runtime.ax)(["_2rko1sit _bfhk13b4 _ca0q1ejb _u5f31ejb _n3td1ejb _19bv1ejb _16qs1dt4 _1bsb1vif"]),
25
24
  style: {
26
25
  "--_1f6rtr1": (0, _runtime.ix)("var(--ds-surface-overlay, ".concat(_colors.N0, ")")),
27
- "--_qzf6oc": (0, _runtime.ix)("var(--ds-shadow-overlay, ".concat("0 20px 32px -8px ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A), ")")),
28
- "--_18gm6wc": (0, _runtime.ix)("".concat(_constants.surveyInnerWidth, "px"))
26
+ "--_qzf6oc": (0, _runtime.ix)("var(--ds-shadow-overlay, ".concat("0 20px 32px -8px ".concat(_colors.N50A, ", 0 0 1px ").concat(_colors.N60A), ")"))
29
27
  }
30
28
  }, /*#__PURE__*/React.createElement("div", {
31
29
  className: (0, _runtime.ax)(["_kqswstnw _154ipxbi _1xi2pxbi"])
@@ -1,4 +1,4 @@
1
- ._1xi28err{right:var(--_1hx5ohh)}
2
- ._94n58err{bottom:var(--_1hx5ohh)}
1
+ ._1xi2oahv{right:var(--ds-space-600,3pc)}
2
+ ._94n5oahv{bottom:var(--ds-space-600,3pc)}
3
3
  ._k8m01rjc{transition-property:transform,opacity}
4
4
  ._kqsw1n9t{position:fixed}
@@ -11,11 +11,14 @@ var React = _interopRequireWildcard(require("react"));
11
11
  var _runtime = require("@compiled/react/runtime");
12
12
  var _reactTransitionGroup = require("react-transition-group");
13
13
  var _constants = require("@atlaskit/theme/constants");
14
- var _constants2 = require("../constants");
15
14
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
15
+ // 8px is the base unit in pixels
16
+ var surveyOffset = "var(--ds-space-600, 48px)";
16
17
  var animationDuration = 300;
17
18
  var offscreen = {
18
- translateX: "".concat(_constants2.surveyInnerWidth + _constants2.surveyOffset, "px"),
19
+ // Hard-coded because there is no large enough space token and this component is not responsive.
20
+ translateX: "488px",
21
+ //survey container width + survey offset
19
22
  opacity: '0'
20
23
  };
21
24
  var getAnimationProps = function getAnimationProps(state) {
@@ -49,14 +52,13 @@ function SurveyMarshal(props) {
49
52
  translateX = _getAnimationProps.translateX,
50
53
  opacity = _getAnimationProps.opacity;
51
54
  return /*#__PURE__*/React.createElement("div", {
52
- className: (0, _runtime.ax)(["_kqsw1n9t _1xi28err _94n58err _k8m01rjc"]),
53
55
  style: {
54
56
  opacity: opacity,
55
57
  transition: "all ".concat(animationDuration, "ms ease-in-out"),
56
58
  zIndex: _constants.layers.flag(),
57
- transform: "translateX(".concat(translateX, ")"),
58
- "--_1hx5ohh": (0, _runtime.ix)("".concat(_constants2.surveyOffset, "px"))
59
- }
59
+ transform: "translateX(".concat(translateX, ")")
60
+ },
61
+ className: (0, _runtime.ax)(["_kqsw1n9t _1xi2oahv _94n5oahv _k8m01rjc"])
60
62
  }, children());
61
63
  });
62
64
  }
@@ -5,7 +5,6 @@ import { ax, ix } from "@compiled/react/runtime";
5
5
  import { IconButton as Button } from '@atlaskit/button/new';
6
6
  import CrossIcon from '@atlaskit/icon/core/migration/close--cross';
7
7
  import { N0, N50A, N60A } from '@atlaskit/theme/colors';
8
- import { surveyInnerWidth } from '../constants';
9
8
  const containerStyles = null;
10
9
  const buttonWrapperStyles = null;
11
10
  export default (({
@@ -1,4 +1,4 @@
1
- ._1xi2ckbl{right:3pc}
2
- ._94n5ckbl{bottom:3pc}
1
+ ._1xi2oahv{right:var(--ds-space-600,3pc)}
2
+ ._94n5oahv{bottom:var(--ds-space-600,3pc)}
3
3
  ._k8m01rjc{transition-property:transform,opacity}
4
4
  ._kqsw1n9t{position:fixed}
@@ -4,10 +4,13 @@ import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { Transition } from 'react-transition-group';
6
6
  import { layers } from '@atlaskit/theme/constants';
7
- import { surveyInnerWidth, surveyOffset } from '../constants';
7
+ // 8px is the base unit in pixels
8
+ const surveyOffset = "var(--ds-space-600, 48px)";
8
9
  const animationDuration = 300;
9
10
  const offscreen = {
10
- translateX: `${surveyInnerWidth + surveyOffset}px`,
11
+ // Hard-coded because there is no large enough space token and this component is not responsive.
12
+ translateX: "488px",
13
+ //survey container width + survey offset
11
14
  opacity: '0'
12
15
  };
13
16
  const getAnimationProps = state => {
@@ -50,7 +53,7 @@ export default function SurveyMarshal(props) {
50
53
  zIndex: layers.flag(),
51
54
  transform: `translateX(${translateX})`
52
55
  },
53
- className: ax(["_kqsw1n9t _1xi2ckbl _94n5ckbl _k8m01rjc"])
56
+ className: ax(["_kqsw1n9t _1xi2oahv _94n5oahv _k8m01rjc"])
54
57
  }, children());
55
58
  });
56
59
  }
@@ -2,7 +2,7 @@
2
2
  ._2rko1sit{border-radius:var(--ds-border-radius,3px)}._154ipxbi{top:var(--ds-space-200,1pc)}
3
3
  ._16qs1dt4{box-shadow:var(--_qzf6oc)}
4
4
  ._19bv1ejb{padding-left:var(--ds-space-300,24px)}
5
- ._1bsb1sw3{width:var(--_18gm6wc)}
5
+ ._1bsb1vif{width:440px}
6
6
  ._1xi2pxbi{right:var(--ds-space-200,1pc)}
7
7
  ._bfhk13b4{background-color:var(--_1f6rtr1)}
8
8
  ._ca0q1ejb{padding-top:var(--ds-space-300,24px)}
@@ -5,18 +5,16 @@ import { ax, ix } from "@compiled/react/runtime";
5
5
  import { IconButton as Button } from '@atlaskit/button/new';
6
6
  import CrossIcon from '@atlaskit/icon/core/migration/close--cross';
7
7
  import { N0, N50A, N60A } from '@atlaskit/theme/colors';
8
- import { surveyInnerWidth } from '../constants';
9
8
  var containerStyles = null;
10
9
  var buttonWrapperStyles = null;
11
10
  export default (function (_ref) {
12
11
  var children = _ref.children,
13
12
  onDismiss = _ref.onDismiss;
14
13
  return /*#__PURE__*/React.createElement("div", {
15
- className: ax(["_2rko1sit _bfhk13b4 _ca0q1ejb _u5f31ejb _n3td1ejb _19bv1ejb _16qs1dt4 _1bsb1sw3"]),
14
+ className: ax(["_2rko1sit _bfhk13b4 _ca0q1ejb _u5f31ejb _n3td1ejb _19bv1ejb _16qs1dt4 _1bsb1vif"]),
16
15
  style: {
17
16
  "--_1f6rtr1": ix("var(--ds-surface-overlay, ".concat(N0, ")")),
18
- "--_qzf6oc": ix("var(--ds-shadow-overlay, ".concat("0 20px 32px -8px ".concat(N50A, ", 0 0 1px ").concat(N60A), ")")),
19
- "--_18gm6wc": ix("".concat(surveyInnerWidth, "px"))
17
+ "--_qzf6oc": ix("var(--ds-shadow-overlay, ".concat("0 20px 32px -8px ".concat(N50A, ", 0 0 1px ").concat(N60A), ")"))
20
18
  }
21
19
  }, /*#__PURE__*/React.createElement("div", {
22
20
  className: ax(["_kqswstnw _154ipxbi _1xi2pxbi"])
@@ -1,4 +1,4 @@
1
- ._1xi28err{right:var(--_1hx5ohh)}
2
- ._94n58err{bottom:var(--_1hx5ohh)}
1
+ ._1xi2oahv{right:var(--ds-space-600,3pc)}
2
+ ._94n5oahv{bottom:var(--ds-space-600,3pc)}
3
3
  ._k8m01rjc{transition-property:transform,opacity}
4
4
  ._kqsw1n9t{position:fixed}
@@ -4,10 +4,13 @@ import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { Transition } from 'react-transition-group';
6
6
  import { layers } from '@atlaskit/theme/constants';
7
- import { surveyInnerWidth, surveyOffset } from '../constants';
7
+ // 8px is the base unit in pixels
8
+ var surveyOffset = "var(--ds-space-600, 48px)";
8
9
  var animationDuration = 300;
9
10
  var offscreen = {
10
- translateX: "".concat(surveyInnerWidth + surveyOffset, "px"),
11
+ // Hard-coded because there is no large enough space token and this component is not responsive.
12
+ translateX: "488px",
13
+ //survey container width + survey offset
11
14
  opacity: '0'
12
15
  };
13
16
  var getAnimationProps = function getAnimationProps(state) {
@@ -41,14 +44,13 @@ export default function SurveyMarshal(props) {
41
44
  translateX = _getAnimationProps.translateX,
42
45
  opacity = _getAnimationProps.opacity;
43
46
  return /*#__PURE__*/React.createElement("div", {
44
- className: ax(["_kqsw1n9t _1xi28err _94n58err _k8m01rjc"]),
45
47
  style: {
46
48
  opacity: opacity,
47
49
  transition: "all ".concat(animationDuration, "ms ease-in-out"),
48
50
  zIndex: layers.flag(),
49
- transform: "translateX(".concat(translateX, ")"),
50
- "--_1hx5ohh": ix("".concat(surveyOffset, "px"))
51
- }
51
+ transform: "translateX(".concat(translateX, ")")
52
+ },
53
+ className: ax(["_kqsw1n9t _1xi2oahv _94n5oahv _k8m01rjc"])
52
54
  }, children());
53
55
  });
54
56
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/contextual-survey",
3
- "version": "4.0.2",
3
+ "version": "5.0.0",
4
4
  "description": "A React component used to ask the user for feedback",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -26,7 +26,6 @@
26
26
  "atlaskit:src": "src/index.ts",
27
27
  "af:exports": {
28
28
  ".": "./src/index.ts",
29
- "./constants": "./src/constants.ts",
30
29
  "./types": "./src/types.ts"
31
30
  },
32
31
  "atlassian": {
@@ -47,8 +46,8 @@
47
46
  "@atlaskit/primitives": "^14.8.0",
48
47
  "@atlaskit/textarea": "^8.0.0",
49
48
  "@atlaskit/theme": "^18.0.0",
50
- "@atlaskit/tokens": "^5.0.0",
51
- "@atlaskit/tooltip": "^20.2.0",
49
+ "@atlaskit/tokens": "^5.1.0",
50
+ "@atlaskit/tooltip": "^20.3.0",
52
51
  "@babel/runtime": "^7.0.0",
53
52
  "@compiled/react": "^0.18.3",
54
53
  "@emotion/react": "^11.7.1",
@@ -1,17 +0,0 @@
1
- {
2
- "name": "@atlaskit/contextual-survey/constants",
3
- "main": "../dist/cjs/constants.js",
4
- "module": "../dist/esm/constants.js",
5
- "module:es2019": "../dist/es2019/constants.js",
6
- "sideEffects": [
7
- "*.compiled.css"
8
- ],
9
- "types": "../dist/types/constants.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.4": {
12
- "*": [
13
- "../dist/types-ts4.5/constants.d.ts"
14
- ]
15
- }
16
- }
17
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.surveyOffset = exports.surveyInnerWidth = void 0;
7
- var _constants = require("@atlaskit/theme/constants");
8
- var surveyInnerWidth = exports.surveyInnerWidth = (0, _constants.gridSize)() * 55; // 440
9
- var surveyOffset = exports.surveyOffset = (0, _constants.gridSize)() * 6; // 48
@@ -1,3 +0,0 @@
1
- import { gridSize } from '@atlaskit/theme/constants';
2
- export const surveyInnerWidth = gridSize() * 55; // 440
3
- export const surveyOffset = gridSize() * 6; // 48
@@ -1,3 +0,0 @@
1
- import { gridSize } from '@atlaskit/theme/constants';
2
- export var surveyInnerWidth = gridSize() * 55; // 440
3
- export var surveyOffset = gridSize() * 6; // 48
@@ -1,2 +0,0 @@
1
- export declare const surveyInnerWidth: number;
2
- export declare const surveyOffset: number;
@@ -1,2 +0,0 @@
1
- export declare const surveyInnerWidth: number;
2
- export declare const surveyOffset: number;