Version 1.0.2 mit node_modules Verzeichnis

This commit is contained in:
ISA
2024-10-02 07:58:24 +02:00
parent f353a06b1b
commit 62b6e55a0a
68228 changed files with 4548477 additions and 651 deletions

168
node_modules/react-select/README.md generated vendored Normal file
View File

@@ -0,0 +1,168 @@
[![NPM](https://img.shields.io/npm/v/react-select.svg)](https://www.npmjs.com/package/react-select)
[![CircleCI](https://circleci.com/gh/JedWatson/react-select/tree/master.svg?style=shield)](https://circleci.com/gh/JedWatson/react-select/tree/master)
[![Coverage Status](https://coveralls.io/repos/JedWatson/react-select/badge.svg?branch=master&service=github)](https://coveralls.io/github/JedWatson/react-select?branch=master)
[![Supported by Thinkmill](https://thinkmill.github.io/badge/heart.svg)](http://thinkmill.com.au/?utm_source=github&utm_medium=badge&utm_campaign=react-select)
# React-Select
The Select control for [React](https://reactjs.com). Initially built for use in [KeystoneJS](http://www.keystonejs.com).
See [react-select.com](https://www.react-select.com) for live demos and comprehensive docs.
React Select is funded by [Thinkmill](https://www.thinkmill.com.au) and [Atlassian](https://atlaskit.atlassian.com). It represents a whole new approach to developing powerful React.js components that _just work_ out of the box, while being extremely customisable.
For the story behind this component, watch Jed's talk at React Conf 2019 - [building React Select](https://youtu.be/yS0jUnmBujE)
Features include:
- Flexible approach to data, with customisable functions
- Extensible styling API with [emotion](https://emotion.sh)
- Component Injection API for complete control over the UI behaviour
- Controllable state props and modular architecture
- Long-requested features like option groups, portal support, animation, and more
## Using an older version?
- [v3, v4, and v5 upgrade guide](https://react-select.com/upgrade)
- [v2 upgrade guide](https://react-select.com/upgrade-to-v2)
- React Select v1 documentation and examples are available at [v1.react-select.com](https://v1.react-select.com)
# Installation and usage
The easiest way to use react-select is to install it from npm and build it into your app with Webpack.
```
yarn add react-select
```
Then use it in your app:
#### With React Component
```js
import React from 'react';
import Select from 'react-select';
const options = [
{ value: 'chocolate', label: 'Chocolate' },
{ value: 'strawberry', label: 'Strawberry' },
{ value: 'vanilla', label: 'Vanilla' },
];
class App extends React.Component {
state = {
selectedOption: null,
};
handleChange = (selectedOption) => {
this.setState({ selectedOption }, () =>
console.log(`Option selected:`, this.state.selectedOption)
);
};
render() {
const { selectedOption } = this.state;
return (
<Select
value={selectedOption}
onChange={this.handleChange}
options={options}
/>
);
}
}
```
#### With React Hooks
```js
import React, { useState } from 'react';
import Select from 'react-select';
const options = [
{ value: 'chocolate', label: 'Chocolate' },
{ value: 'strawberry', label: 'Strawberry' },
{ value: 'vanilla', label: 'Vanilla' },
];
export default function App() {
const [selectedOption, setSelectedOption] = useState(null);
return (
<div className="App">
<Select
defaultValue={selectedOption}
onChange={setSelectedOption}
options={options}
/>
</div>
);
}
```
## Props
Common props you may want to specify include:
- `autoFocus` - focus the control when it mounts
- `className` - apply a className to the control
- `classNamePrefix` - apply classNames to inner elements with the given prefix
- `isDisabled` - disable the control
- `isMulti` - allow the user to select multiple values
- `isSearchable` - allow the user to search for matching options
- `name` - generate an HTML input with this name, containing the current value
- `onChange` - subscribe to change events
- `options` - specify the options the user can select from
- `placeholder` - change the text displayed when no option is selected
- `noOptionsMessage` - ({ inputValue: string }) => string | null - Text to display when there are no options
- `value` - control the current value
See the [props documentation](https://www.react-select.com/props) for complete documentation on the props react-select supports.
## Controllable Props
You can control the following props by providing values for them. If you don't, react-select will manage them for you.
- `value` / `onChange` - specify the current value of the control
- `menuIsOpen` / `onMenuOpen` / `onMenuClose` - control whether the menu is open
- `inputValue` / `onInputChange` - control the value of the search input (changing this will update the available options)
If you don't provide these props, you can set the initial value of the state they control:
- `defaultValue` - set the initial value of the control
- `defaultMenuIsOpen` - set the initial open value of the menu
- `defaultInputValue` - set the initial value of the search input
## Methods
React-select exposes two public methods:
- `focus()` - focus the control programmatically
- `blur()` - blur the control programmatically
## Customisation
Check the docs for more information on:
- [Customising the styles](https://www.react-select.com/styles)
- [Using custom components](https://www.react-select.com/components)
- [Using the built-in animated components](https://www.react-select.com/home#animated-components)
- [Creating an async select](https://www.react-select.com/async)
- [Allowing users to create new options](https://www.react-select.com/creatable)
- [Advanced use-cases](https://www.react-select.com/advanced)
- [TypeScript guide](https://www.react-select.com/typescript)
## TypeScript
The v5 release represents a rewrite from JavaScript to TypeScript. The types for v4 and earlier releases are available at [@types](https://www.npmjs.com/package/@types/react-select). See the [TypeScript guide](https://www.react-select.com/typescript) for how to use the types starting with v5.
# Thanks
Thank you to everyone who has contributed to this project. It's been a wild ride.
If you like React Select, you should [follow me on twitter](https://twitter.com/jedwatson)!
Shout out to [Joss Mackison](https://github.com/jossmac), [Charles Lee](https://github.com/gwyneplaine), [Ben Conolly](https://github.com/Noviny), [Tom Walker](https://github.com/bladey), [Nathan Bierema](https://github.com/Methuselah96), [Eric Bonow](https://github.com/ebonow), [Emma Hamilton](https://github.com/emmatown), [Dave Brotherstone](https://github.com/bruderstein), [Brian Vaughn](https://github.com/bvaughn), and the [Atlassian Design System](https://atlassian.design) team who along with many other contributors have made this possible ❤️
## License
MIT Licensed. Copyright (c) Jed Watson 2022.

View File

@@ -0,0 +1,3 @@
export * from "../../dist/declarations/src/animated/index.js";
export { _default as default } from "./react-select-animated.cjs.default.js";
//# sourceMappingURL=react-select-animated.cjs.d.mts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"react-select-animated.cjs.d.mts","sourceRoot":"","sources":["../../dist/declarations/src/animated/index.d.ts"],"names":[],"mappings":"AAAA"}

View File

@@ -0,0 +1,3 @@
export * from "../../dist/declarations/src/animated/index";
export { default } from "../../dist/declarations/src/animated/index";
//# sourceMappingURL=react-select-animated.cjs.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"react-select-animated.cjs.d.ts","sourceRoot":"","sources":["../../dist/declarations/src/animated/index.d.ts"],"names":[],"mappings":"AAAA"}

View File

@@ -0,0 +1 @@
export { default as _default } from "../../dist/declarations/src/animated/index.js"

View File

@@ -0,0 +1 @@
exports._default = require("./react-select-animated.cjs.js").default;

View File

@@ -0,0 +1,328 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
var memoizeOne = require('memoize-one');
var index$1 = require('../../dist/index-d1cb43f3.cjs.dev.js');
var React = require('react');
var _extends = require('@babel/runtime/helpers/extends');
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
var reactTransitionGroup = require('react-transition-group');
require('@emotion/react');
require('@babel/runtime/helpers/typeof');
require('@babel/runtime/helpers/taggedTemplateLiteral');
require('@babel/runtime/helpers/defineProperty');
require('react-dom');
require('@floating-ui/dom');
require('use-isomorphic-layout-effect');
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var memoizeOne__default = /*#__PURE__*/_interopDefault(memoizeOne);
var React__namespace = /*#__PURE__*/_interopNamespace(React);
var _excluded$4 = ["in", "onExited", "appear", "enter", "exit"];
// strip transition props off before spreading onto select component
var AnimatedInput = function AnimatedInput(WrappedComponent) {
return function (_ref) {
_ref.in;
_ref.onExited;
_ref.appear;
_ref.enter;
_ref.exit;
var props = _objectWithoutProperties(_ref, _excluded$4);
return /*#__PURE__*/React__namespace.createElement(WrappedComponent, props);
};
};
var AnimatedInput$1 = AnimatedInput;
var _excluded$3 = ["component", "duration", "in", "onExited"];
var Fade = function Fade(_ref) {
var Tag = _ref.component,
_ref$duration = _ref.duration,
duration = _ref$duration === void 0 ? 1 : _ref$duration,
inProp = _ref.in;
_ref.onExited;
var props = _objectWithoutProperties(_ref, _excluded$3);
var nodeRef = React.useRef(null);
var transition = {
entering: {
opacity: 0
},
entered: {
opacity: 1,
transition: "opacity ".concat(duration, "ms")
},
exiting: {
opacity: 0
},
exited: {
opacity: 0
}
};
return /*#__PURE__*/React__namespace.createElement(reactTransitionGroup.Transition, {
mountOnEnter: true,
unmountOnExit: true,
in: inProp,
timeout: duration,
nodeRef: nodeRef
}, function (state) {
var innerProps = {
style: _objectSpread({}, transition[state]),
ref: nodeRef
};
return /*#__PURE__*/React__namespace.createElement(Tag, _extends({
innerProps: innerProps
}, props));
});
};
// ==============================
// Collapse Transition
// ==============================
var collapseDuration = 260;
// wrap each MultiValue with a collapse transition; decreases width until
// finally removing from DOM
var Collapse = function Collapse(_ref2) {
var children = _ref2.children,
_in = _ref2.in,
_onExited = _ref2.onExited;
var ref = React.useRef(null);
var _useState = React.useState('auto'),
_useState2 = _slicedToArray(_useState, 2),
width = _useState2[0],
setWidth = _useState2[1];
React.useEffect(function () {
var el = ref.current;
if (!el) return;
/*
Here we're invoking requestAnimationFrame with a callback invoking our
call to getBoundingClientRect and setState in order to resolve an edge case
around portalling. Certain portalling solutions briefly remove children from the DOM
before appending them to the target node. This is to avoid us trying to call getBoundingClientrect
while the Select component is in this state.
*/
// cannot use `offsetWidth` because it is rounded
var rafId = window.requestAnimationFrame(function () {
return setWidth(el.getBoundingClientRect().width);
});
return function () {
return window.cancelAnimationFrame(rafId);
};
}, []);
var getStyleFromStatus = function getStyleFromStatus(status) {
switch (status) {
default:
return {
width: width
};
case 'exiting':
return {
width: 0,
transition: "width ".concat(collapseDuration, "ms ease-out")
};
case 'exited':
return {
width: 0
};
}
};
return /*#__PURE__*/React__namespace.createElement(reactTransitionGroup.Transition, {
enter: false,
mountOnEnter: true,
unmountOnExit: true,
in: _in,
onExited: function onExited() {
var el = ref.current;
if (!el) return;
_onExited === null || _onExited === void 0 ? void 0 : _onExited(el);
},
timeout: collapseDuration,
nodeRef: ref
}, function (status) {
return /*#__PURE__*/React__namespace.createElement("div", {
ref: ref,
style: _objectSpread({
overflow: 'hidden',
whiteSpace: 'nowrap'
}, getStyleFromStatus(status))
}, children);
});
};
var _excluded$2 = ["in", "onExited"];
// strip transition props off before spreading onto actual component
var AnimatedMultiValue = function AnimatedMultiValue(WrappedComponent) {
return function (_ref) {
var inProp = _ref.in,
onExited = _ref.onExited,
props = _objectWithoutProperties(_ref, _excluded$2);
return /*#__PURE__*/React__namespace.createElement(Collapse, {
in: inProp,
onExited: onExited
}, /*#__PURE__*/React__namespace.createElement(WrappedComponent, _extends({
cropWithEllipsis: inProp
}, props)));
};
};
var AnimatedMultiValue$1 = AnimatedMultiValue;
// fade in when last multi-value removed, otherwise instant
var AnimatedPlaceholder = function AnimatedPlaceholder(WrappedComponent) {
return function (props) {
return /*#__PURE__*/React__namespace.createElement(Fade, _extends({
component: WrappedComponent,
duration: props.isMulti ? collapseDuration : 1
}, props));
};
};
var AnimatedPlaceholder$1 = AnimatedPlaceholder;
// instant fade; all transition-group children must be transitions
var AnimatedSingleValue = function AnimatedSingleValue(WrappedComponent) {
return function (props) {
return /*#__PURE__*/React__namespace.createElement(Fade, _extends({
component: WrappedComponent
}, props));
};
};
var AnimatedSingleValue$1 = AnimatedSingleValue;
var _excluded$1 = ["component"],
_excluded2 = ["children"];
// make ValueContainer a transition group
var AnimatedValueContainer = function AnimatedValueContainer(WrappedComponent) {
return function (props) {
return props.isMulti ? /*#__PURE__*/React__namespace.createElement(IsMultiValueContainer, _extends({
component: WrappedComponent
}, props)) : /*#__PURE__*/React__namespace.createElement(reactTransitionGroup.TransitionGroup, _extends({
component: WrappedComponent
}, props));
};
};
var IsMultiValueContainer = function IsMultiValueContainer(_ref) {
var component = _ref.component,
restProps = _objectWithoutProperties(_ref, _excluded$1);
var multiProps = useIsMultiValueContainer(restProps);
return /*#__PURE__*/React__namespace.createElement(reactTransitionGroup.TransitionGroup, _extends({
component: component
}, multiProps));
};
var useIsMultiValueContainer = function useIsMultiValueContainer(_ref2) {
var children = _ref2.children,
props = _objectWithoutProperties(_ref2, _excluded2);
var isMulti = props.isMulti,
hasValue = props.hasValue,
innerProps = props.innerProps,
_props$selectProps = props.selectProps,
components = _props$selectProps.components,
controlShouldRenderValue = _props$selectProps.controlShouldRenderValue;
var _useState = React.useState(isMulti && controlShouldRenderValue && hasValue),
_useState2 = _slicedToArray(_useState, 2),
cssDisplayFlex = _useState2[0],
setCssDisplayFlex = _useState2[1];
var _useState3 = React.useState(false),
_useState4 = _slicedToArray(_useState3, 2),
removingValue = _useState4[0],
setRemovingValue = _useState4[1];
React.useEffect(function () {
if (hasValue && !cssDisplayFlex) {
setCssDisplayFlex(true);
}
}, [hasValue, cssDisplayFlex]);
React.useEffect(function () {
if (removingValue && !hasValue && cssDisplayFlex) {
setCssDisplayFlex(false);
}
setRemovingValue(false);
}, [removingValue, hasValue, cssDisplayFlex]);
var onExited = function onExited() {
return setRemovingValue(true);
};
var childMapper = function childMapper(child) {
if (isMulti && /*#__PURE__*/React__namespace.isValidElement(child)) {
// Add onExited callback to MultiValues
if (child.type === components.MultiValue) {
return /*#__PURE__*/React__namespace.cloneElement(child, {
onExited: onExited
});
}
// While container flexed, Input cursor is shown after Placeholder text,
// so remove Placeholder until display is set back to grid
if (child.type === components.Placeholder && cssDisplayFlex) {
return null;
}
}
return child;
};
var newInnerProps = _objectSpread(_objectSpread({}, innerProps), {}, {
style: _objectSpread(_objectSpread({}, innerProps === null || innerProps === void 0 ? void 0 : innerProps.style), {}, {
display: isMulti && hasValue || cssDisplayFlex ? 'flex' : 'grid'
})
});
var newProps = _objectSpread(_objectSpread({}, props), {}, {
innerProps: newInnerProps,
children: React__namespace.Children.toArray(children).map(childMapper)
});
return newProps;
};
var AnimatedValueContainer$1 = AnimatedValueContainer;
var _excluded = ["Input", "MultiValue", "Placeholder", "SingleValue", "ValueContainer"];
var makeAnimated = function makeAnimated() {
var externalComponents = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var components = index$1.defaultComponents({
components: externalComponents
});
var Input = components.Input,
MultiValue = components.MultiValue,
Placeholder = components.Placeholder,
SingleValue = components.SingleValue,
ValueContainer = components.ValueContainer,
rest = _objectWithoutProperties(components, _excluded);
return _objectSpread({
Input: AnimatedInput$1(Input),
MultiValue: AnimatedMultiValue$1(MultiValue),
Placeholder: AnimatedPlaceholder$1(Placeholder),
SingleValue: AnimatedSingleValue$1(SingleValue),
ValueContainer: AnimatedValueContainer$1(ValueContainer)
}, rest);
};
var AnimatedComponents = makeAnimated();
var Input = AnimatedComponents.Input;
var MultiValue = AnimatedComponents.MultiValue;
var Placeholder = AnimatedComponents.Placeholder;
var SingleValue = AnimatedComponents.SingleValue;
var ValueContainer = AnimatedComponents.ValueContainer;
var index = memoizeOne__default["default"](makeAnimated);
exports.Input = Input;
exports.MultiValue = MultiValue;
exports.Placeholder = Placeholder;
exports.SingleValue = SingleValue;
exports.ValueContainer = ValueContainer;
exports["default"] = index;

View File

@@ -0,0 +1,7 @@
'use strict';
if (process.env.NODE_ENV === "production") {
module.exports = require("./react-select-animated.cjs.prod.js");
} else {
module.exports = require("./react-select-animated.cjs.dev.js");
}

View File

@@ -0,0 +1,8 @@
export {
Input,
MultiValue,
Placeholder,
SingleValue,
ValueContainer
} from "./react-select-animated.cjs.js";
export { _default as default } from "./react-select-animated.cjs.default.js";

View File

@@ -0,0 +1,328 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
var memoizeOne = require('memoize-one');
var index$1 = require('../../dist/index-665c4ed8.cjs.prod.js');
var React = require('react');
var _extends = require('@babel/runtime/helpers/extends');
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
var reactTransitionGroup = require('react-transition-group');
require('@emotion/react');
require('@babel/runtime/helpers/typeof');
require('@babel/runtime/helpers/taggedTemplateLiteral');
require('@babel/runtime/helpers/defineProperty');
require('react-dom');
require('@floating-ui/dom');
require('use-isomorphic-layout-effect');
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var memoizeOne__default = /*#__PURE__*/_interopDefault(memoizeOne);
var React__namespace = /*#__PURE__*/_interopNamespace(React);
var _excluded$4 = ["in", "onExited", "appear", "enter", "exit"];
// strip transition props off before spreading onto select component
var AnimatedInput = function AnimatedInput(WrappedComponent) {
return function (_ref) {
_ref.in;
_ref.onExited;
_ref.appear;
_ref.enter;
_ref.exit;
var props = _objectWithoutProperties(_ref, _excluded$4);
return /*#__PURE__*/React__namespace.createElement(WrappedComponent, props);
};
};
var AnimatedInput$1 = AnimatedInput;
var _excluded$3 = ["component", "duration", "in", "onExited"];
var Fade = function Fade(_ref) {
var Tag = _ref.component,
_ref$duration = _ref.duration,
duration = _ref$duration === void 0 ? 1 : _ref$duration,
inProp = _ref.in;
_ref.onExited;
var props = _objectWithoutProperties(_ref, _excluded$3);
var nodeRef = React.useRef(null);
var transition = {
entering: {
opacity: 0
},
entered: {
opacity: 1,
transition: "opacity ".concat(duration, "ms")
},
exiting: {
opacity: 0
},
exited: {
opacity: 0
}
};
return /*#__PURE__*/React__namespace.createElement(reactTransitionGroup.Transition, {
mountOnEnter: true,
unmountOnExit: true,
in: inProp,
timeout: duration,
nodeRef: nodeRef
}, function (state) {
var innerProps = {
style: _objectSpread({}, transition[state]),
ref: nodeRef
};
return /*#__PURE__*/React__namespace.createElement(Tag, _extends({
innerProps: innerProps
}, props));
});
};
// ==============================
// Collapse Transition
// ==============================
var collapseDuration = 260;
// wrap each MultiValue with a collapse transition; decreases width until
// finally removing from DOM
var Collapse = function Collapse(_ref2) {
var children = _ref2.children,
_in = _ref2.in,
_onExited = _ref2.onExited;
var ref = React.useRef(null);
var _useState = React.useState('auto'),
_useState2 = _slicedToArray(_useState, 2),
width = _useState2[0],
setWidth = _useState2[1];
React.useEffect(function () {
var el = ref.current;
if (!el) return;
/*
Here we're invoking requestAnimationFrame with a callback invoking our
call to getBoundingClientRect and setState in order to resolve an edge case
around portalling. Certain portalling solutions briefly remove children from the DOM
before appending them to the target node. This is to avoid us trying to call getBoundingClientrect
while the Select component is in this state.
*/
// cannot use `offsetWidth` because it is rounded
var rafId = window.requestAnimationFrame(function () {
return setWidth(el.getBoundingClientRect().width);
});
return function () {
return window.cancelAnimationFrame(rafId);
};
}, []);
var getStyleFromStatus = function getStyleFromStatus(status) {
switch (status) {
default:
return {
width: width
};
case 'exiting':
return {
width: 0,
transition: "width ".concat(collapseDuration, "ms ease-out")
};
case 'exited':
return {
width: 0
};
}
};
return /*#__PURE__*/React__namespace.createElement(reactTransitionGroup.Transition, {
enter: false,
mountOnEnter: true,
unmountOnExit: true,
in: _in,
onExited: function onExited() {
var el = ref.current;
if (!el) return;
_onExited === null || _onExited === void 0 ? void 0 : _onExited(el);
},
timeout: collapseDuration,
nodeRef: ref
}, function (status) {
return /*#__PURE__*/React__namespace.createElement("div", {
ref: ref,
style: _objectSpread({
overflow: 'hidden',
whiteSpace: 'nowrap'
}, getStyleFromStatus(status))
}, children);
});
};
var _excluded$2 = ["in", "onExited"];
// strip transition props off before spreading onto actual component
var AnimatedMultiValue = function AnimatedMultiValue(WrappedComponent) {
return function (_ref) {
var inProp = _ref.in,
onExited = _ref.onExited,
props = _objectWithoutProperties(_ref, _excluded$2);
return /*#__PURE__*/React__namespace.createElement(Collapse, {
in: inProp,
onExited: onExited
}, /*#__PURE__*/React__namespace.createElement(WrappedComponent, _extends({
cropWithEllipsis: inProp
}, props)));
};
};
var AnimatedMultiValue$1 = AnimatedMultiValue;
// fade in when last multi-value removed, otherwise instant
var AnimatedPlaceholder = function AnimatedPlaceholder(WrappedComponent) {
return function (props) {
return /*#__PURE__*/React__namespace.createElement(Fade, _extends({
component: WrappedComponent,
duration: props.isMulti ? collapseDuration : 1
}, props));
};
};
var AnimatedPlaceholder$1 = AnimatedPlaceholder;
// instant fade; all transition-group children must be transitions
var AnimatedSingleValue = function AnimatedSingleValue(WrappedComponent) {
return function (props) {
return /*#__PURE__*/React__namespace.createElement(Fade, _extends({
component: WrappedComponent
}, props));
};
};
var AnimatedSingleValue$1 = AnimatedSingleValue;
var _excluded$1 = ["component"],
_excluded2 = ["children"];
// make ValueContainer a transition group
var AnimatedValueContainer = function AnimatedValueContainer(WrappedComponent) {
return function (props) {
return props.isMulti ? /*#__PURE__*/React__namespace.createElement(IsMultiValueContainer, _extends({
component: WrappedComponent
}, props)) : /*#__PURE__*/React__namespace.createElement(reactTransitionGroup.TransitionGroup, _extends({
component: WrappedComponent
}, props));
};
};
var IsMultiValueContainer = function IsMultiValueContainer(_ref) {
var component = _ref.component,
restProps = _objectWithoutProperties(_ref, _excluded$1);
var multiProps = useIsMultiValueContainer(restProps);
return /*#__PURE__*/React__namespace.createElement(reactTransitionGroup.TransitionGroup, _extends({
component: component
}, multiProps));
};
var useIsMultiValueContainer = function useIsMultiValueContainer(_ref2) {
var children = _ref2.children,
props = _objectWithoutProperties(_ref2, _excluded2);
var isMulti = props.isMulti,
hasValue = props.hasValue,
innerProps = props.innerProps,
_props$selectProps = props.selectProps,
components = _props$selectProps.components,
controlShouldRenderValue = _props$selectProps.controlShouldRenderValue;
var _useState = React.useState(isMulti && controlShouldRenderValue && hasValue),
_useState2 = _slicedToArray(_useState, 2),
cssDisplayFlex = _useState2[0],
setCssDisplayFlex = _useState2[1];
var _useState3 = React.useState(false),
_useState4 = _slicedToArray(_useState3, 2),
removingValue = _useState4[0],
setRemovingValue = _useState4[1];
React.useEffect(function () {
if (hasValue && !cssDisplayFlex) {
setCssDisplayFlex(true);
}
}, [hasValue, cssDisplayFlex]);
React.useEffect(function () {
if (removingValue && !hasValue && cssDisplayFlex) {
setCssDisplayFlex(false);
}
setRemovingValue(false);
}, [removingValue, hasValue, cssDisplayFlex]);
var onExited = function onExited() {
return setRemovingValue(true);
};
var childMapper = function childMapper(child) {
if (isMulti && /*#__PURE__*/React__namespace.isValidElement(child)) {
// Add onExited callback to MultiValues
if (child.type === components.MultiValue) {
return /*#__PURE__*/React__namespace.cloneElement(child, {
onExited: onExited
});
}
// While container flexed, Input cursor is shown after Placeholder text,
// so remove Placeholder until display is set back to grid
if (child.type === components.Placeholder && cssDisplayFlex) {
return null;
}
}
return child;
};
var newInnerProps = _objectSpread(_objectSpread({}, innerProps), {}, {
style: _objectSpread(_objectSpread({}, innerProps === null || innerProps === void 0 ? void 0 : innerProps.style), {}, {
display: isMulti && hasValue || cssDisplayFlex ? 'flex' : 'grid'
})
});
var newProps = _objectSpread(_objectSpread({}, props), {}, {
innerProps: newInnerProps,
children: React__namespace.Children.toArray(children).map(childMapper)
});
return newProps;
};
var AnimatedValueContainer$1 = AnimatedValueContainer;
var _excluded = ["Input", "MultiValue", "Placeholder", "SingleValue", "ValueContainer"];
var makeAnimated = function makeAnimated() {
var externalComponents = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var components = index$1.defaultComponents({
components: externalComponents
});
var Input = components.Input,
MultiValue = components.MultiValue,
Placeholder = components.Placeholder,
SingleValue = components.SingleValue,
ValueContainer = components.ValueContainer,
rest = _objectWithoutProperties(components, _excluded);
return _objectSpread({
Input: AnimatedInput$1(Input),
MultiValue: AnimatedMultiValue$1(MultiValue),
Placeholder: AnimatedPlaceholder$1(Placeholder),
SingleValue: AnimatedSingleValue$1(SingleValue),
ValueContainer: AnimatedValueContainer$1(ValueContainer)
}, rest);
};
var AnimatedComponents = makeAnimated();
var Input = AnimatedComponents.Input;
var MultiValue = AnimatedComponents.MultiValue;
var Placeholder = AnimatedComponents.Placeholder;
var SingleValue = AnimatedComponents.SingleValue;
var ValueContainer = AnimatedComponents.ValueContainer;
var index = memoizeOne__default["default"](makeAnimated);
exports.Input = Input;
exports.MultiValue = MultiValue;
exports.Placeholder = Placeholder;
exports.SingleValue = SingleValue;
exports.ValueContainer = ValueContainer;
exports["default"] = index;

View File

@@ -0,0 +1,297 @@
import _objectSpread from '@babel/runtime/helpers/esm/objectSpread2';
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
import memoizeOne from 'memoize-one';
import { F as defaultComponents } from '../../dist/index-a301f526.esm.js';
import * as React from 'react';
import { useRef, useState, useEffect } from 'react';
import _extends from '@babel/runtime/helpers/esm/extends';
import _slicedToArray from '@babel/runtime/helpers/esm/slicedToArray';
import { Transition, TransitionGroup } from 'react-transition-group';
import '@emotion/react';
import '@babel/runtime/helpers/typeof';
import '@babel/runtime/helpers/taggedTemplateLiteral';
import '@babel/runtime/helpers/defineProperty';
import 'react-dom';
import '@floating-ui/dom';
import 'use-isomorphic-layout-effect';
var _excluded$4 = ["in", "onExited", "appear", "enter", "exit"];
// strip transition props off before spreading onto select component
var AnimatedInput = function AnimatedInput(WrappedComponent) {
return function (_ref) {
_ref.in;
_ref.onExited;
_ref.appear;
_ref.enter;
_ref.exit;
var props = _objectWithoutProperties(_ref, _excluded$4);
return /*#__PURE__*/React.createElement(WrappedComponent, props);
};
};
var AnimatedInput$1 = AnimatedInput;
var _excluded$3 = ["component", "duration", "in", "onExited"];
var Fade = function Fade(_ref) {
var Tag = _ref.component,
_ref$duration = _ref.duration,
duration = _ref$duration === void 0 ? 1 : _ref$duration,
inProp = _ref.in;
_ref.onExited;
var props = _objectWithoutProperties(_ref, _excluded$3);
var nodeRef = useRef(null);
var transition = {
entering: {
opacity: 0
},
entered: {
opacity: 1,
transition: "opacity ".concat(duration, "ms")
},
exiting: {
opacity: 0
},
exited: {
opacity: 0
}
};
return /*#__PURE__*/React.createElement(Transition, {
mountOnEnter: true,
unmountOnExit: true,
in: inProp,
timeout: duration,
nodeRef: nodeRef
}, function (state) {
var innerProps = {
style: _objectSpread({}, transition[state]),
ref: nodeRef
};
return /*#__PURE__*/React.createElement(Tag, _extends({
innerProps: innerProps
}, props));
});
};
// ==============================
// Collapse Transition
// ==============================
var collapseDuration = 260;
// wrap each MultiValue with a collapse transition; decreases width until
// finally removing from DOM
var Collapse = function Collapse(_ref2) {
var children = _ref2.children,
_in = _ref2.in,
_onExited = _ref2.onExited;
var ref = useRef(null);
var _useState = useState('auto'),
_useState2 = _slicedToArray(_useState, 2),
width = _useState2[0],
setWidth = _useState2[1];
useEffect(function () {
var el = ref.current;
if (!el) return;
/*
Here we're invoking requestAnimationFrame with a callback invoking our
call to getBoundingClientRect and setState in order to resolve an edge case
around portalling. Certain portalling solutions briefly remove children from the DOM
before appending them to the target node. This is to avoid us trying to call getBoundingClientrect
while the Select component is in this state.
*/
// cannot use `offsetWidth` because it is rounded
var rafId = window.requestAnimationFrame(function () {
return setWidth(el.getBoundingClientRect().width);
});
return function () {
return window.cancelAnimationFrame(rafId);
};
}, []);
var getStyleFromStatus = function getStyleFromStatus(status) {
switch (status) {
default:
return {
width: width
};
case 'exiting':
return {
width: 0,
transition: "width ".concat(collapseDuration, "ms ease-out")
};
case 'exited':
return {
width: 0
};
}
};
return /*#__PURE__*/React.createElement(Transition, {
enter: false,
mountOnEnter: true,
unmountOnExit: true,
in: _in,
onExited: function onExited() {
var el = ref.current;
if (!el) return;
_onExited === null || _onExited === void 0 ? void 0 : _onExited(el);
},
timeout: collapseDuration,
nodeRef: ref
}, function (status) {
return /*#__PURE__*/React.createElement("div", {
ref: ref,
style: _objectSpread({
overflow: 'hidden',
whiteSpace: 'nowrap'
}, getStyleFromStatus(status))
}, children);
});
};
var _excluded$2 = ["in", "onExited"];
// strip transition props off before spreading onto actual component
var AnimatedMultiValue = function AnimatedMultiValue(WrappedComponent) {
return function (_ref) {
var inProp = _ref.in,
onExited = _ref.onExited,
props = _objectWithoutProperties(_ref, _excluded$2);
return /*#__PURE__*/React.createElement(Collapse, {
in: inProp,
onExited: onExited
}, /*#__PURE__*/React.createElement(WrappedComponent, _extends({
cropWithEllipsis: inProp
}, props)));
};
};
var AnimatedMultiValue$1 = AnimatedMultiValue;
// fade in when last multi-value removed, otherwise instant
var AnimatedPlaceholder = function AnimatedPlaceholder(WrappedComponent) {
return function (props) {
return /*#__PURE__*/React.createElement(Fade, _extends({
component: WrappedComponent,
duration: props.isMulti ? collapseDuration : 1
}, props));
};
};
var AnimatedPlaceholder$1 = AnimatedPlaceholder;
// instant fade; all transition-group children must be transitions
var AnimatedSingleValue = function AnimatedSingleValue(WrappedComponent) {
return function (props) {
return /*#__PURE__*/React.createElement(Fade, _extends({
component: WrappedComponent
}, props));
};
};
var AnimatedSingleValue$1 = AnimatedSingleValue;
var _excluded$1 = ["component"],
_excluded2 = ["children"];
// make ValueContainer a transition group
var AnimatedValueContainer = function AnimatedValueContainer(WrappedComponent) {
return function (props) {
return props.isMulti ? /*#__PURE__*/React.createElement(IsMultiValueContainer, _extends({
component: WrappedComponent
}, props)) : /*#__PURE__*/React.createElement(TransitionGroup, _extends({
component: WrappedComponent
}, props));
};
};
var IsMultiValueContainer = function IsMultiValueContainer(_ref) {
var component = _ref.component,
restProps = _objectWithoutProperties(_ref, _excluded$1);
var multiProps = useIsMultiValueContainer(restProps);
return /*#__PURE__*/React.createElement(TransitionGroup, _extends({
component: component
}, multiProps));
};
var useIsMultiValueContainer = function useIsMultiValueContainer(_ref2) {
var children = _ref2.children,
props = _objectWithoutProperties(_ref2, _excluded2);
var isMulti = props.isMulti,
hasValue = props.hasValue,
innerProps = props.innerProps,
_props$selectProps = props.selectProps,
components = _props$selectProps.components,
controlShouldRenderValue = _props$selectProps.controlShouldRenderValue;
var _useState = useState(isMulti && controlShouldRenderValue && hasValue),
_useState2 = _slicedToArray(_useState, 2),
cssDisplayFlex = _useState2[0],
setCssDisplayFlex = _useState2[1];
var _useState3 = useState(false),
_useState4 = _slicedToArray(_useState3, 2),
removingValue = _useState4[0],
setRemovingValue = _useState4[1];
useEffect(function () {
if (hasValue && !cssDisplayFlex) {
setCssDisplayFlex(true);
}
}, [hasValue, cssDisplayFlex]);
useEffect(function () {
if (removingValue && !hasValue && cssDisplayFlex) {
setCssDisplayFlex(false);
}
setRemovingValue(false);
}, [removingValue, hasValue, cssDisplayFlex]);
var onExited = function onExited() {
return setRemovingValue(true);
};
var childMapper = function childMapper(child) {
if (isMulti && /*#__PURE__*/React.isValidElement(child)) {
// Add onExited callback to MultiValues
if (child.type === components.MultiValue) {
return /*#__PURE__*/React.cloneElement(child, {
onExited: onExited
});
}
// While container flexed, Input cursor is shown after Placeholder text,
// so remove Placeholder until display is set back to grid
if (child.type === components.Placeholder && cssDisplayFlex) {
return null;
}
}
return child;
};
var newInnerProps = _objectSpread(_objectSpread({}, innerProps), {}, {
style: _objectSpread(_objectSpread({}, innerProps === null || innerProps === void 0 ? void 0 : innerProps.style), {}, {
display: isMulti && hasValue || cssDisplayFlex ? 'flex' : 'grid'
})
});
var newProps = _objectSpread(_objectSpread({}, props), {}, {
innerProps: newInnerProps,
children: React.Children.toArray(children).map(childMapper)
});
return newProps;
};
var AnimatedValueContainer$1 = AnimatedValueContainer;
var _excluded = ["Input", "MultiValue", "Placeholder", "SingleValue", "ValueContainer"];
var makeAnimated = function makeAnimated() {
var externalComponents = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var components = defaultComponents({
components: externalComponents
});
var Input = components.Input,
MultiValue = components.MultiValue,
Placeholder = components.Placeholder,
SingleValue = components.SingleValue,
ValueContainer = components.ValueContainer,
rest = _objectWithoutProperties(components, _excluded);
return _objectSpread({
Input: AnimatedInput$1(Input),
MultiValue: AnimatedMultiValue$1(MultiValue),
Placeholder: AnimatedPlaceholder$1(Placeholder),
SingleValue: AnimatedSingleValue$1(SingleValue),
ValueContainer: AnimatedValueContainer$1(ValueContainer)
}, rest);
};
var AnimatedComponents = makeAnimated();
var Input = AnimatedComponents.Input;
var MultiValue = AnimatedComponents.MultiValue;
var Placeholder = AnimatedComponents.Placeholder;
var SingleValue = AnimatedComponents.SingleValue;
var ValueContainer = AnimatedComponents.ValueContainer;
var index = memoizeOne(makeAnimated);
export { Input, MultiValue, Placeholder, SingleValue, ValueContainer, index as default };

5
node_modules/react-select/animated/package.json generated vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"main": "dist/react-select-animated.cjs.js",
"module": "dist/react-select-animated.esm.js",
"types": "dist/react-select-animated.cjs.d.ts"
}

View File

@@ -0,0 +1,3 @@
export * from "../../dist/declarations/src/async-creatable/index.js";
export { _default as default } from "./react-select-async-creatable.cjs.default.js";
//# sourceMappingURL=react-select-async-creatable.cjs.d.mts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"react-select-async-creatable.cjs.d.mts","sourceRoot":"","sources":["../../dist/declarations/src/async-creatable/index.d.ts"],"names":[],"mappings":"AAAA"}

View File

@@ -0,0 +1,3 @@
export * from "../../dist/declarations/src/async-creatable/index";
export { default } from "../../dist/declarations/src/async-creatable/index";
//# sourceMappingURL=react-select-async-creatable.cjs.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"react-select-async-creatable.cjs.d.ts","sourceRoot":"","sources":["../../dist/declarations/src/async-creatable/index.d.ts"],"names":[],"mappings":"AAAA"}

View File

@@ -0,0 +1 @@
export { default as _default } from "../../dist/declarations/src/async-creatable/index.js"

View File

@@ -0,0 +1 @@
exports._default = require("./react-select-async-creatable.cjs.js").default;

View File

@@ -0,0 +1,59 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var _extends = require('@babel/runtime/helpers/extends');
var React = require('react');
var Select = require('../../dist/Select-d63eed7b.cjs.dev.js');
var useAsync = require('../../dist/useAsync-6d052b01.cjs.dev.js');
var useStateManager = require('../../dist/useStateManager-7748b351.cjs.dev.js');
var useCreatable = require('../../dist/useCreatable-cb238d63.cjs.dev.js');
require('@babel/runtime/helpers/objectSpread2');
require('@babel/runtime/helpers/classCallCheck');
require('@babel/runtime/helpers/createClass');
require('@babel/runtime/helpers/inherits');
require('@babel/runtime/helpers/createSuper');
require('@babel/runtime/helpers/toConsumableArray');
require('../../dist/index-d1cb43f3.cjs.dev.js');
require('@emotion/react');
require('@babel/runtime/helpers/slicedToArray');
require('@babel/runtime/helpers/objectWithoutProperties');
require('@babel/runtime/helpers/typeof');
require('@babel/runtime/helpers/taggedTemplateLiteral');
require('@babel/runtime/helpers/defineProperty');
require('react-dom');
require('@floating-ui/dom');
require('use-isomorphic-layout-effect');
require('memoize-one');
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespace(React);
var AsyncCreatableSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
var stateManagerProps = useAsync.useAsync(props);
var creatableProps = useStateManager.useStateManager(stateManagerProps);
var selectProps = useCreatable.useCreatable(creatableProps);
return /*#__PURE__*/React__namespace.createElement(Select.Select, _extends({
ref: ref
}, selectProps));
});
var AsyncCreatableSelect$1 = AsyncCreatableSelect;
exports["default"] = AsyncCreatableSelect$1;

View File

@@ -0,0 +1,7 @@
'use strict';
if (process.env.NODE_ENV === "production") {
module.exports = require("./react-select-async-creatable.cjs.prod.js");
} else {
module.exports = require("./react-select-async-creatable.cjs.dev.js");
}

View File

@@ -0,0 +1,4 @@
export {
} from "./react-select-async-creatable.cjs.js";
export { _default as default } from "./react-select-async-creatable.cjs.default.js";

View File

@@ -0,0 +1,59 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var _extends = require('@babel/runtime/helpers/extends');
var React = require('react');
var Select = require('../../dist/Select-5dacb5ba.cjs.prod.js');
var useAsync = require('../../dist/useAsync-be659a57.cjs.prod.js');
var useStateManager = require('../../dist/useStateManager-ce23061c.cjs.prod.js');
var useCreatable = require('../../dist/useCreatable-95ae3210.cjs.prod.js');
require('@babel/runtime/helpers/objectSpread2');
require('@babel/runtime/helpers/classCallCheck');
require('@babel/runtime/helpers/createClass');
require('@babel/runtime/helpers/inherits');
require('@babel/runtime/helpers/createSuper');
require('@babel/runtime/helpers/toConsumableArray');
require('../../dist/index-665c4ed8.cjs.prod.js');
require('@emotion/react');
require('@babel/runtime/helpers/slicedToArray');
require('@babel/runtime/helpers/objectWithoutProperties');
require('@babel/runtime/helpers/typeof');
require('@babel/runtime/helpers/taggedTemplateLiteral');
require('@babel/runtime/helpers/defineProperty');
require('react-dom');
require('@floating-ui/dom');
require('use-isomorphic-layout-effect');
require('memoize-one');
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespace(React);
var AsyncCreatableSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
var stateManagerProps = useAsync.useAsync(props);
var creatableProps = useStateManager.useStateManager(stateManagerProps);
var selectProps = useCreatable.useCreatable(creatableProps);
return /*#__PURE__*/React__namespace.createElement(Select.Select, _extends({
ref: ref
}, selectProps));
});
var AsyncCreatableSelect$1 = AsyncCreatableSelect;
exports["default"] = AsyncCreatableSelect$1;

View File

@@ -0,0 +1,36 @@
import _extends from '@babel/runtime/helpers/esm/extends';
import * as React from 'react';
import { forwardRef } from 'react';
import { S as Select } from '../../dist/Select-49a62830.esm.js';
import { u as useAsync } from '../../dist/useAsync-ba7c6b77.esm.js';
import { u as useStateManager } from '../../dist/useStateManager-7e1e8489.esm.js';
import { u as useCreatable } from '../../dist/useCreatable-d97ef2c9.esm.js';
import '@babel/runtime/helpers/objectSpread2';
import '@babel/runtime/helpers/classCallCheck';
import '@babel/runtime/helpers/createClass';
import '@babel/runtime/helpers/inherits';
import '@babel/runtime/helpers/createSuper';
import '@babel/runtime/helpers/toConsumableArray';
import '../../dist/index-a301f526.esm.js';
import '@emotion/react';
import '@babel/runtime/helpers/slicedToArray';
import '@babel/runtime/helpers/objectWithoutProperties';
import '@babel/runtime/helpers/typeof';
import '@babel/runtime/helpers/taggedTemplateLiteral';
import '@babel/runtime/helpers/defineProperty';
import 'react-dom';
import '@floating-ui/dom';
import 'use-isomorphic-layout-effect';
import 'memoize-one';
var AsyncCreatableSelect = /*#__PURE__*/forwardRef(function (props, ref) {
var stateManagerProps = useAsync(props);
var creatableProps = useStateManager(stateManagerProps);
var selectProps = useCreatable(creatableProps);
return /*#__PURE__*/React.createElement(Select, _extends({
ref: ref
}, selectProps));
});
var AsyncCreatableSelect$1 = AsyncCreatableSelect;
export { AsyncCreatableSelect$1 as default };

View File

@@ -0,0 +1,5 @@
{
"main": "dist/react-select-async-creatable.cjs.js",
"module": "dist/react-select-async-creatable.esm.js",
"types": "dist/react-select-async-creatable.cjs.d.ts"
}

View File

@@ -0,0 +1,3 @@
export * from "../../dist/declarations/src/async/index.js";
export { _default as default } from "./react-select-async.cjs.default.js";
//# sourceMappingURL=react-select-async.cjs.d.mts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"react-select-async.cjs.d.mts","sourceRoot":"","sources":["../../dist/declarations/src/async/index.d.ts"],"names":[],"mappings":"AAAA"}

View File

@@ -0,0 +1,3 @@
export * from "../../dist/declarations/src/async/index";
export { default } from "../../dist/declarations/src/async/index";
//# sourceMappingURL=react-select-async.cjs.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"react-select-async.cjs.d.ts","sourceRoot":"","sources":["../../dist/declarations/src/async/index.d.ts"],"names":[],"mappings":"AAAA"}

View File

@@ -0,0 +1 @@
export { default as _default } from "../../dist/declarations/src/async/index.js"

View File

@@ -0,0 +1 @@
exports._default = require("./react-select-async.cjs.js").default;

View File

@@ -0,0 +1,58 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var _extends = require('@babel/runtime/helpers/extends');
var React = require('react');
var Select = require('../../dist/Select-d63eed7b.cjs.dev.js');
var useStateManager = require('../../dist/useStateManager-7748b351.cjs.dev.js');
var useAsync = require('../../dist/useAsync-6d052b01.cjs.dev.js');
require('@babel/runtime/helpers/objectSpread2');
require('@babel/runtime/helpers/classCallCheck');
require('@babel/runtime/helpers/createClass');
require('@babel/runtime/helpers/inherits');
require('@babel/runtime/helpers/createSuper');
require('@babel/runtime/helpers/toConsumableArray');
require('../../dist/index-d1cb43f3.cjs.dev.js');
require('@emotion/react');
require('@babel/runtime/helpers/slicedToArray');
require('@babel/runtime/helpers/objectWithoutProperties');
require('@babel/runtime/helpers/typeof');
require('@babel/runtime/helpers/taggedTemplateLiteral');
require('@babel/runtime/helpers/defineProperty');
require('react-dom');
require('@floating-ui/dom');
require('use-isomorphic-layout-effect');
require('memoize-one');
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespace(React);
var AsyncSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
var stateManagedProps = useAsync.useAsync(props);
var selectProps = useStateManager.useStateManager(stateManagedProps);
return /*#__PURE__*/React__namespace.createElement(Select.Select, _extends({
ref: ref
}, selectProps));
});
var AsyncSelect$1 = AsyncSelect;
exports.useAsync = useAsync.useAsync;
exports["default"] = AsyncSelect$1;

View File

@@ -0,0 +1,7 @@
'use strict';
if (process.env.NODE_ENV === "production") {
module.exports = require("./react-select-async.cjs.prod.js");
} else {
module.exports = require("./react-select-async.cjs.dev.js");
}

View File

@@ -0,0 +1,4 @@
export {
useAsync
} from "./react-select-async.cjs.js";
export { _default as default } from "./react-select-async.cjs.default.js";

View File

@@ -0,0 +1,58 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var _extends = require('@babel/runtime/helpers/extends');
var React = require('react');
var Select = require('../../dist/Select-5dacb5ba.cjs.prod.js');
var useStateManager = require('../../dist/useStateManager-ce23061c.cjs.prod.js');
var useAsync = require('../../dist/useAsync-be659a57.cjs.prod.js');
require('@babel/runtime/helpers/objectSpread2');
require('@babel/runtime/helpers/classCallCheck');
require('@babel/runtime/helpers/createClass');
require('@babel/runtime/helpers/inherits');
require('@babel/runtime/helpers/createSuper');
require('@babel/runtime/helpers/toConsumableArray');
require('../../dist/index-665c4ed8.cjs.prod.js');
require('@emotion/react');
require('@babel/runtime/helpers/slicedToArray');
require('@babel/runtime/helpers/objectWithoutProperties');
require('@babel/runtime/helpers/typeof');
require('@babel/runtime/helpers/taggedTemplateLiteral');
require('@babel/runtime/helpers/defineProperty');
require('react-dom');
require('@floating-ui/dom');
require('use-isomorphic-layout-effect');
require('memoize-one');
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespace(React);
var AsyncSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
var stateManagedProps = useAsync.useAsync(props);
var selectProps = useStateManager.useStateManager(stateManagedProps);
return /*#__PURE__*/React__namespace.createElement(Select.Select, _extends({
ref: ref
}, selectProps));
});
var AsyncSelect$1 = AsyncSelect;
exports.useAsync = useAsync.useAsync;
exports["default"] = AsyncSelect$1;

View File

@@ -0,0 +1,35 @@
import _extends from '@babel/runtime/helpers/esm/extends';
import * as React from 'react';
import { forwardRef } from 'react';
import { S as Select } from '../../dist/Select-49a62830.esm.js';
import { u as useStateManager } from '../../dist/useStateManager-7e1e8489.esm.js';
import { u as useAsync } from '../../dist/useAsync-ba7c6b77.esm.js';
export { u as useAsync } from '../../dist/useAsync-ba7c6b77.esm.js';
import '@babel/runtime/helpers/objectSpread2';
import '@babel/runtime/helpers/classCallCheck';
import '@babel/runtime/helpers/createClass';
import '@babel/runtime/helpers/inherits';
import '@babel/runtime/helpers/createSuper';
import '@babel/runtime/helpers/toConsumableArray';
import '../../dist/index-a301f526.esm.js';
import '@emotion/react';
import '@babel/runtime/helpers/slicedToArray';
import '@babel/runtime/helpers/objectWithoutProperties';
import '@babel/runtime/helpers/typeof';
import '@babel/runtime/helpers/taggedTemplateLiteral';
import '@babel/runtime/helpers/defineProperty';
import 'react-dom';
import '@floating-ui/dom';
import 'use-isomorphic-layout-effect';
import 'memoize-one';
var AsyncSelect = /*#__PURE__*/forwardRef(function (props, ref) {
var stateManagedProps = useAsync(props);
var selectProps = useStateManager(stateManagedProps);
return /*#__PURE__*/React.createElement(Select, _extends({
ref: ref
}, selectProps));
});
var AsyncSelect$1 = AsyncSelect;
export { AsyncSelect$1 as default };

5
node_modules/react-select/async/package.json generated vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"main": "dist/react-select-async.cjs.js",
"module": "dist/react-select-async.esm.js",
"types": "dist/react-select-async.cjs.d.ts"
}

View File

@@ -0,0 +1,3 @@
export * from "../../dist/declarations/src/base/index.js";
export { _default as default } from "./react-select-base.cjs.default.js";
//# sourceMappingURL=react-select-base.cjs.d.mts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"react-select-base.cjs.d.mts","sourceRoot":"","sources":["../../dist/declarations/src/base/index.d.ts"],"names":[],"mappings":"AAAA"}

View File

@@ -0,0 +1,3 @@
export * from "../../dist/declarations/src/base/index";
export { default } from "../../dist/declarations/src/base/index";
//# sourceMappingURL=react-select-base.cjs.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"react-select-base.cjs.d.ts","sourceRoot":"","sources":["../../dist/declarations/src/base/index.d.ts"],"names":[],"mappings":"AAAA"}

View File

@@ -0,0 +1 @@
export { default as _default } from "../../dist/declarations/src/base/index.js"

View File

@@ -0,0 +1 @@
exports._default = require("./react-select-base.cjs.js").default;

View File

@@ -0,0 +1,29 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var Select = require('../../dist/Select-d63eed7b.cjs.dev.js');
require('@babel/runtime/helpers/extends');
require('@babel/runtime/helpers/objectSpread2');
require('@babel/runtime/helpers/classCallCheck');
require('@babel/runtime/helpers/createClass');
require('@babel/runtime/helpers/inherits');
require('@babel/runtime/helpers/createSuper');
require('@babel/runtime/helpers/toConsumableArray');
require('react');
require('../../dist/index-d1cb43f3.cjs.dev.js');
require('@emotion/react');
require('@babel/runtime/helpers/slicedToArray');
require('@babel/runtime/helpers/objectWithoutProperties');
require('@babel/runtime/helpers/typeof');
require('@babel/runtime/helpers/taggedTemplateLiteral');
require('@babel/runtime/helpers/defineProperty');
require('react-dom');
require('@floating-ui/dom');
require('use-isomorphic-layout-effect');
require('memoize-one');
exports["default"] = Select.Select;
exports.defaultProps = Select.defaultProps;

View File

@@ -0,0 +1,7 @@
'use strict';
if (process.env.NODE_ENV === "production") {
module.exports = require("./react-select-base.cjs.prod.js");
} else {
module.exports = require("./react-select-base.cjs.dev.js");
}

View File

@@ -0,0 +1,4 @@
export {
defaultProps
} from "./react-select-base.cjs.js";
export { _default as default } from "./react-select-base.cjs.default.js";

View File

@@ -0,0 +1,29 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var Select = require('../../dist/Select-5dacb5ba.cjs.prod.js');
require('@babel/runtime/helpers/extends');
require('@babel/runtime/helpers/objectSpread2');
require('@babel/runtime/helpers/classCallCheck');
require('@babel/runtime/helpers/createClass');
require('@babel/runtime/helpers/inherits');
require('@babel/runtime/helpers/createSuper');
require('@babel/runtime/helpers/toConsumableArray');
require('react');
require('../../dist/index-665c4ed8.cjs.prod.js');
require('@emotion/react');
require('@babel/runtime/helpers/slicedToArray');
require('@babel/runtime/helpers/objectWithoutProperties');
require('@babel/runtime/helpers/typeof');
require('@babel/runtime/helpers/taggedTemplateLiteral');
require('@babel/runtime/helpers/defineProperty');
require('react-dom');
require('@floating-ui/dom');
require('use-isomorphic-layout-effect');
require('memoize-one');
exports["default"] = Select.Select;
exports.defaultProps = Select.defaultProps;

View File

@@ -0,0 +1,20 @@
export { S as default, a as defaultProps } from '../../dist/Select-49a62830.esm.js';
import '@babel/runtime/helpers/extends';
import '@babel/runtime/helpers/objectSpread2';
import '@babel/runtime/helpers/classCallCheck';
import '@babel/runtime/helpers/createClass';
import '@babel/runtime/helpers/inherits';
import '@babel/runtime/helpers/createSuper';
import '@babel/runtime/helpers/toConsumableArray';
import 'react';
import '../../dist/index-a301f526.esm.js';
import '@emotion/react';
import '@babel/runtime/helpers/slicedToArray';
import '@babel/runtime/helpers/objectWithoutProperties';
import '@babel/runtime/helpers/typeof';
import '@babel/runtime/helpers/taggedTemplateLiteral';
import '@babel/runtime/helpers/defineProperty';
import 'react-dom';
import '@floating-ui/dom';
import 'use-isomorphic-layout-effect';
import 'memoize-one';

5
node_modules/react-select/base/package.json generated vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"main": "dist/react-select-base.cjs.js",
"module": "dist/react-select-base.esm.js",
"types": "dist/react-select-base.cjs.d.ts"
}

View File

@@ -0,0 +1,3 @@
export * from "../../dist/declarations/src/creatable/index.js";
export { _default as default } from "./react-select-creatable.cjs.default.js";
//# sourceMappingURL=react-select-creatable.cjs.d.mts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"react-select-creatable.cjs.d.mts","sourceRoot":"","sources":["../../dist/declarations/src/creatable/index.d.ts"],"names":[],"mappings":"AAAA"}

View File

@@ -0,0 +1,3 @@
export * from "../../dist/declarations/src/creatable/index";
export { default } from "../../dist/declarations/src/creatable/index";
//# sourceMappingURL=react-select-creatable.cjs.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"react-select-creatable.cjs.d.ts","sourceRoot":"","sources":["../../dist/declarations/src/creatable/index.d.ts"],"names":[],"mappings":"AAAA"}

View File

@@ -0,0 +1 @@
export { default as _default } from "../../dist/declarations/src/creatable/index.js"

View File

@@ -0,0 +1 @@
exports._default = require("./react-select-creatable.cjs.js").default;

View File

@@ -0,0 +1,58 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var _extends = require('@babel/runtime/helpers/extends');
var React = require('react');
var Select = require('../../dist/Select-d63eed7b.cjs.dev.js');
var useStateManager = require('../../dist/useStateManager-7748b351.cjs.dev.js');
var useCreatable = require('../../dist/useCreatable-cb238d63.cjs.dev.js');
require('@babel/runtime/helpers/objectSpread2');
require('@babel/runtime/helpers/classCallCheck');
require('@babel/runtime/helpers/createClass');
require('@babel/runtime/helpers/inherits');
require('@babel/runtime/helpers/createSuper');
require('@babel/runtime/helpers/toConsumableArray');
require('../../dist/index-d1cb43f3.cjs.dev.js');
require('@emotion/react');
require('@babel/runtime/helpers/slicedToArray');
require('@babel/runtime/helpers/objectWithoutProperties');
require('@babel/runtime/helpers/typeof');
require('@babel/runtime/helpers/taggedTemplateLiteral');
require('@babel/runtime/helpers/defineProperty');
require('react-dom');
require('@floating-ui/dom');
require('use-isomorphic-layout-effect');
require('memoize-one');
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespace(React);
var CreatableSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
var creatableProps = useStateManager.useStateManager(props);
var selectProps = useCreatable.useCreatable(creatableProps);
return /*#__PURE__*/React__namespace.createElement(Select.Select, _extends({
ref: ref
}, selectProps));
});
var CreatableSelect$1 = CreatableSelect;
exports.useCreatable = useCreatable.useCreatable;
exports["default"] = CreatableSelect$1;

View File

@@ -0,0 +1,7 @@
'use strict';
if (process.env.NODE_ENV === "production") {
module.exports = require("./react-select-creatable.cjs.prod.js");
} else {
module.exports = require("./react-select-creatable.cjs.dev.js");
}

View File

@@ -0,0 +1,4 @@
export {
useCreatable
} from "./react-select-creatable.cjs.js";
export { _default as default } from "./react-select-creatable.cjs.default.js";

View File

@@ -0,0 +1,58 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var _extends = require('@babel/runtime/helpers/extends');
var React = require('react');
var Select = require('../../dist/Select-5dacb5ba.cjs.prod.js');
var useStateManager = require('../../dist/useStateManager-ce23061c.cjs.prod.js');
var useCreatable = require('../../dist/useCreatable-95ae3210.cjs.prod.js');
require('@babel/runtime/helpers/objectSpread2');
require('@babel/runtime/helpers/classCallCheck');
require('@babel/runtime/helpers/createClass');
require('@babel/runtime/helpers/inherits');
require('@babel/runtime/helpers/createSuper');
require('@babel/runtime/helpers/toConsumableArray');
require('../../dist/index-665c4ed8.cjs.prod.js');
require('@emotion/react');
require('@babel/runtime/helpers/slicedToArray');
require('@babel/runtime/helpers/objectWithoutProperties');
require('@babel/runtime/helpers/typeof');
require('@babel/runtime/helpers/taggedTemplateLiteral');
require('@babel/runtime/helpers/defineProperty');
require('react-dom');
require('@floating-ui/dom');
require('use-isomorphic-layout-effect');
require('memoize-one');
function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () { return e[k]; }
});
}
});
}
n["default"] = e;
return Object.freeze(n);
}
var React__namespace = /*#__PURE__*/_interopNamespace(React);
var CreatableSelect = /*#__PURE__*/React.forwardRef(function (props, ref) {
var creatableProps = useStateManager.useStateManager(props);
var selectProps = useCreatable.useCreatable(creatableProps);
return /*#__PURE__*/React__namespace.createElement(Select.Select, _extends({
ref: ref
}, selectProps));
});
var CreatableSelect$1 = CreatableSelect;
exports.useCreatable = useCreatable.useCreatable;
exports["default"] = CreatableSelect$1;

View File

@@ -0,0 +1,35 @@
import _extends from '@babel/runtime/helpers/esm/extends';
import * as React from 'react';
import { forwardRef } from 'react';
import { S as Select } from '../../dist/Select-49a62830.esm.js';
import { u as useStateManager } from '../../dist/useStateManager-7e1e8489.esm.js';
import { u as useCreatable } from '../../dist/useCreatable-d97ef2c9.esm.js';
export { u as useCreatable } from '../../dist/useCreatable-d97ef2c9.esm.js';
import '@babel/runtime/helpers/objectSpread2';
import '@babel/runtime/helpers/classCallCheck';
import '@babel/runtime/helpers/createClass';
import '@babel/runtime/helpers/inherits';
import '@babel/runtime/helpers/createSuper';
import '@babel/runtime/helpers/toConsumableArray';
import '../../dist/index-a301f526.esm.js';
import '@emotion/react';
import '@babel/runtime/helpers/slicedToArray';
import '@babel/runtime/helpers/objectWithoutProperties';
import '@babel/runtime/helpers/typeof';
import '@babel/runtime/helpers/taggedTemplateLiteral';
import '@babel/runtime/helpers/defineProperty';
import 'react-dom';
import '@floating-ui/dom';
import 'use-isomorphic-layout-effect';
import 'memoize-one';
var CreatableSelect = /*#__PURE__*/forwardRef(function (props, ref) {
var creatableProps = useStateManager(props);
var selectProps = useCreatable(creatableProps);
return /*#__PURE__*/React.createElement(Select, _extends({
ref: ref
}, selectProps));
});
var CreatableSelect$1 = CreatableSelect;
export { CreatableSelect$1 as default };

5
node_modules/react-select/creatable/package.json generated vendored Normal file
View File

@@ -0,0 +1,5 @@
{
"main": "dist/react-select-creatable.cjs.js",
"module": "dist/react-select-creatable.esm.js",
"types": "dist/react-select-creatable.cjs.d.ts"
}

2663
node_modules/react-select/dist/Select-49a62830.esm.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

2693
node_modules/react-select/dist/Select-d63eed7b.cjs.dev.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,10 @@
import { ReactElement, RefAttributes } from 'react';
import Select from './Select';
import { GroupBase } from './types';
import useAsync from './useAsync';
import type { AsyncProps } from './useAsync';
export type { AsyncProps };
declare type AsyncSelect = <Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: AsyncProps<Option, IsMulti, Group> & RefAttributes<Select<Option, IsMulti, Group>>) => ReactElement;
declare const AsyncSelect: AsyncSelect;
export { useAsync };
export default AsyncSelect;

View File

@@ -0,0 +1,10 @@
import { ReactElement, RefAttributes } from 'react';
import Select from './Select';
import { GroupBase } from './types';
import { AsyncAdditionalProps } from './useAsync';
import { StateManagerProps } from './useStateManager';
import { CreatableAdditionalProps } from './useCreatable';
export declare type AsyncCreatableProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = StateManagerProps<Option, IsMulti, Group> & CreatableAdditionalProps<Option, Group> & AsyncAdditionalProps<Option, Group>;
declare type AsyncCreatableSelect = <Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: AsyncCreatableProps<Option, IsMulti, Group> & RefAttributes<Select<Option, IsMulti, Group>>) => ReactElement;
declare const AsyncCreatableSelect: AsyncCreatableSelect;
export default AsyncCreatableSelect;

View File

@@ -0,0 +1,10 @@
import { ReactElement, RefAttributes } from 'react';
import Select from './Select';
import { GroupBase } from './types';
import { StateManagerProps } from './useStateManager';
import useCreatable, { CreatableAdditionalProps } from './useCreatable';
export declare type CreatableProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = StateManagerProps<Option, IsMulti, Group> & CreatableAdditionalProps<Option, Group>;
declare type CreatableSelect = <Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: CreatableProps<Option, IsMulti, Group> & RefAttributes<Select<Option, IsMulti, Group>>) => ReactElement;
declare const CreatableSelect: CreatableSelect;
export { useCreatable };
export default CreatableSelect;

View File

@@ -0,0 +1,8 @@
import { ReactNode } from 'react';
interface NonceProviderProps {
nonce: string;
children: ReactNode;
cacheKey: string;
}
declare const _default: ({ nonce, children, cacheKey }: NonceProviderProps) => JSX.Element;
export default _default;

View File

@@ -0,0 +1,491 @@
import * as React from 'react';
import { AriaAttributes, Component, FocusEventHandler, FormEventHandler, KeyboardEventHandler, MouseEventHandler, ReactNode, RefCallback, TouchEventHandler } from 'react';
import { FilterOptionOption } from './filters';
import { AriaLiveMessages, AriaSelection } from './accessibility/index';
import { SelectComponentsConfig } from './components/index';
import { ClassNamesConfig, StylesConfig, StylesProps } from './styles';
import { ThemeConfig } from './theme';
import { ActionMeta, FocusDirection, GetOptionLabel, GetOptionValue, GroupBase, InputActionMeta, MenuPlacement, MenuPosition, OnChangeValue, Options, OptionsOrGroups, PropsValue, SetValueAction } from './types';
export declare type FormatOptionLabelContext = 'menu' | 'value';
export interface FormatOptionLabelMeta<Option> {
context: FormatOptionLabelContext;
inputValue: string;
selectValue: Options<Option>;
}
export interface Props<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
/** HTML ID of an element containing an error message related to the input**/
'aria-errormessage'?: AriaAttributes['aria-errormessage'];
/** Indicate if the value entered in the field is invalid **/
'aria-invalid'?: AriaAttributes['aria-invalid'];
/** Aria label (for assistive tech) */
'aria-label'?: AriaAttributes['aria-label'];
/** HTML ID of an element that should be used as the label (for assistive tech) */
'aria-labelledby'?: AriaAttributes['aria-labelledby'];
/** Used to set the priority with which screen reader should treat updates to live regions. The possible settings are: off, polite (default) or assertive */
'aria-live'?: AriaAttributes['aria-live'];
/** Customise the messages used by the aria-live component */
ariaLiveMessages?: AriaLiveMessages<Option, IsMulti, Group>;
/** Focus the control when it is mounted */
autoFocus?: boolean;
/** Remove the currently focused option when the user presses backspace when Select isClearable or isMulti */
backspaceRemovesValue: boolean;
/** Remove focus from the input when the user selects an option (handy for dismissing the keyboard on touch devices) */
blurInputOnSelect: boolean;
/** When the user reaches the top/bottom of the menu, prevent scroll on the scroll-parent */
captureMenuScroll: boolean;
/** Sets a className attribute on the outer component */
className?: string;
/**
* If provided, all inner components will be given a prefixed className attribute.
*
* This is useful when styling via CSS classes instead of the Styles API approach.
*/
classNamePrefix?: string | null;
/**
* Provide classNames based on state for each inner component
*/
classNames: ClassNamesConfig<Option, IsMulti, Group>;
/** Close the select menu when the user selects an option */
closeMenuOnSelect: boolean;
/**
* If `true`, close the select menu when the user scrolls the document/body.
*
* If a function, takes a standard javascript `ScrollEvent` you return a boolean:
*
* `true` => The menu closes
*
* `false` => The menu stays open
*
* This is useful when you have a scrollable modal and want to portal the menu out,
* but want to avoid graphical issues.
*/
closeMenuOnScroll: boolean | ((event: Event) => boolean);
/**
* This complex object includes all the compositional components that are used
* in `react-select`. If you wish to overwrite a component, pass in an object
* with the appropriate namespace.
*
* If you only wish to restyle a component, we recommend using the `styles` prop
* instead. For a list of the components that can be passed in, and the shape
* that will be passed to them, see [the components docs](/components)
*/
components: SelectComponentsConfig<Option, IsMulti, Group>;
/** Whether the value of the select, e.g. SingleValue, should be displayed in the control. */
controlShouldRenderValue: boolean;
/** Delimiter used to join multiple values into a single HTML Input value */
delimiter?: string;
/** Clear all values when the user presses escape AND the menu is closed */
escapeClearsValue: boolean;
/** Custom method to filter whether an option should be displayed in the menu */
filterOption: ((option: FilterOptionOption<Option>, inputValue: string) => boolean) | null;
/**
* Formats group labels in the menu as React components
*
* An example can be found in the [Replacing builtins](/advanced#replacing-builtins) documentation.
*/
formatGroupLabel: (group: Group) => ReactNode;
/** Formats option labels in the menu and control as React components */
formatOptionLabel?: (data: Option, formatOptionLabelMeta: FormatOptionLabelMeta<Option>) => ReactNode;
/**
* Resolves option data to a string to be displayed as the label by components
*
* Note: Failure to resolve to a string type can interfere with filtering and
* screen reader support.
*/
getOptionLabel: GetOptionLabel<Option>;
/** Resolves option data to a string to compare options and specify value attributes */
getOptionValue: GetOptionValue<Option>;
/** Hide the selected option from the menu */
hideSelectedOptions?: boolean;
/** The id to set on the SelectContainer component. */
id?: string;
/** The value of the search input */
inputValue: string;
/** The id of the search input */
inputId?: string;
/** Define an id prefix for the select components e.g. {your-id}-value */
instanceId?: number | string;
/** Is the select value clearable */
isClearable?: boolean;
/** Is the select disabled */
isDisabled: boolean;
/** Is the select in a state of loading (async) */
isLoading: boolean;
/**
* Override the built-in logic to detect whether an option is disabled
*
* An example can be found in the [Replacing builtins](/advanced#replacing-builtins) documentation.
*/
isOptionDisabled: (option: Option, selectValue: Options<Option>) => boolean;
/** Override the built-in logic to detect whether an option is selected */
isOptionSelected?: (option: Option, selectValue: Options<Option>) => boolean;
/** Support multiple selected options */
isMulti: IsMulti;
/** Is the select direction right-to-left */
isRtl: boolean;
/** Whether to enable search functionality */
isSearchable: boolean;
/** Async: Text to display when loading options */
loadingMessage: (obj: {
inputValue: string;
}) => ReactNode;
/** Minimum height of the menu before flipping */
minMenuHeight: number;
/** Maximum height of the menu before scrolling */
maxMenuHeight: number;
/** Whether the menu is open */
menuIsOpen: boolean;
/**
* Default placement of the menu in relation to the control. 'auto' will flip
* when there isn't enough space below the control.
*/
menuPlacement: MenuPlacement;
/** The CSS position value of the menu, when "fixed" extra layout management is required */
menuPosition: MenuPosition;
/**
* Whether the menu should use a portal, and where it should attach
*
* An example can be found in the [Portaling](/advanced#portaling) documentation
*/
menuPortalTarget?: HTMLElement | null;
/** Whether to block scroll events when the menu is open */
menuShouldBlockScroll: boolean;
/** Whether the menu should be scrolled into view when it opens */
menuShouldScrollIntoView: boolean;
/** Name of the HTML Input (optional - without this, no input will be rendered) */
name?: string;
/** Text to display when there are no options */
noOptionsMessage: (obj: {
inputValue: string;
}) => ReactNode;
/** Handle blur events on the control */
onBlur?: FocusEventHandler<HTMLInputElement>;
/** Handle change events on the select */
onChange: (newValue: OnChangeValue<Option, IsMulti>, actionMeta: ActionMeta<Option>) => void;
/** Handle focus events on the control */
onFocus?: FocusEventHandler<HTMLInputElement>;
/** Handle change events on the input */
onInputChange: (newValue: string, actionMeta: InputActionMeta) => void;
/** Handle key down events on the select */
onKeyDown?: KeyboardEventHandler<HTMLDivElement>;
/** Handle the menu opening */
onMenuOpen: () => void;
/** Handle the menu closing */
onMenuClose: () => void;
/** Fired when the user scrolls to the top of the menu */
onMenuScrollToTop?: (event: WheelEvent | TouchEvent) => void;
/** Fired when the user scrolls to the bottom of the menu */
onMenuScrollToBottom?: (event: WheelEvent | TouchEvent) => void;
/** Allows control of whether the menu is opened when the Select is focused */
openMenuOnFocus: boolean;
/** Allows control of whether the menu is opened when the Select is clicked */
openMenuOnClick: boolean;
/** Array of options that populate the select menu */
options: OptionsOrGroups<Option, Group>;
/** Number of options to jump in menu when page{up|down} keys are used */
pageSize: number;
/** Placeholder for the select value */
placeholder: ReactNode;
/** Status to relay to screen readers */
screenReaderStatus: (obj: {
count: number;
}) => string;
/**
* Style modifier methods
*
* A basic example can be found at the bottom of the [Replacing builtins](/advanced#replacing-builtins) documentation.
*/
styles: StylesConfig<Option, IsMulti, Group>;
/** Theme modifier method */
theme?: ThemeConfig;
/** Sets the tabIndex attribute on the input */
tabIndex: number;
/** Select the currently focused option when the user presses tab */
tabSelectsValue: boolean;
/** Remove all non-essential styles */
unstyled: boolean;
/** The value of the select; reflected by the selected option */
value: PropsValue<Option>;
/** Sets the form attribute on the input */
form?: string;
/** Marks the value-holding input as required for form validation */
required?: boolean;
}
export declare const defaultProps: {
'aria-live': string;
backspaceRemovesValue: boolean;
blurInputOnSelect: boolean;
captureMenuScroll: boolean;
classNames: {};
closeMenuOnSelect: boolean;
closeMenuOnScroll: boolean;
components: {};
controlShouldRenderValue: boolean;
escapeClearsValue: boolean;
filterOption: (option: FilterOptionOption<unknown>, rawInput: string) => boolean;
formatGroupLabel: <Option, Group extends GroupBase<Option>>(group: Group) => string;
getOptionLabel: <Option_1>(option: Option_1) => string;
getOptionValue: <Option_2>(option: Option_2) => string;
isDisabled: boolean;
isLoading: boolean;
isMulti: boolean;
isRtl: boolean;
isSearchable: boolean;
isOptionDisabled: <Option_3>(option: Option_3) => boolean;
loadingMessage: () => string;
maxMenuHeight: number;
minMenuHeight: number;
menuIsOpen: boolean;
menuPlacement: string;
menuPosition: string;
menuShouldBlockScroll: boolean;
menuShouldScrollIntoView: boolean;
noOptionsMessage: () => string;
openMenuOnFocus: boolean;
openMenuOnClick: boolean;
options: never[];
pageSize: number;
placeholder: string;
screenReaderStatus: ({ count }: {
count: number;
}) => string;
styles: {};
tabIndex: number;
tabSelectsValue: boolean;
unstyled: boolean;
};
interface State<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
ariaSelection: AriaSelection<Option, IsMulti> | null;
inputIsHidden: boolean;
isFocused: boolean;
focusedOption: Option | null;
focusedOptionId: string | null;
focusableOptionsWithIds: FocusableOptionWithId<Option>[];
focusedValue: Option | null;
selectValue: Options<Option>;
clearFocusValueOnUpdate: boolean;
prevWasFocused: boolean;
inputIsHiddenAfterUpdate: boolean | null | undefined;
prevProps: Props<Option, IsMulti, Group> | void;
instancePrefix: string;
}
interface CategorizedOption<Option> {
type: 'option';
data: Option;
isDisabled: boolean;
isSelected: boolean;
label: string;
value: string;
index: number;
}
interface FocusableOptionWithId<Option> {
data: Option;
id: string;
}
interface CategorizedGroup<Option, Group extends GroupBase<Option>> {
type: 'group';
data: Group;
options: readonly CategorizedOption<Option>[];
index: number;
}
declare type CategorizedGroupOrOption<Option, Group extends GroupBase<Option>> = CategorizedGroup<Option, Group> | CategorizedOption<Option>;
export default class Select<Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> extends Component<Props<Option, IsMulti, Group>, State<Option, IsMulti, Group>> {
static defaultProps: {
'aria-live': string;
backspaceRemovesValue: boolean;
blurInputOnSelect: boolean;
captureMenuScroll: boolean;
classNames: {};
closeMenuOnSelect: boolean;
closeMenuOnScroll: boolean;
components: {};
controlShouldRenderValue: boolean;
escapeClearsValue: boolean;
filterOption: (option: FilterOptionOption<unknown>, rawInput: string) => boolean;
formatGroupLabel: <Option_1, Group_1 extends GroupBase<Option_1>>(group: Group_1) => string;
getOptionLabel: <Option_2>(option: Option_2) => string;
getOptionValue: <Option_3>(option: Option_3) => string;
isDisabled: boolean;
isLoading: boolean;
isMulti: boolean;
isRtl: boolean;
isSearchable: boolean;
isOptionDisabled: <Option_4>(option: Option_4) => boolean;
loadingMessage: () => string;
maxMenuHeight: number;
minMenuHeight: number;
menuIsOpen: boolean;
menuPlacement: string;
menuPosition: string;
menuShouldBlockScroll: boolean;
menuShouldScrollIntoView: boolean;
noOptionsMessage: () => string;
openMenuOnFocus: boolean;
openMenuOnClick: boolean;
options: never[];
pageSize: number;
placeholder: string;
screenReaderStatus: ({ count }: {
count: number;
}) => string;
styles: {};
tabIndex: number;
tabSelectsValue: boolean;
unstyled: boolean;
};
state: State<Option, IsMulti, Group>;
blockOptionHover: boolean;
isComposing: boolean;
commonProps: any;
initialTouchX: number;
initialTouchY: number;
openAfterFocus: boolean;
scrollToFocusedOptionOnUpdate: boolean;
userIsDragging?: boolean;
isAppleDevice: boolean;
controlRef: HTMLDivElement | null;
getControlRef: RefCallback<HTMLDivElement>;
focusedOptionRef: HTMLDivElement | null;
getFocusedOptionRef: RefCallback<HTMLDivElement>;
menuListRef: HTMLDivElement | null;
getMenuListRef: RefCallback<HTMLDivElement>;
inputRef: HTMLInputElement | null;
getInputRef: RefCallback<HTMLInputElement>;
constructor(props: Props<Option, IsMulti, Group>);
static getDerivedStateFromProps(props: Props<unknown, boolean, GroupBase<unknown>>, state: State<unknown, boolean, GroupBase<unknown>>): {
prevProps: Props<unknown, boolean, GroupBase<unknown>>;
ariaSelection: AriaSelection<unknown, boolean> | null;
prevWasFocused: boolean;
inputIsHidden: boolean;
inputIsHiddenAfterUpdate: undefined;
} | {
prevProps: Props<unknown, boolean, GroupBase<unknown>>;
ariaSelection: AriaSelection<unknown, boolean> | null;
prevWasFocused: boolean;
inputIsHidden?: undefined;
inputIsHiddenAfterUpdate?: undefined;
};
componentDidMount(): void;
componentDidUpdate(prevProps: Props<Option, IsMulti, Group>): void;
componentWillUnmount(): void;
onMenuOpen(): void;
onMenuClose(): void;
onInputChange(newValue: string, actionMeta: InputActionMeta): void;
focusInput(): void;
blurInput(): void;
focus: () => void;
blur: () => void;
openMenu(focusOption: 'first' | 'last'): void;
focusValue(direction: 'previous' | 'next'): void;
focusOption(direction?: FocusDirection): void;
onChange: (newValue: OnChangeValue<Option, IsMulti>, actionMeta: ActionMeta<Option>) => void;
setValue: (newValue: OnChangeValue<Option, IsMulti>, action: SetValueAction, option?: Option | undefined) => void;
selectOption: (newValue: Option) => void;
removeValue: (removedValue: Option) => void;
clearValue: () => void;
popValue: () => void;
getTheme(): import("./types").Theme;
getFocusedOptionId: (focusedOption: Option) => string | null;
getFocusableOptionsWithIds: () => FocusableOptionWithId<Option>[];
getValue: () => Options<Option>;
cx: (...args: any) => string;
getCommonProps(): {
clearValue: () => void;
cx: (...args: any) => string;
getStyles: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => import("./types").CSSObjectWithLabel;
getClassNames: <Key_1 extends keyof StylesProps<Option, IsMulti, Group>>(key: Key_1, props: StylesProps<Option, IsMulti, Group>[Key_1]) => string | undefined;
getValue: () => Options<Option>;
hasValue: boolean;
isMulti: IsMulti;
isRtl: boolean;
options: OptionsOrGroups<Option, Group>;
selectOption: (newValue: Option) => void;
selectProps: Readonly<Props<Option, IsMulti, Group>> & Readonly<{
children?: React.ReactNode;
}>;
setValue: (newValue: OnChangeValue<Option, IsMulti>, action: SetValueAction, option?: Option | undefined) => void;
theme: import("./types").Theme;
};
getOptionLabel: (data: Option) => string;
getOptionValue: (data: Option) => string;
getStyles: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => import("./types").CSSObjectWithLabel;
getClassNames: <Key extends keyof StylesProps<Option, IsMulti, Group>>(key: Key, props: StylesProps<Option, IsMulti, Group>[Key]) => string | undefined;
getElementId: (element: 'group' | 'input' | 'listbox' | 'option' | 'placeholder' | 'live-region') => string;
getComponents: () => {
ClearIndicator: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: import(".").ClearIndicatorProps<Option_1, IsMulti_1, Group_1>) => import("@emotion/react").jsx.JSX.Element;
Control: <Option_2, IsMulti_2 extends boolean, Group_2 extends GroupBase<Option_2>>(props: import(".").ControlProps<Option_2, IsMulti_2, Group_2>) => import("@emotion/react").jsx.JSX.Element;
DropdownIndicator: <Option_3, IsMulti_3 extends boolean, Group_3 extends GroupBase<Option_3>>(props: import(".").DropdownIndicatorProps<Option_3, IsMulti_3, Group_3>) => import("@emotion/react").jsx.JSX.Element;
DownChevron: (props: import("./components/indicators").DownChevronProps) => import("@emotion/react").jsx.JSX.Element;
CrossIcon: (props: import("./components/indicators").CrossIconProps) => import("@emotion/react").jsx.JSX.Element;
Group: <Option_4, IsMulti_4 extends boolean, Group_4 extends GroupBase<Option_4>>(props: import(".").GroupProps<Option_4, IsMulti_4, Group_4>) => import("@emotion/react").jsx.JSX.Element;
GroupHeading: <Option_5, IsMulti_5 extends boolean, Group_5 extends GroupBase<Option_5>>(props: import(".").GroupHeadingProps<Option_5, IsMulti_5, Group_5>) => import("@emotion/react").jsx.JSX.Element;
IndicatorsContainer: <Option_6, IsMulti_6 extends boolean, Group_6 extends GroupBase<Option_6>>(props: import(".").IndicatorsContainerProps<Option_6, IsMulti_6, Group_6>) => import("@emotion/react").jsx.JSX.Element;
IndicatorSeparator: <Option_7, IsMulti_7 extends boolean, Group_7 extends GroupBase<Option_7>>(props: import(".").IndicatorSeparatorProps<Option_7, IsMulti_7, Group_7>) => import("@emotion/react").jsx.JSX.Element;
Input: <Option_8, IsMulti_8 extends boolean, Group_8 extends GroupBase<Option_8>>(props: import(".").InputProps<Option_8, IsMulti_8, Group_8>) => import("@emotion/react").jsx.JSX.Element;
LoadingIndicator: <Option_9, IsMulti_9 extends boolean, Group_9 extends GroupBase<Option_9>>({ innerProps, isRtl, size, ...restProps }: import(".").LoadingIndicatorProps<Option_9, IsMulti_9, Group_9>) => import("@emotion/react").jsx.JSX.Element;
Menu: <Option_10, IsMulti_10 extends boolean, Group_10 extends GroupBase<Option_10>>(props: import("./components/Menu").MenuProps<Option_10, IsMulti_10, Group_10>) => import("@emotion/react").jsx.JSX.Element;
MenuList: <Option_11, IsMulti_11 extends boolean, Group_11 extends GroupBase<Option_11>>(props: import("./components/Menu").MenuListProps<Option_11, IsMulti_11, Group_11>) => import("@emotion/react").jsx.JSX.Element;
MenuPortal: <Option_12, IsMulti_12 extends boolean, Group_12 extends GroupBase<Option_12>>(props: import("./components/Menu").MenuPortalProps<Option_12, IsMulti_12, Group_12>) => import("@emotion/react").jsx.JSX.Element | null;
LoadingMessage: <Option_13, IsMulti_13 extends boolean, Group_13 extends GroupBase<Option_13>>({ children, innerProps, ...restProps }: import("./components/Menu").NoticeProps<Option_13, IsMulti_13, Group_13>) => import("@emotion/react").jsx.JSX.Element;
NoOptionsMessage: <Option_14, IsMulti_14 extends boolean, Group_14 extends GroupBase<Option_14>>({ children, innerProps, ...restProps }: import("./components/Menu").NoticeProps<Option_14, IsMulti_14, Group_14>) => import("@emotion/react").jsx.JSX.Element;
MultiValue: <Option_15, IsMulti_15 extends boolean, Group_15 extends GroupBase<Option_15>>(props: import(".").MultiValueProps<Option_15, IsMulti_15, Group_15>) => import("@emotion/react").jsx.JSX.Element;
MultiValueContainer: <Option_16, IsMulti_16 extends boolean, Group_16 extends GroupBase<Option_16>>({ children, innerProps, }: import(".").MultiValueGenericProps<Option_16, IsMulti_16, Group_16>) => import("@emotion/react").jsx.JSX.Element;
MultiValueLabel: <Option_16, IsMulti_16 extends boolean, Group_16 extends GroupBase<Option_16>>({ children, innerProps, }: import(".").MultiValueGenericProps<Option_16, IsMulti_16, Group_16>) => import("@emotion/react").jsx.JSX.Element;
MultiValueRemove: typeof import("./components/MultiValue").MultiValueRemove;
Option: <Option_17, IsMulti_17 extends boolean, Group_17 extends GroupBase<Option_17>>(props: import(".").OptionProps<Option_17, IsMulti_17, Group_17>) => import("@emotion/react").jsx.JSX.Element;
Placeholder: <Option_18, IsMulti_18 extends boolean, Group_18 extends GroupBase<Option_18>>(props: import(".").PlaceholderProps<Option_18, IsMulti_18, Group_18>) => import("@emotion/react").jsx.JSX.Element;
SelectContainer: <Option_19, IsMulti_19 extends boolean, Group_19 extends GroupBase<Option_19>>(props: import(".").ContainerProps<Option_19, IsMulti_19, Group_19>) => import("@emotion/react").jsx.JSX.Element;
SingleValue: <Option_20, IsMulti_20 extends boolean, Group_20 extends GroupBase<Option_20>>(props: import(".").SingleValueProps<Option_20, IsMulti_20, Group_20>) => import("@emotion/react").jsx.JSX.Element;
ValueContainer: <Option_21, IsMulti_21 extends boolean, Group_21 extends GroupBase<Option_21>>(props: import(".").ValueContainerProps<Option_21, IsMulti_21, Group_21>) => import("@emotion/react").jsx.JSX.Element;
};
buildCategorizedOptions: () => CategorizedGroupOrOption<Option, Group>[];
getCategorizedOptions: () => CategorizedGroupOrOption<Option, Group>[];
buildFocusableOptions: () => Option[];
getFocusableOptions: () => Option[];
ariaOnChange: (value: OnChangeValue<Option, IsMulti>, actionMeta: ActionMeta<Option>) => void;
hasValue(): boolean;
hasOptions(): boolean;
isClearable(): boolean;
isOptionDisabled(option: Option, selectValue: Options<Option>): boolean;
isOptionSelected(option: Option, selectValue: Options<Option>): boolean;
filterOption(option: FilterOptionOption<Option>, inputValue: string): boolean;
formatOptionLabel(data: Option, context: FormatOptionLabelContext): ReactNode;
formatGroupLabel(data: Group): React.ReactNode;
onMenuMouseDown: MouseEventHandler<HTMLDivElement>;
onMenuMouseMove: MouseEventHandler<HTMLDivElement>;
onControlMouseDown: (event: React.MouseEvent<HTMLDivElement> | React.TouchEvent<HTMLDivElement>) => void;
onDropdownIndicatorMouseDown: (event: React.MouseEvent<HTMLDivElement> | React.TouchEvent<HTMLDivElement>) => void;
onClearIndicatorMouseDown: (event: React.MouseEvent<HTMLDivElement> | React.TouchEvent<HTMLDivElement>) => void;
onScroll: (event: Event) => void;
startListeningComposition(): void;
stopListeningComposition(): void;
onCompositionStart: () => void;
onCompositionEnd: () => void;
startListeningToTouch(): void;
stopListeningToTouch(): void;
onTouchStart: ({ touches }: TouchEvent) => void;
onTouchMove: ({ touches }: TouchEvent) => void;
onTouchEnd: (event: TouchEvent) => void;
onControlTouchEnd: TouchEventHandler<HTMLDivElement>;
onClearIndicatorTouchEnd: TouchEventHandler<HTMLDivElement>;
onDropdownIndicatorTouchEnd: TouchEventHandler<HTMLDivElement>;
handleInputChange: FormEventHandler<HTMLInputElement>;
onInputFocus: FocusEventHandler<HTMLInputElement>;
onInputBlur: FocusEventHandler<HTMLInputElement>;
onOptionHover: (focusedOption: Option) => void;
shouldHideSelectedOptions: () => boolean | IsMulti;
onValueInputFocus: FocusEventHandler;
onKeyDown: KeyboardEventHandler<HTMLDivElement>;
renderInput(): JSX.Element;
renderPlaceholderOrValue(): JSX.Element | JSX.Element[] | null;
renderClearIndicator(): JSX.Element | null;
renderLoadingIndicator(): JSX.Element | null;
renderIndicatorSeparator(): JSX.Element | null;
renderDropdownIndicator(): JSX.Element | null;
renderMenu(): JSX.Element | null;
renderFormField(): JSX.Element | undefined;
renderLiveRegion(): JSX.Element;
render(): JSX.Element;
}
export declare type PublicBaseSelectProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = JSX.LibraryManagedAttributes<typeof Select, Props<Option, IsMulti, Group>>;
export {};

