@atlaskit/modal-dialog 17.2.1 → 17.2.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/modal-dialog
2
2
 
3
+ ## 17.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`6a5baf4c2b1ac`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6a5baf4c2b1ac) -
8
+ Behind `platform-dst-top-layer`, a modal with no `height` sizes to its content again. Before, a
9
+ child with `flex: 1` collapsed the modal to 0px.
10
+
3
11
  ## 17.2.1
4
12
 
5
13
  ### Patch Changes
@@ -1,9 +1,10 @@
1
1
  import { type JSCodeshift } from 'jscodeshift';
2
2
  import { type Collection } from 'jscodeshift/src/Collection';
3
3
 
4
+ import { getJSXAttributesByName } from '@atlaskit/codemod-utils/support';
5
+
4
6
  import { addCommentToStartOfFile } from './add-comment-to-start-of-file';
5
7
  import { getDefaultSpecifier } from './get-default-specifier';
6
- import { getJSXAttributesByName } from './get-jsx-attributes-by-name';
7
8
  import { getNamedSpecifier } from './get-named-specifier';
8
9
 
9
10
  export const createRemoveFuncIfBooleanFor: (
@@ -1,8 +1,9 @@
1
1
  import { type JSCodeshift, type VariableDeclaration } from 'jscodeshift';
2
2
  import { type Collection } from 'jscodeshift/src/Collection';
3
3
 
4
+ import { getJSXAttributesByName } from '@atlaskit/codemod-utils/support';
5
+
4
6
  import { findIdentifierAndReplaceAttribute } from './find-identifier-and-replace-attribute';
5
- import { getJSXAttributesByName } from './get-jsx-attributes-by-name';
6
7
  import { getNamedSpecifier } from './get-named-specifier';
7
8
  import { hasVariableAssignment } from './has-variable-assignment';
8
9
 
@@ -7,22 +7,25 @@
7
7
  ._1bsbauwl{width:100vw}
8
8
  ._1dg11kw7>form:only-child{flex-direction:inherit}
9
9
  ._1e02ze3t{inset-inline-start:var(--ds-space-0,0)}
10
+ ._1e0c11p5{display:grid}
10
11
  ._1e0c1txw{display:flex}
11
12
  ._1mq81kw7>form:only-child{display:inherit}
12
13
  ._1q1l1bhr{--ds-elevation-surface-current:var(--ds-surface-overlay,#fff)}
13
14
  ._1reoewfl{overflow-x:visible}
14
15
  ._2hwxidpf{margin-right:0}
15
16
  ._2lx21bp4{flex-direction:column}
17
+ ._2z05i47z{grid-template-rows:minmax(0,1fr)}
16
18
  ._4t3i1kxc{height:100vh}
17
19
  ._8am5i4x0{-webkit-overflow-scrolling:touch}
18
20
  ._bfhk1bhr{background-color:var(--ds-surface-overlay,#fff)}
19
21
  ._ds62idpf>form:only-child{min-height:0}
20
22
  ._kqsw1n9t{position:fixed}
21
23
  ._lcxv1wug{pointer-events:auto}
24
+ ._lcxvglyw{pointer-events:none}
22
25
  ._ln19p27b{scrollbar-gutter:stable}
23
26
  ._m01u1kw7>form:only-child{max-height:inherit}
24
27
  ._otyridpf{margin-bottom:0}._128mdkaa:focus-visible{outline-width:var(--ds-border-width-focused,2px)}
25
28
  ._1ah3dkaa:focus-visible{outline-offset:var(--ds-border-width-focused,2px)}
26
29
  ._mizu1v1w:focus-visible{outline-color:var(--ds-border-focused,#4688ec)}
27
30
  ._ra3xnqa1:focus-visible{outline-style:solid}
28
- @media (min-width:30rem){._1jyk17ks{height:var(--modal-dialog-height)}._g7116m9r{width:var(--modal-dialog-width)}._we1i18uh{max-width:calc(100vw - 90pt)}._e8uo221b{max-height:calc(100vh - 90pt)}._1sg41wqb{margin-top:60px}._maxs1wug{margin-right:auto}._1jvh1wqb{margin-bottom:60px}._1uca1wug{margin-left:auto}._1mpv184x{min-height:min-content}._e8uo1ris{max-height:max-content}._epkxpb1k{border-radius:var(--ds-radius-xlarge,9pt)}._zg7p130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}}
31
+ @media (min-width:30rem){._1jyk17ks{height:var(--modal-dialog-height)}._g7116m9r{width:var(--modal-dialog-width)}._we1i18uh{max-width:calc(100vw - 90pt)}._e8uo221b{max-height:calc(100vh - 90pt)}._1sg41wqb{margin-top:60px}._maxs1wug{margin-right:auto}._1jvh1wqb{margin-bottom:60px}._1uca1wug{margin-left:auto}._1mpv184x{min-height:min-content}._epkxpb1k{border-radius:var(--ds-radius-xlarge,9pt)}._zg7p130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}}
@@ -73,7 +73,17 @@ var topLayerScrollModeStyles = {
73
73
  'viewport-scroll': "_4t3i1kxc _1sg41wqb _maxs1wug _1jvh1wqb _1uca1wug _1mpv184x _1jyk17ks _g7116m9r _we1i18uh",
74
74
  'body-scroll': "_1bsbauwl _4t3i1kxc _1jyk17ks _g7116m9r _we1i18uh _e8uo221b"
75
75
  };
76
- var topLayerAutoHeightStyles = null;
76
+
77
+ /**
78
+ * Sizing container around the surface. As a stretched grid item, the surface sizes to its content
79
+ * and has a definite height. A fixed height with `max-height: max-content` collapses with a
80
+ * `flex: 1` child. `pointer-events: none` keeps presses beside the surface as backdrop presses.
81
+ */
82
+ var sizingContainerStyles = {
83
+ 'body-scroll': "_1e0c11p5 _2z05i47z _lcxvglyw _e8uo221b",
84
+ 'viewport-scroll': "_1e0c11p5 _lcxvglyw",
85
+ 'full-screen': "_1e0c11p5 _lcxvglyw"
86
+ };
77
87
  var allowlistElements = function allowlistElements(element, callback) {
78
88
  // Allow focus outside modal when AUI dialog is visible
79
89
  // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- legacy FocusLock allowlist
@@ -95,7 +105,7 @@ function useModalCloseHandler(providedOnClose) {
95
105
  action: 'closed',
96
106
  componentName: 'modalDialog',
97
107
  packageName: "@atlaskit/modal-dialog",
98
- packageVersion: "17.2.0"
108
+ packageVersion: "17.2.1"
99
109
  });
100
110
  }
101
111
  function getScrollMode(_ref) {
@@ -134,11 +144,9 @@ function getTopLayerSurfaceWidth(input) {
134
144
  }
135
145
  function getTopLayerSurfaceHeight(input) {
136
146
  if (!input) {
137
- // Although this value would ordinarily fill the viewport height,
138
- // there is also a `max-height: max-content` applied to keep it constrained.
139
- // But we need to provide the modal with a fixed height (non-keyword, non-percentage)
140
- // in order for child elements with 100% height to work correctly.
141
- return 'calc(100vh - 120px)';
147
+ // Size to the content. The sizing container gives the surface a definite height, so
148
+ // children with `height: 100%` still fill it. See `sizingContainerStyles`.
149
+ return 'auto';
142
150
  }
143
151
  if (typeof input === 'number') {
144
152
  return "".concat(input, "px");
@@ -353,17 +361,19 @@ function ModalWrapperTopLayer(props) {
353
361
  }), /*#__PURE__*/React.createElement(_dialogScrollLock.DialogScrollLock, {
354
362
  isOpen: true
355
363
  }), /*#__PURE__*/React.createElement("div", {
364
+ className: (0, _runtime.ax)([sizingContainerStyles[scrollMode]])
365
+ }, /*#__PURE__*/React.createElement("div", {
356
366
  ref: contentRef,
357
367
  style: {
358
368
  '--modal-dialog-height': getTopLayerSurfaceHeight(height),
359
369
  '--modal-dialog-width': getTopLayerSurfaceWidth(width)
360
370
  },
361
- className: (0, _runtime.ax)([surfaceStyles.root, !isFullScreen && surfaceStyles.borderRadius, topLayerScrollModeStyles[scrollMode], !height && !isFullScreen && "_e8uo1ris"])
371
+ className: (0, _runtime.ax)([surfaceStyles.root, !isFullScreen && surfaceStyles.borderRadius, topLayerScrollModeStyles[scrollMode]])
362
372
  }, /*#__PURE__*/React.createElement(_context.ModalContext.Provider, {
363
373
  value: modalDialogContext
364
374
  }, /*#__PURE__*/React.createElement(_scrollContext.ScrollContext.Provider, {
365
375
  value: shouldScrollInViewport
366
- }, /*#__PURE__*/React.createElement(_motionPresenceBoundary.default, null, children)))));
376
+ }, /*#__PURE__*/React.createElement(_motionPresenceBoundary.default, null, children))))));
367
377
  }
