@atlaskit/select 19.0.0 → 20.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/cjs/CountrySelect.compiled.css +5 -0
- package/dist/cjs/CountrySelect.js +17 -24
- package/dist/cjs/PopupSelect/PopupSelect.js +5 -3
- package/dist/cjs/PopupSelect/components.compiled.css +11 -0
- package/dist/cjs/PopupSelect/components.js +37 -48
- package/dist/cjs/Select.js +1 -1
- package/dist/cjs/components/input-options.compiled.css +28 -0
- package/dist/cjs/components/input-options.js +64 -155
- package/dist/es2019/CountrySelect.compiled.css +5 -0
- package/dist/es2019/CountrySelect.js +14 -26
- package/dist/es2019/PopupSelect/PopupSelect.js +6 -3
- package/dist/es2019/PopupSelect/components.compiled.css +11 -0
- package/dist/es2019/PopupSelect/components.js +32 -50
- package/dist/es2019/Select.js +1 -1
- package/dist/es2019/components/input-options.compiled.css +28 -0
- package/dist/es2019/components/input-options.js +55 -161
- package/dist/esm/CountrySelect.compiled.css +5 -0
- package/dist/esm/CountrySelect.js +14 -26
- package/dist/esm/PopupSelect/PopupSelect.js +5 -3
- package/dist/esm/PopupSelect/components.compiled.css +11 -0
- package/dist/esm/PopupSelect/components.js +33 -48
- package/dist/esm/Select.js +1 -1
- package/dist/esm/components/input-options.compiled.css +28 -0
- package/dist/esm/components/input-options.js +61 -157
- package/dist/types/CountrySelect.d.ts +2 -6
- package/dist/types/PopupSelect/PopupSelect.d.ts +4 -8
- package/dist/types/PopupSelect/components.d.ts +4 -8
- package/dist/types/components/input-options.d.ts +1 -2
- package/dist/types-ts4.5/CountrySelect.d.ts +2 -6
- package/dist/types-ts4.5/PopupSelect/PopupSelect.d.ts +4 -8
- package/dist/types-ts4.5/PopupSelect/components.d.ts +4 -8
- package/dist/types-ts4.5/components/input-options.d.ts +1 -2
- package/package.json +8 -9
|
@@ -1,61 +1,18 @@
|
|
|
1
|
+
/* input-options.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @jsxRuntime classic
|
|
10
|
-
* @jsx jsx
|
|
11
|
-
*/
|
|
12
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
13
|
-
import { useCallback, useState } from 'react';
|
|
14
|
-
import { css, jsx } from '@emotion/react';
|
|
15
|
-
import { isAppleDevice } from '@atlaskit/ds-lib/device-check';
|
|
4
|
+
import "./input-options.compiled.css";
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
7
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
16
8
|
import CheckboxIcon from '@atlaskit/icon/glyph/checkbox';
|
|
17
9
|
import RadioIcon from '@atlaskit/icon/glyph/radio';
|
|
18
10
|
import PrimitiveSVGIcon from '@atlaskit/icon/svg';
|
|
19
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
getStyles = props.getStyles,
|
|
25
|
-
isDisabled = props.isDisabled,
|
|
26
|
-
isFocused = props.isFocused,
|
|
27
|
-
isSelected = props.isSelected;
|
|
28
|
-
var baseStyles = {
|
|
29
|
-
alignItems: 'center',
|
|
30
|
-
backgroundColor: isFocused ? "var(--ds-background-neutral-subtle-hovered, #091E420F)" : 'transparent',
|
|
31
|
-
color: isDisabled ? "var(--ds-text-disabled, inherit)" : 'inherit',
|
|
32
|
-
display: 'flex ',
|
|
33
|
-
paddingBottom: "var(--ds-space-050, 4px)",
|
|
34
|
-
paddingLeft: "var(--ds-space-200, 16px)",
|
|
35
|
-
paddingTop: "var(--ds-space-050, 4px)",
|
|
36
|
-
// This 'none' needs to be present to ensure that style is not applied when
|
|
37
|
-
// the option is selected but not focused.
|
|
38
|
-
boxShadow: isFocused ? "inset 2px 0px 0px ".concat("var(--ds-border-focused, #388BFF)") : 'none',
|
|
39
|
-
':active': {
|
|
40
|
-
backgroundColor: "var(--ds-background-neutral-subtle-pressed, #091E4224)"
|
|
41
|
-
},
|
|
42
|
-
'@media screen and (-ms-high-contrast: active)': {
|
|
43
|
-
borderLeft: isFocused ? '2px solid transparent' : ''
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
var augmentedStyles = css(_objectSpread(_objectSpread({}, getStyles('option', props)), baseStyles));
|
|
47
|
-
var bemClasses = {
|
|
48
|
-
option: true,
|
|
49
|
-
'option--is-disabled': isDisabled,
|
|
50
|
-
'option--is-focused': isFocused,
|
|
51
|
-
'option--is-selected': isSelected
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
// maintain react-select API
|
|
55
|
-
return {
|
|
56
|
-
styles: augmentedStyles,
|
|
57
|
-
classes: cx(bemClasses, className)
|
|
58
|
-
};
|
|
12
|
+
var optionStyles = {
|
|
13
|
+
default: "_1e0c1txw _4cvr1h6o _1bsb1osq _uiztglyw _18ql1j7p _vchhusvi _85i51b66 _1q511b66 _bozgpxbi _y4tiutpp _bfhk1j28 _16qs1kw7 _syaz1kw7 _1di61dty",
|
|
14
|
+
focused: "_bfhk166n _16qsn8hf _112e1vrj",
|
|
15
|
+
disabled: "_syaz15gi"
|
|
59
16
|
};
|
|
60
17
|
|
|
61
18
|
// state of the parent option
|
|
@@ -84,46 +41,21 @@ var getPrimaryColor = function getPrimaryColor(_ref) {
|
|
|
84
41
|
|
|
85
42
|
// the secondary color represents the radio dot or checkmark
|
|
86
43
|
var getSecondaryColor = function getSecondaryColor(_ref2) {
|
|
87
|
-
var
|
|
88
|
-
isDisabled = _ref2.isDisabled,
|
|
44
|
+
var isDisabled = _ref2.isDisabled,
|
|
89
45
|
isSelected = _ref2.isSelected;
|
|
90
46
|
if (isDisabled && isSelected) {
|
|
91
47
|
return "var(--ds-text-disabled, #091E424F)";
|
|
92
|
-
} else if (isActive && isSelected && !isDisabled) {
|
|
93
|
-
return "var(--ds-surface, #FFFFFF)";
|
|
94
48
|
} else if (!isSelected) {
|
|
95
49
|
return 'transparent';
|
|
96
50
|
}
|
|
97
51
|
return "var(--ds-surface, #FFFFFF)";
|
|
98
52
|
};
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
var isActive = _ref3.isActive,
|
|
103
|
-
isDisabled = _ref3.isDisabled,
|
|
104
|
-
isSelected = _ref3.isSelected;
|
|
105
|
-
if (isSelected || isActive || isDisabled) {
|
|
106
|
-
return 'currentColor';
|
|
107
|
-
}
|
|
108
|
-
return "var(--ds-border-input, #8590A2)";
|
|
53
|
+
var iconStyles = {
|
|
54
|
+
inherit: "_1u9j1r31 _1gqp1r31",
|
|
55
|
+
default: "_1u9j1elr _1gqp1elr"
|
|
109
56
|
};
|
|
110
|
-
var baseIconStyles =
|
|
111
|
-
|
|
112
|
-
alignItems: 'center',
|
|
113
|
-
flexShrink: 0,
|
|
114
|
-
paddingInlineEnd: "var(--ds-space-050, 4px)",
|
|
115
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/design-system/no-nested-styles, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
116
|
-
'& svg rect, & svg circle:first-of-type': {
|
|
117
|
-
strokeLinejoin: 'round',
|
|
118
|
-
strokeWidth: "var(--ds-border-width, 1px)"
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
var baseOptionStyles = css({
|
|
122
|
-
flexGrow: 1,
|
|
123
|
-
overflowX: 'hidden',
|
|
124
|
-
textOverflow: 'ellipsis',
|
|
125
|
-
whiteSpace: 'nowrap'
|
|
126
|
-
});
|
|
57
|
+
var baseIconStyles = null;
|
|
58
|
+
var baseOptionStyles = null;
|
|
127
59
|
|
|
128
60
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
129
61
|
var ControlOption = function ControlOption(props) {
|
|
@@ -137,91 +69,63 @@ var ControlOption = function ControlOption(props) {
|
|
|
137
69
|
var onMouseUp = useCallback(function () {
|
|
138
70
|
return setIsActive(false);
|
|
139
71
|
}, []);
|
|
140
|
-
var
|
|
141
|
-
Icon = props.Icon,
|
|
72
|
+
var Icon = props.Icon,
|
|
142
73
|
children = props.children,
|
|
143
74
|
innerProps = props.innerProps,
|
|
144
75
|
innerRef = props.innerRef,
|
|
145
|
-
|
|
146
|
-
|
|
76
|
+
cx = props.cx,
|
|
77
|
+
className = props.className,
|
|
78
|
+
isDisabled = props.isDisabled,
|
|
147
79
|
isSelected = props.isSelected,
|
|
148
80
|
isFocused = props.isFocused;
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
81
|
+
var classNames = useMemo(function () {
|
|
82
|
+
return cx({
|
|
83
|
+
option: true,
|
|
84
|
+
'option--is-disabled': isDisabled,
|
|
85
|
+
'option--is-focused': isFocused,
|
|
86
|
+
'option--is-selected': isSelected
|
|
87
|
+
}, className);
|
|
88
|
+
}, [cx, isDisabled, isFocused, isSelected, className]);
|
|
89
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
90
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
91
|
+
className: ax([optionStyles.default, isFocused && optionStyles.focused, isDisabled && optionStyles.disabled, classNames]),
|
|
92
|
+
ref: innerRef,
|
|
152
93
|
onMouseDown: onMouseDown,
|
|
153
94
|
onMouseUp: onMouseUp,
|
|
154
95
|
onMouseLeave: onMouseUp
|
|
155
|
-
})
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
css: [baseIconStyles,
|
|
174
|
-
// Here we are adding a border to the Checkbox and Radio SVG icons
|
|
175
|
-
// This is an a11y fix for Select only for now but it may be rolled
|
|
176
|
-
// into the `@atlaskit/icon` package's Checkbox and Radio SVGs later
|
|
177
|
-
// eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
|
|
178
|
-
{
|
|
179
|
-
// This can eventually be changed to static styles that are
|
|
180
|
-
// applied conditionally (e.g. `isActive && activeBorderStyles`),
|
|
181
|
-
// but considering there are multiple instances of `react-select`
|
|
182
|
-
// requiring styles to be generated dynamically, it seemed like a
|
|
183
|
-
// low priority.
|
|
184
|
-
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
185
|
-
'& svg rect, & svg circle:first-of-type': {
|
|
186
|
-
stroke: getBorderColor({
|
|
187
|
-
isActive: isActive,
|
|
188
|
-
isDisabled: isDisabled,
|
|
189
|
-
isSelected: isSelected
|
|
190
|
-
})
|
|
191
|
-
}
|
|
192
|
-
}]
|
|
193
|
-
}, !!Icon ? jsx(Icon, {
|
|
194
|
-
label: "",
|
|
195
|
-
primaryColor: getPrimaryColor({
|
|
196
|
-
isDisabled: isDisabled,
|
|
197
|
-
isSelected: isSelected,
|
|
198
|
-
isFocused: isFocused,
|
|
199
|
-
isActive: isActive
|
|
200
|
-
}),
|
|
201
|
-
secondaryColor: getSecondaryColor({
|
|
202
|
-
isDisabled: isDisabled,
|
|
203
|
-
isSelected: isSelected,
|
|
204
|
-
isActive: isActive
|
|
205
|
-
}),
|
|
206
|
-
isFacadeDisabled: true
|
|
207
|
-
}) : null), jsx("div", {
|
|
208
|
-
css: baseOptionStyles
|
|
209
|
-
}, children, isVoiceOver && (isSelected || isDisabled) && jsx(VisuallyHidden, null, "".concat(isSelected ? ',selected' : '').concat(isDisabled ? ',dimmed' : ''))))
|
|
210
|
-
);
|
|
96
|
+
}, innerProps), /*#__PURE__*/React.createElement("div", {
|
|
97
|
+
className: ax(["_1e0c1txw _4cvr1h6o _1o9zidpf _y4ti1b66 _16cu892t _1xci892t _59qxe4h9 _8y3xe4h9", isSelected || isActive || isDisabled ? iconStyles.inherit : iconStyles.default])
|
|
98
|
+
}, !!Icon ? /*#__PURE__*/React.createElement(Icon, {
|
|
99
|
+
label: "",
|
|
100
|
+
primaryColor: getPrimaryColor({
|
|
101
|
+
isDisabled: isDisabled,
|
|
102
|
+
isSelected: isSelected,
|
|
103
|
+
isFocused: isFocused,
|
|
104
|
+
isActive: isActive
|
|
105
|
+
}),
|
|
106
|
+
secondaryColor: getSecondaryColor({
|
|
107
|
+
isDisabled: isDisabled,
|
|
108
|
+
isSelected: isSelected
|
|
109
|
+
}),
|
|
110
|
+
isFacadeDisabled: true
|
|
111
|
+
}) : null), /*#__PURE__*/React.createElement("div", {
|
|
112
|
+
className: ax(["_16jlkb7n _1reo15vq _1bto1l2s _o5721q9c"])
|
|
113
|
+
}, children));
|
|
211
114
|
};
|
|
212
115
|
var NewCheckboxIcon = function NewCheckboxIcon(props) {
|
|
213
116
|
return (
|
|
117
|
+
/*#__PURE__*/
|
|
214
118
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
215
|
-
|
|
119
|
+
React.createElement(PrimitiveSVGIcon, props, /*#__PURE__*/React.createElement("g", {
|
|
216
120
|
fillRule: "evenodd"
|
|
217
|
-
},
|
|
121
|
+
}, /*#__PURE__*/React.createElement("rect", {
|
|
218
122
|
x: "5.5",
|
|
219
123
|
y: "5.5",
|
|
220
124
|
width: "13",
|
|
221
125
|
height: "13",
|
|
222
126
|
rx: "1.5",
|
|
223
127
|
fill: "currentColor"
|
|
224
|
-
}),
|
|
128
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
225
129
|
fillRule: "evenodd",
|
|
226
130
|
clipRule: "evenodd",
|
|
227
131
|
d: "M16.3262 9.48011L15.1738 8.51984L10.75 13.8284L8.82616 11.5198L7.67383 12.4801L10.1738 15.4801C10.3163 15.6511 10.5274 15.75 10.75 15.75C10.9726 15.75 11.1837 15.6511 11.3262 15.4801L16.3262 9.48011Z",
|
|
@@ -231,16 +135,17 @@ var NewCheckboxIcon = function NewCheckboxIcon(props) {
|
|
|
231
135
|
};
|
|
232
136
|
var NewRadioIcon = function NewRadioIcon(props) {
|
|
233
137
|
return (
|
|
138
|
+
/*#__PURE__*/
|
|
234
139
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
235
|
-
|
|
140
|
+
React.createElement(PrimitiveSVGIcon, props, /*#__PURE__*/React.createElement("g", {
|
|
236
141
|
fillRule: "evenodd"
|
|
237
|
-
},
|
|
142
|
+
}, /*#__PURE__*/React.createElement("circle", {
|
|
238
143
|
cx: "12",
|
|
239
144
|
cy: "12",
|
|
240
145
|
r: "6.75",
|
|
241
146
|
fill: "currentColor",
|
|
242
147
|
strokeWidth: "1.5"
|
|
243
|
-
}),
|
|
148
|
+
}), /*#__PURE__*/React.createElement("circle", {
|
|
244
149
|
cx: "12",
|
|
245
150
|
cy: "12",
|
|
246
151
|
r: "3",
|
|
@@ -252,10 +157,8 @@ var NewRadioIcon = function NewRadioIcon(props) {
|
|
|
252
157
|
/**
|
|
253
158
|
* __Checkbox option__
|
|
254
159
|
*/
|
|
255
|
-
export var CheckboxOption = function CheckboxOption(props
|
|
256
|
-
|
|
257
|
-
) {
|
|
258
|
-
return jsx(ControlOption, _extends({
|
|
160
|
+
export var CheckboxOption = function CheckboxOption(props) {
|
|
161
|
+
return /*#__PURE__*/React.createElement(ControlOption, _extends({
|
|
259
162
|
Icon:
|
|
260
163
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix, @atlaskit/platform/no-preconditioning
|
|
261
164
|
fg('platform-visual-refresh-icons') && fg('platform-icon-control-migration') ? NewCheckboxIcon :
|
|
@@ -270,9 +173,10 @@ export var CheckboxOption = function CheckboxOption(props
|
|
|
270
173
|
*/
|
|
271
174
|
export var RadioOption = function RadioOption(props) {
|
|
272
175
|
return (
|
|
176
|
+
/*#__PURE__*/
|
|
273
177
|
// TODO https://product-fabric.atlassian.net/browse/DSP-20769
|
|
274
178
|
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons, @repo/internal/react/no-unsafe-spread-props
|
|
275
|
-
|
|
179
|
+
React.createElement(ControlOption, _extends({
|
|
276
180
|
Icon:
|
|
277
181
|
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix, @atlaskit/platform/no-preconditioning
|
|
278
182
|
fg('platform-visual-refresh-icons') && fg('platform-icon-control-migration') ? NewRadioIcon :
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
/// <reference types="react" />
|
|
6
2
|
import { groupedCountries } from './data/countries';
|
|
7
3
|
import { type SelectProps } from './types';
|
|
8
4
|
type Country = (typeof groupedCountries)[number]['options'][number];
|
|
9
|
-
declare const CountrySelect: (props: SelectProps<Country>) =>
|
|
5
|
+
declare const CountrySelect: (props: SelectProps<Country>) => JSX.Element;
|
|
10
6
|
export default CountrySelect;
|
|
@@ -111,15 +111,11 @@ export default class PopupSelect<Option = OptionType, IsMulti extends boolean =
|
|
|
111
111
|
focusLockEnabled: boolean;
|
|
112
112
|
isOpen: boolean;
|
|
113
113
|
mergedComponents: {
|
|
114
|
-
/**
|
|
115
|
-
* If `false`, renders a select with no search field. If `true`, renders a search field in the select when the
|
|
116
|
-
* number of options exceeds the `searchThreshold`. The default is `true`.
|
|
117
|
-
*/
|
|
118
114
|
Control: React.FC<import("../types").ControlProps<OptionType, boolean>>;
|
|
119
|
-
DropdownIndicator: () =>
|
|
120
|
-
Menu: ({ children, innerProps }: import("../types").MenuProps<OptionType, boolean>) =>
|
|
121
|
-
ClearIndicator: (props: import("@atlaskit/react-select").ClearIndicatorProps<unknown, boolean, GroupBase<unknown>>) =>
|
|
122
|
-
MultiValueRemove: (props: import("@atlaskit/react-select").MultiValueRemoveProps<unknown, boolean, GroupBase<unknown>>) =>
|
|
115
|
+
DropdownIndicator: () => JSX.Element;
|
|
116
|
+
Menu: ({ children, innerProps }: import("../types").MenuProps<OptionType, boolean>) => JSX.Element;
|
|
117
|
+
ClearIndicator: (props: import("@atlaskit/react-select").ClearIndicatorProps<unknown, boolean, GroupBase<unknown>>) => JSX.Element;
|
|
118
|
+
MultiValueRemove: (props: import("@atlaskit/react-select").MultiValueRemoveProps<unknown, boolean, GroupBase<unknown>>) => JSX.Element;
|
|
123
119
|
};
|
|
124
120
|
mergedPopperProps: PopperPropsNoChildren<string>;
|
|
125
121
|
};
|
|
@@ -3,11 +3,8 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { type CSSProperties, type FC, type ReactNode } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
6
|
import { type ClearIndicatorProps, type ControlProps, type MenuProps, type MultiValueRemoveProps, type OptionType } from '../types';
|
|
8
7
|
interface MenuDialogProps {
|
|
9
|
-
maxWidth?: number | string;
|
|
10
|
-
minWidth?: number | string;
|
|
11
8
|
style: CSSProperties;
|
|
12
9
|
children: ReactNode;
|
|
13
10
|
id: string;
|
|
@@ -16,7 +13,6 @@ interface MenuDialogProps {
|
|
|
16
13
|
/**
|
|
17
14
|
* __Menu dialog__
|
|
18
15
|
* Wrapper for PopupSelect component.
|
|
19
|
-
*
|
|
20
16
|
*/
|
|
21
17
|
export declare const MenuDialog: import("react").ForwardRefExoticComponent<MenuDialogProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
18
|
/**
|
|
@@ -26,9 +22,9 @@ export declare const MenuDialog: import("react").ForwardRefExoticComponent<MenuD
|
|
|
26
22
|
export declare const DummyControl: FC<ControlProps<OptionType, boolean>>;
|
|
27
23
|
export declare const defaultComponents: {
|
|
28
24
|
Control: FC<ControlProps<OptionType, boolean>>;
|
|
29
|
-
DropdownIndicator: () =>
|
|
30
|
-
Menu: ({ children, innerProps }: MenuProps<OptionType, boolean>) =>
|
|
31
|
-
ClearIndicator: (props: ClearIndicatorProps) =>
|
|
32
|
-
MultiValueRemove: (props: MultiValueRemoveProps) =>
|
|
25
|
+
DropdownIndicator: () => JSX.Element;
|
|
26
|
+
Menu: ({ children, innerProps }: MenuProps<OptionType, boolean>) => JSX.Element;
|
|
27
|
+
ClearIndicator: (props: ClearIndicatorProps) => JSX.Element;
|
|
28
|
+
MultiValueRemove: (props: MultiValueRemoveProps) => JSX.Element;
|
|
33
29
|
};
|
|
34
30
|
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
2
|
import { type OptionProps, type OptionType } from '../types';
|
|
4
3
|
/**
|
|
5
4
|
* __Checkbox option__
|
|
@@ -8,4 +7,4 @@ export declare const CheckboxOption: <OptionT extends OptionType>(props: OptionP
|
|
|
8
7
|
/**
|
|
9
8
|
* __Radio option__
|
|
10
9
|
*/
|
|
11
|
-
export declare const RadioOption: <OptionT extends OptionType>(props: OptionProps<OptionT, false>) =>
|
|
10
|
+
export declare const RadioOption: <OptionT extends OptionType>(props: OptionProps<OptionT, false>) => JSX.Element;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
/// <reference types="react" />
|
|
6
2
|
import { groupedCountries } from './data/countries';
|
|
7
3
|
import { type SelectProps } from './types';
|
|
8
4
|
type Country = (typeof groupedCountries)[number]['options'][number];
|
|
9
|
-
declare const CountrySelect: (props: SelectProps<Country>) =>
|
|
5
|
+
declare const CountrySelect: (props: SelectProps<Country>) => JSX.Element;
|
|
10
6
|
export default CountrySelect;
|
|
@@ -111,15 +111,11 @@ export default class PopupSelect<Option = OptionType, IsMulti extends boolean =
|
|
|
111
111
|
focusLockEnabled: boolean;
|
|
112
112
|
isOpen: boolean;
|
|
113
113
|
mergedComponents: {
|
|
114
|
-
/**
|
|
115
|
-
* If `false`, renders a select with no search field. If `true`, renders a search field in the select when the
|
|
116
|
-
* number of options exceeds the `searchThreshold`. The default is `true`.
|
|
117
|
-
*/
|
|
118
114
|
Control: React.FC<import("../types").ControlProps<OptionType, boolean>>;
|
|
119
|
-
DropdownIndicator: () =>
|
|
120
|
-
Menu: ({ children, innerProps }: import("../types").MenuProps<OptionType, boolean>) =>
|
|
121
|
-
ClearIndicator: (props: import("@atlaskit/react-select").ClearIndicatorProps<unknown, boolean, GroupBase<unknown>>) =>
|
|
122
|
-
MultiValueRemove: (props: import("@atlaskit/react-select").MultiValueRemoveProps<unknown, boolean, GroupBase<unknown>>) =>
|
|
115
|
+
DropdownIndicator: () => JSX.Element;
|
|
116
|
+
Menu: ({ children, innerProps }: import("../types").MenuProps<OptionType, boolean>) => JSX.Element;
|
|
117
|
+
ClearIndicator: (props: import("@atlaskit/react-select").ClearIndicatorProps<unknown, boolean, GroupBase<unknown>>) => JSX.Element;
|
|
118
|
+
MultiValueRemove: (props: import("@atlaskit/react-select").MultiValueRemoveProps<unknown, boolean, GroupBase<unknown>>) => JSX.Element;
|
|
123
119
|
};
|
|
124
120
|
mergedPopperProps: PopperPropsNoChildren<string>;
|
|
125
121
|
};
|
|
@@ -3,11 +3,8 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
import { type CSSProperties, type FC, type ReactNode } from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
6
|
import { type ClearIndicatorProps, type ControlProps, type MenuProps, type MultiValueRemoveProps, type OptionType } from '../types';
|
|
8
7
|
interface MenuDialogProps {
|
|
9
|
-
maxWidth?: number | string;
|
|
10
|
-
minWidth?: number | string;
|
|
11
8
|
style: CSSProperties;
|
|
12
9
|
children: ReactNode;
|
|
13
10
|
id: string;
|
|
@@ -16,7 +13,6 @@ interface MenuDialogProps {
|
|
|
16
13
|
/**
|
|
17
14
|
* __Menu dialog__
|
|
18
15
|
* Wrapper for PopupSelect component.
|
|
19
|
-
*
|
|
20
16
|
*/
|
|
21
17
|
export declare const MenuDialog: import("react").ForwardRefExoticComponent<MenuDialogProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
18
|
/**
|
|
@@ -26,9 +22,9 @@ export declare const MenuDialog: import("react").ForwardRefExoticComponent<MenuD
|
|
|
26
22
|
export declare const DummyControl: FC<ControlProps<OptionType, boolean>>;
|
|
27
23
|
export declare const defaultComponents: {
|
|
28
24
|
Control: FC<ControlProps<OptionType, boolean>>;
|
|
29
|
-
DropdownIndicator: () =>
|
|
30
|
-
Menu: ({ children, innerProps }: MenuProps<OptionType, boolean>) =>
|
|
31
|
-
ClearIndicator: (props: ClearIndicatorProps) =>
|
|
32
|
-
MultiValueRemove: (props: MultiValueRemoveProps) =>
|
|
25
|
+
DropdownIndicator: () => JSX.Element;
|
|
26
|
+
Menu: ({ children, innerProps }: MenuProps<OptionType, boolean>) => JSX.Element;
|
|
27
|
+
ClearIndicator: (props: ClearIndicatorProps) => JSX.Element;
|
|
28
|
+
MultiValueRemove: (props: MultiValueRemoveProps) => JSX.Element;
|
|
33
29
|
};
|
|
34
30
|
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { jsx } from '@emotion/react';
|
|
3
2
|
import { type OptionProps, type OptionType } from '../types';
|
|
4
3
|
/**
|
|
5
4
|
* __Checkbox option__
|
|
@@ -8,4 +7,4 @@ export declare const CheckboxOption: <OptionT extends OptionType>(props: OptionP
|
|
|
8
7
|
/**
|
|
9
8
|
* __Radio option__
|
|
10
9
|
*/
|
|
11
|
-
export declare const RadioOption: <OptionT extends OptionType>(props: OptionProps<OptionT, false>) =>
|
|
10
|
+
export declare const RadioOption: <OptionT extends OptionType>(props: OptionProps<OptionT, false>) => JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/select",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "20.0.0",
|
|
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,16 +43,16 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@atlaskit/analytics-next": "^11.0.0",
|
|
45
45
|
"@atlaskit/ds-lib": "^4.0.0",
|
|
46
|
-
"@atlaskit/icon": "^24.
|
|
46
|
+
"@atlaskit/icon": "^24.1.0",
|
|
47
47
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
48
|
-
"@atlaskit/primitives": "^14.
|
|
48
|
+
"@atlaskit/primitives": "^14.1.0",
|
|
49
49
|
"@atlaskit/react-select": "^2.0.0",
|
|
50
50
|
"@atlaskit/spinner": "^18.0.0",
|
|
51
51
|
"@atlaskit/theme": "^17.0.0",
|
|
52
|
-
"@atlaskit/tokens": "^4.
|
|
52
|
+
"@atlaskit/tokens": "^4.2.0",
|
|
53
53
|
"@atlaskit/visually-hidden": "^2.0.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
55
|
-
"@
|
|
55
|
+
"@compiled/react": "^0.18.2",
|
|
56
56
|
"@popperjs/core": "^2.11.8",
|
|
57
57
|
"bind-event-listener": "^3.0.0",
|
|
58
58
|
"react-focus-lock": "^2.9.5",
|
|
@@ -68,13 +68,12 @@
|
|
|
68
68
|
"@af/accessibility-testing": "*",
|
|
69
69
|
"@af/integration-testing": "*",
|
|
70
70
|
"@af/visual-regression": "*",
|
|
71
|
-
"@atlaskit/checkbox": "^
|
|
71
|
+
"@atlaskit/checkbox": "^17.0.0",
|
|
72
72
|
"@atlaskit/modal-dialog": "^13.0.0",
|
|
73
73
|
"@atlaskit/radio": "^8.0.0",
|
|
74
74
|
"@atlaskit/ssr": "*",
|
|
75
75
|
"@atlaskit/visual-regression": "*",
|
|
76
76
|
"@atlassian/feature-flags-test-utils": "*",
|
|
77
|
-
"@emotion/styled": "^11.0.0",
|
|
78
77
|
"@testing-library/react": "^13.4.0",
|
|
79
78
|
"@testing-library/user-event": "^14.4.3",
|
|
80
79
|
"ast-types": "^0.13.3",
|
|
@@ -93,8 +92,8 @@
|
|
|
93
92
|
],
|
|
94
93
|
"deprecation": "no-deprecated-imports",
|
|
95
94
|
"styling": [
|
|
96
|
-
"
|
|
97
|
-
"
|
|
95
|
+
"static",
|
|
96
|
+
"compiled"
|
|
98
97
|
]
|
|
99
98
|
}
|
|
100
99
|
},
|