View File

@@ -0,0 +1,5 @@
export declare function isIPhone(): boolean;
export declare function isMac(): boolean;
export declare function isIPad(): boolean;
export declare function isIOS(): boolean;
export declare function isAppleDevice(): boolean;

View File

@@ -0,0 +1,77 @@
import type { AriaAttributes } from 'react';
import { ActionMeta, GroupBase, InitialInputFocusedActionMeta, OnChangeValue, Options, OptionsOrGroups } from '../types';
export declare type OptionContext = 'menu' | 'value';
export declare type GuidanceContext = 'menu' | 'input' | 'value';
export declare type AriaSelection<Option, IsMulti extends boolean> = InitialInputFocusedActionMeta<Option, IsMulti> | (ActionMeta<Option> & {
value: OnChangeValue<Option, IsMulti>;
option?: Option;
options?: Options<Option>;
});
export interface AriaGuidanceProps {
/** String value of selectProp aria-label */
'aria-label': AriaAttributes['aria-label'];
/** String indicating user's current context and available keyboard interactivity */
context: GuidanceContext;
/** Boolean value of selectProp isSearchable */
isSearchable: boolean;
/** Boolean value of selectProp isMulti */
isMulti: boolean;
/** Boolean value of selectProp isDisabled */
isDisabled: boolean | null;
/** Boolean value of selectProp tabSelectsValue */
tabSelectsValue: boolean;
/** Boolean value indicating if user focused the input for the first time */
isInitialFocus: boolean;
}
export declare type AriaOnChangeProps<Option, IsMulti extends boolean> = AriaSelection<Option, IsMulti> & {
/** String derived label from selected or removed option/value */
label: string;
/** Array of labels derived from multiple selected or cleared options */
labels: string[];
/** Boolean indicating if the selected menu option is disabled */
isDisabled: boolean | null;
};
export interface AriaOnFilterProps {
/** String indicating current inputValue of the input */
inputValue: string;
/** String derived from selectProp screenReaderStatus */
resultsMessage: string;
}
export interface AriaOnFocusProps<Option, Group extends GroupBase<Option>> {
/** String indicating whether the option was focused in the menu or as (multi-) value */
context: OptionContext;
/** Option that is being focused */
focused: Option;
/** Boolean indicating whether focused menu option has been disabled */
isDisabled: boolean;
/** Boolean indicating whether focused menu option is an already selected option */
isSelected: boolean;
/** String derived label from focused option/value */
label: string;
/** Options provided as props to Select used to determine indexing */
options: OptionsOrGroups<Option, Group>;
/** selected option(s) of the Select */
selectValue: Options<Option>;
/** Boolean indicating whether user uses Apple device */
isAppleDevice: boolean;
}
export declare type AriaGuidance = (props: AriaGuidanceProps) => string;
export declare type AriaOnChange<Option, IsMulti extends boolean> = (props: AriaOnChangeProps<Option, IsMulti>) => string;
export declare type AriaOnFilter = (props: AriaOnFilterProps) => string;
export declare type AriaOnFocus<Option, Group extends GroupBase<Option> = GroupBase<Option>> = (props: AriaOnFocusProps<Option, Group>) => string;
export interface AriaLiveMessages<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
/** Guidance message used to convey component state and specific keyboard interactivity */
guidance?: (props: AriaGuidanceProps) => string;
/** OnChange message used to convey changes to value but also called when user selects disabled option */
onChange?: (props: AriaOnChangeProps<Option, IsMulti>) => string;
/** OnFilter message used to convey information about filtered results displayed in the menu */
onFilter?: (props: AriaOnFilterProps) => string;
/** OnFocus message used to convey information about the currently focused option or value */
onFocus?: (props: AriaOnFocusProps<Option, Group>) => string;
}
export declare const defaultAriaLiveMessages: {
guidance: (props: AriaGuidanceProps) => string;
onChange: <Option, IsMulti extends boolean>(props: AriaOnChangeProps<Option, IsMulti>) => string;
onFocus: <Option_1, Group extends GroupBase<Option_1>>(props: AriaOnFocusProps<Option_1, Group>) => string;
onFilter: (props: AriaOnFilterProps) => string;
};