368
378
 
369
379
  /**
@@ -7,22 +7,25 @@
7
7
  ._1bsbauwl{width:100vw}
8
8
  ._1dg11kw7>form:only-child{flex-direction:inherit}
9
9
  ._1e02ze3t{inset-inline-start:var(--ds-space-0,0)}
10
+ ._1e0c11p5{display:grid}
10
11
  ._1e0c1txw{display:flex}
11
12
  ._1mq81kw7>form:only-child{display:inherit}
12
13
  ._1q1l1bhr{--ds-elevation-surface-current:var(--ds-surface-overlay,#fff)}
13
14
  ._1reoewfl{overflow-x:visible}
14
15
  ._2hwxidpf{margin-right:0}
15
16
  ._2lx21bp4{flex-direction:column}
17
+ ._2z05i47z{grid-template-rows:minmax(0,1fr)}
16
18
  ._4t3i1kxc{height:100vh}
17
19
  ._8am5i4x0{-webkit-overflow-scrolling:touch}
18
20
  ._bfhk1bhr{background-color:var(--ds-surface-overlay,#fff)}
19
21
  ._ds62idpf>form:only-child{min-height:0}
20
22
  ._kqsw1n9t{position:fixed}
21
23
  ._lcxv1wug{pointer-events:auto}
24
+ ._lcxvglyw{pointer-events:none}
22
25
  ._ln19p27b{scrollbar-gutter:stable}
23
26
  ._m01u1kw7>form:only-child{max-height:inherit}
24
27
  ._otyridpf{margin-bottom:0}._128mdkaa:focus-visible{outline-width:var(--ds-border-width-focused,2px)}
25
28
  ._1ah3dkaa:focus-visible{outline-offset:var(--ds-border-width-focused,2px)}
26
29
  ._mizu1v1w:focus-visible{outline-color:var(--ds-border-focused,#4688ec)}
27
30
  ._ra3xnqa1:focus-visible{outline-style:solid}
28
- @media (min-width:30rem){._1jyk17ks{height:var(--modal-dialog-height)}._g7116m9r{width:var(--modal-dialog-width)}._we1i18uh{max-width:calc(100vw - 90pt)}._e8uo221b{max-height:calc(100vh - 90pt)}._1sg41wqb{margin-top:60px}._maxs1wug{margin-right:auto}._1jvh1wqb{margin-bottom:60px}._1uca1wug{margin-left:auto}._1mpv184x{min-height:min-content}._e8uo1ris{max-height:max-content}._epkxpb1k{border-radius:var(--ds-radius-xlarge,9pt)}._zg7p130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}}
31
+ @media (min-width:30rem){._1jyk17ks{height:var(--modal-dialog-height)}._g7116m9r{width:var(--modal-dialog-width)}._we1i18uh{max-width:calc(100vw - 90pt)}._e8uo221b{max-height:calc(100vh - 90pt)}._1sg41wqb{margin-top:60px}._maxs1wug{margin-right:auto}._1jvh1wqb{margin-bottom:60px}._1uca1wug{margin-left:auto}._1mpv184x{min-height:min-content}._epkxpb1k{border-radius:var(--ds-radius-xlarge,9pt)}._zg7p130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}}
@@ -63,7 +63,17 @@ const topLayerScrollModeStyles = {
63
63
  'viewport-scroll': "_4t3i1kxc _1sg41wqb _maxs1wug _1jvh1wqb _1uca1wug _1mpv184x _1jyk17ks _g7116m9r _we1i18uh",
64
64
  'body-scroll': "_1bsbauwl _4t3i1kxc _1jyk17ks _g7116m9r _we1i18uh _e8uo221b"
65
65
  };
66
- const topLayerAutoHeightStyles = null;
66
+
67
+ /**
68
+ * Sizing container around the surface. As a stretched grid item, the surface sizes to its content
69
+ * and has a definite height. A fixed height with `max-height: max-content` collapses with a
70
+ * `flex: 1` child. `pointer-events: none` keeps presses beside the surface as backdrop presses.
71
+ */
72
+ const sizingContainerStyles = {
73
+ 'body-scroll': "_1e0c11p5 _2z05i47z _lcxvglyw _e8uo221b",
74
+ 'viewport-scroll': "_1e0c11p5 _lcxvglyw",
75
+ 'full-screen': "_1e0c11p5 _lcxvglyw"
76
+ };
67
77
  const allowlistElements = (element, callback) => {
68
78
  // Allow focus outside modal when AUI dialog is visible
69
79
  // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- legacy FocusLock allowlist
@@ -85,7 +95,7 @@ function useModalCloseHandler(providedOnClose) {
85
95
  action: 'closed',
86
96
  componentName: 'modalDialog',
87
97
  packageName: "@atlaskit/modal-dialog",
88
- packageVersion: "17.2.0"
98
+ packageVersion: "17.2.1"
89
99
  });
