@atlaskit/popup 7.0.0 → 8.1.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,36 @@
1
1
  # @atlaskit/popup
2
2
 
3
+ ## 8.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`f0b2e3b3c48b2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f0b2e3b3c48b2) -
8
+ Export `TriggerAriaProps` from `@atlaskit/popup/types` for components that accept Popup's trigger
9
+ ARIA attributes.
10
+
11
+ ## 8.0.0
12
+
13
+ ### Major Changes
14
+
15
+ - [`ae5c32fe7bfd6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ae5c32fe7bfd6) -
16
+ Record the rollback of the DSP-25935 popup trigger type expansion in PR #487935. This restores
17
+ compatibility with existing consumers, including Jira Assets audit logs and linked objects.
18
+
19
+ Popup's `aria-haspopup` trigger contract returns to `boolean | 'dialog'`. The affected public
20
+ trigger props in Dropdown Menu, Avatar, Lozenge, Universal Create, Rovo Pins, and Navigation
21
+ System also return to their earlier contracts. Consumers using the newly added role-specific
22
+ string values must return to values supported by those earlier contracts. Popup no longer exports
23
+ `AriaHasPopup` or `TriggerAriaProps`; use `TriggerProps['aria-haspopup']` and
24
+ `Pick<TriggerProps, 'aria-controls' | 'aria-expanded' | 'aria-haspopup'>` instead.
25
+
26
+ Popup and Dropdown Menu retain their existing top-layer runtime ARIA values through the prior
27
+ compatibility adapters. Conversation Assistant returns to its previous internal trigger type
28
+ annotation without changing its public API.
29
+
30
+ ### Patch Changes
31
+
32
+ - Updated dependencies
33
+
3
34
  ## 7.0.0
4
35
 
5
36
  ### Major Changes
@@ -211,6 +211,13 @@ var PopupTopLayer = exports.PopupTopLayer = /*#__PURE__*/(0, _react.memo)(functi
211
211
  'aria-controls': ariaAttributes['aria-controls'],
212
212
  // `aria-expanded` reflects current open state.
213
213
  'aria-expanded': ariaAttributes['aria-expanded'],
214
+ // FUDGE(top-layer-api): cast to the narrow public TriggerProps['aria-haspopup'] union.
215
+ // `getAriaForTrigger` derives `aria-haspopup` from the content's role and types it
216
+ // as the wider WAI-ARIA union (boolean | 'dialog' | 'menu' | 'listbox' | 'tree' | 'grid').
217
+ // We keep the public popup TriggerProps narrow (boolean | 'dialog') because the
218
+ // top-layer API surface is not yet settled. Widening adopter types now would commit
219
+ // us to a public surface we may revisit. The runtime value is unchanged; only the
220
+ // TypeScript-visible type is narrowed at this boundary.
214
221
  'aria-haspopup': ariaAttributes['aria-haspopup']
215
222
  };
216
223
  return /*#__PURE__*/React.createElement(_react.Fragment, null, trigger(triggerProps), /*#__PURE__*/React.createElement(_popover.Popover, (0, _extends2.default)({
@@ -223,6 +223,13 @@ export const PopupTopLayer = /*#__PURE__*/memo(function PopupTopLayer({
223
223
  'aria-controls': ariaAttributes['aria-controls'],
224
224
  // `aria-expanded` reflects current open state.
225
225
  'aria-expanded': ariaAttributes['aria-expanded'],
226
+ // FUDGE(top-layer-api): cast to the narrow public TriggerProps['aria-haspopup'] union.
227
+ // `getAriaForTrigger` derives `aria-haspopup` from the content's role and types it
228
+ // as the wider WAI-ARIA union (boolean | 'dialog' | 'menu' | 'listbox' | 'tree' | 'grid').
229
+ // We keep the public popup TriggerProps narrow (boolean | 'dialog') because the
230
+ // top-layer API surface is not yet settled. Widening adopter types now would commit
231
+ // us to a public surface we may revisit. The runtime value is unchanged; only the
232
+ // TypeScript-visible type is narrowed at this boundary.
226
233
  'aria-haspopup': ariaAttributes['aria-haspopup']
227
234
  };
228
235
  return /*#__PURE__*/React.createElement(Fragment, null, trigger(triggerProps), /*#__PURE__*/React.createElement(Popover, _extends({
@@ -202,6 +202,13 @@ export var PopupTopLayer = /*#__PURE__*/memo(function PopupTopLayer(_ref) {
202
202
  'aria-controls': ariaAttributes['aria-controls'],
203
203
  // `aria-expanded` reflects current open state.
204
204
  'aria-expanded': ariaAttributes['aria-expanded'],
205
+ // FUDGE(top-layer-api): cast to the narrow public TriggerProps['aria-haspopup'] union.
206
+ // `getAriaForTrigger` derives `aria-haspopup` from the content's role and types it
207
+ // as the wider WAI-ARIA union (boolean | 'dialog' | 'menu' | 'listbox' | 'tree' | 'grid').
208
+ // We keep the public popup TriggerProps narrow (boolean | 'dialog') because the
209
+ // top-layer API surface is not yet settled. Widening adopter types now would commit
210
+ // us to a public surface we may revisit. The runtime value is unchanged; only the
211
+ // TypeScript-visible type is narrowed at this boundary.
205
212
  'aria-haspopup': ariaAttributes['aria-haspopup']
206
213
  };
207
214
  return /*#__PURE__*/React.createElement(Fragment, null, trigger(triggerProps), /*#__PURE__*/React.createElement(Popover, _extends({
@@ -1,7 +1,6 @@
1
1
  import { type ComponentType, type CSSProperties, type Dispatch, type PropsWithChildren, type default as React, type ReactNode, type Ref, type SetStateAction } from 'react';
2
2
  import { type StrictXCSSProp } from '@atlaskit/css';
3
3
  import type { Modifier, Placement, PopperChildrenProps } from '@atlaskit/popper/main';
4
- export type AriaHasPopup = boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
5
4
  export interface TriggerAriaProps {
6
5
  /**
7
6
  * Identifies the popup element that the trigger controls.
@@ -15,7 +14,7 @@ export interface TriggerAriaProps {
15
14
  /**
16
15
  * Informs assistive technology that this element triggers a popup.
17
16
  */
18
- 'aria-haspopup': AriaHasPopup;
17
+ 'aria-haspopup': boolean | 'dialog';
19
18
  }
20
19
  export interface TriggerProps extends TriggerAriaProps {
21
20
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/popup",
3
- "version": "7.0.0",
3
+ "version": "8.1.0",
4
4
  "description": "A popup displays brief content in an overlay.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -65,7 +65,7 @@
65
65
  "@atlaskit/code": "^20.0.0",
66
66
  "@atlaskit/datetime-picker": "^19.0.0",
67
67
  "@atlaskit/docs": "^12.3.0",
68
- "@atlaskit/dropdown-menu": "^19.0.0",
68
+ "@atlaskit/dropdown-menu": "^20.0.0",
69
69
  "@atlaskit/form": "^18.0.0",
70
70
  "@atlaskit/heading": "^8.0.0",
71
71
  "@atlaskit/icon": "^38.0.0",