@atlaskit/dropdown-menu 10.1.8 → 11.0.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 +148 -0
- package/__perf__/default.tsx +1 -1
- package/__perf__/dropdown-menu.tsx +216 -0
- package/codemods/11.0.0-lite-mode.tsx +39 -0
- package/codemods/__tests__/11.0.0-lite-mode.test.tsx +48 -0
- package/codemods/__tests__/convert-position.test.tsx +88 -0
- package/codemods/__tests__/convert-triggerType.test.tsx +100 -0
- package/codemods/__tests__/deprecate-items.test.tsx +108 -0
- package/codemods/__tests__/deprecate-onItemActivated.test.tsx +108 -0
- package/codemods/__tests__/deprecate-onPositioned.test.tsx +108 -0
- package/codemods/__tests__/deprecate-shouldFitContainer.tsx +108 -0
- package/codemods/__tests__/rename-imports.tsx +136 -0
- package/codemods/__tests__/replace-position-to-placement.test.tsx +84 -0
- package/codemods/__tests__/replace-shouldAllowMultipleLine.test.tsx +122 -0
- package/codemods/__tests__/update-component-callsites.tsx +66 -0
- package/codemods/migrates/convert-trigger-type.tsx +57 -0
- package/codemods/migrates/deprecate-items.tsx +9 -0
- package/codemods/migrates/deprecate-onItemActivated.tsx +9 -0
- package/codemods/migrates/deprecate-onPositioned.tsx +9 -0
- package/codemods/migrates/deprecate-shouldFitContainer.tsx +9 -0
- package/codemods/migrates/rename-imports.tsx +22 -0
- package/codemods/migrates/replace-position-to-placement.tsx +38 -0
- package/codemods/migrates/replace-shouldAllowMultiline.tsx +47 -0
- package/codemods/migrates/update-component-callsites.tsx +13 -0
- package/codemods/utils/convert-position.tsx +24 -0
- package/codemods/utils/create-rename-import.tsx +41 -0
- package/codemods/utils/create-update-callsite.tsx +32 -0
- package/dist/cjs/checkbox/dropdown-item-checkbox-group.js +31 -0
- package/dist/cjs/checkbox/dropdown-item-checkbox.js +108 -0
- package/dist/cjs/dropdown-menu-item-group.js +22 -0
- package/dist/cjs/dropdown-menu-item.js +67 -0
- package/dist/cjs/dropdown-menu.js +194 -0
- package/dist/cjs/index.js +21 -29
- package/dist/cjs/{components/item/DropdownItemRadio.js → internal/components/focus-manager.js} +40 -9
- package/dist/cjs/internal/components/menu-wrapper.js +68 -0
- package/dist/cjs/internal/context/checkbox-group-context.js +14 -0
- package/dist/cjs/internal/context/selection-store.js +76 -0
- package/dist/cjs/internal/hooks/use-checkbox-state.js +68 -0
- package/dist/cjs/internal/hooks/use-radio-state.js +84 -0
- package/dist/cjs/internal/hooks/use-register-item-with-focus-manager.js +29 -0
- package/dist/cjs/internal/utils/get-icon-colors.js +25 -0
- package/dist/cjs/internal/utils/handle-focus.js +58 -0
- package/dist/cjs/internal/utils/is-checkbox-item.js +11 -0
- package/dist/cjs/internal/utils/is-radio-item.js +11 -0
- package/dist/cjs/internal/utils/is-voice-over-supported.js +23 -0
- package/dist/cjs/internal/utils/reset-options-in-group.js +23 -0
- package/dist/cjs/radio/dropdown-item-radio-group.js +89 -0
- package/dist/cjs/radio/dropdown-item-radio.js +108 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/checkbox/dropdown-item-checkbox-group.js +21 -0
- package/dist/es2019/checkbox/dropdown-item-checkbox.js +67 -0
- package/dist/es2019/dropdown-menu-item-group.js +11 -0
- package/dist/es2019/dropdown-menu-item.js +49 -0
- package/dist/es2019/dropdown-menu.js +151 -0
- package/dist/es2019/index.js +7 -11
- package/dist/es2019/internal/components/focus-manager.js +40 -0
- package/dist/es2019/internal/components/menu-wrapper.js +44 -0
- package/dist/es2019/internal/context/checkbox-group-context.js +6 -0
- package/dist/es2019/internal/context/selection-store.js +54 -0
- package/dist/es2019/internal/hooks/use-checkbox-state.js +45 -0
- package/dist/es2019/internal/hooks/use-radio-state.js +56 -0
- package/dist/es2019/internal/hooks/use-register-item-with-focus-manager.js +19 -0
- package/dist/es2019/internal/utils/get-icon-colors.js +17 -0
- package/dist/es2019/internal/utils/handle-focus.js +48 -0
- package/dist/es2019/internal/utils/is-checkbox-item.js +4 -0
- package/dist/es2019/internal/utils/is-radio-item.js +4 -0
- package/dist/es2019/internal/utils/is-voice-over-supported.js +11 -0
- package/dist/es2019/internal/utils/reset-options-in-group.js +7 -0
- package/dist/es2019/radio/dropdown-item-radio-group.js +56 -0
- package/dist/es2019/radio/dropdown-item-radio.js +67 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/checkbox/dropdown-item-checkbox-group.js +19 -0
- package/dist/esm/checkbox/dropdown-item-checkbox.js +81 -0
- package/dist/esm/dropdown-menu-item-group.js +11 -0
- package/dist/esm/dropdown-menu-item.js +52 -0
- package/dist/esm/dropdown-menu.js +168 -0
- package/dist/esm/index.js +7 -11
- package/dist/esm/internal/components/focus-manager.js +39 -0
- package/dist/esm/internal/components/menu-wrapper.js +45 -0
- package/dist/esm/internal/context/checkbox-group-context.js +6 -0
- package/dist/esm/internal/context/selection-store.js +58 -0
- package/dist/esm/internal/hooks/use-checkbox-state.js +55 -0
- package/dist/esm/internal/hooks/use-radio-state.js +70 -0
- package/dist/esm/internal/hooks/use-register-item-with-focus-manager.js +19 -0
- package/dist/esm/internal/utils/get-icon-colors.js +17 -0
- package/dist/esm/internal/utils/handle-focus.js +47 -0
- package/dist/esm/internal/utils/is-checkbox-item.js +4 -0
- package/dist/esm/internal/utils/is-radio-item.js +4 -0
- package/dist/esm/internal/utils/is-voice-over-supported.js +15 -0
- package/dist/esm/internal/utils/reset-options-in-group.js +13 -0
- package/dist/esm/radio/dropdown-item-radio-group.js +66 -0
- package/dist/esm/radio/dropdown-item-radio.js +81 -0
- package/dist/esm/version.json +1 -1
- package/dist/types/checkbox/dropdown-item-checkbox-group.d.ts +16 -0
- package/dist/types/checkbox/dropdown-item-checkbox.d.ts +13 -0
- package/dist/types/dropdown-menu-item-group.d.ts +11 -0
- package/dist/types/dropdown-menu-item.d.ts +13 -0
- package/dist/types/dropdown-menu.d.ts +13 -0
- package/dist/types/index.d.ts +8 -10
- package/dist/types/internal/components/focus-manager.d.ts +19 -0
- package/dist/types/internal/components/menu-wrapper.d.ts +11 -0
- package/dist/types/internal/context/checkbox-group-context.d.ts +5 -0
- package/dist/types/internal/context/selection-store.d.ts +27 -0
- package/dist/types/internal/hooks/use-checkbox-state.d.ts +14 -0
- package/dist/types/internal/hooks/use-radio-state.d.ts +9 -0
- package/dist/types/internal/hooks/use-register-item-with-focus-manager.d.ts +4 -0
- package/dist/types/internal/utils/get-icon-colors.d.ts +8 -0
- package/dist/types/internal/utils/handle-focus.d.ts +2 -0
- package/dist/types/internal/utils/is-checkbox-item.d.ts +1 -0
- package/dist/types/internal/utils/is-radio-item.d.ts +1 -0
- package/dist/types/internal/utils/is-voice-over-supported.d.ts +2 -0
- package/dist/types/internal/utils/reset-options-in-group.d.ts +4 -0
- package/dist/types/radio/dropdown-item-radio-group.d.ts +25 -0
- package/dist/types/radio/dropdown-item-radio.d.ts +13 -0
- package/dist/types/types.d.ts +254 -79
- package/package.json +39 -23
- package/dist/cjs/components/DropdownMenu.js +0 -230
- package/dist/cjs/components/DropdownMenuStateless.js +0 -523
- package/dist/cjs/components/context/DropdownItemClickManager.js +0 -72
- package/dist/cjs/components/context/DropdownItemFocusManager.js +0 -178
- package/dist/cjs/components/context/DropdownItemSelectionCache.js +0 -131
- package/dist/cjs/components/context/DropdownItemSelectionManager.js +0 -185
- package/dist/cjs/components/group/DropdownItemGroup.js +0 -61
- package/dist/cjs/components/group/DropdownItemGroupCheckbox.js +0 -16
- package/dist/cjs/components/group/DropdownItemGroupRadio.js +0 -16
- package/dist/cjs/components/group/ert-group-selection.js +0 -8
- package/dist/cjs/components/hoc/withItemSelectionManager.js +0 -66
- package/dist/cjs/components/hoc/withToggleInteraction.js +0 -175
- package/dist/cjs/components/item/DropdownItem.js +0 -19
- package/dist/cjs/components/item/DropdownItemCheckbox.js +0 -28
- package/dist/cjs/components/item/ert-item-checkbox.js +0 -8
- package/dist/cjs/components/item/ert-item-radio.js +0 -8
- package/dist/cjs/components/item/ert-item.js +0 -8
- package/dist/cjs/styled/WidthConstrainer.js +0 -21
- package/dist/cjs/util/contextNamespace.js +0 -19
- package/dist/cjs/util/getDisplayName.js +0 -14
- package/dist/cjs/util/keys.js +0 -18
- package/dist/cjs/util/safeContextCall.js +0 -27
- package/dist/cjs/util/supportsVoiceover.js +0 -17
- package/dist/es2019/components/DropdownMenu.js +0 -156
- package/dist/es2019/components/DropdownMenuStateless.js +0 -459
- package/dist/es2019/components/context/DropdownItemClickManager.js +0 -31
- package/dist/es2019/components/context/DropdownItemFocusManager.js +0 -134
- package/dist/es2019/components/context/DropdownItemSelectionCache.js +0 -68
- package/dist/es2019/components/context/DropdownItemSelectionManager.js +0 -140
- package/dist/es2019/components/group/DropdownItemGroup.js +0 -17
- package/dist/es2019/components/group/DropdownItemGroupCheckbox.js +0 -3
- package/dist/es2019/components/group/DropdownItemGroupRadio.js +0 -3
- package/dist/es2019/components/group/ert-group-selection.js +0 -1
- package/dist/es2019/components/hoc/withItemSelectionManager.js +0 -20
- package/dist/es2019/components/hoc/withToggleInteraction.js +0 -119
- package/dist/es2019/components/item/DropdownItem.js +0 -3
- package/dist/es2019/components/item/DropdownItemCheckbox.js +0 -5
- package/dist/es2019/components/item/DropdownItemRadio.js +0 -5
- package/dist/es2019/components/item/ert-item-checkbox.js +0 -1
- package/dist/es2019/components/item/ert-item-radio.js +0 -1
- package/dist/es2019/components/item/ert-item.js +0 -1
- package/dist/es2019/styled/WidthConstrainer.js +0 -6
- package/dist/es2019/util/contextNamespace.js +0 -6
- package/dist/es2019/util/getDisplayName.js +0 -4
- package/dist/es2019/util/keys.js +0 -6
- package/dist/es2019/util/safeContextCall.js +0 -10
- package/dist/es2019/util/supportsVoiceover.js +0 -5
- package/dist/esm/components/DropdownMenu.js +0 -215
- package/dist/esm/components/DropdownMenuStateless.js +0 -516
- package/dist/esm/components/context/DropdownItemClickManager.js +0 -59
- package/dist/esm/components/context/DropdownItemFocusManager.js +0 -164
- package/dist/esm/components/context/DropdownItemSelectionCache.js +0 -113
- package/dist/esm/components/context/DropdownItemSelectionManager.js +0 -174
- package/dist/esm/components/group/DropdownItemGroup.js +0 -43
- package/dist/esm/components/group/DropdownItemGroupCheckbox.js +0 -3
- package/dist/esm/components/group/DropdownItemGroupRadio.js +0 -3
- package/dist/esm/components/group/ert-group-selection.js +0 -1
- package/dist/esm/components/hoc/withItemSelectionManager.js +0 -47
- package/dist/esm/components/hoc/withToggleInteraction.js +0 -155
- package/dist/esm/components/item/DropdownItem.js +0 -3
- package/dist/esm/components/item/DropdownItemCheckbox.js +0 -7
- package/dist/esm/components/item/DropdownItemRadio.js +0 -7
- package/dist/esm/components/item/ert-item-checkbox.js +0 -1
- package/dist/esm/components/item/ert-item-radio.js +0 -1
- package/dist/esm/components/item/ert-item.js +0 -1
- package/dist/esm/styled/WidthConstrainer.js +0 -9
- package/dist/esm/util/contextNamespace.js +0 -8
- package/dist/esm/util/getDisplayName.js +0 -6
- package/dist/esm/util/keys.js +0 -6
- package/dist/esm/util/safeContextCall.js +0 -18
- package/dist/esm/util/supportsVoiceover.js +0 -9
- package/dist/types/components/DropdownMenu.d.ts +0 -36
- package/dist/types/components/DropdownMenuStateless.d.ts +0 -82
- package/dist/types/components/context/DropdownItemClickManager.d.ts +0 -19
- package/dist/types/components/context/DropdownItemFocusManager.d.ts +0 -35
- package/dist/types/components/context/DropdownItemSelectionCache.d.ts +0 -31
- package/dist/types/components/context/DropdownItemSelectionManager.d.ts +0 -34
- package/dist/types/components/group/DropdownItemGroup.d.ts +0 -12
- package/dist/types/components/group/DropdownItemGroupCheckbox.d.ts +0 -55
- package/dist/types/components/group/DropdownItemGroupRadio.d.ts +0 -55
- package/dist/types/components/group/ert-group-selection.d.ts +0 -6
- package/dist/types/components/hoc/withItemSelectionManager.d.ts +0 -63
- package/dist/types/components/hoc/withToggleInteraction.d.ts +0 -98
- package/dist/types/components/item/DropdownItem.d.ts +0 -65
- package/dist/types/components/item/DropdownItemCheckbox.d.ts +0 -80
- package/dist/types/components/item/DropdownItemRadio.d.ts +0 -80
- package/dist/types/components/item/ert-item-checkbox.d.ts +0 -2
- package/dist/types/components/item/ert-item-radio.d.ts +0 -2
- package/dist/types/components/item/ert-item.d.ts +0 -2
- package/dist/types/styled/WidthConstrainer.d.ts +0 -7
- package/dist/types/util/contextNamespace.d.ts +0 -4
- package/dist/types/util/getDisplayName.d.ts +0 -3
- package/dist/types/util/keys.d.ts +0 -6
- package/dist/types/util/safeContextCall.d.ts +0 -6
- package/dist/types/util/supportsVoiceover.d.ts +0 -2
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
-
import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
|
|
5
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
|
6
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
7
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
8
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
|
-
|
|
10
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
11
|
-
|
|
12
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
13
|
-
|
|
14
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
15
|
-
|
|
16
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
17
|
-
|
|
18
|
-
import React, { Component } from 'react';
|
|
19
|
-
import PropTypes from 'prop-types';
|
|
20
|
-
import { B400, N40 } from '@atlaskit/theme/colors';
|
|
21
|
-
import { selectionManagerContext } from '../../util/contextNamespace';
|
|
22
|
-
import getDisplayName from '../../util/getDisplayName';
|
|
23
|
-
import { KEY_ENTER, KEY_SPACE } from '../../util/keys';
|
|
24
|
-
import safeContextCall from '../../util/safeContextCall';
|
|
25
|
-
|
|
26
|
-
// HOC that typically wraps @atlaskit/item
|
|
27
|
-
var withToggleInteraction = function withToggleInteraction(WrappedComponent, SelectionIcon, getAriaRole) {
|
|
28
|
-
var _class, _temp;
|
|
29
|
-
|
|
30
|
-
return _temp = _class = /*#__PURE__*/function (_Component) {
|
|
31
|
-
_inherits(WithToggleInteraction, _Component);
|
|
32
|
-
|
|
33
|
-
var _super = _createSuper(WithToggleInteraction);
|
|
34
|
-
|
|
35
|
-
function WithToggleInteraction() {
|
|
36
|
-
var _this;
|
|
37
|
-
|
|
38
|
-
_classCallCheck(this, WithToggleInteraction);
|
|
39
|
-
|
|
40
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
41
|
-
args[_key] = arguments[_key];
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
45
|
-
|
|
46
|
-
_defineProperty(_assertThisInitialized(_this), "getIconColors", function () {
|
|
47
|
-
var isSelected = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
48
|
-
|
|
49
|
-
if (isSelected) {
|
|
50
|
-
return {
|
|
51
|
-
primary: B400,
|
|
52
|
-
secondary: N40
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
return {
|
|
57
|
-
primary: N40,
|
|
58
|
-
secondary: N40
|
|
59
|
-
};
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
_defineProperty(_assertThisInitialized(_this), "warnIfUseControlledAndUncontrolledState", function () {
|
|
63
|
-
if (process.env.NODE_ENV !== 'production' && !process.env.CI) {
|
|
64
|
-
if (_this.props.defaultSelected && _this.props.isSelected) {
|
|
65
|
-
// eslint-disable-next-line no-console
|
|
66
|
-
console.warn('DropdownItem defaultSelected and isSelected props should not be used at the same time.');
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
_defineProperty(_assertThisInitialized(_this), "callContextFn", safeContextCall(_assertThisInitialized(_this), selectionManagerContext));
|
|
72
|
-
|
|
73
|
-
_defineProperty(_assertThisInitialized(_this), "handleKeyboard", function (event) {
|
|
74
|
-
var key = event.key;
|
|
75
|
-
|
|
76
|
-
if (key === KEY_ENTER || key === KEY_SPACE) {
|
|
77
|
-
// We prevent default here to avoid page scroll
|
|
78
|
-
event.preventDefault();
|
|
79
|
-
|
|
80
|
-
_this.handleItemActivated(event);
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
|
|
84
|
-
_defineProperty(_assertThisInitialized(_this), "handleItemActivated", function (event) {
|
|
85
|
-
if (_this.props.onClick) {
|
|
86
|
-
_this.props.onClick(event);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
_this.callContextFn('itemClicked', _this.props.id);
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
_defineProperty(_assertThisInitialized(_this), "isSelectedInDropdown", function () {
|
|
93
|
-
return _this.callContextFn('isItemSelected', _this.props.id);
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
return _this;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
_createClass(WithToggleInteraction, [{
|
|
100
|
-
key: "componentDidMount",
|
|
101
|
-
value: function componentDidMount() {
|
|
102
|
-
var _this$props = this.props,
|
|
103
|
-
defaultSelected = _this$props.defaultSelected,
|
|
104
|
-
isSelected = _this$props.isSelected,
|
|
105
|
-
id = _this$props.id;
|
|
106
|
-
this.warnIfUseControlledAndUncontrolledState();
|
|
107
|
-
this.callContextFn('setItemSelected', id, isSelected, defaultSelected);
|
|
108
|
-
}
|
|
109
|
-
}, {
|
|
110
|
-
key: "UNSAFE_componentWillReceiveProps",
|
|
111
|
-
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
112
|
-
var id = nextProps.id,
|
|
113
|
-
defaultSelected = nextProps.defaultSelected,
|
|
114
|
-
isSelected = nextProps.isSelected;
|
|
115
|
-
|
|
116
|
-
if (this.props.isSelected !== isSelected) {
|
|
117
|
-
this.callContextFn('setItemSelected', id, isSelected, defaultSelected);
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}, {
|
|
121
|
-
key: "render",
|
|
122
|
-
value: function render() {
|
|
123
|
-
var _this$props2 = this.props,
|
|
124
|
-
children = _this$props2.children,
|
|
125
|
-
otherProps = _objectWithoutProperties(_this$props2, ["children"]);
|
|
126
|
-
|
|
127
|
-
var isSelected = this.isSelectedInDropdown();
|
|
128
|
-
var iconColors = this.getIconColors(!!isSelected);
|
|
129
|
-
var ariaRole = getAriaRole();
|
|
130
|
-
|
|
131
|
-
var wrappedCompProps = _objectSpread(_objectSpread({}, otherProps), {}, {
|
|
132
|
-
role: ariaRole,
|
|
133
|
-
'aria-checked': isSelected,
|
|
134
|
-
isSelected: isSelected,
|
|
135
|
-
onClick: this.handleItemActivated,
|
|
136
|
-
onKeyDown: this.handleKeyboard,
|
|
137
|
-
elemBefore: /*#__PURE__*/React.createElement(SelectionIcon, {
|
|
138
|
-
primaryColor: iconColors.primary,
|
|
139
|
-
secondaryColor: iconColors.secondary,
|
|
140
|
-
size: "medium",
|
|
141
|
-
label: ""
|
|
142
|
-
})
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
return /*#__PURE__*/React.createElement(WrappedComponent, wrappedCompProps, children);
|
|
146
|
-
}
|
|
147
|
-
}]);
|
|
148
|
-
|
|
149
|
-
return WithToggleInteraction;
|
|
150
|
-
}(Component), _defineProperty(_class, "displayName", "WithToggleInteraction(".concat(getDisplayName(WrappedComponent), ")")), _defineProperty(_class, "defaultProps", {
|
|
151
|
-
onClick: function onClick() {}
|
|
152
|
-
}), _defineProperty(_class, "contextTypes", _defineProperty({}, selectionManagerContext, PropTypes.object.isRequired)), _temp;
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
export default withToggleInteraction;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import CheckboxIcon from '@atlaskit/icon/glyph/checkbox';
|
|
2
|
-
import Item, { withItemFocus } from '@atlaskit/item';
|
|
3
|
-
import supportsVoiceover from '../../util/supportsVoiceover';
|
|
4
|
-
import withToggleInteraction from '../hoc/withToggleInteraction';
|
|
5
|
-
export default withToggleInteraction(withItemFocus(Item), CheckboxIcon, function () {
|
|
6
|
-
return supportsVoiceover() ? 'checkbox' : 'menuitemcheckbox';
|
|
7
|
-
});
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import RadioIcon from '@atlaskit/icon/glyph/radio';
|
|
2
|
-
import Item, { withItemFocus } from '@atlaskit/item';
|
|
3
|
-
import supportsVoiceover from '../../util/supportsVoiceover';
|
|
4
|
-
import withToggleInteraction from '../hoc/withToggleInteraction';
|
|
5
|
-
export default withToggleInteraction(withItemFocus(Item), RadioIcon, function () {
|
|
6
|
-
return supportsVoiceover() ? 'radio' : 'menuitemradio';
|
|
7
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function (_) {}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function (_) {}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function (_) {}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
-
|
|
3
|
-
var _templateObject;
|
|
4
|
-
|
|
5
|
-
import styled from 'styled-components';
|
|
6
|
-
export default styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", ";\n"])), function (_ref) {
|
|
7
|
-
var shouldFitContainer = _ref.shouldFitContainer;
|
|
8
|
-
return shouldFitContainer ? '' : 'max-width: 300px;';
|
|
9
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
var prefix = function prefix(key) {
|
|
2
|
-
return "@atlaskit-private-do-not-use/dropdown-menu:".concat(key);
|
|
3
|
-
};
|
|
4
|
-
|
|
5
|
-
export var focusManagerContext = prefix('focus-manager');
|
|
6
|
-
export var selectionCacheContext = prefix('selection-cache');
|
|
7
|
-
export var selectionManagerContext = prefix('selection-manager');
|
|
8
|
-
export var clickManagerContext = prefix('click-manager');
|
package/dist/esm/util/keys.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// There are cases where the context is not available, such as when a dropdown item is used
|
|
2
|
-
// inside @atlaskit/navigation. For this reason we have this helper function which safely calls
|
|
3
|
-
// the context functions if they are available.
|
|
4
|
-
export default (function (instance, contextKey) {
|
|
5
|
-
return function (fnToCall) {
|
|
6
|
-
var _instance$context$con;
|
|
7
|
-
|
|
8
|
-
if (!instance.context[contextKey]) {
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
13
|
-
args[_key - 1] = arguments[_key];
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return (_instance$context$con = instance.context[contextKey])[fnToCall].apply(_instance$context$con, args);
|
|
17
|
-
};
|
|
18
|
-
});
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
var canUseDOM = function canUseDOM() {
|
|
2
|
-
return Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
3
|
-
};
|
|
4
|
-
|
|
5
|
-
var supportsVoiceOver = function supportsVoiceOver() {
|
|
6
|
-
return /Mac OS X/.test(canUseDOM() ? navigator.userAgent : '');
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
export default supportsVoiceOver;
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
2
|
-
import { DeprecatedItemGroup, DropdownMenuStatefulProps, OnItemActivatedArgs, OnOpenChangeArgs } from '../types';
|
|
3
|
-
interface State {
|
|
4
|
-
isOpen: boolean;
|
|
5
|
-
items: Array<DeprecatedItemGroup>;
|
|
6
|
-
}
|
|
7
|
-
export default class DropdownMenu extends Component<DropdownMenuStatefulProps, State> {
|
|
8
|
-
static defaultProps: {
|
|
9
|
-
appearance: string;
|
|
10
|
-
boundariesElement: string;
|
|
11
|
-
defaultOpen: boolean;
|
|
12
|
-
isLoading: boolean;
|
|
13
|
-
isOpen: boolean;
|
|
14
|
-
items: never[];
|
|
15
|
-
onItemActivated: () => void;
|
|
16
|
-
onOpenChange: () => void;
|
|
17
|
-
position: string;
|
|
18
|
-
isMenuFixed: boolean;
|
|
19
|
-
shouldAllowMultilineItems: boolean;
|
|
20
|
-
shouldFitContainer: boolean;
|
|
21
|
-
shouldFlip: boolean;
|
|
22
|
-
triggerType: string;
|
|
23
|
-
onPositioned: () => void;
|
|
24
|
-
};
|
|
25
|
-
state: {
|
|
26
|
-
isOpen: boolean;
|
|
27
|
-
items: DeprecatedItemGroup[];
|
|
28
|
-
};
|
|
29
|
-
UNSAFE_componentWillReceiveProps(nextProps: DropdownMenuStatefulProps): void;
|
|
30
|
-
findActivatedGroup: (item: Object) => DeprecatedItemGroup;
|
|
31
|
-
handleItemActivation: (attrs: OnItemActivatedArgs) => void;
|
|
32
|
-
handleOpenChange: (attrs: OnOpenChangeArgs, ...args: Array<any>) => void;
|
|
33
|
-
close: (...args: Array<any>) => void;
|
|
34
|
-
render(): JSX.Element;
|
|
35
|
-
}
|
|
36
|
-
export {};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import React, { Component, KeyboardEvent, MouseEvent } from 'react';
|
|
2
|
-
import { DeprecatedItem, DeprecatedItemGroup, DropdownMenuStatelessProps, OnOpenChangeArgs } from '../types';
|
|
3
|
-
interface OpenCloseArgs {
|
|
4
|
-
event: MouseEvent | KeyboardEvent;
|
|
5
|
-
source?: 'click' | 'keydown';
|
|
6
|
-
}
|
|
7
|
-
interface State {
|
|
8
|
-
autoFocusDropdownItems: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare class DropdownMenuStateless extends Component<DropdownMenuStatelessProps, State> {
|
|
11
|
-
domItemsList?: NodeListOf<HTMLElement> | null;
|
|
12
|
-
focusedItem?: number;
|
|
13
|
-
triggerContainer?: HTMLElement;
|
|
14
|
-
sourceOfIsOpen?: string | null;
|
|
15
|
-
dropdownListPositioned: boolean;
|
|
16
|
-
static defaultProps: {
|
|
17
|
-
appearance: string;
|
|
18
|
-
boundariesElement: string;
|
|
19
|
-
isLoading: boolean;
|
|
20
|
-
isOpen: boolean;
|
|
21
|
-
items: never[];
|
|
22
|
-
onItemActivated: () => void;
|
|
23
|
-
onOpenChange: () => void;
|
|
24
|
-
position: string;
|
|
25
|
-
isMenuFixed: boolean;
|
|
26
|
-
shouldAllowMultilineItems: boolean;
|
|
27
|
-
shouldFitContainer: boolean;
|
|
28
|
-
shouldFlip: boolean;
|
|
29
|
-
triggerType: string;
|
|
30
|
-
onPositioned: () => void;
|
|
31
|
-
};
|
|
32
|
-
state: {
|
|
33
|
-
autoFocusDropdownItems: boolean;
|
|
34
|
-
};
|
|
35
|
-
componentDidMount: () => void;
|
|
36
|
-
componentDidUpdate: (prevProp: DropdownMenuStatelessProps) => void;
|
|
37
|
-
getNextFocusable: (indexItem?: number | undefined, available?: number | undefined) => number | null;
|
|
38
|
-
getPrevFocusable: (indexItem?: number | undefined, available?: number | undefined) => number | null;
|
|
39
|
-
focusFirstItem: () => void;
|
|
40
|
-
focusNextItem: () => void;
|
|
41
|
-
focusPreviousItem: () => void;
|
|
42
|
-
focusItem: (index?: number | null | undefined) => void;
|
|
43
|
-
isTargetChildItem: (target: HTMLElement) => boolean;
|
|
44
|
-
handleKeyboardInteractionForClosed: (event: KeyboardEvent) => void;
|
|
45
|
-
handleKeyboardInteractionsDeprecated: (event: KeyboardEvent<HTMLElement>) => void;
|
|
46
|
-
domMenuContainer: HTMLElement | null;
|
|
47
|
-
handleClickDeprecated(event: MouseEvent): void;
|
|
48
|
-
isUsingDeprecatedAPI: () => boolean;
|
|
49
|
-
handleClick(event: MouseEvent): void;
|
|
50
|
-
handleOpenChange: (args: OnOpenChangeArgs) => void;
|
|
51
|
-
triggerContent: () => {} | null | undefined;
|
|
52
|
-
open: (attrs: OpenCloseArgs) => void;
|
|
53
|
-
close: (attrs: OpenCloseArgs) => void;
|
|
54
|
-
toggle: (attrs: OpenCloseArgs) => void;
|
|
55
|
-
renderTrigger: () => {} | null | undefined;
|
|
56
|
-
renderItems: (items: DeprecatedItem[]) => JSX.Element[];
|
|
57
|
-
renderGroups: (groups: DeprecatedItemGroup[]) => JSX.Element[];
|
|
58
|
-
renderDeprecated: () => JSX.Element;
|
|
59
|
-
/** Ensure droplist is positioned before focussing to avoid container scrolling to top */
|
|
60
|
-
onDroplistPositioned: () => void;
|
|
61
|
-
/** Render focusManager only after droplist has been positioned when trigger via keyboard */
|
|
62
|
-
renderDropdownItems: () => JSX.Element;
|
|
63
|
-
render(): JSX.Element;
|
|
64
|
-
}
|
|
65
|
-
export { DropdownMenuStateless as DropdownMenuStatelessWithoutAnalytics };
|
|
66
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<Pick<Pick<DropdownMenuStatelessProps, "children" | "appearance" | "shouldFitContainer" | "testId" | "onOpenChange" | "boundariesElement" | "isLoading" | "isOpen" | "items" | "onItemActivated" | "position" | "isMenuFixed" | "shouldAllowMultilineItems" | "shouldFlip" | "trigger" | "triggerButtonProps" | "triggerType" | "onPositioned">, "children" | "testId" | "trigger" | "triggerButtonProps"> & Partial<Pick<Pick<DropdownMenuStatelessProps, "children" | "appearance" | "shouldFitContainer" | "testId" | "onOpenChange" | "boundariesElement" | "isLoading" | "isOpen" | "items" | "onItemActivated" | "position" | "isMenuFixed" | "shouldAllowMultilineItems" | "shouldFlip" | "trigger" | "triggerButtonProps" | "triggerType" | "onPositioned">, "appearance" | "shouldFitContainer" | "onOpenChange" | "boundariesElement" | "isLoading" | "isOpen" | "items" | "onItemActivated" | "position" | "isMenuFixed" | "shouldAllowMultilineItems" | "shouldFlip" | "triggerType" | "onPositioned">> & Partial<Pick<{
|
|
67
|
-
appearance: string;
|
|
68
|
-
boundariesElement: string;
|
|
69
|
-
isLoading: boolean;
|
|
70
|
-
isOpen: boolean;
|
|
71
|
-
items: never[];
|
|
72
|
-
onItemActivated: () => void;
|
|
73
|
-
onOpenChange: () => void;
|
|
74
|
-
position: string;
|
|
75
|
-
isMenuFixed: boolean;
|
|
76
|
-
shouldAllowMultilineItems: boolean;
|
|
77
|
-
shouldFitContainer: boolean;
|
|
78
|
-
shouldFlip: boolean;
|
|
79
|
-
triggerType: string;
|
|
80
|
-
onPositioned: () => void;
|
|
81
|
-
}, never>> & React.RefAttributes<any> & import("@atlaskit/analytics-next").WithContextProps, "children" | "appearance" | "shouldFitContainer" | "testId" | "analyticsContext" | "key" | "onOpenChange" | "boundariesElement" | "isLoading" | "isOpen" | "items" | "onItemActivated" | "position" | "isMenuFixed" | "shouldAllowMultilineItems" | "shouldFlip" | "trigger" | "triggerButtonProps" | "triggerType" | "onPositioned"> & React.RefAttributes<any>>;
|
|
82
|
-
export default _default;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Component, KeyboardEvent, MouseEvent, ReactNode } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
interface Props {
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
onItemClicked: (event: MouseEvent | KeyboardEvent) => void;
|
|
6
|
-
}
|
|
7
|
-
export default class DropdownItemClickManager extends Component<Props> {
|
|
8
|
-
static childContextTypes: {
|
|
9
|
-
[x: string]: PropTypes.Requireable<any>;
|
|
10
|
-
};
|
|
11
|
-
getChildContext(): {
|
|
12
|
-
[x: string]: {
|
|
13
|
-
itemClicked: (event: any) => void;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
handleItemClicked: (event: any) => void;
|
|
17
|
-
render(): ReactNode;
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { Component, KeyboardEvent, MouseEvent, ReactNode } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { FocusItem, ItemId } from '../../types';
|
|
4
|
-
interface Props {
|
|
5
|
-
/** Causes first registered item to receive focus */
|
|
6
|
-
autoFocus?: boolean;
|
|
7
|
-
children?: ReactNode;
|
|
8
|
-
close?: (args: {
|
|
9
|
-
event: MouseEvent | KeyboardEvent;
|
|
10
|
-
source?: 'click' | 'keydown';
|
|
11
|
-
}) => void;
|
|
12
|
-
}
|
|
13
|
-
export default class DropdownItemFocusManager extends Component<Props> {
|
|
14
|
-
static childContextTypes: {
|
|
15
|
-
[x: string]: PropTypes.Requireable<any>;
|
|
16
|
-
};
|
|
17
|
-
getChildContext(): {
|
|
18
|
-
[x: string]: {
|
|
19
|
-
itemFocused: (itemId: string) => void;
|
|
20
|
-
registerItem: (itemId: string, itemNode: HTMLElement) => void;
|
|
21
|
-
deregisterItem: (itemId: string) => void;
|
|
22
|
-
updateItem: (itemId: string, itemNode: HTMLElement) => void;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
registeredItems: Array<FocusItem>;
|
|
26
|
-
focusedItemId?: ItemId;
|
|
27
|
-
handleItemRegistered: (itemId: ItemId, itemNode: HTMLElement) => void;
|
|
28
|
-
handleItemDeregistered: (itemId: ItemId) => void;
|
|
29
|
-
handleItemFocused: (itemId: ItemId) => void;
|
|
30
|
-
handleItemUpdated: (itemId: ItemId, itemNode: HTMLElement) => void;
|
|
31
|
-
focusedItemIndex: () => number;
|
|
32
|
-
handleKeyboard: (event: KeyboardEvent) => void;
|
|
33
|
-
render(): JSX.Element;
|
|
34
|
-
}
|
|
35
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Component, ReactNode } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { CachedItem, GroupId, ItemId } from '../../types';
|
|
4
|
-
interface Props {
|
|
5
|
-
children?: ReactNode;
|
|
6
|
-
}
|
|
7
|
-
interface State {
|
|
8
|
-
lastCacheUpdate: number;
|
|
9
|
-
}
|
|
10
|
-
export default class DropdownItemSelectionCache extends Component<Props, State> {
|
|
11
|
-
static childContextTypes: {
|
|
12
|
-
[x: string]: PropTypes.Requireable<any>;
|
|
13
|
-
};
|
|
14
|
-
state: {
|
|
15
|
-
lastCacheUpdate: number;
|
|
16
|
-
};
|
|
17
|
-
selectedItems: Array<CachedItem>;
|
|
18
|
-
alreadyDefaultedItems: Array<CachedItem>;
|
|
19
|
-
getChildContext(): {
|
|
20
|
-
[x: string]: {
|
|
21
|
-
isItemSelected: (groupId: GroupId, itemId: ItemId) => boolean;
|
|
22
|
-
itemsInGroup: (groupId: GroupId) => CachedItem[];
|
|
23
|
-
itemSelectionsChanged: (groupId: string, newGroupSelections: CachedItem[]) => void;
|
|
24
|
-
hasItemAlreadyHadDefaultSelectedApplied: (groupId: GroupId, itemId: ItemId) => boolean;
|
|
25
|
-
markItemAsDefaultApplied: (groupId: GroupId, itemId: ItemId) => void;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
handleItemSelectionsChanged: (groupId: string, newGroupSelections: Array<CachedItem>) => void;
|
|
29
|
-
render(): JSX.Element;
|
|
30
|
-
}
|
|
31
|
-
export {};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Component, ReactNode } from 'react';
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
3
|
-
import { Behaviors, CachedItem, ItemId } from '../../types';
|
|
4
|
-
interface Props {
|
|
5
|
-
behavior: Behaviors;
|
|
6
|
-
groupId: string;
|
|
7
|
-
children?: ReactNode;
|
|
8
|
-
}
|
|
9
|
-
export default class DropdownItemSelectionManager extends Component<Props> {
|
|
10
|
-
static childContextTypes: {
|
|
11
|
-
[x: string]: PropTypes.Requireable<any>;
|
|
12
|
-
};
|
|
13
|
-
static contextTypes: {
|
|
14
|
-
[x: string]: PropTypes.Validator<any>;
|
|
15
|
-
};
|
|
16
|
-
getChildContext(): {
|
|
17
|
-
[x: string]: {
|
|
18
|
-
isItemSelected: (itemId: ItemId) => any;
|
|
19
|
-
itemClicked: (clickedItemId: string) => void;
|
|
20
|
-
setItemSelected: (itemId: string, isSelected?: boolean | undefined, defaultSelected?: boolean | undefined) => void;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
setItemSelected: (itemId: ItemId, isSelected?: boolean | undefined, defaultSelected?: boolean | undefined) => void;
|
|
24
|
-
setCheckboxItemSelected: (itemId: ItemId, isSelected: boolean) => void;
|
|
25
|
-
setRadioItemSelected: (itemId: ItemId, isSelected: boolean) => void;
|
|
26
|
-
isItemSelectedInCache: (itemId: ItemId) => boolean;
|
|
27
|
-
handleItemClicked: (clickedItemId: ItemId) => void;
|
|
28
|
-
hasAlreadyAppliedDefaultSelected: (itemId: ItemId) => any;
|
|
29
|
-
handleCheckboxItemClicked: (clickedItemId: ItemId) => void;
|
|
30
|
-
handleRadioItemClicked: (clickedItemId: ItemId) => void;
|
|
31
|
-
updateCacheContextWithSelections: (itemSelections: Array<CachedItem>) => void;
|
|
32
|
-
render(): JSX.Element;
|
|
33
|
-
}
|
|
34
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Component, ReactNode } from 'react';
|
|
2
|
-
export interface Props {
|
|
3
|
-
/** `DropdownItems` to be rendered inside the group.*/
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
/** Optional heading text to be shown above the items. */
|
|
6
|
-
title?: string;
|
|
7
|
-
/** Content to be shown to the right of the title heading. Not shown if no title is set. */
|
|
8
|
-
elemAfter?: ReactNode | string;
|
|
9
|
-
}
|
|
10
|
-
export default class DropdownItemGroup extends Component<Props> {
|
|
11
|
-
render(): JSX.Element;
|
|
12
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare const _default: {
|
|
3
|
-
new (props: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>): {
|
|
4
|
-
render(): JSX.Element;
|
|
5
|
-
context: any;
|
|
6
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
7
|
-
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
8
|
-
readonly props: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps> & Readonly<{
|
|
9
|
-
children?: import("react").ReactNode;
|
|
10
|
-
}>;
|
|
11
|
-
state: Readonly<{}>;
|
|
12
|
-
refs: {
|
|
13
|
-
[key: string]: import("react").ReactInstance;
|
|
14
|
-
};
|
|
15
|
-
componentDidMount?(): void;
|
|
16
|
-
shouldComponentUpdate?(nextProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
17
|
-
componentWillUnmount?(): void;
|
|
18
|
-
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
19
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, prevState: Readonly<{}>): any;
|
|
20
|
-
componentDidUpdate?(prevProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
21
|
-
componentWillMount?(): void;
|
|
22
|
-
UNSAFE_componentWillMount?(): void;
|
|
23
|
-
componentWillReceiveProps?(nextProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, nextContext: any): void;
|
|
24
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, nextContext: any): void;
|
|
25
|
-
componentWillUpdate?(nextProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
26
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
27
|
-
};
|
|
28
|
-
new (props: import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps, context?: any): {
|
|
29
|
-
render(): JSX.Element;
|
|
30
|
-
context: any;
|
|
31
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
32
|
-
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
33
|
-
readonly props: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps> & Readonly<{
|
|
34
|
-
children?: import("react").ReactNode;
|
|
35
|
-
}>;
|
|
36
|
-
state: Readonly<{}>;
|
|
37
|
-
refs: {
|
|
38
|
-
[key: string]: import("react").ReactInstance;
|
|
39
|
-
};
|
|
40
|
-
componentDidMount?(): void;
|
|
41
|
-
shouldComponentUpdate?(nextProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
42
|
-
componentWillUnmount?(): void;
|
|
43
|
-
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
44
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, prevState: Readonly<{}>): any;
|
|
45
|
-
componentDidUpdate?(prevProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
46
|
-
componentWillMount?(): void;
|
|
47
|
-
UNSAFE_componentWillMount?(): void;
|
|
48
|
-
componentWillReceiveProps?(nextProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, nextContext: any): void;
|
|
49
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, nextContext: any): void;
|
|
50
|
-
componentWillUpdate?(nextProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
51
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
52
|
-
};
|
|
53
|
-
contextType?: import("react").Context<any> | undefined;
|
|
54
|
-
};
|
|
55
|
-
export default _default;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
declare const _default: {
|
|
3
|
-
new (props: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>): {
|
|
4
|
-
render(): JSX.Element;
|
|
5
|
-
context: any;
|
|
6
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
7
|
-
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
8
|
-
readonly props: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps> & Readonly<{
|
|
9
|
-
children?: import("react").ReactNode;
|
|
10
|
-
}>;
|
|
11
|
-
state: Readonly<{}>;
|
|
12
|
-
refs: {
|
|
13
|
-
[key: string]: import("react").ReactInstance;
|
|
14
|
-
};
|
|
15
|
-
componentDidMount?(): void;
|
|
16
|
-
shouldComponentUpdate?(nextProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
17
|
-
componentWillUnmount?(): void;
|
|
18
|
-
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
19
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, prevState: Readonly<{}>): any;
|
|
20
|
-
componentDidUpdate?(prevProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
21
|
-
componentWillMount?(): void;
|
|
22
|
-
UNSAFE_componentWillMount?(): void;
|
|
23
|
-
componentWillReceiveProps?(nextProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, nextContext: any): void;
|
|
24
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, nextContext: any): void;
|
|
25
|
-
componentWillUpdate?(nextProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
26
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
27
|
-
};
|
|
28
|
-
new (props: import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps, context?: any): {
|
|
29
|
-
render(): JSX.Element;
|
|
30
|
-
context: any;
|
|
31
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
32
|
-
forceUpdate(callBack?: (() => void) | undefined): void;
|
|
33
|
-
readonly props: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps> & Readonly<{
|
|
34
|
-
children?: import("react").ReactNode;
|
|
35
|
-
}>;
|
|
36
|
-
state: Readonly<{}>;
|
|
37
|
-
refs: {
|
|
38
|
-
[key: string]: import("react").ReactInstance;
|
|
39
|
-
};
|
|
40
|
-
componentDidMount?(): void;
|
|
41
|
-
shouldComponentUpdate?(nextProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
42
|
-
componentWillUnmount?(): void;
|
|
43
|
-
componentDidCatch?(error: Error, errorInfo: import("react").ErrorInfo): void;
|
|
44
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, prevState: Readonly<{}>): any;
|
|
45
|
-
componentDidUpdate?(prevProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, prevState: Readonly<{}>, snapshot?: any): void;
|
|
46
|
-
componentWillMount?(): void;
|
|
47
|
-
UNSAFE_componentWillMount?(): void;
|
|
48
|
-
componentWillReceiveProps?(nextProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, nextContext: any): void;
|
|
49
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, nextContext: any): void;
|
|
50
|
-
componentWillUpdate?(nextProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
51
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("./DropdownItemGroup").Props & import("../hoc/withItemSelectionManager").WithDropdownItemSelectionManagerProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
52
|
-
};
|
|
53
|
-
contextType?: import("react").Context<any> | undefined;
|
|
54
|
-
};
|
|
55
|
-
export default _default;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Props } from '../group/DropdownItemGroup';
|
|
2
|
-
import { WithDropdownItemSelectionManagerProps } from '../hoc/withItemSelectionManager';
|
|
3
|
-
interface SelectionProps extends Props, WithDropdownItemSelectionManagerProps {
|
|
4
|
-
}
|
|
5
|
-
export default function (_: SelectionProps): void;
|
|
6
|
-
export {};
|