@atlaskit/select 21.3.2 → 21.3.4

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,19 @@
1
1
  # @atlaskit/select
2
2
 
3
+ ## 21.3.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 21.3.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [`437668dfbdec9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/437668dfbdec9) -
14
+ Add explicit types to a number of DST components
15
+ - Updated dependencies
16
+
3
17
  ## 21.3.2
4
18
 
5
19
  ### Patch Changes
@@ -32,7 +32,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
32
32
  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; }
33
33
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
34
34
  function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
35
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint-disable @atlaskit/platform/ensure-feature-flag-prefix */ // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
35
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
36
36
  /**
37
37
  * Are we rendering on the client or server?
38
38
  */
@@ -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 = "21.3.1";
14
+ var packageVersion = "21.3.3";
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)({
@@ -98,7 +98,9 @@ var ControlOption = function ControlOption(props) {
98
98
  className: (0, _runtime.ax)([optionStyles.default, isFocused && optionStyles.focused, isDisabled && optionStyles.disabled, classNames]),
99
99
  ref: innerRef,
100
100
  onMouseDown: onMouseDown,
101
- onMouseUp: onMouseUp,
101
+ onMouseUp: onMouseUp
102
+ // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
103
+ ,
102
104
  onMouseLeave: onMouseUp
103
105
  }, innerProps), /*#__PURE__*/React.createElement("div", {
104
106
  className: (0, _runtime.ax)(["_1e0c1txw _4cvr1h6o _1o9zidpf _y4ti1b66 _16cu892t _1xci892t _59qxe4h9 _8y3xe4h9", isSelected || isActive || isDisabled ? iconStyles.inherit : iconStyles.default])
@@ -166,9 +168,7 @@ var NewRadioIcon = function NewRadioIcon(props) {
166
168
  */
167
169
  var CheckboxOption = exports.CheckboxOption = function CheckboxOption(props) {
168
170
  return /*#__PURE__*/React.createElement(ControlOption, (0, _extends2.default)({
169
- Icon:
170
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
171
- (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? NewCheckboxIcon :
171
+ Icon: (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? NewCheckboxIcon :
172
172
  // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
173
173
  _checkbox.default
174
174
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
@@ -183,9 +183,7 @@ var RadioOption = exports.RadioOption = function RadioOption(props) {
183
183
  /*#__PURE__*/
184
184
  // TODO https://product-fabric.atlassian.net/browse/DSP-20769
185
185
  React.createElement(ControlOption, (0, _extends2.default)({
186
- Icon:
187
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
188
- (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? NewRadioIcon :
186
+ Icon: (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? NewRadioIcon :
189
187
  // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
190
188
  _radio.default
191
189
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
@@ -9,9 +9,7 @@ exports.default = createSelect;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
11
  var _react = _interopRequireWildcard(require("react"));
12
- var _excluded = ["ariaLiveMessages", "isInvalid", "onClickPreventDefault", "tabSelectsValue", "validationState"];
13
- /* eslint-disable @atlaskit/platform/ensure-feature-flag-prefix */
14
- // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
12
+ var _excluded = ["ariaLiveMessages", "isInvalid", "onClickPreventDefault", "tabSelectsValue", "validationState"]; // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
15
13
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
16
14
  function createSelect(WrappedComponent) {
17
15
  var AtlaskitSelect = /*#__PURE__*/(0, _react.forwardRef)(function AtlaskitSelect(props, forwardedRef) {
@@ -1,6 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
- /* eslint-disable @atlaskit/platform/ensure-feature-flag-prefix */
4
3
  // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
5
4
  import React, { PureComponent } from 'react';
6
5
  import { bind } from 'bind-event-listener';
@@ -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 = "21.3.1";
6
+ const packageVersion = "21.3.3";
7
7
  export const SelectWithoutAnalytics = createSelect(AsyncSelect);
8
8
  const createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
9
9
  const Select = withAnalyticsContext({
@@ -83,7 +83,9 @@ const ControlOption = props => {
83
83
  className: ax([optionStyles.default, isFocused && optionStyles.focused, isDisabled && optionStyles.disabled, classNames]),
84
84
  ref: innerRef,
85
85
  onMouseDown: onMouseDown,
86
- onMouseUp: onMouseUp,
86
+ onMouseUp: onMouseUp
87
+ // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
88
+ ,
87
89
  onMouseLeave: onMouseUp
88
90
  }, innerProps), /*#__PURE__*/React.createElement("div", {
89
91
  className: ax(["_1e0c1txw _4cvr1h6o _1o9zidpf _y4ti1b66 _16cu892t _1xci892t _59qxe4h9 _8y3xe4h9", isSelected || isActive || isDisabled ? iconStyles.inherit : iconStyles.default])
@@ -144,9 +146,7 @@ React.createElement(PrimitiveSVGIcon, props, /*#__PURE__*/React.createElement("g
144
146
  * __Checkbox option__
145
147
  */
146
148
  export const CheckboxOption = props => /*#__PURE__*/React.createElement(ControlOption, _extends({
147
- Icon:
148
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
149
- fg('platform-visual-refresh-icons') ? NewCheckboxIcon :
149
+ Icon: fg('platform-visual-refresh-icons') ? NewCheckboxIcon :
150
150
  // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
151
151
  CheckboxIcon
152
152
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
@@ -159,9 +159,7 @@ export const RadioOption = props =>
159
159
  /*#__PURE__*/
160
160
  // TODO https://product-fabric.atlassian.net/browse/DSP-20769
161
161
  React.createElement(ControlOption, _extends({
162
- Icon:
163
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
164
- fg('platform-visual-refresh-icons') ? NewRadioIcon :
162
+ Icon: fg('platform-visual-refresh-icons') ? NewRadioIcon :
165
163
  // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
166
164
  RadioIcon
167
165
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
@@ -1,5 +1,4 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- /* eslint-disable @atlaskit/platform/ensure-feature-flag-prefix */
3
2
  // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
4
3
  import React, { forwardRef, useImperativeHandle, useRef } from 'react';
5
4
  export default function createSelect(WrappedComponent) {
@@ -11,7 +11,6 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
11
11
  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; }
12
12
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
13
13
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
14
- /* eslint-disable @atlaskit/platform/ensure-feature-flag-prefix */
15
14
  // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
16
15
  import React, { PureComponent } from 'react';
17
16
  import { bind } from 'bind-event-listener';
@@ -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 = "21.3.1";
6
+ var packageVersion = "21.3.3";
7
7
  export var SelectWithoutAnalytics = createSelect(AsyncSelect);
8
8
  var createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');
9
9
  var Select = withAnalyticsContext({
@@ -89,7 +89,9 @@ var ControlOption = function ControlOption(props) {
89
89
  className: ax([optionStyles.default, isFocused && optionStyles.focused, isDisabled && optionStyles.disabled, classNames]),
90
90
  ref: innerRef,
91
91
  onMouseDown: onMouseDown,
92
- onMouseUp: onMouseUp,
92
+ onMouseUp: onMouseUp
93
+ // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
94
+ ,
93
95
  onMouseLeave: onMouseUp
94
96
  }, innerProps), /*#__PURE__*/React.createElement("div", {
95
97
  className: ax(["_1e0c1txw _4cvr1h6o _1o9zidpf _y4ti1b66 _16cu892t _1xci892t _59qxe4h9 _8y3xe4h9", isSelected || isActive || isDisabled ? iconStyles.inherit : iconStyles.default])
@@ -157,9 +159,7 @@ var NewRadioIcon = function NewRadioIcon(props) {
157
159
  */
158
160
  export var CheckboxOption = function CheckboxOption(props) {
159
161
  return /*#__PURE__*/React.createElement(ControlOption, _extends({
160
- Icon:
161
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
162
- fg('platform-visual-refresh-icons') ? NewCheckboxIcon :
162
+ Icon: fg('platform-visual-refresh-icons') ? NewCheckboxIcon :
163
163
  // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
164
164
  CheckboxIcon
165
165
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
@@ -174,9 +174,7 @@ export var RadioOption = function RadioOption(props) {
174
174
  /*#__PURE__*/
175
175
  // TODO https://product-fabric.atlassian.net/browse/DSP-20769
176
176
  React.createElement(ControlOption, _extends({
177
- Icon:
178
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
179
- fg('platform-visual-refresh-icons') ? NewRadioIcon :
177
+ Icon: fg('platform-visual-refresh-icons') ? NewRadioIcon :
180
178
  // eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
181
179
  RadioIcon
182
180
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
@@ -1,7 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["ariaLiveMessages", "isInvalid", "onClickPreventDefault", "tabSelectsValue", "validationState"];
4
- /* eslint-disable @atlaskit/platform/ensure-feature-flag-prefix */
5
4
  // eslint-disable-next-line @repo/internal/fs/filename-pattern-match
6
5
  import React, { forwardRef, useImperativeHandle, useRef } from 'react';
7
6
  export default function createSelect(WrappedComponent) {
@@ -2,6 +2,7 @@ import React, { type KeyboardEventHandler, PureComponent, type ReactNode } from
2
2
  import { type UnbindFn } from 'bind-event-listener';
3
3
  import { type PopperProps } from 'react-popper';
4
4
  import { type ActionMeta, type AtlaskitSelectRefType, type OptionType, type ReactSelectProps, type StylesConfig, type ValidationState, type ValueType } from '../types';
5
+ import { defaultComponents } from './components';
5
6
  type defaultModifiers = 'offset' | 'preventOverflow' | 'flip';
6
7
  type PopperPropsNoChildren<Modifiers> = Omit<PopperProps<Modifiers>, 'children'>;
7
8
  interface PopupSelectTriggerProps {
@@ -113,28 +114,10 @@ export default class PopupSelect<Option = OptionType, IsMulti extends boolean =
113
114
  state: {
114
115
  focusLockEnabled: boolean;
115
116
  isOpen: boolean;
116
- mergedComponents: {
117
- Control: React.FC<import("../types").ControlProps<OptionType, boolean>>;
118
- DropdownIndicator: () => JSX.Element;
119
- Menu: ({ children, innerProps }: import("../types").MenuProps<OptionType, boolean>) => JSX.Element;
120
- ClearIndicator: (props: import("@atlaskit/react-select").ClearIndicatorProps) => JSX.Element;
121
- MultiValueRemove: (props: import("@atlaskit/react-select").MultiValueRemoveProps) => JSX.Element;
122
- };
117
+ mergedComponents: typeof defaultComponents;
123
118
  mergedPopperProps: PopperPropsNoChildren<defaultModifiers | string>;
124
119
  };
125
- static defaultProps: {
126
- closeMenuOnSelect: boolean;
127
- shouldCloseMenuOnTab: boolean;
128
- components: {};
129
- maxMenuHeight: number;
130
- maxMenuWidth: number;
131
- minMenuWidth: number;
132
- popperProps: {};
133
- isSearchable: boolean;
134
- searchThreshold: number;
135
- styles: {};
136
- options: never[];
137
- };
120
+ static defaultProps: PopupSelectProps;
138
121
  static getDerivedStateFromProps(props: PopupSelectProps<OptionType>, state: State): Partial<State<string>> | null;
139
122
  componentDidMount(): void;
140
123
  componentWillUnmount(): void;
@@ -2,6 +2,7 @@ import React, { type KeyboardEventHandler, PureComponent, type ReactNode } from
2
2
  import { type UnbindFn } from 'bind-event-listener';
3
3
  import { type PopperProps } from 'react-popper';
4
4
  import { type ActionMeta, type AtlaskitSelectRefType, type OptionType, type ReactSelectProps, type StylesConfig, type ValidationState, type ValueType } from '../types';
5
+ import { defaultComponents } from './components';
5
6
  type defaultModifiers = 'offset' | 'preventOverflow' | 'flip';
6
7
  type PopperPropsNoChildren<Modifiers> = Omit<PopperProps<Modifiers>, 'children'>;
7
8
  interface PopupSelectTriggerProps {
@@ -113,28 +114,10 @@ export default class PopupSelect<Option = OptionType, IsMulti extends boolean =
113
114
  state: {
114
115
  focusLockEnabled: boolean;
115
116
  isOpen: boolean;
116
- mergedComponents: {
117
- Control: React.FC<import("../types").ControlProps<OptionType, boolean>>;
118
- DropdownIndicator: () => JSX.Element;
119
- Menu: ({ children, innerProps }: import("../types").MenuProps<OptionType, boolean>) => JSX.Element;
120
- ClearIndicator: (props: import("@atlaskit/react-select").ClearIndicatorProps) => JSX.Element;
121
- MultiValueRemove: (props: import("@atlaskit/react-select").MultiValueRemoveProps) => JSX.Element;
122
- };
117
+ mergedComponents: typeof defaultComponents;
123
118
  mergedPopperProps: PopperPropsNoChildren<defaultModifiers | string>;
124
119
  };
125
- static defaultProps: {
126
- closeMenuOnSelect: boolean;
127
- shouldCloseMenuOnTab: boolean;
128
- components: {};
129
- maxMenuHeight: number;
130
- maxMenuWidth: number;
131
- minMenuWidth: number;
132
- popperProps: {};
133
- isSearchable: boolean;
134
- searchThreshold: number;
135
- styles: {};
136
- options: never[];
137
- };
120
+ static defaultProps: PopupSelectProps;
138
121
  static getDerivedStateFromProps(props: PopupSelectProps<OptionType>, state: State): Partial<State<string>> | null;
139
122
  componentDidMount(): void;
140
123
  componentWillUnmount(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/select",
3
- "version": "21.3.2",
3
+ "version": "21.3.4",
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/"
@@ -34,13 +34,13 @@
34
34
  "dependencies": {
35
35
  "@atlaskit/analytics-next": "^11.1.0",
36
36
  "@atlaskit/ds-lib": "^5.1.0",
37
- "@atlaskit/icon": "^28.3.0",
37
+ "@atlaskit/icon": "^28.5.0",
38
38
  "@atlaskit/platform-feature-flags": "^1.1.0",
39
- "@atlaskit/primitives": "^14.15.0",
40
- "@atlaskit/react-select": "^3.7.0",
39
+ "@atlaskit/primitives": "^15.0.0",
40
+ "@atlaskit/react-select": "^3.8.0",
41
41
  "@atlaskit/spinner": "^19.0.0",
42
42
  "@atlaskit/theme": "^21.0.0",
43
- "@atlaskit/tokens": "^6.4.0",
43
+ "@atlaskit/tokens": "^6.5.0",
44
44
  "@atlaskit/visually-hidden": "^3.0.0",
45
45
  "@babel/runtime": "^7.0.0",
46
46
  "@compiled/react": "^0.18.3",
@@ -58,14 +58,14 @@
58
58
  "@af/accessibility-testing": "workspace:^",
59
59
  "@af/integration-testing": "workspace:^",
60
60
  "@af/visual-regression": "workspace:^",
61
- "@atlaskit/button": "^23.4.0",
61
+ "@atlaskit/button": "^23.5.0",
62
62
  "@atlaskit/checkbox": "^17.1.0",
63
63
  "@atlaskit/docs": "^11.1.0",
64
64
  "@atlaskit/drawer": "^11.0.0",
65
65
  "@atlaskit/form": "^14.2.0",
66
66
  "@atlaskit/link": "^3.2.0",
67
- "@atlaskit/logo": "^19.7.0",
68
- "@atlaskit/modal-dialog": "^14.4.0",
67
+ "@atlaskit/logo": "^19.9.0",
68
+ "@atlaskit/modal-dialog": "^14.5.0",
69
69
  "@atlaskit/radio": "^8.3.0",
70
70
  "@atlaskit/section-message": "^8.7.0",
71
71
  "@atlassian/ssr-tests": "^0.3.0",