90
100
  }
91
101
  function getScrollMode({
@@ -125,11 +135,9 @@ function getTopLayerSurfaceWidth(input) {
125
135
  }
126
136
  function getTopLayerSurfaceHeight(input) {
127
137
  if (!input) {
128
- // Although this value would ordinarily fill the viewport height,
129
- // there is also a `max-height: max-content` applied to keep it constrained.
130
- // But we need to provide the modal with a fixed height (non-keyword, non-percentage)
131
- // in order for child elements with 100% height to work correctly.
132
- return 'calc(100vh - 120px)';
138
+ // Size to the content. The sizing container gives the surface a definite height, so
139
+ // children with `height: 100%` still fill it. See `sizingContainerStyles`.
140
+ return 'auto';
133
141
  }
134
142
  if (typeof input === 'number') {
135
143
  return `${input}px`;
@@ -341,17 +349,19 @@ function ModalWrapperTopLayer(props) {
341
349
  }), /*#__PURE__*/React.createElement(DialogScrollLock, {
342
350
  isOpen: true
343
351
  }), /*#__PURE__*/React.createElement("div", {
352
+ className: ax([sizingContainerStyles[scrollMode]])
353
+ }, /*#__PURE__*/React.createElement("div", {
344
354
  ref: contentRef,
345
355
  style: {
346
356
  '--modal-dialog-height': getTopLayerSurfaceHeight(height),
347
357
  '--modal-dialog-width': getTopLayerSurfaceWidth(width)
348
358
  },
349
- className: ax([surfaceStyles.root, !isFullScreen && surfaceStyles.borderRadius, topLayerScrollModeStyles[scrollMode], !height && !isFullScreen && "_e8uo1ris"])
359
+ className: ax([surfaceStyles.root, !isFullScreen && surfaceStyles.borderRadius, topLayerScrollModeStyles[scrollMode]])
350
360
  }, /*#__PURE__*/React.createElement(ModalContext.Provider, {
351
361
  value: modalDialogContext
352
362
  }, /*#__PURE__*/React.createElement(ScrollContext.Provider, {
353
363
  value: shouldScrollInViewport
354
- }, /*#__PURE__*/React.createElement(MotionPresenceBoundary, null, children)))));
364
+ }, /*#__PURE__*/React.createElement(MotionPresenceBoundary, null, children))))));
355
365
  }