View File

@@ -0,0 +1,8 @@
import { ReactElement } from 'react';
import { TransitionProps } from 'react-transition-group/Transition';
import { InputProps } from '../components/Input';
import { GroupBase } from '../types';
export declare type InputComponent = <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: InputProps<Option, IsMulti, Group>) => ReactElement;
export declare type AnimatedInputProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = InputProps<Option, IsMulti, Group> & Partial<TransitionProps>;
declare const AnimatedInput: (WrappedComponent: InputComponent) => InputComponent;
export default AnimatedInput;

View File

@@ -0,0 +1,8 @@
import { ReactElement } from 'react';
import { TransitionProps } from 'react-transition-group/Transition';
import { MultiValueProps } from '../components/MultiValue';
import { GroupBase } from '../types';
export declare type MultiValueComponent = <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MultiValueProps<Option, IsMulti, Group>) => ReactElement;
export declare type AnimatedMultiValueProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = MultiValueProps<Option, IsMulti, Group> & Partial<TransitionProps>;
declare const AnimatedMultiValue: (WrappedComponent: MultiValueComponent) => <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ in: inProp, onExited, ...props }: AnimatedMultiValueProps<Option, IsMulti, Group>) => JSX.Element;
export default AnimatedMultiValue;

View File

@@ -0,0 +1,6 @@
import { ReactElement } from 'react';
import { PlaceholderProps } from '../components/Placeholder';
import { GroupBase } from '../types';
export declare type PlaceholderComponent = <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: PlaceholderProps<Option, IsMulti, Group>) => ReactElement;
declare const AnimatedPlaceholder: (WrappedComponent: PlaceholderComponent) => <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: PlaceholderProps<Option, IsMulti, Group>) => JSX.Element;
export default AnimatedPlaceholder;

