@atlaskit/popup 4.20.1 → 4.20.2

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,13 @@
1
1
  # @atlaskit/popup
2
2
 
3
+ ## 4.20.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`cc4a66306965d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cc4a66306965d) -
8
+ Cleanup feature gate `platform_dst_nav4_flyout_menu_slots_close_button`. Flyout menu slot
9
+ subcomponents (header, body, footer) and close button are now permanently enabled.
10
+
3
11
  ## 4.20.1
4
12
 
5
13
  ### Patch Changes
@@ -40,7 +40,7 @@ var PopupTrigger = exports.PopupTrigger = function PopupTrigger(_ref) {
40
40
  var triggerRef = (0, _react.useCallback)(function (node) {
41
41
  triggerRefObject.current = node;
42
42
  }, [triggerRefObject]);
43
- var ariaHasPopup = role === 'dialog' && (0, _platformFeatureFlags.fg)('platform_dst_nav4_flyout_menu_slots_close_button') ? 'dialog' : true;
43
+ var ariaHasPopup = role === 'dialog' ? 'dialog' : true;
44
44
 
45
45
  // When the top-layer flag is on, bypass Popper's <Reference> entirely.
46
46
  // We only need to set triggerRefObject.current — no Popper ref merging needed.
@@ -15,7 +15,6 @@
15
15
  ._bfhk1i5c{background-color:var(--ds-blanket,#050c1f75)}
16
16
  ._c71l1ei0{max-height:calc(100vh - var(--ds-space-050, 4px)*2)}
17
17
  ._c71l1kw7{max-height:inherit}
18
- ._c71ldtre{max-height:50vh}
19
18
  ._kqsw1n9t{position:fixed}
20
19
  ._syazi7uo{color:var(--ds-text,#292a2e)}
21
20
  ._vchhusvi{box-sizing:border-box}
@@ -38,7 +38,6 @@ var wrapperStyles = {
38
38
  var scrollableStyles = null;
39
39
  var blanketStyles = null;
40
40
  var modalStyles = null;
41
- var newModalStyles = null;
42
41
  var focusRingStyles = {
43
42
  root: "_mizu1v1w _1ah3dkaa _ra3xnqa1 _128mdkaa _1cvmnqa1 _4davt94y"
44
43
  };
@@ -103,7 +102,7 @@ var DefaultPopupComponent = /*#__PURE__*/(0, _react.forwardRef)(function (props,
103
102
  htmlAttributes = (0, _objectWithoutProperties2.default)(props, _excluded);
104
103
  return /*#__PURE__*/React.createElement("div", (0, _extends2.default)({
105
104
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
106
- className: (0, _runtime.ax)([wrapperStyles.root, (0, _platformFeatureFlags.fg)('platform-dst-shape-theme-default') && wrapperStyles.rootT26Shape, appearance === 'UNSAFE_modal-below-sm' && !(0, _platformFeatureFlags.fg)('platform_dst_nav4_flyout_menu_slots_close_button') && "_dk5d1b66 _c71ldtre _kqsw1n9t _152t1b66", appearance === 'UNSAFE_modal-below-sm' && (0, _platformFeatureFlags.fg)('platform_dst_nav4_flyout_menu_slots_close_button') && "_dk5d1b66 _c71l1ei0 _kqsw1n9t _152t1b66", (!shouldRenderToParent || shouldFitViewport) && "_1reo1wug _18m91wug", shouldFitContainer && "_1bsb1osq", className])
105
+ className: (0, _runtime.ax)([wrapperStyles.root, (0, _platformFeatureFlags.fg)('platform-dst-shape-theme-default') && wrapperStyles.rootT26Shape, appearance === 'UNSAFE_modal-below-sm' && "_dk5d1b66 _c71l1ei0 _kqsw1n9t _152t1b66", (!shouldRenderToParent || shouldFitViewport) && "_1reo1wug _18m91wug", shouldFitContainer && "_1bsb1osq", className])
107
106
  }, htmlAttributes, {
108
107
  ref: !(0, _platformFeatureFlags.fg)('platform-dst-motion-uplift-popup') ? ref : undefined
109
108
  }), children);
@@ -33,7 +33,7 @@ export const PopupTrigger = ({
33
33
  const triggerRef = useCallback(node => {
34
34
  triggerRefObject.current = node;
35
35
  }, [triggerRefObject]);
36
- const ariaHasPopup = role === 'dialog' && fg('platform_dst_nav4_flyout_menu_slots_close_button') ? 'dialog' : true;
36
+ const ariaHasPopup = role === 'dialog' ? 'dialog' : true;
37
37
 
38
38
  // When the top-layer flag is on, bypass Popper's <Reference> entirely.
39
39
  // We only need to set triggerRefObject.current — no Popper ref merging needed.
@@ -15,7 +15,6 @@
15
15
  ._bfhk1i5c{background-color:var(--ds-blanket,#050c1f75)}
16
16
  ._c71l1ei0{max-height:calc(100vh - var(--ds-space-050, 4px)*2)}
17
17
  ._c71l1kw7{max-height:inherit}
18
- ._c71ldtre{max-height:50vh}
19
18
  ._kqsw1n9t{position:fixed}
20
19
  ._syazi7uo{color:var(--ds-text,#292a2e)}
21
20
  ._vchhusvi{box-sizing:border-box}
@@ -22,7 +22,6 @@ const wrapperStyles = {
22
22
  const scrollableStyles = null;
23
23
  const blanketStyles = null;
24
24
  const modalStyles = null;
25
- const newModalStyles = null;
26
25
  const focusRingStyles = {
27
26
  root: "_mizu1v1w _1ah3dkaa _ra3xnqa1 _128mdkaa _1cvmnqa1 _4davt94y"
28
27
  };
@@ -89,7 +88,7 @@ const DefaultPopupComponent = /*#__PURE__*/forwardRef((props, ref) => {
89
88
  } = props;
90
89
  return /*#__PURE__*/React.createElement("div", _extends({
91
90
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
92
- className: ax([wrapperStyles.root, fg('platform-dst-shape-theme-default') && wrapperStyles.rootT26Shape, appearance === 'UNSAFE_modal-below-sm' && !fg('platform_dst_nav4_flyout_menu_slots_close_button') && "_dk5d1b66 _c71ldtre _kqsw1n9t _152t1b66", appearance === 'UNSAFE_modal-below-sm' && fg('platform_dst_nav4_flyout_menu_slots_close_button') && "_dk5d1b66 _c71l1ei0 _kqsw1n9t _152t1b66", (!shouldRenderToParent || shouldFitViewport) && "_1reo1wug _18m91wug", shouldFitContainer && "_1bsb1osq", className])
91
+ className: ax([wrapperStyles.root, fg('platform-dst-shape-theme-default') && wrapperStyles.rootT26Shape, appearance === 'UNSAFE_modal-below-sm' && "_dk5d1b66 _c71l1ei0 _kqsw1n9t _152t1b66", (!shouldRenderToParent || shouldFitViewport) && "_1reo1wug _18m91wug", shouldFitContainer && "_1bsb1osq", className])
93
92
  }, htmlAttributes, {
94
93
  ref: !fg('platform-dst-motion-uplift-popup') ? ref : undefined
95
94
  }), children);
@@ -32,7 +32,7 @@ export var PopupTrigger = function PopupTrigger(_ref) {
32
32
  var triggerRef = useCallback(function (node) {
33
33
  triggerRefObject.current = node;
34
34
  }, [triggerRefObject]);
35
- var ariaHasPopup = role === 'dialog' && fg('platform_dst_nav4_flyout_menu_slots_close_button') ? 'dialog' : true;
35
+ var ariaHasPopup = role === 'dialog' ? 'dialog' : true;
36
36
 
37
37
  // When the top-layer flag is on, bypass Popper's <Reference> entirely.
38
38
  // We only need to set triggerRefObject.current — no Popper ref merging needed.
@@ -15,7 +15,6 @@
15
15
  ._bfhk1i5c{background-color:var(--ds-blanket,#050c1f75)}
16
16
  ._c71l1ei0{max-height:calc(100vh - var(--ds-space-050, 4px)*2)}
17
17
  ._c71l1kw7{max-height:inherit}
18
- ._c71ldtre{max-height:50vh}
19
18
  ._kqsw1n9t{position:fixed}
20
19
  ._syazi7uo{color:var(--ds-text,#292a2e)}
21
20
  ._vchhusvi{box-sizing:border-box}
@@ -29,7 +29,6 @@ var wrapperStyles = {
29
29
  var scrollableStyles = null;
30
30
  var blanketStyles = null;
31
31
  var modalStyles = null;
32
- var newModalStyles = null;
33
32
  var focusRingStyles = {
34
33
  root: "_mizu1v1w _1ah3dkaa _ra3xnqa1 _128mdkaa _1cvmnqa1 _4davt94y"
35
34
  };
@@ -94,7 +93,7 @@ var DefaultPopupComponent = /*#__PURE__*/forwardRef(function (props, ref) {
94
93
  htmlAttributes = _objectWithoutProperties(props, _excluded);
95
94
  return /*#__PURE__*/React.createElement("div", _extends({
96
95
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
97
- className: ax([wrapperStyles.root, fg('platform-dst-shape-theme-default') && wrapperStyles.rootT26Shape, appearance === 'UNSAFE_modal-below-sm' && !fg('platform_dst_nav4_flyout_menu_slots_close_button') && "_dk5d1b66 _c71ldtre _kqsw1n9t _152t1b66", appearance === 'UNSAFE_modal-below-sm' && fg('platform_dst_nav4_flyout_menu_slots_close_button') && "_dk5d1b66 _c71l1ei0 _kqsw1n9t _152t1b66", (!shouldRenderToParent || shouldFitViewport) && "_1reo1wug _18m91wug", shouldFitContainer && "_1bsb1osq", className])
96
+ className: ax([wrapperStyles.root, fg('platform-dst-shape-theme-default') && wrapperStyles.rootT26Shape, appearance === 'UNSAFE_modal-below-sm' && "_dk5d1b66 _c71l1ei0 _kqsw1n9t _152t1b66", (!shouldRenderToParent || shouldFitViewport) && "_1reo1wug _18m91wug", shouldFitContainer && "_1bsb1osq", className])
98
97
  }, htmlAttributes, {
99
98
  ref: !fg('platform-dst-motion-uplift-popup') ? ref : undefined
100
99
  }), children);
@@ -94,8 +94,7 @@ export interface PopupComponentProps {
94
94
  /**
95
95
  * The "default" appearance is used for standard popups.
96
96
  * The "UNSAFE_modal-below-sm" appearance makes the popup appear as a modal when the viewport is smaller than "sm".
97
- * When the feature gate `platform_dst_nav4_flyout_menu_slots_close_button` is enabled, the appearance should only
98
- * be set to "UNSAFE_modal-below-sm" if the provided popup includes a close button.
97
+ * The appearance should only be set to "UNSAFE_modal-below-sm" if the provided popup includes a close button.
99
98
  */
100
99
  appearance?: 'default' | 'UNSAFE_modal-below-sm';
101
100
  /**
@@ -94,8 +94,7 @@ export interface PopupComponentProps {
94
94
  /**
95
95
  * The "default" appearance is used for standard popups.
96
96
  * The "UNSAFE_modal-below-sm" appearance makes the popup appear as a modal when the viewport is smaller than "sm".
97
- * When the feature gate `platform_dst_nav4_flyout_menu_slots_close_button` is enabled, the appearance should only
98
- * be set to "UNSAFE_modal-below-sm" if the provided popup includes a close button.
97
+ * The appearance should only be set to "UNSAFE_modal-below-sm" if the provided popup includes a close button.
99
98
  */
100
99
  appearance?: 'default' | 'UNSAFE_modal-below-sm';
101
100
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/popup",
3
- "version": "4.20.1",
3
+ "version": "4.20.2",
4
4
  "description": "A popup displays brief content in an overlay.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -72,7 +72,7 @@
72
72
  "@atlaskit/icon": "^35.0.0",
73
73
  "@atlaskit/link": "^3.4.0",
74
74
  "@atlaskit/modal-dialog": "^15.1.0",
75
- "@atlaskit/section-message": "^8.12.0",
75
+ "@atlaskit/section-message": "^8.13.0",
76
76
  "@atlaskit/textfield": "^8.3.0",
77
77
  "@atlaskit/toggle": "^15.6.0",
78
78
  "@atlassian/feature-flags-test-utils": "^1.1.0",
@@ -85,6 +85,7 @@
85
85
  "ast-types": "^0.13.3",
86
86
  "jscodeshift": "^17.0.0",
87
87
  "raf-stub": "^2.0.1",
88
+ "react": "^18.2.0",
88
89
  "react-dom": "^18.2.0"
89
90
  },
90
91
  "keywords": [
@@ -131,9 +132,6 @@
131
132
  "platform-dst-shape-theme-default": {
132
133
  "type": "boolean"
133
134
  },
134
- "platform_dst_nav4_flyout_menu_slots_close_button": {
135
- "type": "boolean"
136
- },
137
135
  "platform_dst_nested_escape": {
138
136
  "type": "boolean"
139
137
  },