356
366
 
357
367
  /**
@@ -7,22 +7,25 @@
7
7
  ._1bsbauwl{width:100vw}
8
8
  ._1dg11kw7>form:only-child{flex-direction:inherit}
9
9
  ._1e02ze3t{inset-inline-start:var(--ds-space-0,0)}
10
+ ._1e0c11p5{display:grid}
10
11
  ._1e0c1txw{display:flex}
11
12
  ._1mq81kw7>form:only-child{display:inherit}
12
13
  ._1q1l1bhr{--ds-elevation-surface-current:var(--ds-surface-overlay,#fff)}
13
14
  ._1reoewfl{overflow-x:visible}
14
15
  ._2hwxidpf{margin-right:0}
15
16
  ._2lx21bp4{flex-direction:column}
17
+ ._2z05i47z{grid-template-rows:minmax(0,1fr)}
16
18
  ._4t3i1kxc{height:100vh}
17
19
  ._8am5i4x0{-webkit-overflow-scrolling:touch}
18
20
  ._bfhk1bhr{background-color:var(--ds-surface-overlay,#fff)}
19
21
  ._ds62idpf>form:only-child{min-height:0}
20
22
  ._kqsw1n9t{position:fixed}
21
23
  ._lcxv1wug{pointer-events:auto}
24
+ ._lcxvglyw{pointer-events:none}
22
25
  ._ln19p27b{scrollbar-gutter:stable}
23
26
  ._m01u1kw7>form:only-child{max-height:inherit}
24
27
  ._otyridpf{margin-bottom:0}._128mdkaa:focus-visible{outline-width:var(--ds-border-width-focused,2px)}
25
28
  ._1ah3dkaa:focus-visible{outline-offset:var(--ds-border-width-focused,2px)}
26
29
  ._mizu1v1w:focus-visible{outline-color:var(--ds-border-focused,#4688ec)}
27
30
  ._ra3xnqa1:focus-visible{outline-style:solid}
28
- @media (min-width:30rem){._1jyk17ks{height:var(--modal-dialog-height)}._g7116m9r{width:var(--modal-dialog-width)}._we1i18uh{max-width:calc(100vw - 90pt)}._e8uo221b{max-height:calc(100vh - 90pt)}._1sg41wqb{margin-top:60px}._maxs1wug{margin-right:auto}._1jvh1wqb{margin-bottom:60px}._1uca1wug{margin-left:auto}._1mpv184x{min-height:min-content}._e8uo1ris{max-height:max-content}._epkxpb1k{border-radius:var(--ds-radius-xlarge,9pt)}._zg7p130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}}
31
+ @media (min-width:30rem){._1jyk17ks{height:var(--modal-dialog-height)}._g7116m9r{width:var(--modal-dialog-width)}._we1i18uh{max-width:calc(100vw - 90pt)}._e8uo221b{max-height:calc(100vh - 90pt)}._1sg41wqb{margin-top:60px}._maxs1wug{margin-right:auto}._1jvh1wqb{margin-bottom:60px}._1uca1wug{margin-left:auto}._1mpv184x{min-height:min-content}._epkxpb1k{border-radius:var(--ds-radius-xlarge,9pt)}._zg7p130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}}
@@ -64,7 +64,17 @@ var topLayerScrollModeStyles = {
64
64
  'viewport-scroll': "_4t3i1kxc _1sg41wqb _maxs1wug _1jvh1wqb _1uca1wug _1mpv184x _1jyk17ks _g7116m9r _we1i18uh",
65
65
  'body-scroll': "_1bsbauwl _4t3i1kxc _1jyk17ks _g7116m9r _we1i18uh _e8uo221b"
66
66
  };
67
- var topLayerAutoHeightStyles = null;
67
+
68
+ /**
69
+ * Sizing container around the surface. As a stretched grid item, the surface sizes to its content
70
+ * and has a definite height. A fixed height with `max-height: max-content` collapses with a
71
+ * `flex: 1` child. `pointer-events: none` keeps presses beside the surface as backdrop presses.
72
+ */
73
+ var sizingContainerStyles = {
74
+ 'body-scroll': "_1e0c11p5 _2z05i47z _lcxvglyw _e8uo221b",
75
+ 'viewport-scroll': "_1e0c11p5 _lcxvglyw",
76
+ 'full-screen': "_1e0c11p5 _lcxvglyw"
77
+ };
68
78
  var allowlistElements = function allowlistElements(element, callback) {
69
79
  // Allow focus outside modal when AUI dialog is visible
70
80
  // eslint-disable-next-line @atlaskit/platform/no-direct-document-usage -- legacy FocusLock allowlist
@@ -86,7 +96,7 @@ function useModalCloseHandler(providedOnClose) {
86
96
  action: 'closed',
87
97
  componentName: 'modalDialog',
88
98
  packageName: "@atlaskit/modal-dialog",
89
- packageVersion: "17.2.0"
99
+ packageVersion: "17.2.1"
90
100
  });