View File

@@ -0,0 +1,6 @@
import { ReactElement } from 'react';
import { SingleValueProps } from '../components/SingleValue';
import { GroupBase } from '../types';
export declare type SingleValueComponent = <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: SingleValueProps<Option, IsMulti, Group>) => ReactElement;
declare const AnimatedSingleValue: (WrappedComponent: SingleValueComponent) => <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: SingleValueProps<Option, IsMulti, Group>) => JSX.Element;
export default AnimatedSingleValue;

View File

@@ -0,0 +1,6 @@
import { ReactElement } from 'react';
import { ValueContainerProps } from '../components/containers';
import { GroupBase } from '../types';
export declare type ValueContainerComponent = <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ValueContainerProps<Option, IsMulti, Group>) => ReactElement;
declare const AnimatedValueContainer: (WrappedComponent: ValueContainerComponent) => <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ValueContainerProps<Option, IsMulti, Group>) => JSX.Element;
export default AnimatedValueContainer;

View File

@@ -0,0 +1,59 @@
export declare const Input: (<Option, IsMulti extends boolean, Group extends import("..").GroupBase<Option>>(props: import("..").InputProps<Option, IsMulti, Group>) => import("@emotion/react").jsx.JSX.Element) | undefined;
export declare const MultiValue: (<Option, IsMulti extends boolean, Group extends import("..").GroupBase<Option>>(props: import("..").MultiValueProps<Option, IsMulti, Group>) => import("@emotion/react").jsx.JSX.Element) | undefined;
export declare const Placeholder: (<Option, IsMulti extends boolean, Group extends import("..").GroupBase<Option>>(props: import("..").PlaceholderProps<Option, IsMulti, Group>) => import("@emotion/react").jsx.JSX.Element) | undefined;
export declare const SingleValue: (<Option, IsMulti extends boolean, Group extends import("..").GroupBase<Option>>(props: import("..").SingleValueProps<Option, IsMulti, Group>) => import("@emotion/react").jsx.JSX.Element) | undefined;
export declare const ValueContainer: (<Option, IsMulti extends boolean, Group extends import("..").GroupBase<Option>>(props: import("..").ValueContainerProps<Option, IsMulti, Group>) => import("@emotion/react").jsx.JSX.Element) | undefined;
declare const _default: import("memoize-one").MemoizedFn<(externalComponents?: Partial<{
ClearIndicator: <Option, IsMulti extends boolean, Group extends import("..").GroupBase<Option>>(props: import("..").ClearIndicatorProps<Option, IsMulti, Group>) => import("@emotion/react").jsx.JSX.Element;
Control: <Option_1, IsMulti_1 extends boolean, Group_1 extends import("..").GroupBase<Option_1>>(props: import("..").ControlProps<Option_1, IsMulti_1, Group_1>) => import("@emotion/react").jsx.JSX.Element;
DropdownIndicator: <Option_2, IsMulti_2 extends boolean, Group_2 extends import("..").GroupBase<Option_2>>(props: import("..").DropdownIndicatorProps<Option_2, IsMulti_2, Group_2>) => import("@emotion/react").jsx.JSX.Element;
DownChevron: (props: import("../components/indicators").DownChevronProps) => import("@emotion/react").jsx.JSX.Element;
CrossIcon: (props: import("../components/indicators").CrossIconProps) => import("@emotion/react").jsx.JSX.Element;
Group: <Option_3, IsMulti_3 extends boolean, Group_3 extends import("..").GroupBase<Option_3>>(props: import("..").GroupProps<Option_3, IsMulti_3, Group_3>) => import("@emotion/react").jsx.JSX.Element;
GroupHeading: <Option_4, IsMulti_4 extends boolean, Group_4 extends import("..").GroupBase<Option_4>>(props: import("..").GroupHeadingProps<Option_4, IsMulti_4, Group_4>) => import("@emotion/react").jsx.JSX.Element;
IndicatorsContainer: <Option_5, IsMulti_5 extends boolean, Group_5 extends import("..").GroupBase<Option_5>>(props: import("..").IndicatorsContainerProps<Option_5, IsMulti_5, Group_5>) => import("@emotion/react").jsx.JSX.Element;
IndicatorSeparator: <Option_6, IsMulti_6 extends boolean, Group_6 extends import("..").GroupBase<Option_6>>(props: import("..").IndicatorSeparatorProps<Option_6, IsMulti_6, Group_6>) => import("@emotion/react").jsx.JSX.Element;
Input: <Option_7, IsMulti_7 extends boolean, Group_7 extends import("..").GroupBase<Option_7>>(props: import("..").InputProps<Option_7, IsMulti_7, Group_7>) => import("@emotion/react").jsx.JSX.Element;
LoadingIndicator: <Option_8, IsMulti_8 extends boolean, Group_8 extends import("..").GroupBase<Option_8>>({ innerProps, isRtl, size, ...restProps }: import("..").LoadingIndicatorProps<Option_8, IsMulti_8, Group_8>) => import("@emotion/react").jsx.JSX.Element;
Menu: <Option_9, IsMulti_9 extends boolean, Group_9 extends import("..").GroupBase<Option_9>>(props: import("..").MenuProps<Option_9, IsMulti_9, Group_9>) => import("@emotion/react").jsx.JSX.Element;
MenuList: <Option_10, IsMulti_10 extends boolean, Group_10 extends import("..").GroupBase<Option_10>>(props: import("..").MenuListProps<Option_10, IsMulti_10, Group_10>) => import("@emotion/react").jsx.JSX.Element;
MenuPortal: <Option_11, IsMulti_11 extends boolean, Group_11 extends import("..").GroupBase<Option_11>>(props: import("../components/Menu").MenuPortalProps<Option_11, IsMulti_11, Group_11>) => import("@emotion/react").jsx.JSX.Element | null;
LoadingMessage: <Option_12, IsMulti_12 extends boolean, Group_12 extends import("..").GroupBase<Option_12>>({ children, innerProps, ...restProps }: import("..").NoticeProps<Option_12, IsMulti_12, Group_12>) => import("@emotion/react").jsx.JSX.Element;
NoOptionsMessage: <Option_13, IsMulti_13 extends boolean, Group_13 extends import("..").GroupBase<Option_13>>({ children, innerProps, ...restProps }: import("..").NoticeProps<Option_13, IsMulti_13, Group_13>) => import("@emotion/react").jsx.JSX.Element;
MultiValue: <Option_14, IsMulti_14 extends boolean, Group_14 extends import("..").GroupBase<Option_14>>(props: import("..").MultiValueProps<Option_14, IsMulti_14, Group_14>) => import("@emotion/react").jsx.JSX.Element;
MultiValueContainer: <Option_15, IsMulti_15 extends boolean, Group_15 extends import("..").GroupBase<Option_15>>({ children, innerProps, }: import("..").MultiValueGenericProps<Option_15, IsMulti_15, Group_15>) => import("@emotion/react").jsx.JSX.Element;
MultiValueLabel: <Option_15, IsMulti_15 extends boolean, Group_15 extends import("..").GroupBase<Option_15>>({ children, innerProps, }: import("..").MultiValueGenericProps<Option_15, IsMulti_15, Group_15>) => import("@emotion/react").jsx.JSX.Element;
MultiValueRemove: typeof import("../components/MultiValue").MultiValueRemove;
Option: <Option_16, IsMulti_16 extends boolean, Group_16 extends import("..").GroupBase<Option_16>>(props: import("..").OptionProps<Option_16, IsMulti_16, Group_16>) => import("@emotion/react").jsx.JSX.Element;
Placeholder: <Option_17, IsMulti_17 extends boolean, Group_17 extends import("..").GroupBase<Option_17>>(props: import("..").PlaceholderProps<Option_17, IsMulti_17, Group_17>) => import("@emotion/react").jsx.JSX.Element;
SelectContainer: <Option_18, IsMulti_18 extends boolean, Group_18 extends import("..").GroupBase<Option_18>>(props: import("..").ContainerProps<Option_18, IsMulti_18, Group_18>) => import("@emotion/react").jsx.JSX.Element;
SingleValue: <Option_19, IsMulti_19 extends boolean, Group_19 extends import("..").GroupBase<Option_19>>(props: import("..").SingleValueProps<Option_19, IsMulti_19, Group_19>) => import("@emotion/react").jsx.JSX.Element;
ValueContainer: <Option_20, IsMulti_20 extends boolean, Group_20 extends import("..").GroupBase<Option_20>>(props: import("..").ValueContainerProps<Option_20, IsMulti_20, Group_20>) => import("@emotion/react").jsx.JSX.Element;
}>) => Partial<{
ClearIndicator: <Option, IsMulti extends boolean, Group extends import("..").GroupBase<Option>>(props: import("..").ClearIndicatorProps<Option, IsMulti, Group>) => import("@emotion/react").jsx.JSX.Element;
Control: <Option_1, IsMulti_1 extends boolean, Group_1 extends import("..").GroupBase<Option_1>>(props: import("..").ControlProps<Option_1, IsMulti_1, Group_1>) => import("@emotion/react").jsx.JSX.Element;
DropdownIndicator: <Option_2, IsMulti_2 extends boolean, Group_2 extends import("..").GroupBase<Option_2>>(props: import("..").DropdownIndicatorProps<Option_2, IsMulti_2, Group_2>) => import("@emotion/react").jsx.JSX.Element;
DownChevron: (props: import("../components/indicators").DownChevronProps) => import("@emotion/react").jsx.JSX.Element;
CrossIcon: (props: import("../components/indicators").CrossIconProps) => import("@emotion/react").jsx.JSX.Element;
Group: <Option_3, IsMulti_3 extends boolean, Group_3 extends import("..").GroupBase<Option_3>>(props: import("..").GroupProps<Option_3, IsMulti_3, Group_3>) => import("@emotion/react").jsx.JSX.Element;
GroupHeading: <Option_4, IsMulti_4 extends boolean, Group_4 extends import("..").GroupBase<Option_4>>(props: import("..").GroupHeadingProps<Option_4, IsMulti_4, Group_4>) => import("@emotion/react").jsx.JSX.Element;
IndicatorsContainer: <Option_5, IsMulti_5 extends boolean, Group_5 extends import("..").GroupBase<Option_5>>(props: import("..").IndicatorsContainerProps<Option_5, IsMulti_5, Group_5>) => import("@emotion/react").jsx.JSX.Element;
IndicatorSeparator: <Option_6, IsMulti_6 extends boolean, Group_6 extends import("..").GroupBase<Option_6>>(props: import("..").IndicatorSeparatorProps<Option_6, IsMulti_6, Group_6>) => import("@emotion/react").jsx.JSX.Element;
Input: <Option_7, IsMulti_7 extends boolean, Group_7 extends import("..").GroupBase<Option_7>>(props: import("..").InputProps<Option_7, IsMulti_7, Group_7>) => import("@emotion/react").jsx.JSX.Element;
LoadingIndicator: <Option_8, IsMulti_8 extends boolean, Group_8 extends import("..").GroupBase<Option_8>>({ innerProps, isRtl, size, ...restProps }: import("..").LoadingIndicatorProps<Option_8, IsMulti_8, Group_8>) => import("@emotion/react").jsx.JSX.Element;
Menu: <Option_9, IsMulti_9 extends boolean, Group_9 extends import("..").GroupBase<Option_9>>(props: import("..").MenuProps<Option_9, IsMulti_9, Group_9>) => import("@emotion/react").jsx.JSX.Element;
MenuList: <Option_10, IsMulti_10 extends boolean, Group_10 extends import("..").GroupBase<Option_10>>(props: import("..").MenuListProps<Option_10, IsMulti_10, Group_10>) => import("@emotion/react").jsx.JSX.Element;
MenuPortal: <Option_11, IsMulti_11 extends boolean, Group_11 extends import("..").GroupBase<Option_11>>(props: import("../components/Menu").MenuPortalProps<Option_11, IsMulti_11, Group_11>) => import("@emotion/react").jsx.JSX.Element | null;
LoadingMessage: <Option_12, IsMulti_12 extends boolean, Group_12 extends import("..").GroupBase<Option_12>>({ children, innerProps, ...restProps }: import("..").NoticeProps<Option_12, IsMulti_12, Group_12>) => import("@emotion/react").jsx.JSX.Element;
NoOptionsMessage: <Option_13, IsMulti_13 extends boolean, Group_13 extends import("..").GroupBase<Option_13>>({ children, innerProps, ...restProps }: import("..").NoticeProps<Option_13, IsMulti_13, Group_13>) => import("@emotion/react").jsx.JSX.Element;
MultiValue: <Option_14, IsMulti_14 extends boolean, Group_14 extends import("..").GroupBase<Option_14>>(props: import("..").MultiValueProps<Option_14, IsMulti_14, Group_14>) => import("@emotion/react").jsx.JSX.Element;
MultiValueContainer: <Option_15, IsMulti_15 extends boolean, Group_15 extends import("..").GroupBase<Option_15>>({ children, innerProps, }: import("..").MultiValueGenericProps<Option_15, IsMulti_15, Group_15>) => import("@emotion/react").jsx.JSX.Element;
MultiValueLabel: <Option_15, IsMulti_15 extends boolean, Group_15 extends import("..").GroupBase<Option_15>>({ children, innerProps, }: import("..").MultiValueGenericProps<Option_15, IsMulti_15, Group_15>) => import("@emotion/react").jsx.JSX.Element;
MultiValueRemove: typeof import("../components/MultiValue").MultiValueRemove;
Option: <Option_16, IsMulti_16 extends boolean, Group_16 extends import("..").GroupBase<Option_16>>(props: import("..").OptionProps<Option_16, IsMulti_16, Group_16>) => import("@emotion/react").jsx.JSX.Element;
Placeholder: <Option_17, IsMulti_17 extends boolean, Group_17 extends import("..").GroupBase<Option_17>>(props: import("..").PlaceholderProps<Option_17, IsMulti_17, Group_17>) => import("@emotion/react").jsx.JSX.Element;
SelectContainer: <Option_18, IsMulti_18 extends boolean, Group_18 extends import("..").GroupBase<Option_18>>(props: import("..").ContainerProps<Option_18, IsMulti_18, Group_18>) => import("@emotion/react").jsx.JSX.Element;
SingleValue: <Option_19, IsMulti_19 extends boolean, Group_19 extends import("..").GroupBase<Option_19>>(props: import("..").SingleValueProps<Option_19, IsMulti_19, Group_19>) => import("@emotion/react").jsx.JSX.Element;
ValueContainer: <Option_20, IsMulti_20 extends boolean, Group_20 extends import("..").GroupBase<Option_20>>(props: import("..").ValueContainerProps<Option_20, IsMulti_20, Group_20>) => import("@emotion/react").jsx.JSX.Element;
}>>;
export default _default;

