@atlaskit/dropdown-menu 16.7.1 → 16.8.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 +18 -0
- package/dist/cjs/internal/hooks/use-radio-state.js +2 -2
- package/dist/cjs/radio/dropdown-item-radio-group.js +3 -13
- package/dist/cjs/radio/radio-group-context.js +18 -0
- package/dist/es2019/internal/hooks/use-radio-state.js +1 -1
- package/dist/es2019/radio/dropdown-item-radio-group.js +2 -12
- package/dist/es2019/radio/radio-group-context.js +11 -0
- package/dist/esm/internal/hooks/use-radio-state.js +1 -1
- package/dist/esm/radio/dropdown-item-radio-group.js +2 -12
- package/dist/esm/radio/radio-group-context.js +11 -0
- package/dist/types/radio/dropdown-item-radio-group.d.ts +0 -12
- package/dist/types/radio/radio-group-context.d.ts +14 -0
- package/dist/types-ts4.5/radio/dropdown-item-radio-group.d.ts +0 -12
- package/dist/types-ts4.5/radio/radio-group-context.d.ts +14 -0
- package/dropdown-item-checkbox/package.json +17 -0
- package/dropdown-item-checkbox-group/package.json +17 -0
- package/dropdown-item-radio/package.json +17 -0
- package/dropdown-item-radio-group/package.json +17 -0
- package/dropdown-menu/package.json +17 -0
- package/dropdown-menu-item/package.json +17 -0
- package/dropdown-menu-item-group/package.json +17 -0
- package/dropdown-menu.docs.tsx +192 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @atlaskit/dropdown-menu
|
|
2
2
|
|
|
3
|
+
## 16.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`1001eaeabe30f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1001eaeabe30f) -
|
|
8
|
+
Autofix: add explicit package exports (barrel removal)
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
14
|
+
## 16.7.2
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- [`f31216f23df61`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f31216f23df61) -
|
|
19
|
+
Removes internally exported API from files which will soon be exported as top-level API
|
|
20
|
+
|
|
3
21
|
## 16.7.1
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -8,7 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
10
|
var _react = require("react");
|
|
11
|
-
var
|
|
11
|
+
var _radioGroupContext = require("../../radio/radio-group-context");
|
|
12
12
|
var _selectionStore = require("../context/selection-store");
|
|
13
13
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
14
|
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; }
|
|
@@ -19,7 +19,7 @@ function useRadioState(_ref) {
|
|
|
19
19
|
var _useContext = (0, _react.useContext)(_selectionStore.SelectionStoreContext),
|
|
20
20
|
setGroupState = _useContext.setGroupState,
|
|
21
21
|
getGroupState = _useContext.getGroupState;
|
|
22
|
-
var _useContext2 = (0, _react.useContext)(
|
|
22
|
+
var _useContext2 = (0, _react.useContext)(_radioGroupContext.RadioGroupContext),
|
|
23
23
|
group = _useContext2.id,
|
|
24
24
|
radioGroupState = _useContext2.radioGroupState,
|
|
25
25
|
selectRadioItem = _useContext2.selectRadioItem;
|
|
@@ -5,32 +5,22 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.default =
|
|
8
|
+
exports.default = void 0;
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
12
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
|
-
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
15
14
|
var _useId = require("@atlaskit/ds-lib/use-id");
|
|
16
15
|
var _menu = require("@atlaskit/menu");
|
|
17
16
|
var _groupTitle = _interopRequireDefault(require("../internal/components/group-title"));
|
|
18
17
|
var _selectionStore = require("../internal/context/selection-store");
|
|
19
18
|
var _resetOptionsInGroup = _interopRequireDefault(require("../internal/utils/reset-options-in-group"));
|
|
19
|
+
var _radioGroupContext = require("./radio-group-context");
|
|
20
20
|
var _excluded = ["children", "hasSeparator", "id", "isList", "isScrollable", "testId", "title"];
|
|
21
21
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
22
22
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
23
|
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; }
|
|
24
|
-
/**
|
|
25
|
-
* __Radio group context__
|
|
26
|
-
* Context provider that wraps each DropdownItemRadioGroup
|
|
27
|
-
*/
|
|
28
|
-
var RadioGroupContext = exports.RadioGroupContext = /*#__PURE__*/(0, _react.createContext)({
|
|
29
|
-
id: '',
|
|
30
|
-
radioGroupState: {},
|
|
31
|
-
selectRadioItem: _noop.default
|
|
32
|
-
});
|
|
33
|
-
|
|
34
24
|
/**
|
|
35
25
|
* __Dropdown item radio group__
|
|
36
26
|
* Store which manages the selection state for each DropdownItemRadio
|
|
@@ -67,7 +57,7 @@ var DropdownItemRadioGroup = function DropdownItemRadioGroup(_ref) {
|
|
|
67
57
|
setRadioGroupState(newValue);
|
|
68
58
|
setGroupState(id, newValue);
|
|
69
59
|
};
|
|
70
|
-
return /*#__PURE__*/_react.default.createElement(RadioGroupContext.Provider, {
|
|
60
|
+
return /*#__PURE__*/_react.default.createElement(_radioGroupContext.RadioGroupContext.Provider, {
|
|
71
61
|
value: {
|
|
72
62
|
id: id,
|
|
73
63
|
radioGroupState: radioGroupState,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.RadioGroupContext = void 0;
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
10
|
+
/**
|
|
11
|
+
* __Radio group context__
|
|
12
|
+
* Context provider that wraps each DropdownItemRadioGroup
|
|
13
|
+
*/
|
|
14
|
+
var RadioGroupContext = exports.RadioGroupContext = /*#__PURE__*/(0, _react.createContext)({
|
|
15
|
+
id: '',
|
|
16
|
+
radioGroupState: {},
|
|
17
|
+
selectRadioItem: _noop.default
|
|
18
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCallback, useContext, useEffect, useState } from 'react';
|
|
2
|
-
import { RadioGroupContext } from '../../radio/
|
|
2
|
+
import { RadioGroupContext } from '../../radio/radio-group-context';
|
|
3
3
|
import { SelectionStoreContext } from '../context/selection-store';
|
|
4
4
|
function useRadioState({
|
|
5
5
|
id,
|
|
@@ -1,21 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React, {
|
|
3
|
-
import noop from '@atlaskit/ds-lib/noop';
|
|
2
|
+
import React, { useContext, useState } from 'react';
|
|
4
3
|
import { useId } from '@atlaskit/ds-lib/use-id';
|
|
5
4
|
import { Section } from '@atlaskit/menu';
|
|
6
5
|
import GroupTitle from '../internal/components/group-title';
|
|
7
6
|
import { SelectionStoreContext } from '../internal/context/selection-store';
|
|
8
7
|
import resetOptionsInGroup from '../internal/utils/reset-options-in-group';
|
|
9
|
-
|
|
10
|
-
* __Radio group context__
|
|
11
|
-
* Context provider that wraps each DropdownItemRadioGroup
|
|
12
|
-
*/
|
|
13
|
-
export const RadioGroupContext = /*#__PURE__*/createContext({
|
|
14
|
-
id: '',
|
|
15
|
-
radioGroupState: {},
|
|
16
|
-
selectRadioItem: noop
|
|
17
|
-
});
|
|
18
|
-
|
|
8
|
+
import { RadioGroupContext } from './radio-group-context';
|
|
19
9
|
/**
|
|
20
10
|
* __Dropdown item radio group__
|
|
21
11
|
* Store which manages the selection state for each DropdownItemRadio
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
import noop from '@atlaskit/ds-lib/noop';
|
|
3
|
+
/**
|
|
4
|
+
* __Radio group context__
|
|
5
|
+
* Context provider that wraps each DropdownItemRadioGroup
|
|
6
|
+
*/
|
|
7
|
+
export const RadioGroupContext = /*#__PURE__*/createContext({
|
|
8
|
+
id: '',
|
|
9
|
+
radioGroupState: {},
|
|
10
|
+
selectRadioItem: noop
|
|
11
|
+
});
|
|
@@ -3,7 +3,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
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; }
|
|
5
5
|
import { useCallback, useContext, useEffect, useState } from 'react';
|
|
6
|
-
import { RadioGroupContext } from '../../radio/
|
|
6
|
+
import { RadioGroupContext } from '../../radio/radio-group-context';
|
|
7
7
|
import { SelectionStoreContext } from '../context/selection-store';
|
|
8
8
|
function useRadioState(_ref) {
|
|
9
9
|
var id = _ref.id,
|
|
@@ -5,23 +5,13 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
5
5
|
var _excluded = ["children", "hasSeparator", "id", "isList", "isScrollable", "testId", "title"];
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
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; }
|
|
8
|
-
import React, {
|
|
9
|
-
import noop from '@atlaskit/ds-lib/noop';
|
|
8
|
+
import React, { useContext, useState } from 'react';
|
|
10
9
|
import { useId } from '@atlaskit/ds-lib/use-id';
|
|
11
10
|
import { Section } from '@atlaskit/menu';
|
|
12
11
|
import GroupTitle from '../internal/components/group-title';
|
|
13
12
|
import { SelectionStoreContext } from '../internal/context/selection-store';
|
|
14
13
|
import resetOptionsInGroup from '../internal/utils/reset-options-in-group';
|
|
15
|
-
|
|
16
|
-
* __Radio group context__
|
|
17
|
-
* Context provider that wraps each DropdownItemRadioGroup
|
|
18
|
-
*/
|
|
19
|
-
export var RadioGroupContext = /*#__PURE__*/createContext({
|
|
20
|
-
id: '',
|
|
21
|
-
radioGroupState: {},
|
|
22
|
-
selectRadioItem: noop
|
|
23
|
-
});
|
|
24
|
-
|
|
14
|
+
import { RadioGroupContext } from './radio-group-context';
|
|
25
15
|
/**
|
|
26
16
|
* __Dropdown item radio group__
|
|
27
17
|
* Store which manages the selection state for each DropdownItemRadio
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
import noop from '@atlaskit/ds-lib/noop';
|
|
3
|
+
/**
|
|
4
|
+
* __Radio group context__
|
|
5
|
+
* Context provider that wraps each DropdownItemRadioGroup
|
|
6
|
+
*/
|
|
7
|
+
export var RadioGroupContext = /*#__PURE__*/createContext({
|
|
8
|
+
id: '',
|
|
9
|
+
radioGroupState: {},
|
|
10
|
+
selectRadioItem: noop
|
|
11
|
+
});
|
|
@@ -3,18 +3,6 @@ import { type SectionProps } from '@atlaskit/menu';
|
|
|
3
3
|
interface DropdownItemRadioGroupProps extends SectionProps {
|
|
4
4
|
id: string;
|
|
5
5
|
}
|
|
6
|
-
interface RadioGroupContextProps {
|
|
7
|
-
id: string;
|
|
8
|
-
radioGroupState: {
|
|
9
|
-
[key: string]: boolean | undefined;
|
|
10
|
-
};
|
|
11
|
-
selectRadioItem: (id: string, value: boolean) => void;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* __Radio group context__
|
|
15
|
-
* Context provider that wraps each DropdownItemRadioGroup
|
|
16
|
-
*/
|
|
17
|
-
export declare const RadioGroupContext: React.Context<RadioGroupContextProps>;
|
|
18
6
|
/**
|
|
19
7
|
* __Dropdown item radio group__
|
|
20
8
|
* Store which manages the selection state for each DropdownItemRadio
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface RadioGroupContextProps {
|
|
3
|
+
id: string;
|
|
4
|
+
radioGroupState: {
|
|
5
|
+
[key: string]: boolean | undefined;
|
|
6
|
+
};
|
|
7
|
+
selectRadioItem: (id: string, value: boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* __Radio group context__
|
|
11
|
+
* Context provider that wraps each DropdownItemRadioGroup
|
|
12
|
+
*/
|
|
13
|
+
export declare const RadioGroupContext: React.Context<RadioGroupContextProps>;
|
|
14
|
+
export {};
|
|
@@ -3,18 +3,6 @@ import { type SectionProps } from '@atlaskit/menu';
|
|
|
3
3
|
interface DropdownItemRadioGroupProps extends SectionProps {
|
|
4
4
|
id: string;
|
|
5
5
|
}
|
|
6
|
-
interface RadioGroupContextProps {
|
|
7
|
-
id: string;
|
|
8
|
-
radioGroupState: {
|
|
9
|
-
[key: string]: boolean | undefined;
|
|
10
|
-
};
|
|
11
|
-
selectRadioItem: (id: string, value: boolean) => void;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* __Radio group context__
|
|
15
|
-
* Context provider that wraps each DropdownItemRadioGroup
|
|
16
|
-
*/
|
|
17
|
-
export declare const RadioGroupContext: React.Context<RadioGroupContextProps>;
|
|
18
6
|
/**
|
|
19
7
|
* __Dropdown item radio group__
|
|
20
8
|
* Store which manages the selection state for each DropdownItemRadio
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface RadioGroupContextProps {
|
|
3
|
+
id: string;
|
|
4
|
+
radioGroupState: {
|
|
5
|
+
[key: string]: boolean | undefined;
|
|
6
|
+
};
|
|
7
|
+
selectRadioItem: (id: string, value: boolean) => void;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* __Radio group context__
|
|
11
|
+
* Context provider that wraps each DropdownItemRadioGroup
|
|
12
|
+
*/
|
|
13
|
+
export declare const RadioGroupContext: React.Context<RadioGroupContextProps>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/dropdown-menu/dropdown-item-checkbox",
|
|
3
|
+
"main": "../dist/cjs/checkbox/dropdown-item-checkbox.js",
|
|
4
|
+
"module": "../dist/esm/checkbox/dropdown-item-checkbox.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/checkbox/dropdown-item-checkbox.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/checkbox/dropdown-item-checkbox.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/checkbox/dropdown-item-checkbox.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/dropdown-menu/dropdown-item-checkbox-group",
|
|
3
|
+
"main": "../dist/cjs/checkbox/dropdown-item-checkbox-group.js",
|
|
4
|
+
"module": "../dist/esm/checkbox/dropdown-item-checkbox-group.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/checkbox/dropdown-item-checkbox-group.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/checkbox/dropdown-item-checkbox-group.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/checkbox/dropdown-item-checkbox-group.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/dropdown-menu/dropdown-item-radio",
|
|
3
|
+
"main": "../dist/cjs/radio/dropdown-item-radio.js",
|
|
4
|
+
"module": "../dist/esm/radio/dropdown-item-radio.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/radio/dropdown-item-radio.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/radio/dropdown-item-radio.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/radio/dropdown-item-radio.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/dropdown-menu/dropdown-item-radio-group",
|
|
3
|
+
"main": "../dist/cjs/radio/dropdown-item-radio-group.js",
|
|
4
|
+
"module": "../dist/esm/radio/dropdown-item-radio-group.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/radio/dropdown-item-radio-group.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/radio/dropdown-item-radio-group.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/radio/dropdown-item-radio-group.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/dropdown-menu/dropdown-menu",
|
|
3
|
+
"main": "../dist/cjs/dropdown-menu.js",
|
|
4
|
+
"module": "../dist/esm/dropdown-menu.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/dropdown-menu.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/dropdown-menu.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/dropdown-menu.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/dropdown-menu/dropdown-menu-item",
|
|
3
|
+
"main": "../dist/cjs/dropdown-menu-item.js",
|
|
4
|
+
"module": "../dist/esm/dropdown-menu-item.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/dropdown-menu-item.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/dropdown-menu-item.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/dropdown-menu-item.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/dropdown-menu/dropdown-menu-item-group",
|
|
3
|
+
"main": "../dist/cjs/dropdown-menu-item-group.js",
|
|
4
|
+
"module": "../dist/esm/dropdown-menu-item-group.js",
|
|
5
|
+
"module:es2019": "../dist/es2019/dropdown-menu-item-group.js",
|
|
6
|
+
"sideEffects": [
|
|
7
|
+
"**/*.compiled.css"
|
|
8
|
+
],
|
|
9
|
+
"types": "../dist/types/dropdown-menu-item-group.d.ts",
|
|
10
|
+
"typesVersions": {
|
|
11
|
+
">=4.5 <5.9": {
|
|
12
|
+
"*": [
|
|
13
|
+
"../dist/types-ts4.5/dropdown-menu-item-group.d.ts"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
package/dropdown-menu.docs.tsx
CHANGED
|
@@ -49,6 +49,198 @@ const documentation: ComponentStructuredContentSource[] = [
|
|
|
49
49
|
keywords: ['dropdown', 'menu', 'actions', 'options', 'popup', 'contextual'],
|
|
50
50
|
categories: ['navigation', 'interaction'],
|
|
51
51
|
},
|
|
52
|
+
{
|
|
53
|
+
name: 'DropdownItem',
|
|
54
|
+
description:
|
|
55
|
+
'A dropdown item populates the dropdown menu with items. Use for links or actions; every item must be inside a DropdownItemGroup. Can also be used as the trigger for a nested submenu.',
|
|
56
|
+
status: 'general-availability',
|
|
57
|
+
import: {
|
|
58
|
+
name: 'DropdownItem',
|
|
59
|
+
package: '@atlaskit/dropdown-menu',
|
|
60
|
+
type: 'named',
|
|
61
|
+
packagePath: path.resolve(__dirname),
|
|
62
|
+
packageJson: require('./package.json'),
|
|
63
|
+
},
|
|
64
|
+
usageGuidelines: [
|
|
65
|
+
'Use inside DropdownMenu with DropdownItemGroup (required parent)',
|
|
66
|
+
'Use for links (href) or actions (onClick); verbs for actions, nouns for links; no articles; single line per item',
|
|
67
|
+
'For a nested submenu: use as the trigger (pass triggerRef and trigger props, use elemAfter e.g. chevron); keep to maximum two layers',
|
|
68
|
+
],
|
|
69
|
+
contentGuidelines: [
|
|
70
|
+
'Use clear, descriptive menu item labels',
|
|
71
|
+
'Keep menu item text concise',
|
|
72
|
+
'Use consistent terminology across menu items',
|
|
73
|
+
],
|
|
74
|
+
accessibilityGuidelines: [
|
|
75
|
+
'Avoid truncation—ensure max width does not cut off labels',
|
|
76
|
+
'Ensure keyboard navigation with arrow keys',
|
|
77
|
+
],
|
|
78
|
+
examples: [
|
|
79
|
+
{
|
|
80
|
+
name: 'Dropdown Menu',
|
|
81
|
+
description: 'Dropdown Menu with DropdownItem example',
|
|
82
|
+
source: path.resolve(__dirname, './examples/ai/dropdown-menu.tsx'),
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
keywords: ['dropdown', 'menu', 'item', 'action', 'link', 'menuitem'],
|
|
86
|
+
categories: ['navigation', 'interaction'],
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'DropdownItemGroup',
|
|
90
|
+
description:
|
|
91
|
+
'Wrapping element for dropdown menu items. Use to group related items; optional short uppercase title (e.g. "Edit page", "Tools") separates sections.',
|
|
92
|
+
status: 'general-availability',
|
|
93
|
+
import: {
|
|
94
|
+
name: 'DropdownItemGroup',
|
|
95
|
+
package: '@atlaskit/dropdown-menu',
|
|
96
|
+
type: 'named',
|
|
97
|
+
packagePath: path.resolve(__dirname),
|
|
98
|
+
packageJson: require('./package.json'),
|
|
99
|
+
},
|
|
100
|
+
usageGuidelines: [
|
|
101
|
+
'Use inside DropdownMenu to group related items',
|
|
102
|
+
'Use short, uppercase title to describe the group',
|
|
103
|
+
'Nested menu: maximum two layers',
|
|
104
|
+
],
|
|
105
|
+
contentGuidelines: [
|
|
106
|
+
'Group related actions logically',
|
|
107
|
+
'Use consistent terminology across menu items',
|
|
108
|
+
],
|
|
109
|
+
accessibilityGuidelines: ['Provide clear group titles', 'Nested menu: maximum two layers'],
|
|
110
|
+
examples: [
|
|
111
|
+
{
|
|
112
|
+
name: 'Dropdown Menu',
|
|
113
|
+
description: 'Dropdown Menu with DropdownItemGroup example',
|
|
114
|
+
source: path.resolve(__dirname, './examples/ai/dropdown-menu.tsx'),
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
keywords: ['dropdown', 'menu', 'group', 'section', 'title'],
|
|
118
|
+
categories: ['navigation', 'interaction'],
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: 'DropdownItemCheckbox',
|
|
122
|
+
description:
|
|
123
|
+
'A dropdown menu item with checkbox selection. Use for multiple selection from a list (e.g. status filters, show/hide toggles).',
|
|
124
|
+
status: 'general-availability',
|
|
125
|
+
import: {
|
|
126
|
+
name: 'DropdownItemCheckbox',
|
|
127
|
+
package: '@atlaskit/dropdown-menu',
|
|
128
|
+
type: 'named',
|
|
129
|
+
packagePath: path.resolve(__dirname),
|
|
130
|
+
packageJson: require('./package.json'),
|
|
131
|
+
},
|
|
132
|
+
usageGuidelines: [
|
|
133
|
+
'Use with DropdownItemCheckboxGroup; control selection with isSelected and onClick',
|
|
134
|
+
'Use for multiple selection from a list or toggles (e.g. categories, column visibility)',
|
|
135
|
+
'Group related checkboxes; use short uppercase title on DropdownItemCheckboxGroup',
|
|
136
|
+
],
|
|
137
|
+
contentGuidelines: ['Use clear, descriptive labels', 'Keep menu item text concise'],
|
|
138
|
+
accessibilityGuidelines: [
|
|
139
|
+
'Ensure keyboard navigation and clear selection state',
|
|
140
|
+
'Use appropriate ARIA attributes',
|
|
141
|
+
],
|
|
142
|
+
examples: [
|
|
143
|
+
{
|
|
144
|
+
name: 'Dropdown Menu',
|
|
145
|
+
description: 'Dropdown Menu with checkbox items example',
|
|
146
|
+
source: path.resolve(__dirname, './examples/ai/dropdown-menu.tsx'),
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
keywords: ['dropdown', 'menu', 'checkbox', 'multi-select', 'toggle'],
|
|
150
|
+
categories: ['navigation', 'interaction', 'form'],
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: 'DropdownItemCheckboxGroup',
|
|
154
|
+
description:
|
|
155
|
+
'Groups DropdownItemCheckbox components for multi-select options within a dropdown menu.',
|
|
156
|
+
status: 'general-availability',
|
|
157
|
+
import: {
|
|
158
|
+
name: 'DropdownItemCheckboxGroup',
|
|
159
|
+
package: '@atlaskit/dropdown-menu',
|
|
160
|
+
type: 'named',
|
|
161
|
+
packagePath: path.resolve(__dirname),
|
|
162
|
+
packageJson: require('./package.json'),
|
|
163
|
+
},
|
|
164
|
+
usageGuidelines: [
|
|
165
|
+
'Use to group related DropdownItemCheckbox items',
|
|
166
|
+
'Use for multiple selection from a list',
|
|
167
|
+
],
|
|
168
|
+
contentGuidelines: ['Group related checkboxes logically', 'Use consistent terminology'],
|
|
169
|
+
examples: [
|
|
170
|
+
{
|
|
171
|
+
name: 'Checkbox group',
|
|
172
|
+
description: 'DropdownItemCheckboxGroup with titled section and checkbox items.',
|
|
173
|
+
source: path.resolve(
|
|
174
|
+
__dirname,
|
|
175
|
+
'./examples/constellation/dropdown-item-checkbox-selected.tsx',
|
|
176
|
+
),
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
keywords: ['dropdown', 'menu', 'checkbox', 'group', 'multi-select'],
|
|
180
|
+
categories: ['navigation', 'interaction', 'form'],
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
name: 'DropdownItemRadio',
|
|
184
|
+
description:
|
|
185
|
+
'A dropdown menu item with radio selection. Use for single selection from a short list (e.g. view mode, sort order).',
|
|
186
|
+
status: 'general-availability',
|
|
187
|
+
import: {
|
|
188
|
+
name: 'DropdownItemRadio',
|
|
189
|
+
package: '@atlaskit/dropdown-menu',
|
|
190
|
+
type: 'named',
|
|
191
|
+
packagePath: path.resolve(__dirname),
|
|
192
|
+
packageJson: require('./package.json'),
|
|
193
|
+
},
|
|
194
|
+
usageGuidelines: [
|
|
195
|
+
'Use with DropdownItemRadioGroup; control selection with isSelected and onClick',
|
|
196
|
+
'Use for single selection from a short list (e.g. views, density)',
|
|
197
|
+
'Group related radio items; use short uppercase title on DropdownItemRadioGroup',
|
|
198
|
+
],
|
|
199
|
+
contentGuidelines: ['Use clear, descriptive labels', 'Keep menu item text concise'],
|
|
200
|
+
accessibilityGuidelines: [
|
|
201
|
+
'Ensure keyboard navigation and clear selection state',
|
|
202
|
+
'Use appropriate ARIA attributes',
|
|
203
|
+
],
|
|
204
|
+
examples: [
|
|
205
|
+
{
|
|
206
|
+
name: 'Dropdown Menu',
|
|
207
|
+
description: 'Dropdown Menu with radio items example',
|
|
208
|
+
source: path.resolve(__dirname, './examples/ai/dropdown-menu.tsx'),
|
|
209
|
+
},
|
|
210
|
+
],
|
|
211
|
+
keywords: ['dropdown', 'menu', 'radio', 'single-select', 'choice'],
|
|
212
|
+
categories: ['navigation', 'interaction', 'form'],
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
name: 'DropdownItemRadioGroup',
|
|
216
|
+
description:
|
|
217
|
+
'Groups DropdownItemRadio components for single-select options within a dropdown menu.',
|
|
218
|
+
status: 'general-availability',
|
|
219
|
+
import: {
|
|
220
|
+
name: 'DropdownItemRadioGroup',
|
|
221
|
+
package: '@atlaskit/dropdown-menu',
|
|
222
|
+
type: 'named',
|
|
223
|
+
packagePath: path.resolve(__dirname),
|
|
224
|
+
packageJson: require('./package.json'),
|
|
225
|
+
},
|
|
226
|
+
usageGuidelines: [
|
|
227
|
+
'Use to group related DropdownItemRadio items',
|
|
228
|
+
'Use for single selection from a short list',
|
|
229
|
+
],
|
|
230
|
+
contentGuidelines: ['Group related radio items logically', 'Use consistent terminology'],
|
|
231
|
+
examples: [
|
|
232
|
+
{
|
|
233
|
+
name: 'Radio group',
|
|
234
|
+
description: 'DropdownItemRadioGroup with titled section and radio items.',
|
|
235
|
+
source: path.resolve(
|
|
236
|
+
__dirname,
|
|
237
|
+
'./examples/constellation/dropdown-item-radio-selected.tsx',
|
|
238
|
+
),
|
|
239
|
+
},
|
|
240
|
+
],
|
|
241
|
+
keywords: ['dropdown', 'menu', 'radio', 'group', 'single-select'],
|
|
242
|
+
categories: ['navigation', 'interaction', 'form'],
|
|
243
|
+
},
|
|
52
244
|
];
|
|
53
245
|
|
|
54
246
|
export default documentation;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/dropdown-menu",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.8.0",
|
|
4
4
|
"description": "A dropdown menu displays a list of actions or options to a user.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"@atlaskit/layering": "^3.6.0",
|
|
32
32
|
"@atlaskit/menu": "^8.4.0",
|
|
33
33
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
34
|
-
"@atlaskit/popup": "^4.
|
|
34
|
+
"@atlaskit/popup": "^4.14.0",
|
|
35
35
|
"@atlaskit/primitives": "^18.0.0",
|
|
36
36
|
"@atlaskit/spinner": "^19.0.0",
|
|
37
37
|
"@atlaskit/theme": "^22.0.0",
|
|
38
|
-
"@atlaskit/tokens": "^11.
|
|
38
|
+
"@atlaskit/tokens": "^11.2.0",
|
|
39
39
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
40
40
|
"@babel/runtime": "^7.0.0",
|
|
41
41
|
"bind-event-listener": "^3.0.0"
|
|
@@ -50,14 +50,14 @@
|
|
|
50
50
|
"@af/visual-regression": "workspace:^",
|
|
51
51
|
"@atlaskit/app-provider": "^4.1.0",
|
|
52
52
|
"@atlaskit/atlassian-navigation": "^5.6.0",
|
|
53
|
-
"@atlaskit/avatar": "^25.
|
|
53
|
+
"@atlaskit/avatar": "^25.10.0",
|
|
54
54
|
"@atlaskit/checkbox": "^17.3.0",
|
|
55
55
|
"@atlaskit/docs": "^11.7.0",
|
|
56
|
-
"@atlaskit/form": "^15.
|
|
56
|
+
"@atlaskit/form": "^15.5.0",
|
|
57
57
|
"@atlaskit/heading": "^5.3.0",
|
|
58
58
|
"@atlaskit/link": "^3.3.0",
|
|
59
59
|
"@atlaskit/lozenge": "^13.5.0",
|
|
60
|
-
"@atlaskit/modal-dialog": "^14.
|
|
60
|
+
"@atlaskit/modal-dialog": "^14.12.0",
|
|
61
61
|
"@atlaskit/section-message": "^8.12.0",
|
|
62
62
|
"@atlaskit/textfield": "^8.2.0",
|
|
63
63
|
"@atlaskit/toggle": "^15.2.0",
|