91
101
  }
92
102
  function getScrollMode(_ref) {
@@ -125,11 +135,9 @@ function getTopLayerSurfaceWidth(input) {
125
135
  }
126
136
  function getTopLayerSurfaceHeight(input) {
127
137
  if (!input) {
128
- // Although this value would ordinarily fill the viewport height,
129
- // there is also a `max-height: max-content` applied to keep it constrained.
130
- // But we need to provide the modal with a fixed height (non-keyword, non-percentage)
131
- // in order for child elements with 100% height to work correctly.
132
- return 'calc(100vh - 120px)';
138
+ // Size to the content. The sizing container gives the surface a definite height, so
139
+ // children with `height: 100%` still fill it. See `sizingContainerStyles`.
140
+ return 'auto';
133
141
  }
134
142
  if (typeof input === 'number') {
135
143
  return "".concat(input, "px");
@@ -344,17 +352,19 @@ function ModalWrapperTopLayer(props) {
344
352
  }), /*#__PURE__*/React.createElement(DialogScrollLock, {
345
353
  isOpen: true
346
354
  }), /*#__PURE__*/React.createElement("div", {
355
+ className: ax([sizingContainerStyles[scrollMode]])
356
+ }, /*#__PURE__*/React.createElement("div", {
347
357
  ref: contentRef,
348
358
  style: {
349
359
  '--modal-dialog-height': getTopLayerSurfaceHeight(height),
350
360
  '--modal-dialog-width': getTopLayerSurfaceWidth(width)
351
361
  },
352
- className: ax([surfaceStyles.root, !isFullScreen && surfaceStyles.borderRadius, topLayerScrollModeStyles[scrollMode], !height && !isFullScreen && "_e8uo1ris"])
362
+ className: ax([surfaceStyles.root, !isFullScreen && surfaceStyles.borderRadius, topLayerScrollModeStyles[scrollMode]])
353
363
  }, /*#__PURE__*/React.createElement(ModalContext.Provider, {
354
364
  value: modalDialogContext
355
365
  }, /*#__PURE__*/React.createElement(ScrollContext.Provider, {
356
366
  value: shouldScrollInViewport
357
- }, /*#__PURE__*/React.createElement(MotionPresenceBoundary, null, children)))));
367
+ }, /*#__PURE__*/React.createElement(MotionPresenceBoundary, null, children))))));
358
368
  }