View File

@@ -0,0 +1,17 @@
import { ComponentType, ReactNode } from 'react';
import { ExitHandler } from 'react-transition-group/Transition';
declare type FadeProps<ComponentProps> = {
component: ComponentType<ComponentProps>;
in?: boolean;
onExited?: ExitHandler<undefined | HTMLElement>;
duration?: number;
} & ComponentProps;
export declare const Fade: <ComponentProps extends {}>({ component: Tag, duration, in: inProp, onExited, ...props }: FadeProps<ComponentProps>) => JSX.Element;
export declare const collapseDuration = 260;
interface CollapseProps {
children: ReactNode;
in?: boolean;
onExited?: ExitHandler<undefined | HTMLElement>;
}
export declare const Collapse: ({ children, in: _in, onExited }: CollapseProps) => JSX.Element;
export {};

View File

@@ -0,0 +1,2 @@
export * from '../AsyncCreatable';
export { default } from '../AsyncCreatable';

View File

@@ -0,0 +1,2 @@
export * from '../Async';
export { default } from '../Async';

View File

@@ -0,0 +1,2 @@
export * from '../Select';
export { default } from '../Select';

View File

@@ -0,0 +1,5 @@
import { GroupBase } from './types';
export declare const formatGroupLabel: <Option, Group extends GroupBase<Option>>(group: Group) => string;
export declare const getOptionLabel: <Option>(option: Option) => string;
export declare const getOptionValue: <Option>(option: Option) => string;
export declare const isOptionDisabled: <Option>(option: Option) => boolean;

