@atlaskit/status 5.9.1 → 5.9.3

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,20 @@
1
1
  # @atlaskit/status
2
2
 
3
+ ## 5.9.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 5.9.2
10
+
11
+ ### Patch Changes
12
+
13
+ - [`501b7257aaa6d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/501b7257aaa6d) -
14
+ Add a capped, scrollable status suggestion list with parent-constrained labels behind
15
+ platform_editor_status_popup_suggestions_patch_1.
16
+ - Updated dependencies
17
+
3
18
  ## 5.9.1
4
19
 
5
20
  ### Patch Changes
@@ -1,3 +1,5 @@
1
+ ._1e0c1o8l{display:inline-block}
1
2
  ._1frxnkob>*{vertical-align:middle}
2
3
  ._1k0l7vkz>*{line-height:1pc}
3
- ._d0dzdf4r>*{display:inline-block!important}
4
+ ._d0dzdf4r>*{display:inline-block!important}
5
+ ._p12f1osq{max-width:100%}
@@ -43,6 +43,9 @@ var MAX_WIDTH = 200;
43
43
  */
44
44
  var inlineBlockStyles = null;
45
45
 
46
+ // Bound the Lozenge to its parent while keeping short statuses content-sized.
47
+ var constrainedToParentStyles = null;
48
+
46
49
  // eg. Version/4.0 Chrome/95.0.4638.50
47
50
  var isAndroidChromium = typeof window !== 'undefined' && /Version\/.* Chrome\/.*/.test(window.navigator.userAgent);
48
51
  var StatusInternal = /*#__PURE__*/function (_PureComponent) {
@@ -100,7 +103,8 @@ var StatusInternal = /*#__PURE__*/function (_PureComponent) {
100
103
  style = _this$props.style,
101
104
  role = _this$props.role,
102
105
  onClick = _this$props.onClick,
103
- isBold = _this$props.isBold;
106
+ isBold = _this$props.isBold,
107
+ isConstrainedToParent = _this$props.isConstrainedToParent;
104
108
  if (text.trim().length === 0) {
105
109
  return null;
106
110
  }
@@ -108,7 +112,7 @@ var StatusInternal = /*#__PURE__*/function (_PureComponent) {
108
112
  // Note: ommitted data-local-id attribute to avoid copying/pasting the same localId
109
113
  return /*#__PURE__*/React.createElement("span", {
110
114
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
111
- className: (0, _runtime.ax)([isAndroidChromium && "_d0dzdf4r _1k0l7vkz _1frxnkob", "status-lozenge-span"]),
115
+ className: (0, _runtime.ax)([isAndroidChromium && "_d0dzdf4r _1k0l7vkz _1frxnkob", isConstrainedToParent && "_1e0c1o8l _p12f1osq", "status-lozenge-span"]),
112
116
  onClick: onClick,
113
117
  onKeyDown: onClick ? this.handleKeyDown : undefined,
114
118
  onMouseEnter: this.handleMouseEnter,
@@ -1,4 +1,10 @@
1
- ._n6341ihb [data-ds--text-field--container]{border-color:var(--ds-border-bold,#7d818a)}._18u0u2gc{margin-left:var(--ds-space-100,8px)}
1
+ ._n6341ihb [data-ds--text-field--container]{border-color:var(--ds-border-bold,#7d818a)}._15mtglyw{overscroll-behavior-y:none}
2
+ ._18m91wug{overflow-y:auto}
3
+ ._18u0u2gc{margin-left:var(--ds-space-100,8px)}
4
+ ._19pk1b66{margin-top:var(--ds-space-050,4px)}
2
5
  ._19pkidpf{margin-top:0}
6
+ ._1bsb1osq{width:100%}
3
7
  ._2hwxu2gc{margin-right:var(--ds-space-100,8px)}
8
+ ._c71l4d55{max-height:232px}
9
+ ._ca0q1b66{padding-top:var(--ds-space-050,4px)}
4
10
  ._otyridpf{margin-bottom:0}
@@ -24,6 +24,9 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
24
24
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
25
25
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
26
26
  var fieldTextWrapperStyles = null;
27
+
28
+ // Keep the existing content position while reserving space inside the scrollport for focus rings.
29
+ var scrollContainerStyles = null;
27
30
  var Picker = /*#__PURE__*/function (_PureComponent) {
28
31
  function Picker() {
29
32
  var _this;
@@ -70,7 +73,14 @@ var Picker = /*#__PURE__*/function (_PureComponent) {
70
73
  selectedColor = _this$props.selectedColor,
71
74
  onColorClick = _this$props.onColorClick,
72
75
  onColorHover = _this$props.onColorHover,
73
- intl = _this$props.intl;
76
+ intl = _this$props.intl,
77
+ scrollableContent = _this$props.scrollableContent;
78
+ var colorPalette = /*#__PURE__*/_react.default.createElement(_colorPalette.default, {
79
+ key: this.colorPaletteKey,
80
+ onClick: onColorClick,
81
+ onHover: onColorHover,
82
+ selectedColor: selectedColor
83
+ });
74
84
 
75
85
  // Using <React.Fragment> instead of [] to workaround Enzyme
76
86
  // (https://github.com/airbnb/enzyme/issues/1149)
@@ -86,12 +96,10 @@ var Picker = /*#__PURE__*/function (_PureComponent) {
86
96
  spellCheck: false,
87
97
  autoComplete: "off",
88
98
  "aria-label": intl.formatMessage(_i18n.messages.statusInputLabel)
89
- })), /*#__PURE__*/_react.default.createElement(_colorPalette.default, {
90
- key: this.colorPaletteKey,
91
- onClick: onColorClick,
92
- onHover: onColorHover,
93
- selectedColor: selectedColor
94
- }));
99
+ })), scrollableContent ? /*#__PURE__*/_react.default.createElement("div", {
100
+ "data-status-picker-scroll-container": true,
101
+ className: (0, _runtime.ax)(["_19pk1b66 _c71l4d55 _18m91wug _15mtglyw _ca0q1b66 _1bsb1osq"])
102
+ }, colorPalette, scrollableContent) : colorPalette);
95
103
  }
96
104
  }, {
97
105
  key: "componentDidUpdate",
@@ -10,7 +10,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
10
10
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
11
11
  var ELEMENTS_CHANNEL = exports.ELEMENTS_CHANNEL = 'fabric-elements';
12
12
  var packageName = "@atlaskit/status";
13
- var packageVersion = "5.9.0";
13
+ var packageVersion = "5.9.2";
14
14
  var createStatusAnalyticsAndFire = exports.createStatusAnalyticsAndFire = function createStatusAnalyticsAndFire(createAnalyticsEvent) {
15
15
  return function (payload) {
16
16
  var statusPayload = _objectSpread(_objectSpread({}, payload), {}, {
@@ -1,3 +1,5 @@
1
+ ._1e0c1o8l{display:inline-block}
1
2
  ._1frxnkob>*{vertical-align:middle}
2
3
  ._1k0l7vkz>*{line-height:1pc}
3
- ._d0dzdf4r>*{display:inline-block!important}
4
+ ._d0dzdf4r>*{display:inline-block!important}
5
+ ._p12f1osq{max-width:100%}
@@ -27,6 +27,9 @@ const MAX_WIDTH = 200;
27
27
  */
28
28
  const inlineBlockStyles = null;
29
29
 
30
+ // Bound the Lozenge to its parent while keeping short statuses content-sized.
31
+ const constrainedToParentStyles = null;
32
+
30
33
  // eg. Version/4.0 Chrome/95.0.4638.50
31
34
  const isAndroidChromium = typeof window !== 'undefined' && /Version\/.* Chrome\/.*/.test(window.navigator.userAgent);
32
35
  class StatusInternal extends PureComponent {
@@ -79,7 +82,8 @@ class StatusInternal extends PureComponent {
79
82
  style,
80
83
  role,
81
84
  onClick,
82
- isBold
85
+ isBold,
86
+ isConstrainedToParent
83
87
  } = this.props;
84
88
  if (text.trim().length === 0) {
85
89
  return null;
@@ -88,7 +92,7 @@ class StatusInternal extends PureComponent {
88
92
  // Note: ommitted data-local-id attribute to avoid copying/pasting the same localId
89
93
  return /*#__PURE__*/React.createElement("span", {
90
94
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
91
- className: ax([isAndroidChromium && "_d0dzdf4r _1k0l7vkz _1frxnkob", "status-lozenge-span"]),
95
+ className: ax([isAndroidChromium && "_d0dzdf4r _1k0l7vkz _1frxnkob", isConstrainedToParent && "_1e0c1o8l _p12f1osq", "status-lozenge-span"]),
92
96
  onClick: onClick,
93
97
  onKeyDown: onClick ? this.handleKeyDown : undefined,
94
98
  onMouseEnter: this.handleMouseEnter,
@@ -1,4 +1,10 @@
1
- ._n6341ihb [data-ds--text-field--container]{border-color:var(--ds-border-bold,#7d818a)}._18u0u2gc{margin-left:var(--ds-space-100,8px)}
1
+ ._n6341ihb [data-ds--text-field--container]{border-color:var(--ds-border-bold,#7d818a)}._15mtglyw{overscroll-behavior-y:none}
2
+ ._18m91wug{overflow-y:auto}
3
+ ._18u0u2gc{margin-left:var(--ds-space-100,8px)}
4
+ ._19pk1b66{margin-top:var(--ds-space-050,4px)}
2
5
  ._19pkidpf{margin-top:0}
6
+ ._1bsb1osq{width:100%}
3
7
  ._2hwxu2gc{margin-right:var(--ds-space-100,8px)}
8
+ ._c71l4d55{max-height:232px}
9
+ ._ca0q1b66{padding-top:var(--ds-space-050,4px)}
4
10
  ._otyridpf{margin-bottom:0}
@@ -8,6 +8,9 @@ import { injectIntl } from 'react-intl';
8
8
  import ColorPalette from './internal/color-palette';
9
9
  import { messages } from './i18n';
10
10
  const fieldTextWrapperStyles = null;
11
+
12
+ // Keep the existing content position while reserving space inside the scrollport for focus rings.
13
+ const scrollContainerStyles = null;
11
14
  class Picker extends PureComponent {
12
15
  constructor(...args) {
13
16
  super(...args);
@@ -45,8 +48,15 @@ class Picker extends PureComponent {
45
48
  selectedColor,
46
49
  onColorClick,
47
50
  onColorHover,
48
- intl
51
+ intl,
52
+ scrollableContent
49
53
  } = this.props;
54
+ const colorPalette = /*#__PURE__*/React.createElement(ColorPalette, {
55
+ key: this.colorPaletteKey,
56
+ onClick: onColorClick,
57
+ onHover: onColorHover,
58
+ selectedColor: selectedColor
59
+ });
50
60
 
51
61
  // Using <React.Fragment> instead of [] to workaround Enzyme
52
62
  // (https://github.com/airbnb/enzyme/issues/1149)
@@ -62,12 +72,10 @@ class Picker extends PureComponent {
62
72
  spellCheck: false,
63
73
  autoComplete: "off",
64
74
  "aria-label": intl.formatMessage(messages.statusInputLabel)
65
- })), /*#__PURE__*/React.createElement(ColorPalette, {
66
- key: this.colorPaletteKey,
67
- onClick: onColorClick,
68
- onHover: onColorHover,
69
- selectedColor: selectedColor
70
- }));
75
+ })), scrollableContent ? /*#__PURE__*/React.createElement("div", {
76
+ "data-status-picker-scroll-container": true,
77
+ className: ax(["_19pk1b66 _c71l4d55 _18m91wug _15mtglyw _ca0q1b66 _1bsb1osq"])
78
+ }, colorPalette, scrollableContent) : colorPalette);
71
79
  }
72
80
  componentDidUpdate() {
73
81
  if (this.inputRef && this.props.autoFocus) {
@@ -1,6 +1,6 @@
1
1
  export const ELEMENTS_CHANNEL = 'fabric-elements';
2
2
  const packageName = "@atlaskit/status";
3
- const packageVersion = "5.9.0";
3
+ const packageVersion = "5.9.2";
4
4
  export const createStatusAnalyticsAndFire = createAnalyticsEvent => payload => {
5
5
  const statusPayload = {
6
6
  ...payload,
@@ -1,3 +1,5 @@
1
+ ._1e0c1o8l{display:inline-block}
1
2
  ._1frxnkob>*{vertical-align:middle}
2
3
  ._1k0l7vkz>*{line-height:1pc}
3
- ._d0dzdf4r>*{display:inline-block!important}
4
+ ._d0dzdf4r>*{display:inline-block!important}
5
+ ._p12f1osq{max-width:100%}
@@ -34,6 +34,9 @@ var MAX_WIDTH = 200;
34
34
  */
35
35
  var inlineBlockStyles = null;
36
36
 
37
+ // Bound the Lozenge to its parent while keeping short statuses content-sized.
38
+ var constrainedToParentStyles = null;
39
+
37
40
  // eg. Version/4.0 Chrome/95.0.4638.50
38
41
  var isAndroidChromium = typeof window !== 'undefined' && /Version\/.* Chrome\/.*/.test(window.navigator.userAgent);
39
42
  var StatusInternal = /*#__PURE__*/function (_PureComponent) {
@@ -91,7 +94,8 @@ var StatusInternal = /*#__PURE__*/function (_PureComponent) {
91
94
  style = _this$props.style,
92
95
  role = _this$props.role,
93
96
  onClick = _this$props.onClick,
94
- isBold = _this$props.isBold;
97
+ isBold = _this$props.isBold,
98
+ isConstrainedToParent = _this$props.isConstrainedToParent;
95
99
  if (text.trim().length === 0) {
96
100
  return null;
97
101
  }
@@ -99,7 +103,7 @@ var StatusInternal = /*#__PURE__*/function (_PureComponent) {
99
103
  // Note: ommitted data-local-id attribute to avoid copying/pasting the same localId
100
104
  return /*#__PURE__*/React.createElement("span", {
101
105
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
102
- className: ax([isAndroidChromium && "_d0dzdf4r _1k0l7vkz _1frxnkob", "status-lozenge-span"]),
106
+ className: ax([isAndroidChromium && "_d0dzdf4r _1k0l7vkz _1frxnkob", isConstrainedToParent && "_1e0c1o8l _p12f1osq", "status-lozenge-span"]),
103
107
  onClick: onClick,
104
108
  onKeyDown: onClick ? this.handleKeyDown : undefined,
105
109
  onMouseEnter: this.handleMouseEnter,
@@ -1,4 +1,10 @@
1
- ._n6341ihb [data-ds--text-field--container]{border-color:var(--ds-border-bold,#7d818a)}._18u0u2gc{margin-left:var(--ds-space-100,8px)}
1
+ ._n6341ihb [data-ds--text-field--container]{border-color:var(--ds-border-bold,#7d818a)}._15mtglyw{overscroll-behavior-y:none}
2
+ ._18m91wug{overflow-y:auto}
3
+ ._18u0u2gc{margin-left:var(--ds-space-100,8px)}
4
+ ._19pk1b66{margin-top:var(--ds-space-050,4px)}
2
5
  ._19pkidpf{margin-top:0}
6
+ ._1bsb1osq{width:100%}
3
7
  ._2hwxu2gc{margin-right:var(--ds-space-100,8px)}
8
+ ._c71l4d55{max-height:232px}
9
+ ._ca0q1b66{padding-top:var(--ds-space-050,4px)}
4
10
  ._otyridpf{margin-bottom:0}
@@ -15,6 +15,9 @@ import { injectIntl } from 'react-intl';
15
15
  import ColorPalette from './internal/color-palette';
16
16
  import { messages } from './i18n';
17
17
  var fieldTextWrapperStyles = null;
18
+
19
+ // Keep the existing content position while reserving space inside the scrollport for focus rings.
20
+ var scrollContainerStyles = null;
18
21
  var Picker = /*#__PURE__*/function (_PureComponent) {
19
22
  function Picker() {
20
23
  var _this;
@@ -61,7 +64,14 @@ var Picker = /*#__PURE__*/function (_PureComponent) {
61
64
  selectedColor = _this$props.selectedColor,
62
65
  onColorClick = _this$props.onColorClick,
63
66
  onColorHover = _this$props.onColorHover,
64
- intl = _this$props.intl;
67
+ intl = _this$props.intl,
68
+ scrollableContent = _this$props.scrollableContent;
69
+ var colorPalette = /*#__PURE__*/React.createElement(ColorPalette, {
70
+ key: this.colorPaletteKey,
71
+ onClick: onColorClick,
72
+ onHover: onColorHover,
73
+ selectedColor: selectedColor
74
+ });
65
75
 
66
76
  // Using <React.Fragment> instead of [] to workaround Enzyme
67
77
  // (https://github.com/airbnb/enzyme/issues/1149)
@@ -77,12 +87,10 @@ var Picker = /*#__PURE__*/function (_PureComponent) {
77
87
  spellCheck: false,
78
88
  autoComplete: "off",
79
89
  "aria-label": intl.formatMessage(messages.statusInputLabel)
80
- })), /*#__PURE__*/React.createElement(ColorPalette, {
81
- key: this.colorPaletteKey,
82
- onClick: onColorClick,
83
- onHover: onColorHover,
84
- selectedColor: selectedColor
85
- }));
90
+ })), scrollableContent ? /*#__PURE__*/React.createElement("div", {
91
+ "data-status-picker-scroll-container": true,
92
+ className: ax(["_19pk1b66 _c71l4d55 _18m91wug _15mtglyw _ca0q1b66 _1bsb1osq"])
93
+ }, colorPalette, scrollableContent) : colorPalette);
86
94
  }
87
95
  }, {
88
96
  key: "componentDidUpdate",
@@ -3,7 +3,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
4
  export var ELEMENTS_CHANNEL = 'fabric-elements';
5
5
  var packageName = "@atlaskit/status";
6
- var packageVersion = "5.9.0";
6
+ var packageVersion = "5.9.2";
7
7
  export var createStatusAnalyticsAndFire = function createStatusAnalyticsAndFire(createAnalyticsEvent) {
8
8
  return function (payload) {
9
9
  var statusPayload = _objectSpread(_objectSpread({}, payload), {}, {
@@ -9,6 +9,7 @@ export type StatusStyle = 'bold' | 'subtle';
9
9
  export interface OwnProps {
10
10
  color: Color;
11
11
  isBold?: boolean;
12
+ isConstrainedToParent?: boolean;
12
13
  localId?: string;
13
14
  onClick?: (event: React.SyntheticEvent<any>) => void;
14
15
  onHover?: () => void;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { type ReactNode } from 'react';
2
2
  import { type WithIntlProps, type WrappedComponentProps } from 'react-intl';
3
3
  import { type Color } from './Status';
4
4
  export type ColorType = Color;
@@ -8,6 +8,7 @@ export interface Props {
8
8
  onColorHover?: (value: ColorType) => void;
9
9
  onEnter: () => void;
10
10
  onTextChanged: (value: string) => void;
11
+ scrollableContent?: ReactNode;
11
12
  selectedColor: ColorType;
12
13
  text: string;
13
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/status",
3
- "version": "5.9.1",
3
+ "version": "5.9.3",
4
4
  "description": "Fabric Status React Components",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -51,8 +51,8 @@
51
51
  "@atlaskit/primitives": "^22.5.0",
52
52
  "@atlaskit/react-compiler-gating": "^0.2.0",
53
53
  "@atlaskit/textfield": "^10.2.0",
54
- "@atlaskit/tmp-editor-statsig": "^169.0.0",
55
- "@atlaskit/tokens": "^16.10.0",
54
+ "@atlaskit/tmp-editor-statsig": "^171.0.0",
55
+ "@atlaskit/tokens": "^16.11.0",
56
56
  "@babel/runtime": "^7.0.0",
57
57
  "@compiled/react": "^1.0.2"
58
58
  },