359
369
 
360
370
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/modal-dialog",
3
- "version": "17.2.1",
3
+ "version": "17.2.2",
4
4
  "description": "A modal dialog displays content that requires user interaction, in a layer above the page.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -48,10 +48,10 @@
48
48
  "@atlaskit/platform-feature-flags": "^2.2.0",
49
49
  "@atlaskit/portal": "^7.1.0",
50
50
  "@atlaskit/pragmatic-drag-and-drop": "^4.0.0",
51
- "@atlaskit/primitives": "^22.6.0",
51
+ "@atlaskit/primitives": "^22.7.0",
52
52
  "@atlaskit/react-compiler-gating": "^0.2.0",
53
53
  "@atlaskit/theme": "^28.2.0",
54
- "@atlaskit/tokens": "^20.9.0",
54
+ "@atlaskit/tokens": "^20.10.0",
55
55
  "@atlaskit/top-layer": "^7.1.0",
56
56
  "@babel/runtime": "^7.0.0",
57
57
  "@compiled/react": "^1.0.2",
@@ -73,9 +73,10 @@
73
73
  "@atlaskit/breadcrumbs": "^17.8.0",
74
74
  "@atlaskit/checkbox": "^19.3.0",
75
75
  "@atlaskit/code": "^20.0.0",
76
+ "@atlaskit/codemod-utils": "^5.2.0",
76
77
  "@atlaskit/datetime-picker": "^19.4.0",
77
78
  "@atlaskit/docs": "^12.3.0",
78
- "@atlaskit/dropdown-menu": "^21.0.0",
79
+ "@atlaskit/dropdown-menu": "^21.1.0",
79
80
  "@atlaskit/flag": "^19.0.0",
80
81
  "@atlaskit/form": "^18.3.0",
81
82
  "@atlaskit/heading": "^8.0.0",
@@ -1,18 +0,0 @@
1
- import { type ASTPath, type JSCodeshift, type JSXAttribute } from 'jscodeshift';
2
- import { type Collection } from 'jscodeshift/src/Collection';
3
-
4
- export function getJSXAttributesByName(
5
- j: JSCodeshift,
6
- element: ASTPath<any>,
7
- attributeName: string,
8
- ): Collection<JSXAttribute> {
9
- return j(element)
10
- .find(j.JSXOpeningElement)
11
- .find(j.JSXAttribute)
12
- .filter((attribute) => {
13
- const matches = j(attribute)
14
- .find(j.JSXIdentifier)
15
- .filter((identifier) => identifier.value.name === attributeName);
16
- return Boolean(matches.length);
17
- });
18
- }