View File

@@ -0,0 +1,20 @@
/** @jsx jsx */
import { ReactNode, Ref } from 'react';
import { jsx } from '@emotion/react';
import { CommonPropsAndClassName, CSSObjectWithLabel, GroupBase } from '../types';
export interface ControlProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
/** Children to render. */
children: ReactNode;
innerRef: Ref<HTMLDivElement>;
/** The mouse down event and the innerRef to pass down to the controller element. */
innerProps: JSX.IntrinsicElements['div'];
/** Whether the select is disabled. */
isDisabled: boolean;
/** Whether the select is focused. */
isFocused: boolean;
/** Whether the select is expanded. */
menuIsOpen: boolean;
}
export declare const css: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ isDisabled, isFocused, theme: { colors, borderRadius, spacing }, }: ControlProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
declare const Control: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ControlProps<Option, IsMulti, Group>) => jsx.JSX.Element;
export default Control;

View File

@@ -0,0 +1,38 @@
/** @jsx jsx */
import { ComponentType, ReactNode } from 'react';
import { jsx } from '@emotion/react';
import { CommonProps, CommonPropsAndClassName, CSSObjectWithLabel, CX, GetStyles, GroupBase, Options, Theme } from '../types';
import { Props } from '../Select';
export interface ForwardedHeadingProps<Option, Group extends GroupBase<Option>> {
id: string;
data: Group;
}
export interface GroupProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
/** The children to be rendered. */
children: ReactNode;
/** Component to wrap the label, receives headingProps. */
Heading: ComponentType<GroupHeadingProps<Option, IsMulti, Group>>;
/** Props to pass to Heading. */
headingProps: ForwardedHeadingProps<Option, Group>;
/** Props to be passed to the group element. */
innerProps: JSX.IntrinsicElements['div'];
/** Label to be displayed in the heading component. */
label: ReactNode;
/** The data of the group. */
data: Group;
options: Options<Option>;
}
export declare const groupCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ theme: { spacing } }: GroupProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
declare const Group: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: GroupProps<Option, IsMulti, Group>) => jsx.JSX.Element;
interface GroupHeadingPropsDefinedProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> extends ForwardedHeadingProps<Option, Group> {
className?: string | undefined;
selectProps: Props<Option, IsMulti, Group>;
theme: Theme;
getStyles: GetStyles<Option, IsMulti, Group>;
getClassNames: CommonProps<Option, IsMulti, Group>['getClassNames'];
cx: CX;
}
export declare type GroupHeadingProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> = GroupHeadingPropsDefinedProps<Option, IsMulti, Group> & JSX.IntrinsicElements['div'];
export declare const groupHeadingCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ theme: { colors, spacing } }: GroupHeadingProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
export declare const GroupHeading: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: GroupHeadingProps<Option, IsMulti, Group>) => jsx.JSX.Element;
export default Group;

