@atlaskit/select 16.7.0 → 16.7.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 +94 -82
- package/dist/cjs/AsyncCreatableSelect.js +1 -2
- package/dist/cjs/AsyncSelect.js +1 -2
- package/dist/cjs/CheckboxSelect.js +1 -2
- package/dist/cjs/CountrySelect.js +1 -2
- package/dist/cjs/CreatableSelect.js +1 -2
- package/dist/cjs/PopupSelect/PopupSelect.js +5 -6
- package/dist/cjs/PopupSelect/components.js +8 -12
- package/dist/cjs/RadioSelect.js +1 -2
- package/dist/cjs/Select.js +4 -6
- package/dist/cjs/components/index.js +2 -4
- package/dist/cjs/components/indicators.js +4 -7
- package/dist/cjs/components/input-aria-describedby.js +2 -3
- package/dist/cjs/components/input-options.js +7 -11
- package/dist/cjs/data/countries.js +3 -5
- package/dist/cjs/utils/grouped-options-announcement.js +2 -3
- package/dist/es2019/PopupSelect/components.js +2 -3
- package/dist/es2019/Select.js +1 -1
- package/dist/es2019/components/input-options.js +2 -3
- package/dist/esm/PopupSelect/PopupSelect.js +4 -4
- package/dist/esm/PopupSelect/components.js +3 -5
- package/dist/esm/Select.js +1 -1
- package/dist/esm/components/input-options.js +4 -6
- package/dist/types/PopupSelect/PopupSelect.d.ts +2 -2
- package/dist/types/PopupSelect/components.d.ts +1 -1
- package/dist/types-ts4.5/PopupSelect/PopupSelect.d.ts +2 -2
- package/dist/types-ts4.5/PopupSelect/components.d.ts +1 -1
- package/package.json +4 -4
- package/report.api.md +0 -3
- package/tmp/api-report-tmp.d.ts +3 -3
|
@@ -7,5 +7,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _asyncCreatable = _interopRequireDefault(require("react-select/async-creatable"));
|
|
9
9
|
var _createSelect = _interopRequireDefault(require("./createSelect"));
|
|
10
|
-
var _default = (0, _createSelect.default)(_asyncCreatable.default);
|
|
11
|
-
exports.default = _default;
|
|
10
|
+
var _default = exports.default = (0, _createSelect.default)(_asyncCreatable.default);
|
package/dist/cjs/AsyncSelect.js
CHANGED
|
@@ -7,5 +7,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _async = _interopRequireDefault(require("react-select/async"));
|
|
9
9
|
var _createSelect = _interopRequireDefault(require("./createSelect"));
|
|
10
|
-
var _default = (0, _createSelect.default)(_async.default);
|
|
11
|
-
exports.default = _default;
|
|
10
|
+
var _default = exports.default = (0, _createSelect.default)(_async.default);
|
|
@@ -7,5 +7,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = void 0;
|
|
8
8
|
var _creatable = _interopRequireDefault(require("react-select/creatable"));
|
|
9
9
|
var _createSelect = _interopRequireDefault(require("./createSelect"));
|
|
10
|
-
var _default = (0, _createSelect.default)(_creatable.default);
|
|
11
|
-
exports.default = _default;
|
|
10
|
+
var _default = exports.default = (0, _createSelect.default)(_creatable.default);
|
|
@@ -69,7 +69,7 @@ var defaultPopperProps = {
|
|
|
69
69
|
var isEmpty = function isEmpty(obj) {
|
|
70
70
|
return Object.keys(obj).length === 0;
|
|
71
71
|
};
|
|
72
|
-
var PopupSelect = /*#__PURE__*/function (_PureComponent) {
|
|
72
|
+
var PopupSelect = exports.default = /*#__PURE__*/function (_PureComponent) {
|
|
73
73
|
(0, _inherits2.default)(PopupSelect, _PureComponent);
|
|
74
74
|
var _super = _createSuper(PopupSelect);
|
|
75
75
|
function PopupSelect() {
|
|
@@ -234,7 +234,7 @@ var PopupSelect = /*#__PURE__*/function (_PureComponent) {
|
|
|
234
234
|
if (typeof window === 'undefined') {
|
|
235
235
|
return;
|
|
236
236
|
}
|
|
237
|
-
(_this$unbindWindowKey = (_this2 = _this).unbindWindowKeydown) === null || _this$unbindWindowKey === void 0
|
|
237
|
+
(_this$unbindWindowKey = (_this2 = _this).unbindWindowKeydown) === null || _this$unbindWindowKey === void 0 || _this$unbindWindowKey.call(_this2);
|
|
238
238
|
_this.unbindWindowKeydown = null;
|
|
239
239
|
});
|
|
240
240
|
// Refs
|
|
@@ -359,7 +359,7 @@ var PopupSelect = /*#__PURE__*/function (_PureComponent) {
|
|
|
359
359
|
onFirstUpdate: function onFirstUpdate(state) {
|
|
360
360
|
var _mergedPopperProps$on;
|
|
361
361
|
_this.handleFirstPopperUpdate();
|
|
362
|
-
(_mergedPopperProps$on = mergedPopperProps.onFirstUpdate) === null || _mergedPopperProps$on === void 0
|
|
362
|
+
(_mergedPopperProps$on = mergedPopperProps.onFirstUpdate) === null || _mergedPopperProps$on === void 0 || _mergedPopperProps$on.call(mergedPopperProps, state);
|
|
363
363
|
}
|
|
364
364
|
}), function (_ref2) {
|
|
365
365
|
var placement = _ref2.placement,
|
|
@@ -433,9 +433,9 @@ var PopupSelect = /*#__PURE__*/function (_PureComponent) {
|
|
|
433
433
|
if (typeof window === 'undefined') {
|
|
434
434
|
return;
|
|
435
435
|
}
|
|
436
|
-
(_this$unbindWindowCli = this.unbindWindowClick) === null || _this$unbindWindowCli === void 0
|
|
436
|
+
(_this$unbindWindowCli = this.unbindWindowClick) === null || _this$unbindWindowCli === void 0 || _this$unbindWindowCli.call(this);
|
|
437
437
|
this.unbindWindowClick = null;
|
|
438
|
-
(_this$unbindWindowKey2 = this.unbindWindowKeydown) === null || _this$unbindWindowKey2 === void 0
|
|
438
|
+
(_this$unbindWindowKey2 = this.unbindWindowKeydown) === null || _this$unbindWindowKey2 === void 0 || _this$unbindWindowKey2.call(this);
|
|
439
439
|
this.unbindWindowKeydown = null;
|
|
440
440
|
}
|
|
441
441
|
}, {
|
|
@@ -496,7 +496,6 @@ var PopupSelect = /*#__PURE__*/function (_PureComponent) {
|
|
|
496
496
|
}]);
|
|
497
497
|
return PopupSelect;
|
|
498
498
|
}(_react.PureComponent);
|
|
499
|
-
exports.default = PopupSelect;
|
|
500
499
|
(0, _defineProperty2.default)(PopupSelect, "defaultProps", {
|
|
501
500
|
closeMenuOnSelect: true,
|
|
502
501
|
components: {},
|
|
@@ -13,8 +13,7 @@ var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"
|
|
|
13
13
|
var _search = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/search"));
|
|
14
14
|
var _constants = require("@atlaskit/theme/constants");
|
|
15
15
|
var _colors = require("@atlaskit/theme/colors");
|
|
16
|
-
var _excluded = ["innerRef", "innerProps"]
|
|
17
|
-
_excluded2 = ["children", "innerProps"];
|
|
16
|
+
var _excluded = ["innerRef", "innerProps"];
|
|
18
17
|
/** @jsx jsx */
|
|
19
18
|
// ==============================
|
|
20
19
|
// Styled Components
|
|
@@ -25,7 +24,7 @@ var menuDialogStyles = (0, _react.css)({
|
|
|
25
24
|
boxShadow: "var(--ds-shadow-overlay, ".concat("0 0 0 1px ".concat(_colors.N40A, ", 0 4px 11px ").concat(_colors.N40A), ")"),
|
|
26
25
|
zIndex: _constants.layers.modal()
|
|
27
26
|
});
|
|
28
|
-
var MenuDialog = function MenuDialog(_ref) {
|
|
27
|
+
var MenuDialog = exports.MenuDialog = function MenuDialog(_ref) {
|
|
29
28
|
var maxWidth = _ref.maxWidth,
|
|
30
29
|
minWidth = _ref.minWidth,
|
|
31
30
|
children = _ref.children,
|
|
@@ -50,9 +49,9 @@ var MenuDialog = function MenuDialog(_ref) {
|
|
|
50
49
|
// ==============================
|
|
51
50
|
// Custom Components
|
|
52
51
|
// ==============================
|
|
53
|
-
|
|
52
|
+
|
|
54
53
|
var dropdownStyles = (0, _react.css)({
|
|
55
|
-
|
|
54
|
+
marginInlineEnd: "var(--ds-space-025, 2px)",
|
|
56
55
|
textAlign: 'center',
|
|
57
56
|
width: 32
|
|
58
57
|
});
|
|
@@ -77,21 +76,18 @@ var Control = function Control(_ref2) {
|
|
|
77
76
|
innerProps: innerProps
|
|
78
77
|
})));
|
|
79
78
|
};
|
|
80
|
-
var DummyControl = function DummyControl(props) {
|
|
79
|
+
var DummyControl = exports.DummyControl = function DummyControl(props) {
|
|
81
80
|
return (0, _react.jsx)(_visuallyHidden.default, null, (0, _react.jsx)(_reactSelect.components.Control, props));
|
|
82
81
|
};
|
|
83
82
|
|
|
84
83
|
// NOTE `props` intentionally omitted from `Fragment`
|
|
85
|
-
exports.DummyControl = DummyControl;
|
|
86
84
|
var Menu = function Menu(_ref3) {
|
|
87
85
|
var children = _ref3.children,
|
|
88
|
-
innerProps = _ref3.innerProps
|
|
89
|
-
props = (0, _objectWithoutProperties2.default)(_ref3, _excluded2);
|
|
86
|
+
innerProps = _ref3.innerProps;
|
|
90
87
|
return (0, _react.jsx)("div", innerProps, children);
|
|
91
88
|
};
|
|
92
|
-
var defaultComponents = {
|
|
89
|
+
var defaultComponents = exports.defaultComponents = {
|
|
93
90
|
Control: Control,
|
|
94
91
|
DropdownIndicator: DropdownIndicator,
|
|
95
92
|
Menu: Menu
|
|
96
|
-
};
|
|
97
|
-
exports.defaultComponents = defaultComponents;
|
|
93
|
+
};
|
package/dist/cjs/RadioSelect.js
CHANGED
package/dist/cjs/Select.js
CHANGED
|
@@ -9,11 +9,10 @@ var _reactSelect = _interopRequireDefault(require("react-select"));
|
|
|
9
9
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
10
10
|
var _createSelect = _interopRequireDefault(require("./createSelect"));
|
|
11
11
|
var packageName = "@atlaskit/select";
|
|
12
|
-
var packageVersion = "16.7.
|
|
13
|
-
var SelectWithoutAnalytics = (0, _createSelect.default)(_reactSelect.default);
|
|
14
|
-
exports.SelectWithoutAnalytics = SelectWithoutAnalytics;
|
|
12
|
+
var packageVersion = "16.7.2";
|
|
13
|
+
var SelectWithoutAnalytics = exports.SelectWithoutAnalytics = (0, _createSelect.default)(_reactSelect.default);
|
|
15
14
|
var createAndFireEventOnAtlaskit = (0, _analyticsNext.createAndFireEvent)('atlaskit');
|
|
16
|
-
var _default = (0, _analyticsNext.withAnalyticsContext)({
|
|
15
|
+
var _default = exports.default = (0, _analyticsNext.withAnalyticsContext)({
|
|
17
16
|
componentName: 'select',
|
|
18
17
|
packageName: packageName,
|
|
19
18
|
packageVersion: packageVersion
|
|
@@ -27,5 +26,4 @@ var _default = (0, _analyticsNext.withAnalyticsContext)({
|
|
|
27
26
|
packageVersion: packageVersion
|
|
28
27
|
}
|
|
29
28
|
})
|
|
30
|
-
})(SelectWithoutAnalytics));
|
|
31
|
-
exports.default = _default;
|
|
29
|
+
})(SelectWithoutAnalytics));
|
|
@@ -36,7 +36,7 @@ var disabledStyles = (0, _react.css)({
|
|
|
36
36
|
var enabledStyles = (0, _react.css)({
|
|
37
37
|
display: 'inherit'
|
|
38
38
|
});
|
|
39
|
-
var MultiValueRemove = function MultiValueRemove(props) {
|
|
39
|
+
var MultiValueRemove = exports.MultiValueRemove = function MultiValueRemove(props) {
|
|
40
40
|
var isDisabled = props.selectProps.isDisabled;
|
|
41
41
|
return (0, _react.jsx)(_reactSelect.components.MultiValueRemove, props, (0, _react.jsx)("div", {
|
|
42
42
|
css: isDisabled ? disabledStyles : enabledStyles,
|
|
@@ -48,6 +48,4 @@ var MultiValueRemove = function MultiValueRemove(props) {
|
|
|
48
48
|
secondaryColor: "inherit"
|
|
49
49
|
})));
|
|
50
50
|
};
|
|
51
|
-
exports.
|
|
52
|
-
var IndicatorSeparator = null;
|
|
53
|
-
exports.IndicatorSeparator = IndicatorSeparator;
|
|
51
|
+
var IndicatorSeparator = exports.IndicatorSeparator = null;
|
|
@@ -20,7 +20,7 @@ var iconContainerStyles = (0, _react.css)({
|
|
|
20
20
|
display: 'flex',
|
|
21
21
|
alignItems: 'center'
|
|
22
22
|
});
|
|
23
|
-
var ClearIndicator = function ClearIndicator(props) {
|
|
23
|
+
var ClearIndicator = exports.ClearIndicator = function ClearIndicator(props) {
|
|
24
24
|
return (0, _react.jsx)(_reactSelect.components.ClearIndicator, _objectSpread(_objectSpread({}, props), {}, {
|
|
25
25
|
innerProps: _objectSpread(_objectSpread({}, props.innerProps), {}, {
|
|
26
26
|
'aria-hidden': 'false'
|
|
@@ -34,14 +34,12 @@ var ClearIndicator = function ClearIndicator(props) {
|
|
|
34
34
|
label: "clear"
|
|
35
35
|
})));
|
|
36
36
|
};
|
|
37
|
-
exports.
|
|
38
|
-
var DropdownIndicator = function DropdownIndicator(props) {
|
|
37
|
+
var DropdownIndicator = exports.DropdownIndicator = function DropdownIndicator(props) {
|
|
39
38
|
return (0, _react.jsx)(_reactSelect.components.DropdownIndicator, props, (0, _react.jsx)(_chevronDown.default, {
|
|
40
39
|
label: "open"
|
|
41
40
|
}));
|
|
42
41
|
};
|
|
43
|
-
exports.
|
|
44
|
-
var LoadingIndicator = function LoadingIndicator(props) {
|
|
42
|
+
var LoadingIndicator = exports.LoadingIndicator = function LoadingIndicator(props) {
|
|
45
43
|
var loadingStyles = (0, _react.css)(props.getStyles('loadingIndicator', props));
|
|
46
44
|
return (
|
|
47
45
|
// This *must* be constructed this way because this is being consumed by
|
|
@@ -53,5 +51,4 @@ var LoadingIndicator = function LoadingIndicator(props) {
|
|
|
53
51
|
size: "small"
|
|
54
52
|
}))
|
|
55
53
|
);
|
|
56
|
-
};
|
|
57
|
-
exports.LoadingIndicator = LoadingIndicator;
|
|
54
|
+
};
|
|
@@ -8,11 +8,10 @@ exports.Input = void 0;
|
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
10
|
var _reactSelect = require("react-select");
|
|
11
|
-
var Input = function Input(props) {
|
|
11
|
+
var Input = exports.Input = function Input(props) {
|
|
12
12
|
var passed_describedby = props.selectProps['aria-describedby'];
|
|
13
13
|
var describedby = props['aria-describedby'] + (passed_describedby ? ' ' + passed_describedby : '');
|
|
14
14
|
return /*#__PURE__*/_react.default.createElement(_reactSelect.components.Input, (0, _extends2.default)({}, props, {
|
|
15
15
|
"aria-describedby": describedby
|
|
16
16
|
}));
|
|
17
|
-
};
|
|
18
|
-
exports.Input = Input;
|
|
17
|
+
};
|
|
@@ -24,8 +24,7 @@ var _components = require("@atlaskit/theme/components");
|
|
|
24
24
|
var _colors = require("@atlaskit/theme/colors");
|
|
25
25
|
var _excluded = ["isActive", "isDisabled", "isFocused", "isSelected"],
|
|
26
26
|
_excluded2 = ["isActive", "isDisabled", "isSelected"],
|
|
27
|
-
_excluded3 = ["
|
|
28
|
-
_excluded4 = ["getStyles", "Icon", "children", "innerProps", "innerRef"];
|
|
27
|
+
_excluded3 = ["getStyles", "Icon", "children", "innerProps", "innerRef"];
|
|
29
28
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
30
29
|
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; } }
|
|
31
30
|
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; }
|
|
@@ -157,8 +156,7 @@ var getBorderColor = function getBorderColor(_ref3) {
|
|
|
157
156
|
var isActive = _ref3.isActive,
|
|
158
157
|
isDisabled = _ref3.isDisabled,
|
|
159
158
|
isFocused = _ref3.isFocused,
|
|
160
|
-
isSelected = _ref3.isSelected
|
|
161
|
-
rest = (0, _objectWithoutProperties2.default)(_ref3, _excluded3);
|
|
159
|
+
isSelected = _ref3.isSelected;
|
|
162
160
|
if (isDisabled && isSelected) {
|
|
163
161
|
return "var(--ds-background-disabled, ".concat(_colors.B400, ")");
|
|
164
162
|
} else if (isDisabled) {
|
|
@@ -180,7 +178,7 @@ var baseIconStyles = (0, _react.css)({
|
|
|
180
178
|
alignItems: 'center',
|
|
181
179
|
display: 'flex ',
|
|
182
180
|
flexShrink: 0,
|
|
183
|
-
|
|
181
|
+
paddingInlineEnd: "var(--ds-space-050, 4px)",
|
|
184
182
|
// Here we are adding a border to the Checkbox and Radio SVG icons
|
|
185
183
|
// This is an a11y fix for Select only for now but it may be rolled
|
|
186
184
|
// into the `@atlaskit/icon` package's Checkbox and Radio SVGs later
|
|
@@ -235,7 +233,7 @@ var ControlOption = /*#__PURE__*/function (_Component) {
|
|
|
235
233
|
children = _this$props.children,
|
|
236
234
|
innerProps = _this$props.innerProps,
|
|
237
235
|
innerRef = _this$props.innerRef,
|
|
238
|
-
rest = (0, _objectWithoutProperties2.default)(_this$props,
|
|
236
|
+
rest = (0, _objectWithoutProperties2.default)(_this$props, _excluded3);
|
|
239
237
|
|
|
240
238
|
// prop assignment
|
|
241
239
|
var props = _objectSpread(_objectSpread({}, innerProps), {}, {
|
|
@@ -286,15 +284,13 @@ var ControlOption = /*#__PURE__*/function (_Component) {
|
|
|
286
284
|
}]);
|
|
287
285
|
return ControlOption;
|
|
288
286
|
}(_react2.Component);
|
|
289
|
-
var CheckboxOption = function CheckboxOption(props) {
|
|
287
|
+
var CheckboxOption = exports.CheckboxOption = function CheckboxOption(props) {
|
|
290
288
|
return (0, _react.jsx)(ControlOption, (0, _extends2.default)({
|
|
291
289
|
Icon: _checkbox.default
|
|
292
290
|
}, props));
|
|
293
291
|
};
|
|
294
|
-
exports.
|
|
295
|
-
var RadioOption = function RadioOption(props) {
|
|
292
|
+
var RadioOption = exports.RadioOption = function RadioOption(props) {
|
|
296
293
|
return (0, _react.jsx)(ControlOption, (0, _extends2.default)({
|
|
297
294
|
Icon: _radio.default
|
|
298
295
|
}, props));
|
|
299
|
-
};
|
|
300
|
-
exports.RadioOption = RadioOption;
|
|
296
|
+
};
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.groupedCountries = exports.allCountries = void 0;
|
|
7
|
-
var allCountries = [{
|
|
7
|
+
var allCountries = exports.allCountries = [{
|
|
8
8
|
icon: '🇦🇫',
|
|
9
9
|
name: 'Afghanistan',
|
|
10
10
|
abbr: 'AF',
|
|
@@ -1253,8 +1253,7 @@ var allCountries = [{
|
|
|
1253
1253
|
}];
|
|
1254
1254
|
|
|
1255
1255
|
// separate countries into groups
|
|
1256
|
-
exports.
|
|
1257
|
-
var groupedCountries = [{
|
|
1256
|
+
var groupedCountries = exports.groupedCountries = [{
|
|
1258
1257
|
label: 'Suggested',
|
|
1259
1258
|
options: allCountries.filter(function (c) {
|
|
1260
1259
|
return c.suggested;
|
|
@@ -1264,5 +1263,4 @@ var groupedCountries = [{
|
|
|
1264
1263
|
options: allCountries.filter(function (c) {
|
|
1265
1264
|
return !c.suggested;
|
|
1266
1265
|
})
|
|
1267
|
-
}];
|
|
1268
|
-
exports.groupedCountries = groupedCountries;
|
|
1266
|
+
}];
|
|
@@ -23,9 +23,8 @@ function onFocus(props) {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
// Helper function which identifies if options are grouped.
|
|
26
|
-
var isOptionsGrouped = function isOptionsGrouped(arr) {
|
|
26
|
+
var isOptionsGrouped = exports.isOptionsGrouped = function isOptionsGrouped(arr) {
|
|
27
27
|
return arr === null || arr === void 0 ? void 0 : arr.every(function (obj) {
|
|
28
28
|
return obj.hasOwnProperty('options');
|
|
29
29
|
});
|
|
30
|
-
};
|
|
31
|
-
exports.isOptionsGrouped = isOptionsGrouped;
|
|
30
|
+
};
|
|
@@ -43,7 +43,7 @@ export const MenuDialog = ({
|
|
|
43
43
|
// ==============================
|
|
44
44
|
|
|
45
45
|
const dropdownStyles = css({
|
|
46
|
-
|
|
46
|
+
marginInlineEnd: "var(--ds-space-025, 2px)",
|
|
47
47
|
textAlign: 'center',
|
|
48
48
|
width: 32
|
|
49
49
|
});
|
|
@@ -70,8 +70,7 @@ export const DummyControl = props => jsx(VisuallyHidden, null, jsx(components.Co
|
|
|
70
70
|
// NOTE `props` intentionally omitted from `Fragment`
|
|
71
71
|
const Menu = ({
|
|
72
72
|
children,
|
|
73
|
-
innerProps
|
|
74
|
-
...props
|
|
73
|
+
innerProps
|
|
75
74
|
}) => jsx("div", innerProps, children);
|
|
76
75
|
export const defaultComponents = {
|
|
77
76
|
Control,
|
package/dist/es2019/Select.js
CHANGED
|
@@ -2,7 +2,7 @@ import Select from 'react-select';
|
|
|
2
2
|
import { withAnalyticsEvents, withAnalyticsContext, createAndFireEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import createSelect from './createSelect';
|
|
4
4
|
const packageName = "@atlaskit/select";
|
|
5
|
-
const packageVersion = "16.7.
|
|
5
|
+
const packageVersion = "16.7.2";
|
|
6
6
|
export const SelectWithoutAnalytics = createSelect(Select);
|
|
7
7
|
const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
8
8
|
export default withAnalyticsContext({
|
|
@@ -142,8 +142,7 @@ const getBorderColor = ({
|
|
|
142
142
|
isActive,
|
|
143
143
|
isDisabled,
|
|
144
144
|
isFocused,
|
|
145
|
-
isSelected
|
|
146
|
-
...rest
|
|
145
|
+
isSelected
|
|
147
146
|
}) => {
|
|
148
147
|
if (isDisabled && isSelected) {
|
|
149
148
|
return `var(--ds-background-disabled, ${B400})`;
|
|
@@ -166,7 +165,7 @@ const baseIconStyles = css({
|
|
|
166
165
|
alignItems: 'center',
|
|
167
166
|
display: 'flex ',
|
|
168
167
|
flexShrink: 0,
|
|
169
|
-
|
|
168
|
+
paddingInlineEnd: "var(--ds-space-050, 4px)",
|
|
170
169
|
// Here we are adding a border to the Checkbox and Radio SVG icons
|
|
171
170
|
// This is an a11y fix for Select only for now but it may be rolled
|
|
172
171
|
// into the `@atlaskit/icon` package's Checkbox and Radio SVGs later
|
|
@@ -224,7 +224,7 @@ var PopupSelect = /*#__PURE__*/function (_PureComponent) {
|
|
|
224
224
|
if (typeof window === 'undefined') {
|
|
225
225
|
return;
|
|
226
226
|
}
|
|
227
|
-
(_this$unbindWindowKey = (_this2 = _this).unbindWindowKeydown) === null || _this$unbindWindowKey === void 0
|
|
227
|
+
(_this$unbindWindowKey = (_this2 = _this).unbindWindowKeydown) === null || _this$unbindWindowKey === void 0 || _this$unbindWindowKey.call(_this2);
|
|
228
228
|
_this.unbindWindowKeydown = null;
|
|
229
229
|
});
|
|
230
230
|
// Refs
|
|
@@ -349,7 +349,7 @@ var PopupSelect = /*#__PURE__*/function (_PureComponent) {
|
|
|
349
349
|
onFirstUpdate: function onFirstUpdate(state) {
|
|
350
350
|
var _mergedPopperProps$on;
|
|
351
351
|
_this.handleFirstPopperUpdate();
|
|
352
|
-
(_mergedPopperProps$on = mergedPopperProps.onFirstUpdate) === null || _mergedPopperProps$on === void 0
|
|
352
|
+
(_mergedPopperProps$on = mergedPopperProps.onFirstUpdate) === null || _mergedPopperProps$on === void 0 || _mergedPopperProps$on.call(mergedPopperProps, state);
|
|
353
353
|
}
|
|
354
354
|
}), function (_ref2) {
|
|
355
355
|
var placement = _ref2.placement,
|
|
@@ -423,9 +423,9 @@ var PopupSelect = /*#__PURE__*/function (_PureComponent) {
|
|
|
423
423
|
if (typeof window === 'undefined') {
|
|
424
424
|
return;
|
|
425
425
|
}
|
|
426
|
-
(_this$unbindWindowCli = this.unbindWindowClick) === null || _this$unbindWindowCli === void 0
|
|
426
|
+
(_this$unbindWindowCli = this.unbindWindowClick) === null || _this$unbindWindowCli === void 0 || _this$unbindWindowCli.call(this);
|
|
427
427
|
this.unbindWindowClick = null;
|
|
428
|
-
(_this$unbindWindowKey2 = this.unbindWindowKeydown) === null || _this$unbindWindowKey2 === void 0
|
|
428
|
+
(_this$unbindWindowKey2 = this.unbindWindowKeydown) === null || _this$unbindWindowKey2 === void 0 || _this$unbindWindowKey2.call(this);
|
|
429
429
|
this.unbindWindowKeydown = null;
|
|
430
430
|
}
|
|
431
431
|
}, {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["innerRef", "innerProps"]
|
|
4
|
-
_excluded2 = ["children", "innerProps"];
|
|
3
|
+
var _excluded = ["innerRef", "innerProps"];
|
|
5
4
|
/** @jsx jsx */
|
|
6
5
|
|
|
7
6
|
import { components } from 'react-select';
|
|
@@ -47,7 +46,7 @@ export var MenuDialog = function MenuDialog(_ref) {
|
|
|
47
46
|
// ==============================
|
|
48
47
|
|
|
49
48
|
var dropdownStyles = css({
|
|
50
|
-
|
|
49
|
+
marginInlineEnd: "var(--ds-space-025, 2px)",
|
|
51
50
|
textAlign: 'center',
|
|
52
51
|
width: 32
|
|
53
52
|
});
|
|
@@ -79,8 +78,7 @@ export var DummyControl = function DummyControl(props) {
|
|
|
79
78
|
// NOTE `props` intentionally omitted from `Fragment`
|
|
80
79
|
var Menu = function Menu(_ref3) {
|
|
81
80
|
var children = _ref3.children,
|
|
82
|
-
innerProps = _ref3.innerProps
|
|
83
|
-
props = _objectWithoutProperties(_ref3, _excluded2);
|
|
81
|
+
innerProps = _ref3.innerProps;
|
|
84
82
|
return jsx("div", innerProps, children);
|
|
85
83
|
};
|
|
86
84
|
export var defaultComponents = {
|
package/dist/esm/Select.js
CHANGED
|
@@ -2,7 +2,7 @@ import Select from 'react-select';
|
|
|
2
2
|
import { withAnalyticsEvents, withAnalyticsContext, createAndFireEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import createSelect from './createSelect';
|
|
4
4
|
var packageName = "@atlaskit/select";
|
|
5
|
-
var packageVersion = "16.7.
|
|
5
|
+
var packageVersion = "16.7.2";
|
|
6
6
|
export var SelectWithoutAnalytics = createSelect(Select);
|
|
7
7
|
var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
|
|
8
8
|
export default withAnalyticsContext({
|
|
@@ -10,8 +10,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
|
|
|
10
10
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
11
11
|
var _excluded = ["isActive", "isDisabled", "isFocused", "isSelected"],
|
|
12
12
|
_excluded2 = ["isActive", "isDisabled", "isSelected"],
|
|
13
|
-
_excluded3 = ["
|
|
14
|
-
_excluded4 = ["getStyles", "Icon", "children", "innerProps", "innerRef"];
|
|
13
|
+
_excluded3 = ["getStyles", "Icon", "children", "innerProps", "innerRef"];
|
|
15
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); }; }
|
|
16
15
|
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
16
|
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; }
|
|
@@ -151,8 +150,7 @@ var getBorderColor = function getBorderColor(_ref3) {
|
|
|
151
150
|
var isActive = _ref3.isActive,
|
|
152
151
|
isDisabled = _ref3.isDisabled,
|
|
153
152
|
isFocused = _ref3.isFocused,
|
|
154
|
-
isSelected = _ref3.isSelected
|
|
155
|
-
rest = _objectWithoutProperties(_ref3, _excluded3);
|
|
153
|
+
isSelected = _ref3.isSelected;
|
|
156
154
|
if (isDisabled && isSelected) {
|
|
157
155
|
return "var(--ds-background-disabled, ".concat(B400, ")");
|
|
158
156
|
} else if (isDisabled) {
|
|
@@ -174,7 +172,7 @@ var baseIconStyles = css({
|
|
|
174
172
|
alignItems: 'center',
|
|
175
173
|
display: 'flex ',
|
|
176
174
|
flexShrink: 0,
|
|
177
|
-
|
|
175
|
+
paddingInlineEnd: "var(--ds-space-050, 4px)",
|
|
178
176
|
// Here we are adding a border to the Checkbox and Radio SVG icons
|
|
179
177
|
// This is an a11y fix for Select only for now but it may be rolled
|
|
180
178
|
// into the `@atlaskit/icon` package's Checkbox and Radio SVGs later
|
|
@@ -229,7 +227,7 @@ var ControlOption = /*#__PURE__*/function (_Component) {
|
|
|
229
227
|
children = _this$props.children,
|
|
230
228
|
innerProps = _this$props.innerProps,
|
|
231
229
|
innerRef = _this$props.innerRef,
|
|
232
|
-
rest = _objectWithoutProperties(_this$props,
|
|
230
|
+
rest = _objectWithoutProperties(_this$props, _excluded3);
|
|
233
231
|
|
|
234
232
|
// prop assignment
|
|
235
233
|
var props = _objectSpread(_objectSpread({}, innerProps), {}, {
|
|
@@ -104,7 +104,7 @@ export default class PopupSelect<Option = OptionType, IsMulti extends boolean =
|
|
|
104
104
|
mergedComponents: {
|
|
105
105
|
Control: React.FC<import("../types").ControlProps<OptionType, boolean>>;
|
|
106
106
|
DropdownIndicator: () => import("@emotion/react").jsx.JSX.Element;
|
|
107
|
-
Menu: ({ children, innerProps
|
|
107
|
+
Menu: ({ children, innerProps }: import("../types").MenuProps<OptionType, boolean>) => import("@emotion/react").jsx.JSX.Element;
|
|
108
108
|
};
|
|
109
109
|
mergedPopperProps: PopperPropsNoChildren<string>;
|
|
110
110
|
focusLockEnabled?: undefined;
|
|
@@ -114,7 +114,7 @@ export default class PopupSelect<Option = OptionType, IsMulti extends boolean =
|
|
|
114
114
|
mergedComponents: {
|
|
115
115
|
Control: React.FC<import("../types").ControlProps<OptionType, boolean>>;
|
|
116
116
|
DropdownIndicator: () => import("@emotion/react").jsx.JSX.Element;
|
|
117
|
-
Menu: ({ children, innerProps
|
|
117
|
+
Menu: ({ children, innerProps }: import("../types").MenuProps<OptionType, boolean>) => import("@emotion/react").jsx.JSX.Element;
|
|
118
118
|
};
|
|
119
119
|
mergedPopperProps: PopperPropsNoChildren<string>;
|
|
120
120
|
};
|
|
@@ -15,6 +15,6 @@ export declare const DummyControl: FC<ControlProps<OptionType, boolean>>;
|
|
|
15
15
|
export declare const defaultComponents: {
|
|
16
16
|
Control: FC<ControlProps<OptionType, boolean>>;
|
|
17
17
|
DropdownIndicator: () => jsx.JSX.Element;
|
|
18
|
-
Menu: ({ children, innerProps
|
|
18
|
+
Menu: ({ children, innerProps }: MenuProps<OptionType, boolean>) => jsx.JSX.Element;
|
|
19
19
|
};
|
|
20
20
|
export {};
|
|
@@ -104,7 +104,7 @@ export default class PopupSelect<Option = OptionType, IsMulti extends boolean =
|
|
|
104
104
|
mergedComponents: {
|
|
105
105
|
Control: React.FC<import("../types").ControlProps<OptionType, boolean>>;
|
|
106
106
|
DropdownIndicator: () => import("@emotion/react").jsx.JSX.Element;
|
|
107
|
-
Menu: ({ children, innerProps
|
|
107
|
+
Menu: ({ children, innerProps }: import("../types").MenuProps<OptionType, boolean>) => import("@emotion/react").jsx.JSX.Element;
|
|
108
108
|
};
|
|
109
109
|
mergedPopperProps: PopperPropsNoChildren<string>;
|
|
110
110
|
focusLockEnabled?: undefined;
|
|
@@ -114,7 +114,7 @@ export default class PopupSelect<Option = OptionType, IsMulti extends boolean =
|
|
|
114
114
|
mergedComponents: {
|
|
115
115
|
Control: React.FC<import("../types").ControlProps<OptionType, boolean>>;
|
|
116
116
|
DropdownIndicator: () => import("@emotion/react").jsx.JSX.Element;
|
|
117
|
-
Menu: ({ children, innerProps
|
|
117
|
+
Menu: ({ children, innerProps }: import("../types").MenuProps<OptionType, boolean>) => import("@emotion/react").jsx.JSX.Element;
|
|
118
118
|
};
|
|
119
119
|
mergedPopperProps: PopperPropsNoChildren<string>;
|
|
120
120
|
};
|
|
@@ -15,6 +15,6 @@ export declare const DummyControl: FC<ControlProps<OptionType, boolean>>;
|
|
|
15
15
|
export declare const defaultComponents: {
|
|
16
16
|
Control: FC<ControlProps<OptionType, boolean>>;
|
|
17
17
|
DropdownIndicator: () => jsx.JSX.Element;
|
|
18
|
-
Menu: ({ children, innerProps
|
|
18
|
+
Menu: ({ children, innerProps }: MenuProps<OptionType, boolean>) => jsx.JSX.Element;
|
|
19
19
|
};
|
|
20
20
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/select",
|
|
3
|
-
"version": "16.7.
|
|
3
|
+
"version": "16.7.2",
|
|
4
4
|
"description": "Select allows users to make a single selection or multiple selections from a list of options.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
42
42
|
"@atlaskit/icon": "^21.12.0",
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
44
|
-
"@atlaskit/spinner": "^15.
|
|
44
|
+
"@atlaskit/spinner": "^15.6.0",
|
|
45
45
|
"@atlaskit/theme": "^12.6.0",
|
|
46
|
-
"@atlaskit/tokens": "^1.
|
|
46
|
+
"@atlaskit/tokens": "^1.25.0",
|
|
47
47
|
"@atlaskit/visually-hidden": "^1.2.0",
|
|
48
48
|
"@babel/runtime": "^7.0.0",
|
|
49
49
|
"@emotion/react": "^11.7.1",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"bind-event-listener": "^2.1.1",
|
|
52
52
|
"memoize-one": "^6.0.0",
|
|
53
53
|
"react-fast-compare": "^3.2.0",
|
|
54
|
-
"react-focus-lock": "^2.5
|
|
54
|
+
"react-focus-lock": "^2.9.5",
|
|
55
55
|
"react-node-resolver": "^1.0.1",
|
|
56
56
|
"react-popper": "^2.2.3",
|
|
57
57
|
"react-select": "^5.4.0",
|
package/report.api.md
CHANGED
|
@@ -624,7 +624,6 @@ const defaultComponents: {
|
|
|
624
624
|
Menu: ({
|
|
625
625
|
children,
|
|
626
626
|
innerProps,
|
|
627
|
-
...props
|
|
628
627
|
}: MenuProps<OptionType, boolean>) => jsx.JSX.Element;
|
|
629
628
|
};
|
|
630
629
|
|
|
@@ -1122,7 +1121,6 @@ export class PopupSelect<
|
|
|
1122
1121
|
Menu: ({
|
|
1123
1122
|
children,
|
|
1124
1123
|
innerProps,
|
|
1125
|
-
...props
|
|
1126
1124
|
}: MenuProps<OptionType, boolean>) => jsx;
|
|
1127
1125
|
};
|
|
1128
1126
|
mergedPopperProps: PopperPropsNoChildren<string>;
|
|
@@ -1135,7 +1133,6 @@ export class PopupSelect<
|
|
|
1135
1133
|
Menu: ({
|
|
1136
1134
|
children,
|
|
1137
1135
|
innerProps,
|
|
1138
|
-
...props
|
|
1139
1136
|
}: MenuProps<OptionType, boolean>) => jsx;
|
|
1140
1137
|
};
|
|
1141
1138
|
mergedPopperProps: PopperPropsNoChildren<string>;
|
package/tmp/api-report-tmp.d.ts
CHANGED
|
@@ -311,7 +311,7 @@ export default _default;
|
|
|
311
311
|
const defaultComponents: {
|
|
312
312
|
Control: FC<ControlProps<OptionType, boolean>>;
|
|
313
313
|
DropdownIndicator: () => jsx.JSX.Element;
|
|
314
|
-
Menu: ({ children, innerProps
|
|
314
|
+
Menu: ({ children, innerProps }: MenuProps<OptionType, boolean>) => jsx.JSX.Element;
|
|
315
315
|
};
|
|
316
316
|
|
|
317
317
|
// @public (undocumented)
|
|
@@ -548,7 +548,7 @@ export class PopupSelect<Option = OptionType, IsMulti extends boolean = false, M
|
|
|
548
548
|
mergedComponents: {
|
|
549
549
|
Control: React_2.FC<ControlProps<OptionType, boolean>>;
|
|
550
550
|
DropdownIndicator: () => jsx;
|
|
551
|
-
Menu: ({ children, innerProps
|
|
551
|
+
Menu: ({ children, innerProps }: MenuProps<OptionType, boolean>) => jsx;
|
|
552
552
|
};
|
|
553
553
|
mergedPopperProps: PopperPropsNoChildren<string>;
|
|
554
554
|
} | {
|
|
@@ -556,7 +556,7 @@ export class PopupSelect<Option = OptionType, IsMulti extends boolean = false, M
|
|
|
556
556
|
mergedComponents: {
|
|
557
557
|
Control: React_2.FC<ControlProps<OptionType, boolean>>;
|
|
558
558
|
DropdownIndicator: () => jsx;
|
|
559
|
-
Menu: ({ children, innerProps
|
|
559
|
+
Menu: ({ children, innerProps }: MenuProps<OptionType, boolean>) => jsx;
|
|
560
560
|
};
|
|
561
561
|
mergedPopperProps: PopperPropsNoChildren<string>;
|
|
562
562
|
focusLockEnabled?: undefined;
|