@atlaskit/popup 8.1.0 → 9.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/popup
|
|
2
2
|
|
|
3
|
+
## 9.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`d562a51283c05`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d562a51283c05) -
|
|
8
|
+
Widen Popup and Dropdown Menu trigger `aria-haspopup` types to include valid popup kinds,
|
|
9
|
+
including `menu`. Consumers with explicitly narrow render-prop annotations may need to accept the
|
|
10
|
+
additional values.
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 8.1.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
|
@@ -211,13 +211,6 @@ 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.
|
|
221
214
|
'aria-haspopup': ariaAttributes['aria-haspopup']
|
|
222
215
|
};
|
|
223
216
|
return /*#__PURE__*/React.createElement(_react.Fragment, null, trigger(triggerProps), /*#__PURE__*/React.createElement(_popover.Popover, (0, _extends2.default)({
|
|
@@ -223,13 +223,6 @@ 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.
|
|
233
226
|
'aria-haspopup': ariaAttributes['aria-haspopup']
|
|
234
227
|
};
|
|
235
228
|
return /*#__PURE__*/React.createElement(Fragment, null, trigger(triggerProps), /*#__PURE__*/React.createElement(Popover, _extends({
|
|
@@ -202,13 +202,6 @@ 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.
|
|
212
205
|
'aria-haspopup': ariaAttributes['aria-haspopup']
|
|
213
206
|
};
|
|
214
207
|
return /*#__PURE__*/React.createElement(Fragment, null, trigger(triggerProps), /*#__PURE__*/React.createElement(Popover, _extends({
|
package/dist/types/types.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export interface TriggerAriaProps {
|
|
|
14
14
|
/**
|
|
15
15
|
* Informs assistive technology that this element triggers a popup.
|
|
16
16
|
*/
|
|
17
|
-
'aria-haspopup': boolean | 'dialog';
|
|
17
|
+
'aria-haspopup': boolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
|
|
18
18
|
}
|
|
19
19
|
export interface TriggerProps extends TriggerAriaProps {
|
|
20
20
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/popup",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "A popup displays brief content in an overlay.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,14 +37,14 @@
|
|
|
37
37
|
"@atlaskit/css": "^1.1.0",
|
|
38
38
|
"@atlaskit/ds-lib": "^8.0.0",
|
|
39
39
|
"@atlaskit/layering": "^6.0.0",
|
|
40
|
-
"@atlaskit/motion": "^9.
|
|
40
|
+
"@atlaskit/motion": "^9.1.0",
|
|
41
41
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
42
42
|
"@atlaskit/popper": "^9.4.0",
|
|
43
43
|
"@atlaskit/portal": "^7.0.0",
|
|
44
44
|
"@atlaskit/primitives": "^22.5.0",
|
|
45
45
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
46
46
|
"@atlaskit/tokens": "^20.1.0",
|
|
47
|
-
"@atlaskit/top-layer": "^6.
|
|
47
|
+
"@atlaskit/top-layer": "^6.1.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|
|
49
49
|
"@compiled/react": "^1.0.2",
|
|
50
50
|
"bind-event-listener": "^3.0.0",
|
|
@@ -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": "^
|
|
68
|
+
"@atlaskit/dropdown-menu": "^21.0.0",
|
|
69
69
|
"@atlaskit/form": "^18.0.0",
|
|
70
70
|
"@atlaskit/heading": "^8.0.0",
|
|
71
71
|
"@atlaskit/icon": "^38.0.0",
|