View File

@@ -0,0 +1,20 @@
/** @jsx jsx */
import { InputHTMLAttributes } from 'react';
import { jsx } from '@emotion/react';
import { CommonPropsAndClassName, CSSObjectWithLabel, GroupBase } from '../types';
export interface InputSpecificProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends InputHTMLAttributes<HTMLInputElement>, CommonPropsAndClassName<Option, IsMulti, Group> {
/** Reference to the internal element */
innerRef?: (instance: HTMLInputElement | null) => void;
/** Set whether the input should be visible. Does not affect input size. */
isHidden: boolean;
/** Whether the input is disabled */
isDisabled?: boolean;
/** The ID of the form that the input belongs to */
form?: string;
/** Set className for the input element */
inputClassName?: string;
}
export declare type InputProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> = InputSpecificProps<Option, IsMulti, Group>;
export declare const inputCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ isDisabled, value, theme: { spacing, colors }, }: InputProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
declare const Input: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: InputProps<Option, IsMulti, Group>) => jsx.JSX.Element;
export default Input;

View File

@@ -0,0 +1,21 @@
/** @jsx jsx */
import { ReactNode } from 'react';
import { jsx } from '@emotion/react';
import { AriaSelection } from '../accessibility';
import { CommonProps, GroupBase, Options } from '../types';
export interface LiveRegionProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> extends CommonProps<Option, IsMulti, Group> {
children: ReactNode;
innerProps: {
className?: string;
};
ariaSelection: AriaSelection<Option, IsMulti>;
focusedOption: Option | null;
focusedValue: Option | null;
selectValue: Options<Option>;
focusableOptions: Options<Option>;
isFocused: boolean;
id: string;
isAppleDevice: boolean;
}
declare const LiveRegion: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: LiveRegionProps<Option, IsMulti, Group>) => jsx.JSX.Element;
export default LiveRegion;

View File

@@ -0,0 +1,97 @@
/** @jsx jsx */
import { ReactElement, ReactNode, Ref } from 'react';
import { jsx } from '@emotion/react';
import { MenuPlacement, MenuPosition, CommonProps, GroupBase, CommonPropsAndClassName, CoercedMenuPlacement, CSSObjectWithLabel } from '../types';
interface CalculatedMenuPlacementAndHeight {
placement: CoercedMenuPlacement;
maxHeight: number;
}
interface PlacementArgs {
maxHeight: number;
menuEl: HTMLDivElement | null;
minHeight: number;
placement: MenuPlacement;
shouldScroll: boolean;
isFixedPosition: boolean;
controlHeight: number;
}
export declare function getMenuPlacement({ maxHeight: preferredMaxHeight, menuEl, minHeight, placement: preferredPlacement, shouldScroll, isFixedPosition, controlHeight, }: PlacementArgs): CalculatedMenuPlacementAndHeight;
export interface MenuPlacementProps {
/** Set the minimum height of the menu. */
minMenuHeight: number;
/** Set the maximum height of the menu. */
maxMenuHeight: number;
/** Set whether the menu should be at the top, at the bottom. The auto options sets it to bottom. */
menuPlacement: MenuPlacement;
/** The CSS position value of the menu, when "fixed" extra layout management is required */
menuPosition: MenuPosition;
/** Set whether the page should scroll to show the menu. */
menuShouldScrollIntoView: boolean;
}
export interface MenuProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group>, MenuPlacementProps {
/** Reference to the internal element, consumed by the MenuPlacer component */
innerRef: Ref<HTMLDivElement>;
innerProps: JSX.IntrinsicElements['div'];
isLoading: boolean;
placement: CoercedMenuPlacement;
/** The children to be rendered. */
children: ReactNode;
}
interface PlacerProps {
placement: CoercedMenuPlacement;
maxHeight: number;
}
interface ChildrenProps {
ref: Ref<HTMLDivElement>;
placerProps: PlacerProps;
}
export interface MenuPlacerProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> extends CommonProps<Option, IsMulti, Group>, MenuPlacementProps {
/** The children to be rendered. */
children: (childrenProps: ChildrenProps) => ReactElement;
}
export declare const menuCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ placement, theme: { borderRadius, spacing, colors }, }: MenuProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
export declare const MenuPlacer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MenuPlacerProps<Option, IsMulti, Group>) => ReactElement<any, string | import("react").JSXElementConstructor<any>>;
declare const Menu: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MenuProps<Option, IsMulti, Group>) => jsx.JSX.Element;
export default Menu;
export interface MenuListProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
/** Set the max height of the Menu component */
maxHeight: number;
/** The children to be rendered. */
children: ReactNode;
/** Inner ref to DOM ReactNode */
innerRef: Ref<HTMLDivElement>;
/** The currently focused option */
focusedOption: Option;
/** Props to be passed to the menu-list wrapper. */
innerProps: JSX.IntrinsicElements['div'];
}
export declare const menuListCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ maxHeight, theme: { spacing: { baseUnit }, }, }: MenuListProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
export declare const MenuList: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MenuListProps<Option, IsMulti, Group>) => jsx.JSX.Element;
export declare const noOptionsMessageCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ theme: { spacing: { baseUnit }, colors, }, }: NoticeProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
export declare const loadingMessageCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ theme: { spacing: { baseUnit }, colors, }, }: NoticeProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
export interface NoticeProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
/** The children to be rendered. */
children: ReactNode;
/** Props to be passed on to the wrapper. */
innerProps: JSX.IntrinsicElements['div'];
}
export declare const NoOptionsMessage: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ children, innerProps, ...restProps }: NoticeProps<Option, IsMulti, Group>) => jsx.JSX.Element;
export declare const LoadingMessage: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ children, innerProps, ...restProps }: NoticeProps<Option, IsMulti, Group>) => jsx.JSX.Element;
export interface MenuPortalProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
appendTo: HTMLElement | undefined;
children: ReactNode;
controlElement: HTMLDivElement | null;
innerProps: JSX.IntrinsicElements['div'];
menuPlacement: MenuPlacement;
menuPosition: MenuPosition;
}
export interface PortalStyleArgs {
offset: number;
position: MenuPosition;
rect: {
left: number;
width: number;
};
}
export declare const menuPortalCSS: ({ rect, offset, position, }: PortalStyleArgs) => CSSObjectWithLabel;
export declare const MenuPortal: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MenuPortalProps<Option, IsMulti, Group>) => jsx.JSX.Element | null;

View File

@@ -0,0 +1,44 @@
/** @jsx jsx */
import { ComponentType, ReactNode } from 'react';
import { jsx } from '@emotion/react';
import { CommonPropsAndClassName, CSSObjectWithLabel, GroupBase } from '../types';
import { Props } from '../Select';
interface MultiValueComponents<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
Container: ComponentType<MultiValueGenericProps<Option, IsMulti, Group>>;
Label: ComponentType<MultiValueGenericProps<Option, IsMulti, Group>>;
Remove: ComponentType<MultiValueRemoveProps<Option, IsMulti, Group>>;
}
export interface MultiValueProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
children: ReactNode;
components: MultiValueComponents<Option, IsMulti, Group>;
cropWithEllipsis?: boolean;
data: Option;
innerProps: JSX.IntrinsicElements['div'];
isFocused: boolean;
isDisabled: boolean;
removeProps: JSX.IntrinsicElements['div'];
index: number;
}
export declare const multiValueCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ theme: { spacing, borderRadius, colors }, }: MultiValueProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
export declare const multiValueLabelCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ theme: { borderRadius, colors }, cropWithEllipsis, }: MultiValueProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
export declare const multiValueRemoveCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ theme: { spacing, borderRadius, colors }, isFocused, }: MultiValueProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
export interface MultiValueGenericProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> {
children: ReactNode;
data: any;
innerProps: {
className?: string;
};
selectProps: Props<Option, IsMulti, Group>;
}
export declare const MultiValueGeneric: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ children, innerProps, }: MultiValueGenericProps<Option, IsMulti, Group>) => jsx.JSX.Element;
export declare const MultiValueContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ children, innerProps, }: MultiValueGenericProps<Option, IsMulti, Group>) => jsx.JSX.Element;
export declare const MultiValueLabel: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ children, innerProps, }: MultiValueGenericProps<Option, IsMulti, Group>) => jsx.JSX.Element;
export interface MultiValueRemoveProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> {
children?: ReactNode;
data: Option;
innerProps: JSX.IntrinsicElements['div'];
selectProps: Props<Option, IsMulti, Group>;
}
export declare function MultiValueRemove<Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ children, innerProps }: MultiValueRemoveProps<Option, IsMulti, Group>): jsx.JSX.Element;
declare const MultiValue: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MultiValueProps<Option, IsMulti, Group>) => jsx.JSX.Element;
export default MultiValue;

View File

@@ -0,0 +1,28 @@
/** @jsx jsx */
import { ReactNode, RefCallback } from 'react';
import { jsx } from '@emotion/react';
import { CommonPropsAndClassName, CSSObjectWithLabel, GroupBase } from '../types';
export interface OptionProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
/** The children to be rendered. */
children: ReactNode;
/** Inner ref to DOM Node */
innerRef: RefCallback<HTMLDivElement>;
/** props passed to the wrapping element for the group. */
innerProps: JSX.IntrinsicElements['div'];
/** Text to be displayed representing the option. */
label: string;
/** Type is used by the menu to determine whether this is an option or a group.
In the case of option this is always `option`. **/
type: 'option';
/** The data of the selected option. */
data: Option;
/** Whether the option is disabled. */
isDisabled: boolean;
/** Whether the option is focused. */
isFocused: boolean;
/** Whether the option is selected. */
isSelected: boolean;
}
export declare const optionCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ isDisabled, isFocused, isSelected, theme: { spacing, colors }, }: OptionProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
declare const Option: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: OptionProps<Option, IsMulti, Group>) => jsx.JSX.Element;
export default Option;

View File

