@atlaskit/select 20.2.0 → 20.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atlaskit/select
2
2
 
3
+ ## 20.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#142578](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/142578)
8
+ [`a1e85a3a1ca96`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a1e85a3a1ca96) -
9
+ Export more types from atlaskit/react-select
10
+
11
+ ## 20.3.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#137501](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/137501)
16
+ [`fb85ce5c05391`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fb85ce5c05391) -
17
+ Testing unsafe experimental options, to be removed at a later time.
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
3
23
  ## 20.2.0
4
24
 
5
25
  ### Minor Changes
@@ -10,8 +10,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
11
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
12
12
  var _react = _interopRequireWildcard(require("react"));
13
- var _Select = _interopRequireDefault(require("./Select"));
14
13
  var _inputOptions = require("./components/input-options");
14
+ var _Select = _interopRequireDefault(require("./Select"));
15
15
  var _excluded = ["components"];
16
16
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -37,4 +37,6 @@ var CheckboxSelect = /*#__PURE__*/_react.default.memo(CheckboxSelectInternal
37
37
  // Type casting as `React.memo` does not forward generic types
38
38
  // Reference: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/37087#issuecomment-656596623
39
39
  );
40
+
41
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
40
42
  var _default = exports.default = CheckboxSelect;
@@ -527,6 +527,8 @@ var PopupSelect = exports.default = /*#__PURE__*/function (_PureComponent) {
527
527
  isOpen: isOpen,
528
528
  onKeyDown: _this3.handleTargetKeyDown,
529
529
  ref: _this3.resolveTargetRef(ref),
530
+ // Should technically be 'dialog' by default instead of 'true' via AriaAttributes, but will require further changes.
531
+ // See go/DSP-22283
530
532
  'aria-haspopup': 'true',
531
533
  'aria-expanded': isOpen,
532
534
  'aria-controls': isOpen ? id : undefined
@@ -20,6 +20,7 @@ var _openLayerObserver = require("@atlaskit/layering/experimental/open-layer-obs
20
20
  function NotifyOpenLayerObserver(_ref) {
21
21
  var isOpen = _ref.isOpen,
22
22
  onClose = _ref.onClose;
23
+ // @ts-ignore error TS2353: Object literal may only specify known properties, and 'onClose' does not exist in type '{ isOpen?: boolean | undefined; }'.
23
24
  (0, _openLayerObserver.useNotifyOpenLayerObserver)({
24
25
  isOpen: isOpen,
25
26
  onClose: onClose
@@ -11,7 +11,7 @@ var _createSelect = _interopRequireDefault(require("./createSelect"));
11
11
  /* eslint-disable @repo/internal/react/require-jsdoc */
12
12
 
13
13
  var packageName = "@atlaskit/select";
14
- var packageVersion = "20.2.0";
14
+ var packageVersion = "20.3.1";
15
15
  var SelectWithoutAnalytics = exports.SelectWithoutAnalytics = (0, _createSelect.default)(_async.default);
16
16
  var createAndFireEventOnAtlaskit = (0, _analyticsNext.createAndFireEvent)('atlaskit');
17
17
  var Select = (0, _analyticsNext.withAnalyticsContext)({
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useMemo } from 'react';
3
- import Select from './Select';
4
3
  import { CheckboxOption } from './components/input-options';
4
+ import Select from './Select';
5
5
  const CheckboxSelectInternal = ({
6
6
  components,
7
7
  ...props
@@ -22,4 +22,6 @@ const CheckboxSelect = /*#__PURE__*/React.memo(CheckboxSelectInternal
22
22
  // Type casting as `React.memo` does not forward generic types
23
23
  // Reference: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/37087#issuecomment-656596623
24
24
  );
25
+
26
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
25
27
  export default CheckboxSelect;
@@ -530,6 +530,8 @@ export default class PopupSelect extends PureComponent {
530
530
  isOpen,
531
531
  onKeyDown: this.handleTargetKeyDown,
532
532
  ref: this.resolveTargetRef(ref),
533
+ // Should technically be 'dialog' by default instead of 'true' via AriaAttributes, but will require further changes.
534
+ // See go/DSP-22283
533
535
  'aria-haspopup': 'true',
534
536
  'aria-expanded': isOpen,
535
537
  'aria-controls': isOpen ? id : undefined
@@ -15,6 +15,7 @@ export function NotifyOpenLayerObserver({
15
15
  isOpen,
16
16
  onClose
17
17
  }) {
18
+ // @ts-ignore error TS2353: Object literal may only specify known properties, and 'onClose' does not exist in type '{ isOpen?: boolean | undefined; }'.
18
19
  useNotifyOpenLayerObserver({
19
20
  isOpen,
20
21
  onClose
@@ -3,7 +3,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
3
3
  import AsyncSelect from '@atlaskit/react-select/async';
4
4
  import createSelect from './createSelect';
5
5
  const packageName = "@atlaskit/select";
6
- const packageVersion = "20.2.0";
6
+ const packageVersion = "20.3.1";
7
7
  export const SelectWithoutAnalytics = createSelect(AsyncSelect);
8
8
  const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
9
9
  const Select = withAnalyticsContext({
@@ -5,8 +5,8 @@ var _excluded = ["components"];
5
5
  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; }
6
6
  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; }
7
7
  import React, { useMemo } from 'react';
8
- import Select from './Select';
9
8
  import { CheckboxOption } from './components/input-options';
9
+ import Select from './Select';
10
10
  var CheckboxSelectInternal = function CheckboxSelectInternal(_ref) {
11
11
  var components = _ref.components,
12
12
  props = _objectWithoutProperties(_ref, _excluded);
@@ -27,4 +27,6 @@ var CheckboxSelect = /*#__PURE__*/React.memo(CheckboxSelectInternal
27
27
  // Type casting as `React.memo` does not forward generic types
28
28
  // Reference: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/37087#issuecomment-656596623
29
29
  );
30
+
31
+ // eslint-disable-next-line @repo/internal/react/require-jsdoc
30
32
  export default CheckboxSelect;
@@ -519,6 +519,8 @@ var PopupSelect = /*#__PURE__*/function (_PureComponent) {
519
519
  isOpen: isOpen,
520
520
  onKeyDown: _this3.handleTargetKeyDown,
521
521
  ref: _this3.resolveTargetRef(ref),
522
+ // Should technically be 'dialog' by default instead of 'true' via AriaAttributes, but will require further changes.
523
+ // See go/DSP-22283
522
524
  'aria-haspopup': 'true',
523
525
  'aria-expanded': isOpen,
524
526
  'aria-controls': isOpen ? id : undefined
@@ -14,6 +14,7 @@ import { useNotifyOpenLayerObserver } from '@atlaskit/layering/experimental/open
14
14
  export function NotifyOpenLayerObserver(_ref) {
15
15
  var isOpen = _ref.isOpen,
16
16
  onClose = _ref.onClose;
17
+ // @ts-ignore error TS2353: Object literal may only specify known properties, and &#39;onClose&#39; does not exist in type &#39;{ isOpen?: boolean | undefined; }&#39;.
17
18
  useNotifyOpenLayerObserver({
18
19
  isOpen: isOpen,
19
20
  onClose: onClose
@@ -3,7 +3,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
3
3
  import AsyncSelect from '@atlaskit/react-select/async';
4
4
  import createSelect from './createSelect';
5
5
  var packageName = "@atlaskit/select";
6
- var packageVersion = "20.2.0";
6
+ var packageVersion = "20.3.1";
7
7
  export var SelectWithoutAnalytics = createSelect(AsyncSelect);
8
8
  var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
9
9
  var Select = withAnalyticsContext({
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { type SelectProps, type OptionType } from './types';
2
+ import { type OptionType, type SelectProps } from './types';
3
3
  declare const CheckboxSelect: <OptionT extends OptionType>({ components, ...props }: SelectProps<OptionT, true>) => React.JSX.Element;
4
4
  export default CheckboxSelect;
@@ -1,4 +1,4 @@
1
- export { components, createFilter, mergeStyles } from '@atlaskit/react-select';
1
+ export { components, createFilter, mergeStyles, type CSSObjectWithLabel, } from '@atlaskit/react-select';
2
2
  export { useAsync } from '@atlaskit/react-select/async';
3
3
  export { useCreatable } from '@atlaskit/react-select/creatable';
4
4
  export { CheckboxOption, RadioOption } from './components/input-options';
@@ -13,7 +13,7 @@ export { default as CountrySelect } from './CountrySelect';
13
13
  export { default as RadioSelect } from './RadioSelect';
14
14
  export { default as PopupSelect } from './PopupSelect';
15
15
  export type { PopupSelectProps, ModifierList } from './PopupSelect';
16
- export type { SelectInstance, ActionMeta, ControlProps, FormatOptionLabelMeta, InputActionMeta, InputProps, MenuProps, MenuListComponentProps, OptionProps, OptionsType, OptionType, SelectComponentsConfig, SelectProps, StylesConfig, ValueContainerProps, ValueType, GroupedOptionsType, GroupType, ClearIndicatorProps, DropdownIndicatorProps, IndicatorsContainerProps, LoadingIndicatorProps, MultiValueProps, MultiValueRemoveProps, ReactSelectProps, SingleValueProps, NoticeProps, ValidationState, GroupProps, AsyncSelectProps, PlaceholderProps, AriaOnFocusProps, } from './types';
16
+ export type { SelectInstance, ActionMeta, ControlProps, FormatOptionLabelMeta, InputActionMeta, InputProps, MenuProps, MenuListComponentProps, OptionProps, OptionsType, OptionType, SelectComponentsConfig, SelectProps, StylesConfig, ValueContainerProps, ValueType, GroupedOptionsType, GroupType, ClearIndicatorProps, DropdownIndicatorProps, IndicatorsContainerProps, LoadingIndicatorProps, MultiValueGenericProps, MultiValueProps, MultiValueRemoveProps, ReactSelectProps, SingleValueProps, NoticeProps, ValidationState, GroupProps, AsyncSelectProps, PlaceholderProps, AriaOnFocusProps, } from './types';
17
17
  /**
18
18
  * Types not exported on the public API, didn't find usages in sourcegraph
19
19
  *
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
3
- import { type AriaOnFocusProps, type ClearIndicatorProps, type DropdownIndicatorProps, type FormatOptionLabelMeta, type GroupBase as GroupType, type IndicatorsContainerProps, type InputActionMeta, type InputProps, type LoadingIndicatorProps, type MultiValueProps, type MultiValueRemoveProps, type NoticeProps, type OptionProps as ReactSelectOptionProps, type Props as ReactSelectProps, type ActionMeta as RSActionMeta, type ControlProps as RSControlProps, type GroupProps as RSGroupProps, type MenuListProps as RSMenuListComponentProps, type MenuProps as RSMenuProps, type Options as RSOptionsType, type PlaceholderProps as RSPlaceholderProps, type SelectComponentsConfig as RSSelectComponentsConfig, type StylesConfig as RSStylesConfig, type ValueContainerProps as RSValueContainerProps, type OnChangeValue as RSValueType, type SelectInstance, type SingleValueProps } from '@atlaskit/react-select';
3
+ import { type AriaOnFocusProps, type ClearIndicatorProps, type DropdownIndicatorProps, type FormatOptionLabelMeta, type GroupBase as GroupType, type IndicatorsContainerProps, type InputActionMeta, type InputProps, type LoadingIndicatorProps, type MultiValueGenericProps, type MultiValueProps, type MultiValueRemoveProps, type NoticeProps, type OptionProps as ReactSelectOptionProps, type Props as ReactSelectProps, type ActionMeta as RSActionMeta, type ControlProps as RSControlProps, type GroupProps as RSGroupProps, type MenuListProps as RSMenuListComponentProps, type MenuProps as RSMenuProps, type Options as RSOptionsType, type PlaceholderProps as RSPlaceholderProps, type SelectComponentsConfig as RSSelectComponentsConfig, type StylesConfig as RSStylesConfig, type ValueContainerProps as RSValueContainerProps, type OnChangeValue as RSValueType, type SelectInstance, type SingleValueProps } from '@atlaskit/react-select';
4
4
  import { type AsyncProps } from '@atlaskit/react-select/async';
5
5
  import type BaseSelect from '@atlaskit/react-select/base';
6
6
  import { type CreatableProps } from '@atlaskit/react-select/creatable';
@@ -82,4 +82,4 @@ export type AtlaskitSelectRefType = {
82
82
  blur: () => void;
83
83
  focus: () => void;
84
84
  };
85
- export type { SelectInstance, FormatOptionLabelMeta, InputActionMeta, GroupType, InputProps, MultiValueProps, ReactSelectProps, SingleValueProps, ClearIndicatorProps, DropdownIndicatorProps, IndicatorsContainerProps, LoadingIndicatorProps, NoticeProps, MultiValueRemoveProps, AriaOnFocusProps, };
85
+ export type { SelectInstance, FormatOptionLabelMeta, InputActionMeta, GroupType, InputProps, MultiValueProps, MultiValueGenericProps, ReactSelectProps, SingleValueProps, ClearIndicatorProps, DropdownIndicatorProps, IndicatorsContainerProps, LoadingIndicatorProps, NoticeProps, MultiValueRemoveProps, AriaOnFocusProps, };
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { type SelectProps, type OptionType } from './types';
2
+ import { type OptionType, type SelectProps } from './types';
3
3
  declare const CheckboxSelect: <OptionT extends OptionType>({ components, ...props }: SelectProps<OptionT, true>) => React.JSX.Element;
4
4
  export default CheckboxSelect;
@@ -1,4 +1,4 @@
1
- export { components, createFilter, mergeStyles } from '@atlaskit/react-select';
1
+ export { components, createFilter, mergeStyles, type CSSObjectWithLabel, } from '@atlaskit/react-select';
2
2
  export { useAsync } from '@atlaskit/react-select/async';
3
3
  export { useCreatable } from '@atlaskit/react-select/creatable';
4
4
  export { CheckboxOption, RadioOption } from './components/input-options';
@@ -13,7 +13,7 @@ export { default as CountrySelect } from './CountrySelect';
13
13
  export { default as RadioSelect } from './RadioSelect';
14
14
  export { default as PopupSelect } from './PopupSelect';
15
15
  export type { PopupSelectProps, ModifierList } from './PopupSelect';
16
- export type { SelectInstance, ActionMeta, ControlProps, FormatOptionLabelMeta, InputActionMeta, InputProps, MenuProps, MenuListComponentProps, OptionProps, OptionsType, OptionType, SelectComponentsConfig, SelectProps, StylesConfig, ValueContainerProps, ValueType, GroupedOptionsType, GroupType, ClearIndicatorProps, DropdownIndicatorProps, IndicatorsContainerProps, LoadingIndicatorProps, MultiValueProps, MultiValueRemoveProps, ReactSelectProps, SingleValueProps, NoticeProps, ValidationState, GroupProps, AsyncSelectProps, PlaceholderProps, AriaOnFocusProps, } from './types';
16
+ export type { SelectInstance, ActionMeta, ControlProps, FormatOptionLabelMeta, InputActionMeta, InputProps, MenuProps, MenuListComponentProps, OptionProps, OptionsType, OptionType, SelectComponentsConfig, SelectProps, StylesConfig, ValueContainerProps, ValueType, GroupedOptionsType, GroupType, ClearIndicatorProps, DropdownIndicatorProps, IndicatorsContainerProps, LoadingIndicatorProps, MultiValueGenericProps, MultiValueProps, MultiValueRemoveProps, ReactSelectProps, SingleValueProps, NoticeProps, ValidationState, GroupProps, AsyncSelectProps, PlaceholderProps, AriaOnFocusProps, } from './types';
17
17
  /**
18
18
  * Types not exported on the public API, didn't find usages in sourcegraph
19
19
  *
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
3
- import { type AriaOnFocusProps, type ClearIndicatorProps, type DropdownIndicatorProps, type FormatOptionLabelMeta, type GroupBase as GroupType, type IndicatorsContainerProps, type InputActionMeta, type InputProps, type LoadingIndicatorProps, type MultiValueProps, type MultiValueRemoveProps, type NoticeProps, type OptionProps as ReactSelectOptionProps, type Props as ReactSelectProps, type ActionMeta as RSActionMeta, type ControlProps as RSControlProps, type GroupProps as RSGroupProps, type MenuListProps as RSMenuListComponentProps, type MenuProps as RSMenuProps, type Options as RSOptionsType, type PlaceholderProps as RSPlaceholderProps, type SelectComponentsConfig as RSSelectComponentsConfig, type StylesConfig as RSStylesConfig, type ValueContainerProps as RSValueContainerProps, type OnChangeValue as RSValueType, type SelectInstance, type SingleValueProps } from '@atlaskit/react-select';
3
+ import { type AriaOnFocusProps, type ClearIndicatorProps, type DropdownIndicatorProps, type FormatOptionLabelMeta, type GroupBase as GroupType, type IndicatorsContainerProps, type InputActionMeta, type InputProps, type LoadingIndicatorProps, type MultiValueGenericProps, type MultiValueProps, type MultiValueRemoveProps, type NoticeProps, type OptionProps as ReactSelectOptionProps, type Props as ReactSelectProps, type ActionMeta as RSActionMeta, type ControlProps as RSControlProps, type GroupProps as RSGroupProps, type MenuListProps as RSMenuListComponentProps, type MenuProps as RSMenuProps, type Options as RSOptionsType, type PlaceholderProps as RSPlaceholderProps, type SelectComponentsConfig as RSSelectComponentsConfig, type StylesConfig as RSStylesConfig, type ValueContainerProps as RSValueContainerProps, type OnChangeValue as RSValueType, type SelectInstance, type SingleValueProps } from '@atlaskit/react-select';
4
4
  import { type AsyncProps } from '@atlaskit/react-select/async';
5
5
  import type BaseSelect from '@atlaskit/react-select/base';
6
6
  import { type CreatableProps } from '@atlaskit/react-select/creatable';
@@ -82,4 +82,4 @@ export type AtlaskitSelectRefType = {
82
82
  blur: () => void;
83
83
  focus: () => void;
84
84
  };
85
- export type { SelectInstance, FormatOptionLabelMeta, InputActionMeta, GroupType, InputProps, MultiValueProps, ReactSelectProps, SingleValueProps, ClearIndicatorProps, DropdownIndicatorProps, IndicatorsContainerProps, LoadingIndicatorProps, NoticeProps, MultiValueRemoveProps, AriaOnFocusProps, };
85
+ export type { SelectInstance, FormatOptionLabelMeta, InputActionMeta, GroupType, InputProps, MultiValueProps, MultiValueGenericProps, ReactSelectProps, SingleValueProps, ClearIndicatorProps, DropdownIndicatorProps, IndicatorsContainerProps, LoadingIndicatorProps, NoticeProps, MultiValueRemoveProps, AriaOnFocusProps, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/select",
3
- "version": "20.2.0",
3
+ "version": "20.3.1",
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/"
@@ -43,13 +43,13 @@
43
43
  "dependencies": {
44
44
  "@atlaskit/analytics-next": "^11.0.0",
45
45
  "@atlaskit/ds-lib": "^4.0.0",
46
- "@atlaskit/icon": "^25.5.0",
46
+ "@atlaskit/icon": "^25.6.0",
47
47
  "@atlaskit/platform-feature-flags": "^1.1.0",
48
- "@atlaskit/primitives": "^14.3.0",
49
- "@atlaskit/react-select": "^2.1.0",
48
+ "@atlaskit/primitives": "^14.4.0",
49
+ "@atlaskit/react-select": "^2.4.0",
50
50
  "@atlaskit/spinner": "^18.0.0",
51
51
  "@atlaskit/theme": "^18.0.0",
52
- "@atlaskit/tokens": "^4.7.0",
52
+ "@atlaskit/tokens": "^4.8.0",
53
53
  "@atlaskit/visually-hidden": "^3.0.0",
54
54
  "@babel/runtime": "^7.0.0",
55
55
  "@compiled/react": "^0.18.3",