@@ -0,0 +1,15 @@
/** @jsx jsx */
import { ReactNode } from 'react';
import { jsx } from '@emotion/react';
import { CommonPropsAndClassName, CSSObjectWithLabel, GroupBase } from '../types';
export interface PlaceholderProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
/** The children to be rendered. */
children: ReactNode;
/** props passed to the wrapping element for the group. */
innerProps: JSX.IntrinsicElements['div'];
isDisabled: boolean;
isFocused: boolean;
}
export declare const placeholderCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ theme: { spacing, colors } }: PlaceholderProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
declare const Placeholder: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: PlaceholderProps<Option, IsMulti, Group>) => jsx.JSX.Element;
export default Placeholder;

View File

@@ -0,0 +1,17 @@
/** @jsx jsx */
import { ReactNode } from 'react';
import { jsx } from '@emotion/react';
import { CommonPropsAndClassName, CSSObjectWithLabel, GroupBase } from '../types';
export interface SingleValueProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
/** The children to be rendered. */
children: ReactNode;
/** The data of the selected option rendered in the Single Value component. */
data: Option;
/** Props passed to the wrapping element for the group. */
innerProps: JSX.IntrinsicElements['div'];
/** Whether this is disabled. */
isDisabled: boolean;
}
export declare const css: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ isDisabled, theme: { spacing, colors }, }: SingleValueProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
declare const SingleValue: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: SingleValueProps<Option, IsMulti, Group>) => jsx.JSX.Element;
export default SingleValue;

View File

@@ -0,0 +1,33 @@
/** @jsx jsx */
import { ReactNode } from 'react';
import { jsx } from '@emotion/react';
import { CommonPropsAndClassName, CSSObjectWithLabel, GroupBase } from '../types';
export interface ContainerProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
/** Whether the select is disabled. */
isDisabled: boolean;
isFocused: boolean;
/** The children to be rendered. */
children: ReactNode;
/** Inner props to be passed down to the container. */
innerProps: JSX.IntrinsicElements['div'];
}
export declare const containerCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ isDisabled, isRtl, }: ContainerProps<Option, IsMulti, Group>) => CSSObjectWithLabel;
export declare const SelectContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ContainerProps<Option, IsMulti, Group>) => jsx.JSX.Element;
export interface ValueContainerProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
/** Props to be passed to the value container element. */
innerProps?: JSX.IntrinsicElements['div'];
/** The children to be rendered. */
children: ReactNode;
isDisabled: boolean;
}
export declare const valueContainerCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ theme: { spacing }, isMulti, hasValue, selectProps: { controlShouldRenderValue }, }: ValueContainerProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
export declare const ValueContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ValueContainerProps<Option, IsMulti, Group>) => jsx.JSX.Element;
export interface IndicatorsContainerProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
isDisabled: boolean;
/** The children to be rendered. */
children: ReactNode;
/** Props to be passed to the indicators container element. */
innerProps?: {};
}
export declare const indicatorsContainerCSS: () => CSSObjectWithLabel;
export declare const IndicatorsContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: IndicatorsContainerProps<Option, IsMulti, Group>) => jsx.JSX.Element;

View File

@@ -0,0 +1,73 @@
import { ComponentType } from 'react';
import { ContainerProps, IndicatorsContainerProps, ValueContainerProps } from './containers';
import { ClearIndicatorProps, CrossIconProps, DownChevronProps, DropdownIndicatorProps, IndicatorSeparatorProps, LoadingIndicatorProps } from './indicators';
import { ControlProps } from './Control';
import { GroupHeadingProps, GroupProps } from './Group';
import { InputProps } from './Input';
import { MenuListProps, MenuPortalProps, MenuProps, NoticeProps } from './Menu';
import { MultiValueGenericProps, MultiValueProps, MultiValueRemove, MultiValueRemoveProps } from './MultiValue';
import { OptionProps } from './Option';
import { PlaceholderProps } from './Placeholder';
import { SingleValueProps } from './SingleValue';
import { GroupBase } from '../types';
export interface SelectComponents<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
ClearIndicator: ComponentType<ClearIndicatorProps<Option, IsMulti, Group>>;
Control: ComponentType<ControlProps<Option, IsMulti, Group>>;
DropdownIndicator: ComponentType<DropdownIndicatorProps<Option, IsMulti, Group>> | null;
DownChevron: ComponentType<DownChevronProps>;
CrossIcon: ComponentType<CrossIconProps>;
Group: ComponentType<GroupProps<Option, IsMulti, Group>>;
GroupHeading: ComponentType<GroupHeadingProps<Option, IsMulti, Group>>;
IndicatorsContainer: ComponentType<IndicatorsContainerProps<Option, IsMulti, Group>>;
IndicatorSeparator: ComponentType<IndicatorSeparatorProps<Option, IsMulti, Group>> | null;
Input: ComponentType<InputProps<Option, IsMulti, Group>>;
LoadingIndicator: ComponentType<LoadingIndicatorProps<Option, IsMulti, Group>>;
Menu: ComponentType<MenuProps<Option, IsMulti, Group>>;
MenuList: ComponentType<MenuListProps<Option, IsMulti, Group>>;
MenuPortal: ComponentType<MenuPortalProps<Option, IsMulti, Group>>;
LoadingMessage: ComponentType<NoticeProps<Option, IsMulti, Group>>;
NoOptionsMessage: ComponentType<NoticeProps<Option, IsMulti, Group>>;
MultiValue: ComponentType<MultiValueProps<Option, IsMulti, Group>>;
MultiValueContainer: ComponentType<MultiValueGenericProps<Option, IsMulti, Group>>;
MultiValueLabel: ComponentType<MultiValueGenericProps<Option, IsMulti, Group>>;
MultiValueRemove: ComponentType<MultiValueRemoveProps<Option, IsMulti, Group>>;
Option: ComponentType<OptionProps<Option, IsMulti, Group>>;
Placeholder: ComponentType<PlaceholderProps<Option, IsMulti, Group>>;
SelectContainer: ComponentType<ContainerProps<Option, IsMulti, Group>>;
SingleValue: ComponentType<SingleValueProps<Option, IsMulti, Group>>;
ValueContainer: ComponentType<ValueContainerProps<Option, IsMulti, Group>>;
}
export declare type SelectComponentsConfig<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = Partial<SelectComponents<Option, IsMulti, Group>>;
export declare const components: {
ClearIndicator: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ClearIndicatorProps<Option, IsMulti, Group>) => import("@emotion/react").jsx.JSX.Element;
Control: <Option_1, IsMulti_1 extends boolean, Group_1 extends GroupBase<Option_1>>(props: ControlProps<Option_1, IsMulti_1, Group_1>) => import("@emotion/react").jsx.JSX.Element;
DropdownIndicator: <Option_2, IsMulti_2 extends boolean, Group_2 extends GroupBase<Option_2>>(props: DropdownIndicatorProps<Option_2, IsMulti_2, Group_2>) => import("@emotion/react").jsx.JSX.Element;
DownChevron: (props: DownChevronProps) => import("@emotion/react").jsx.JSX.Element;
CrossIcon: (props: CrossIconProps) => import("@emotion/react").jsx.JSX.Element;
Group: <Option_3, IsMulti_3 extends boolean, Group_3 extends GroupBase<Option_3>>(props: GroupProps<Option_3, IsMulti_3, Group_3>) => import("@emotion/react").jsx.JSX.Element;
GroupHeading: <Option_4, IsMulti_4 extends boolean, Group_4 extends GroupBase<Option_4>>(props: GroupHeadingProps<Option_4, IsMulti_4, Group_4>) => import("@emotion/react").jsx.JSX.Element;
IndicatorsContainer: <Option_5, IsMulti_5 extends boolean, Group_5 extends GroupBase<Option_5>>(props: IndicatorsContainerProps<Option_5, IsMulti_5, Group_5>) => import("@emotion/react").jsx.JSX.Element;
IndicatorSeparator: <Option_6, IsMulti_6 extends boolean, Group_6 extends GroupBase<Option_6>>(props: IndicatorSeparatorProps<Option_6, IsMulti_6, Group_6>) => import("@emotion/react").jsx.JSX.Element;
Input: <Option_7, IsMulti_7 extends boolean, Group_7 extends GroupBase<Option_7>>(props: InputProps<Option_7, IsMulti_7, Group_7>) => import("@emotion/react").jsx.JSX.Element;
LoadingIndicator: <Option_8, IsMulti_8 extends boolean, Group_8 extends GroupBase<Option_8>>({ innerProps, isRtl, size, ...restProps }: LoadingIndicatorProps<Option_8, IsMulti_8, Group_8>) => import("@emotion/react").jsx.JSX.Element;
Menu: <Option_9, IsMulti_9 extends boolean, Group_9 extends GroupBase<Option_9>>(props: MenuProps<Option_9, IsMulti_9, Group_9>) => import("@emotion/react").jsx.JSX.Element;
MenuList: <Option_10, IsMulti_10 extends boolean, Group_10 extends GroupBase<Option_10>>(props: MenuListProps<Option_10, IsMulti_10, Group_10>) => import("@emotion/react").jsx.JSX.Element;
MenuPortal: <Option_11, IsMulti_11 extends boolean, Group_11 extends GroupBase<Option_11>>(props: MenuPortalProps<Option_11, IsMulti_11, Group_11>) => import("@emotion/react").jsx.JSX.Element | null;
LoadingMessage: <Option_12, IsMulti_12 extends boolean, Group_12 extends GroupBase<Option_12>>({ children, innerProps, ...restProps }: NoticeProps<Option_12, IsMulti_12, Group_12>) => import("@emotion/react").jsx.JSX.Element;
NoOptionsMessage: <Option_13, IsMulti_13 extends boolean, Group_13 extends GroupBase<Option_13>>({ children, innerProps, ...restProps }: NoticeProps<Option_13, IsMulti_13, Group_13>) => import("@emotion/react").jsx.JSX.Element;
MultiValue: <Option_14, IsMulti_14 extends boolean, Group_14 extends GroupBase<Option_14>>(props: MultiValueProps<Option_14, IsMulti_14, Group_14>) => import("@emotion/react").jsx.JSX.Element;
MultiValueContainer: <Option_15, IsMulti_15 extends boolean, Group_15 extends GroupBase<Option_15>>({ children, innerProps, }: MultiValueGenericProps<Option_15, IsMulti_15, Group_15>) => import("@emotion/react").jsx.JSX.Element;
MultiValueLabel: <Option_15, IsMulti_15 extends boolean, Group_15 extends GroupBase<Option_15>>({ children, innerProps, }: MultiValueGenericProps<Option_15, IsMulti_15, Group_15>) => import("@emotion/react").jsx.JSX.Element;
MultiValueRemove: typeof MultiValueRemove;
Option: <Option_16, IsMulti_16 extends boolean, Group_16 extends GroupBase<Option_16>>(props: OptionProps<Option_16, IsMulti_16, Group_16>) => import("@emotion/react").jsx.JSX.Element;
Placeholder: <Option_17, IsMulti_17 extends boolean, Group_17 extends GroupBase<Option_17>>(props: PlaceholderProps<Option_17, IsMulti_17, Group_17>) => import("@emotion/react").jsx.JSX.Element;
SelectContainer: <Option_18, IsMulti_18 extends boolean, Group_18 extends GroupBase<Option_18>>(props: ContainerProps<Option_18, IsMulti_18, Group_18>) => import("@emotion/react").jsx.JSX.Element;
SingleValue: <Option_19, IsMulti_19 extends boolean, Group_19 extends GroupBase<Option_19>>(props: SingleValueProps<Option_19, IsMulti_19, Group_19>) => import("@emotion/react").jsx.JSX.Element;
ValueContainer: <Option_20, IsMulti_20 extends boolean, Group_20 extends GroupBase<Option_20>>(props: ValueContainerProps<Option_20, IsMulti_20, Group_20>) => import("@emotion/react").jsx.JSX.Element;
};
export declare type SelectComponentsGeneric = typeof components;
interface Props<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
components: SelectComponentsConfig<Option, IsMulti, Group>;
}
export declare const defaultComponents: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: Props<Option, IsMulti, Group>) => SelectComponentsGeneric;
export {};

View File

@@ -0,0 +1,51 @@
/** @jsx jsx */
import { ReactNode } from 'react';
import { jsx } from '@emotion/react';
import { CommonPropsAndClassName, CSSObjectWithLabel, GroupBase } from '../types';
export declare type CrossIconProps = JSX.IntrinsicElements['svg'] & {
size?: number;
};
export declare const CrossIcon: (props: CrossIconProps) => jsx.JSX.Element;
export declare type DownChevronProps = JSX.IntrinsicElements['svg'] & {
size?: number;
};
export declare const DownChevron: (props: DownChevronProps) => jsx.JSX.Element;
export interface DropdownIndicatorProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
/** The children to be rendered inside the indicator. */
children?: ReactNode;
/** Props that will be passed on to the children. */
innerProps: JSX.IntrinsicElements['div'];
/** The focused state of the select. */
isFocused: boolean;
isDisabled: boolean;
}
export declare const dropdownIndicatorCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ isFocused, theme: { spacing: { baseUnit }, colors, }, }: DropdownIndicatorProps<Option, IsMulti, Group> | ClearIndicatorProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
export declare const DropdownIndicator: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: DropdownIndicatorProps<Option, IsMulti, Group>) => jsx.JSX.Element;
export interface ClearIndicatorProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
/** The children to be rendered inside the indicator. */
children?: ReactNode;
/** Props that will be passed on to the children. */
innerProps: JSX.IntrinsicElements['div'];
/** The focused state of the select. */
isFocused: boolean;
}
export declare const clearIndicatorCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ isFocused, theme: { spacing: { baseUnit }, colors, }, }: DropdownIndicatorProps<Option, IsMulti, Group> | ClearIndicatorProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
export declare const ClearIndicator: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ClearIndicatorProps<Option, IsMulti, Group>) => jsx.JSX.Element;
export interface IndicatorSeparatorProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
isDisabled: boolean;
isFocused: boolean;
innerProps?: JSX.IntrinsicElements['span'];
}
export declare const indicatorSeparatorCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ isDisabled, theme: { spacing: { baseUnit }, colors, }, }: IndicatorSeparatorProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
export declare const IndicatorSeparator: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: IndicatorSeparatorProps<Option, IsMulti, Group>) => jsx.JSX.Element;
export declare const loadingIndicatorCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ isFocused, size, theme: { colors, spacing: { baseUnit }, }, }: LoadingIndicatorProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
export interface LoadingIndicatorProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
/** Props that will be passed on to the children. */
innerProps: JSX.IntrinsicElements['div'];
/** The focused state of the select. */
isFocused: boolean;
isDisabled: boolean;
/** Set size of the container. */
size: number;
}
export declare const LoadingIndicator: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ innerProps, isRtl, size, ...restProps }: LoadingIndicatorProps<Option, IsMulti, Group>) => jsx.JSX.Element;

View File

@@ -0,0 +1,2 @@
export * from '../Creatable';
export { default } from '../Creatable';

View File

@@ -0,0 +1 @@
export declare const stripDiacritics: (str: string) => string;

View File

@@ -0,0 +1,14 @@
export interface FilterOptionOption<Option> {
readonly label: string;
readonly value: string;
readonly data: Option;
}
interface Config<Option> {
readonly ignoreCase?: boolean;
readonly ignoreAccents?: boolean;
readonly stringify?: (option: FilterOptionOption<Option>) => string;
readonly trim?: boolean;
readonly matchFrom?: 'any' | 'start';
}
export declare const createFilter: <Option>(config?: Config<Option> | undefined) => (option: FilterOptionOption<Option>, rawInput: string) => boolean;
export {};

View File

@@ -0,0 +1,28 @@
import Select from './Select';
import type { GroupBase } from './types';
import useStateManager from './useStateManager';
export { default } from './stateManager';
export { default as NonceProvider } from './NonceProvider';
export { mergeStyles } from './styles';
export { defaultTheme } from './theme';
export { createFilter } from './filters';
export { components } from './components';
export declare type SelectInstance<Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> = Select<Option, IsMulti, Group>;
export type { StateManagerProps as Props } from './useStateManager';
export { useStateManager };
export type { SelectComponentsConfig } from './components';
export type { ContainerProps, IndicatorsContainerProps, ValueContainerProps, } from './components/containers';
export type { ControlProps } from './components/Control';
export type { GroupProps, GroupHeadingProps } from './components/Group';
export type { ClearIndicatorProps, DropdownIndicatorProps, IndicatorSeparatorProps, LoadingIndicatorProps, } from './components/indicators';
export type { InputProps } from './components/Input';
export type { MenuListProps, MenuProps, NoticeProps } from './components/Menu';
export type { MultiValueGenericProps, MultiValueProps, MultiValueRemoveProps, } from './components/MultiValue';
export type { OptionProps } from './components/Option';
export type { PlaceholderProps } from './components/Placeholder';
export type { SingleValueProps } from './components/SingleValue';
export type { ThemeConfig } from './theme';
export type { ClassNamesConfig, StylesConfig } from './styles';
export * from './types';
export type { OptionContext, GuidanceContext, AriaGuidanceProps, AriaOnChangeProps, AriaOnFilterProps, AriaOnFocusProps, AriaLiveMessages, AriaGuidance, AriaOnChange, AriaOnFilter, AriaOnFocus, } from './accessibility';
export type { FormatOptionLabelContext, FormatOptionLabelMeta } from './Select';

View File

@@ -0,0 +1,5 @@
/// <reference types="react" />
/** @jsx jsx */
import { jsx } from '@emotion/react';
declare const A11yText: (props: JSX.IntrinsicElements['span']) => jsx.JSX.Element;
export default A11yText;

View File

@@ -0,0 +1,6 @@
/** @jsx jsx */
import { Ref } from 'react';
import { jsx } from '@emotion/react';
export default function DummyInput({ innerRef, ...props }: JSX.IntrinsicElements['input'] & {
readonly innerRef: Ref<HTMLInputElement>;
}): jsx.JSX.Element;

Some files were not shown because too many files have changed in this diff Show More