@atlaskit/react-select 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/LICENSE.md +11 -0
- package/README.md +10 -0
- package/async/package.json +15 -0
- package/base/package.json +15 -0
- package/creatable/package.json +15 -0
- package/dist/cjs/accessibility/helpers.js +34 -0
- package/dist/cjs/accessibility/index.js +74 -0
- package/dist/cjs/async-creatable.js +27 -0
- package/dist/cjs/async.js +30 -0
- package/dist/cjs/builtins.js +18 -0
- package/dist/cjs/components/containers.js +100 -0
- package/dist/cjs/components/control.js +67 -0
- package/dist/cjs/components/group.js +79 -0
- package/dist/cjs/components/index.js +53 -0
- package/dist/cjs/components/indicators.js +214 -0
- package/dist/cjs/components/input.js +93 -0
- package/dist/cjs/components/internal/a11y-text.js +34 -0
- package/dist/cjs/components/internal/dummy-input.js +43 -0
- package/dist/cjs/components/internal/index.js +34 -0
- package/dist/cjs/components/internal/required-input.js +43 -0
- package/dist/cjs/components/internal/scroll-manager.js +57 -0
- package/dist/cjs/components/internal/use-scroll-capture.js +132 -0
- package/dist/cjs/components/internal/use-scroll-lock.js +149 -0
- package/dist/cjs/components/live-region.js +153 -0
- package/dist/cjs/components/menu.js +464 -0
- package/dist/cjs/components/multi-value.js +129 -0
- package/dist/cjs/components/option.js +62 -0
- package/dist/cjs/components/placeholder.js +39 -0
- package/dist/cjs/components/single-value.js +46 -0
- package/dist/cjs/creatable.js +30 -0
- package/dist/cjs/diacritics.js +274 -0
- package/dist/cjs/filters.js +50 -0
- package/dist/cjs/index.js +55 -0
- package/dist/cjs/nonce-provider.js +30 -0
- package/dist/cjs/select.js +1803 -0
- package/dist/cjs/state-manager.js +31 -0
- package/dist/cjs/styles.js +66 -0
- package/dist/cjs/theme.js +42 -0
- package/dist/cjs/types.js +5 -0
- package/dist/cjs/use-async.js +156 -0
- package/dist/cjs/use-creatable.js +114 -0
- package/dist/cjs/use-state-manager.js +83 -0
- package/dist/cjs/utils.js +357 -0
- package/dist/es2019/accessibility/helpers.js +24 -0
- package/dist/es2019/accessibility/index.js +72 -0
- package/dist/es2019/async-creatable.js +17 -0
- package/dist/es2019/async.js +16 -0
- package/dist/es2019/builtins.js +4 -0
- package/dist/es2019/components/containers.js +100 -0
- package/dist/es2019/components/control.js +62 -0
- package/dist/es2019/components/group.js +74 -0
- package/dist/es2019/components/index.js +41 -0
- package/dist/es2019/components/indicators.js +211 -0
- package/dist/es2019/components/input.js +88 -0
- package/dist/es2019/components/internal/a11y-text.js +25 -0
- package/dist/es2019/components/internal/dummy-input.js +36 -0
- package/dist/es2019/components/internal/index.js +4 -0
- package/dist/es2019/components/internal/required-input.js +35 -0
- package/dist/es2019/components/internal/scroll-manager.js +49 -0
- package/dist/es2019/components/internal/use-scroll-capture.js +128 -0
- package/dist/es2019/components/internal/use-scroll-lock.js +143 -0
- package/dist/es2019/components/live-region.js +151 -0
- package/dist/es2019/components/menu.js +466 -0
- package/dist/es2019/components/multi-value.js +134 -0
- package/dist/es2019/components/option.js +57 -0
- package/dist/es2019/components/placeholder.js +34 -0
- package/dist/es2019/components/single-value.js +41 -0
- package/dist/es2019/creatable.js +15 -0
- package/dist/es2019/diacritics.js +264 -0
- package/dist/es2019/filters.js +36 -0
- package/dist/es2019/index.js +8 -0
- package/dist/es2019/nonce-provider.js +19 -0
- package/dist/es2019/select.js +1766 -0
- package/dist/es2019/state-manager.js +22 -0
- package/dist/es2019/styles.js +56 -0
- package/dist/es2019/theme.js +36 -0
- package/dist/es2019/types.js +1 -0
- package/dist/es2019/use-async.js +117 -0
- package/dist/es2019/use-creatable.js +81 -0
- package/dist/es2019/use-state-manager.js +60 -0
- package/dist/es2019/utils.js +309 -0
- package/dist/esm/accessibility/helpers.js +24 -0
- package/dist/esm/accessibility/index.js +68 -0
- package/dist/esm/async-creatable.js +17 -0
- package/dist/esm/async.js +16 -0
- package/dist/esm/builtins.js +12 -0
- package/dist/esm/components/containers.js +96 -0
- package/dist/esm/components/control.js +62 -0
- package/dist/esm/components/group.js +74 -0
- package/dist/esm/components/index.js +43 -0
- package/dist/esm/components/indicators.js +209 -0
- package/dist/esm/components/input.js +88 -0
- package/dist/esm/components/internal/a11y-text.js +27 -0
- package/dist/esm/components/internal/dummy-input.js +37 -0
- package/dist/esm/components/internal/index.js +4 -0
- package/dist/esm/components/internal/required-input.js +36 -0
- package/dist/esm/components/internal/scroll-manager.js +49 -0
- package/dist/esm/components/internal/use-scroll-capture.js +126 -0
- package/dist/esm/components/internal/use-scroll-lock.js +143 -0
- package/dist/esm/components/live-region.js +148 -0
- package/dist/esm/components/menu.js +460 -0
- package/dist/esm/components/multi-value.js +122 -0
- package/dist/esm/components/option.js +57 -0
- package/dist/esm/components/placeholder.js +34 -0
- package/dist/esm/components/single-value.js +41 -0
- package/dist/esm/creatable.js +15 -0
- package/dist/esm/diacritics.js +268 -0
- package/dist/esm/filters.js +43 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/nonce-provider.js +20 -0
- package/dist/esm/select.js +1794 -0
- package/dist/esm/state-manager.js +22 -0
- package/dist/esm/styles.js +58 -0
- package/dist/esm/theme.js +36 -0
- package/dist/esm/types.js +1 -0
- package/dist/esm/use-async.js +149 -0
- package/dist/esm/use-creatable.js +107 -0
- package/dist/esm/use-state-manager.js +76 -0
- package/dist/esm/utils.js +328 -0
- package/dist/types/accessibility/helpers.d.ts +5 -0
- package/dist/types/accessibility/index.d.ts +125 -0
- package/dist/types/async-creatable.d.ts +10 -0
- package/dist/types/async.d.ts +9 -0
- package/dist/types/builtins.d.ts +5 -0
- package/dist/types/components/containers.d.ts +50 -0
- package/dist/types/components/control.d.ts +33 -0
- package/dist/types/components/group.d.ts +53 -0
- package/dist/types/components/index.d.ts +73 -0
- package/dist/types/components/indicators.d.ts +72 -0
- package/dist/types/components/input.d.ts +33 -0
- package/dist/types/components/internal/a11y-text.d.ts +8 -0
- package/dist/types/components/internal/dummy-input.d.ts +9 -0
- package/dist/types/components/internal/index.d.ts +4 -0
- package/dist/types/components/internal/required-input.d.ts +10 -0
- package/dist/types/components/internal/scroll-manager.d.ts +17 -0
- package/dist/types/components/internal/use-scroll-capture.d.ts +12 -0
- package/dist/types/components/internal/use-scroll-lock.d.ts +9 -0
- package/dist/types/components/live-region.d.ts +24 -0
- package/dist/types/components/menu.d.ts +130 -0
- package/dist/types/components/multi-value.d.ts +47 -0
- package/dist/types/components/option.d.ts +49 -0
- package/dist/types/components/placeholder.d.ts +22 -0
- package/dist/types/components/single-value.d.ts +28 -0
- package/dist/types/creatable.d.ts +10 -0
- package/dist/types/diacritics.d.ts +1 -0
- package/dist/types/filters.d.ts +15 -0
- package/dist/types/index.d.ts +28 -0
- package/dist/types/nonce-provider.d.ts +8 -0
- package/dist/types/select.d.ts +616 -0
- package/dist/types/state-manager.d.ts +17 -0
- package/dist/types/styles.d.ts +68 -0
- package/dist/types/theme.d.ts +27 -0
- package/dist/types/types.d.ts +134 -0
- package/dist/types/use-async.d.ts +31 -0
- package/dist/types/use-creatable.d.ts +46 -0
- package/dist/types/use-state-manager.d.ts +15 -0
- package/dist/types/utils.d.ts +44 -0
- package/dist/types-ts4.5/accessibility/helpers.d.ts +5 -0
- package/dist/types-ts4.5/accessibility/index.d.ts +125 -0
- package/dist/types-ts4.5/async-creatable.d.ts +10 -0
- package/dist/types-ts4.5/async.d.ts +9 -0
- package/dist/types-ts4.5/builtins.d.ts +5 -0
- package/dist/types-ts4.5/components/containers.d.ts +50 -0
- package/dist/types-ts4.5/components/control.d.ts +33 -0
- package/dist/types-ts4.5/components/group.d.ts +53 -0
- package/dist/types-ts4.5/components/index.d.ts +73 -0
- package/dist/types-ts4.5/components/indicators.d.ts +72 -0
- package/dist/types-ts4.5/components/input.d.ts +33 -0
- package/dist/types-ts4.5/components/internal/a11y-text.d.ts +8 -0
- package/dist/types-ts4.5/components/internal/dummy-input.d.ts +9 -0
- package/dist/types-ts4.5/components/internal/index.d.ts +4 -0
- package/dist/types-ts4.5/components/internal/required-input.d.ts +10 -0
- package/dist/types-ts4.5/components/internal/scroll-manager.d.ts +17 -0
- package/dist/types-ts4.5/components/internal/use-scroll-capture.d.ts +12 -0
- package/dist/types-ts4.5/components/internal/use-scroll-lock.d.ts +9 -0
- package/dist/types-ts4.5/components/live-region.d.ts +24 -0
- package/dist/types-ts4.5/components/menu.d.ts +130 -0
- package/dist/types-ts4.5/components/multi-value.d.ts +47 -0
- package/dist/types-ts4.5/components/option.d.ts +49 -0
- package/dist/types-ts4.5/components/placeholder.d.ts +22 -0
- package/dist/types-ts4.5/components/single-value.d.ts +28 -0
- package/dist/types-ts4.5/creatable.d.ts +10 -0
- package/dist/types-ts4.5/diacritics.d.ts +1 -0
- package/dist/types-ts4.5/filters.d.ts +15 -0
- package/dist/types-ts4.5/index.d.ts +28 -0
- package/dist/types-ts4.5/nonce-provider.d.ts +8 -0
- package/dist/types-ts4.5/select.d.ts +616 -0
- package/dist/types-ts4.5/state-manager.d.ts +17 -0
- package/dist/types-ts4.5/styles.d.ts +68 -0
- package/dist/types-ts4.5/theme.d.ts +27 -0
- package/dist/types-ts4.5/types.d.ts +134 -0
- package/dist/types-ts4.5/use-async.d.ts +31 -0
- package/dist/types-ts4.5/use-creatable.d.ts +46 -0
- package/dist/types-ts4.5/use-state-manager.d.ts +15 -0
- package/dist/types-ts4.5/utils.d.ts +44 -0
- package/package.json +83 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { type ComponentType } from 'react';
|
|
2
|
+
import { type GroupBase } from '../types';
|
|
3
|
+
import { type ContainerProps, type IndicatorsContainerProps, type ValueContainerProps } from './containers';
|
|
4
|
+
import { type ControlProps } from './control';
|
|
5
|
+
import { type GroupHeadingProps, type GroupProps } from './group';
|
|
6
|
+
import { type ClearIndicatorProps, type CrossIconProps, type DownChevronProps, type DropdownIndicatorProps, type IndicatorSeparatorProps, type LoadingIndicatorProps } from './indicators';
|
|
7
|
+
import { type InputProps } from './input';
|
|
8
|
+
import { type MenuListProps, type MenuPortalProps, type MenuProps, type NoticeProps } from './menu';
|
|
9
|
+
import { type MultiValueGenericProps, type MultiValueProps, MultiValueRemove, type MultiValueRemoveProps } from './multi-value';
|
|
10
|
+
import { type OptionProps } from './option';
|
|
11
|
+
import { type PlaceholderProps } from './placeholder';
|
|
12
|
+
import { type SingleValueProps } from './single-value';
|
|
13
|
+
export interface SelectComponents<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
|
|
14
|
+
ClearIndicator: ComponentType<ClearIndicatorProps<Option, IsMulti, Group>>;
|
|
15
|
+
Control: ComponentType<ControlProps<Option, IsMulti, Group>>;
|
|
16
|
+
DropdownIndicator: ComponentType<DropdownIndicatorProps<Option, IsMulti, Group>> | null;
|
|
17
|
+
DownChevron: ComponentType<DownChevronProps>;
|
|
18
|
+
CrossIcon: ComponentType<CrossIconProps>;
|
|
19
|
+
Group: ComponentType<GroupProps<Option, IsMulti, Group>>;
|
|
20
|
+
GroupHeading: ComponentType<GroupHeadingProps<Option, IsMulti, Group>>;
|
|
21
|
+
IndicatorsContainer: ComponentType<IndicatorsContainerProps<Option, IsMulti, Group>>;
|
|
22
|
+
IndicatorSeparator: ComponentType<IndicatorSeparatorProps<Option, IsMulti, Group>> | null;
|
|
23
|
+
Input: ComponentType<InputProps<Option, IsMulti, Group>>;
|
|
24
|
+
LoadingIndicator: ComponentType<LoadingIndicatorProps<Option, IsMulti, Group>>;
|
|
25
|
+
Menu: ComponentType<MenuProps<Option, IsMulti, Group>>;
|
|
26
|
+
MenuList: ComponentType<MenuListProps<Option, IsMulti, Group>>;
|
|
27
|
+
MenuPortal: ComponentType<MenuPortalProps<Option, IsMulti, Group>>;
|
|
28
|
+
LoadingMessage: ComponentType<NoticeProps<Option, IsMulti, Group>>;
|
|
29
|
+
NoOptionsMessage: ComponentType<NoticeProps<Option, IsMulti, Group>>;
|
|
30
|
+
MultiValue: ComponentType<MultiValueProps<Option, IsMulti, Group>>;
|
|
31
|
+
MultiValueContainer: ComponentType<MultiValueGenericProps<Option, IsMulti, Group>>;
|
|
32
|
+
MultiValueLabel: ComponentType<MultiValueGenericProps<Option, IsMulti, Group>>;
|
|
33
|
+
MultiValueRemove: ComponentType<MultiValueRemoveProps<Option, IsMulti, Group>>;
|
|
34
|
+
Option: ComponentType<OptionProps<Option, IsMulti, Group>>;
|
|
35
|
+
Placeholder: ComponentType<PlaceholderProps<Option, IsMulti, Group>>;
|
|
36
|
+
SelectContainer: ComponentType<ContainerProps<Option, IsMulti, Group>>;
|
|
37
|
+
SingleValue: ComponentType<SingleValueProps<Option, IsMulti, Group>>;
|
|
38
|
+
ValueContainer: ComponentType<ValueContainerProps<Option, IsMulti, Group>>;
|
|
39
|
+
}
|
|
40
|
+
export type SelectComponentsConfig<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = Partial<SelectComponents<Option, IsMulti, Group>>;
|
|
41
|
+
export declare const components: {
|
|
42
|
+
ClearIndicator: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ClearIndicatorProps<Option, IsMulti, Group>) => import("@emotion/react").jsx.JSX.Element;
|
|
43
|
+
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;
|
|
44
|
+
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;
|
|
45
|
+
DownChevron: (props: DownChevronProps) => import("@emotion/react").jsx.JSX.Element;
|
|
46
|
+
CrossIcon: (props: CrossIconProps) => import("@emotion/react").jsx.JSX.Element;
|
|
47
|
+
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;
|
|
48
|
+
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;
|
|
49
|
+
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;
|
|
50
|
+
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;
|
|
51
|
+
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;
|
|
52
|
+
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;
|
|
53
|
+
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;
|
|
54
|
+
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;
|
|
55
|
+
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;
|
|
56
|
+
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;
|
|
57
|
+
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;
|
|
58
|
+
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;
|
|
59
|
+
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;
|
|
60
|
+
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;
|
|
61
|
+
MultiValueRemove: typeof MultiValueRemove;
|
|
62
|
+
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;
|
|
63
|
+
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;
|
|
64
|
+
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;
|
|
65
|
+
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;
|
|
66
|
+
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;
|
|
67
|
+
};
|
|
68
|
+
export type SelectComponentsGeneric = typeof components;
|
|
69
|
+
interface ComponentsProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
|
|
70
|
+
components: SelectComponentsConfig<Option, IsMulti, Group>;
|
|
71
|
+
}
|
|
72
|
+
export declare const defaultComponents: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ComponentsProps<Option, IsMulti, Group>) => SelectComponentsGeneric;
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { type ReactNode } from 'react';
|
|
6
|
+
import { jsx } from '@emotion/react';
|
|
7
|
+
import { type CommonPropsAndClassName, type CSSObjectWithLabel, type GroupBase } from '../types';
|
|
8
|
+
export type CrossIconProps = JSX.IntrinsicElements['svg'] & {
|
|
9
|
+
size?: number;
|
|
10
|
+
};
|
|
11
|
+
export declare const CrossIcon: (props: CrossIconProps) => jsx.JSX.Element;
|
|
12
|
+
export type DownChevronProps = JSX.IntrinsicElements['svg'] & {
|
|
13
|
+
size?: number;
|
|
14
|
+
};
|
|
15
|
+
export declare const DownChevron: (props: DownChevronProps) => jsx.JSX.Element;
|
|
16
|
+
export interface DropdownIndicatorProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
|
|
17
|
+
/**
|
|
18
|
+
* The children to be rendered inside the indicator.
|
|
19
|
+
*/
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Props that will be passed on to the children.
|
|
23
|
+
*/
|
|
24
|
+
innerProps: JSX.IntrinsicElements['div'];
|
|
25
|
+
/**
|
|
26
|
+
* The focused state of the select.
|
|
27
|
+
*/
|
|
28
|
+
isFocused: boolean;
|
|
29
|
+
isDisabled: boolean;
|
|
30
|
+
}
|
|
31
|
+
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;
|
|
32
|
+
export declare const DropdownIndicator: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: DropdownIndicatorProps<Option, IsMulti, Group>) => jsx.JSX.Element;
|
|
33
|
+
export interface ClearIndicatorProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
|
|
34
|
+
/**
|
|
35
|
+
* The children to be rendered inside the indicator.
|
|
36
|
+
*/
|
|
37
|
+
children?: ReactNode;
|
|
38
|
+
/**
|
|
39
|
+
* Props that will be passed on to the children.
|
|
40
|
+
*/
|
|
41
|
+
innerProps: JSX.IntrinsicElements['div'];
|
|
42
|
+
/**
|
|
43
|
+
* The focused state of the select.
|
|
44
|
+
*/
|
|
45
|
+
isFocused: boolean;
|
|
46
|
+
}
|
|
47
|
+
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;
|
|
48
|
+
export declare const ClearIndicator: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ClearIndicatorProps<Option, IsMulti, Group>) => jsx.JSX.Element;
|
|
49
|
+
export interface IndicatorSeparatorProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
|
|
50
|
+
isDisabled: boolean;
|
|
51
|
+
isFocused: boolean;
|
|
52
|
+
innerProps?: JSX.IntrinsicElements['span'];
|
|
53
|
+
}
|
|
54
|
+
export declare const indicatorSeparatorCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ isDisabled, theme: { spacing: { baseUnit }, colors, }, }: IndicatorSeparatorProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
|
|
55
|
+
export declare const IndicatorSeparator: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: IndicatorSeparatorProps<Option, IsMulti, Group>) => jsx.JSX.Element;
|
|
56
|
+
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;
|
|
57
|
+
export interface LoadingIndicatorProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
|
|
58
|
+
/**
|
|
59
|
+
* Props that will be passed on to the children.
|
|
60
|
+
*/
|
|
61
|
+
innerProps: JSX.IntrinsicElements['div'];
|
|
62
|
+
/**
|
|
63
|
+
* The focused state of the select.
|
|
64
|
+
*/
|
|
65
|
+
isFocused: boolean;
|
|
66
|
+
isDisabled: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Set size of the container.
|
|
69
|
+
*/
|
|
70
|
+
size: number;
|
|
71
|
+
}
|
|
72
|
+
export declare const LoadingIndicator: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ innerProps, isRtl, size, ...restProps }: LoadingIndicatorProps<Option, IsMulti, Group>) => jsx.JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { type InputHTMLAttributes } from 'react';
|
|
6
|
+
import { jsx } from '@emotion/react';
|
|
7
|
+
import { type CommonPropsAndClassName, type CSSObjectWithLabel, type GroupBase } from '../types';
|
|
8
|
+
export interface InputSpecificProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends InputHTMLAttributes<HTMLInputElement>, CommonPropsAndClassName<Option, IsMulti, Group> {
|
|
9
|
+
/**
|
|
10
|
+
* Reference to the internal element
|
|
11
|
+
*/
|
|
12
|
+
innerRef?: (instance: HTMLInputElement | null) => void;
|
|
13
|
+
/**
|
|
14
|
+
* Set whether the input should be visible. Does not affect input size.
|
|
15
|
+
*/
|
|
16
|
+
isHidden: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the input is disabled
|
|
19
|
+
*/
|
|
20
|
+
isDisabled?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The ID of the form that the input belongs to
|
|
23
|
+
*/
|
|
24
|
+
form?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Set className for the input element
|
|
27
|
+
*/
|
|
28
|
+
inputClassName?: string;
|
|
29
|
+
}
|
|
30
|
+
export type InputProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> = InputSpecificProps<Option, IsMulti, Group>;
|
|
31
|
+
export declare const inputCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ isDisabled, value, theme: { spacing, colors } }: InputProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
|
|
32
|
+
declare const Input: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: InputProps<Option, IsMulti, Group>) => jsx.JSX.Element;
|
|
33
|
+
export default Input;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { type Ref } from 'react';
|
|
6
|
+
import { jsx } from '@emotion/react';
|
|
7
|
+
export default function DummyInput({ innerRef, ...props }: JSX.IntrinsicElements['input'] & {
|
|
8
|
+
readonly innerRef: Ref<HTMLInputElement>;
|
|
9
|
+
}): jsx.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { type FocusEventHandler, type FunctionComponent } from 'react';
|
|
6
|
+
declare const RequiredInput: FunctionComponent<{
|
|
7
|
+
readonly name?: string;
|
|
8
|
+
readonly onFocus: FocusEventHandler<HTMLInputElement>;
|
|
9
|
+
}>;
|
|
10
|
+
export default RequiredInput;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { type ReactElement, type RefCallback } from 'react';
|
|
6
|
+
import { jsx } from '@emotion/react';
|
|
7
|
+
interface ScrollManagerProps {
|
|
8
|
+
readonly children: (ref: RefCallback<HTMLElement>) => ReactElement;
|
|
9
|
+
readonly lockEnabled: boolean;
|
|
10
|
+
readonly captureEnabled: boolean;
|
|
11
|
+
readonly onBottomArrive?: (event: WheelEvent | TouchEvent) => void;
|
|
12
|
+
readonly onBottomLeave?: (event: WheelEvent | TouchEvent) => void;
|
|
13
|
+
readonly onTopArrive?: (event: WheelEvent | TouchEvent) => void;
|
|
14
|
+
readonly onTopLeave?: (event: WheelEvent | TouchEvent) => void;
|
|
15
|
+
}
|
|
16
|
+
export default function ScrollManager({ children, lockEnabled, captureEnabled, onBottomArrive, onBottomLeave, onTopArrive, onTopLeave, }: ScrollManagerProps): jsx.JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface Options {
|
|
2
|
+
readonly isEnabled: boolean;
|
|
3
|
+
readonly onBottomArrive?: (event: WheelEvent | TouchEvent) => void;
|
|
4
|
+
readonly onBottomLeave?: (event: WheelEvent | TouchEvent) => void;
|
|
5
|
+
readonly onTopArrive?: (event: WheelEvent | TouchEvent) => void;
|
|
6
|
+
readonly onTopLeave?: (event: WheelEvent | TouchEvent) => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* {description}.
|
|
10
|
+
*/
|
|
11
|
+
export default function useScrollCapture({ isEnabled, onBottomArrive, onBottomLeave, onTopArrive, onTopLeave, }: Options): (element: HTMLElement | null) => void;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface Options {
|
|
2
|
+
readonly isEnabled: boolean;
|
|
3
|
+
readonly accountForScrollbars?: boolean;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* {description}.
|
|
7
|
+
*/
|
|
8
|
+
export default function useScrollLock({ isEnabled, accountForScrollbars }: Options): (element: HTMLElement | null) => void;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { type ReactNode } from 'react';
|
|
6
|
+
import { jsx } from '@emotion/react';
|
|
7
|
+
import { type AriaSelection } from '../accessibility';
|
|
8
|
+
import { type CommonProps, type GroupBase, type Options } from '../types';
|
|
9
|
+
export interface LiveRegionProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> extends CommonProps<Option, IsMulti, Group> {
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
innerProps: {
|
|
12
|
+
className?: string;
|
|
13
|
+
};
|
|
14
|
+
ariaSelection: AriaSelection<Option, IsMulti>;
|
|
15
|
+
focusedOption: Option | null;
|
|
16
|
+
focusedValue: Option | null;
|
|
17
|
+
selectValue: Options<Option>;
|
|
18
|
+
focusableOptions: Options<Option>;
|
|
19
|
+
isFocused: boolean;
|
|
20
|
+
id: string;
|
|
21
|
+
isAppleDevice: boolean;
|
|
22
|
+
}
|
|
23
|
+
declare const LiveRegion: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: LiveRegionProps<Option, IsMulti, Group>) => jsx.JSX.Element;
|
|
24
|
+
export default LiveRegion;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { type LegacyRef, type ReactElement, type ReactNode, type Ref } from 'react';
|
|
6
|
+
import { jsx } from '@emotion/react';
|
|
7
|
+
import { type CoercedMenuPlacement, type CommonProps, type CommonPropsAndClassName, type CSSObjectWithLabel, type GroupBase, type MenuPlacement, type MenuPosition } from '../types';
|
|
8
|
+
interface CalculatedMenuPlacementAndHeight {
|
|
9
|
+
placement: CoercedMenuPlacement;
|
|
10
|
+
maxHeight: number;
|
|
11
|
+
}
|
|
12
|
+
interface PlacementArgs {
|
|
13
|
+
maxHeight: number;
|
|
14
|
+
menuEl: HTMLDivElement | null;
|
|
15
|
+
minHeight: number;
|
|
16
|
+
placement: MenuPlacement;
|
|
17
|
+
shouldScroll: boolean;
|
|
18
|
+
isFixedPosition: boolean;
|
|
19
|
+
controlHeight: number;
|
|
20
|
+
}
|
|
21
|
+
export declare function getMenuPlacement({ maxHeight: preferredMaxHeight, menuEl, minHeight, placement: preferredPlacement, shouldScroll, isFixedPosition, controlHeight, }: PlacementArgs): CalculatedMenuPlacementAndHeight;
|
|
22
|
+
export interface MenuPlacementProps {
|
|
23
|
+
/**
|
|
24
|
+
* Set the minimum height of the menu.
|
|
25
|
+
*/
|
|
26
|
+
minMenuHeight: number;
|
|
27
|
+
/**
|
|
28
|
+
* Set the maximum height of the menu.
|
|
29
|
+
*/
|
|
30
|
+
maxMenuHeight: number;
|
|
31
|
+
/**
|
|
32
|
+
* Set whether the menu should be at the top, at the bottom. The auto options sets it to bottom.
|
|
33
|
+
*/
|
|
34
|
+
menuPlacement: MenuPlacement;
|
|
35
|
+
/**
|
|
36
|
+
* The CSS position value of the menu, when "fixed" extra layout management is required
|
|
37
|
+
*/
|
|
38
|
+
menuPosition: MenuPosition;
|
|
39
|
+
/**
|
|
40
|
+
* Set whether the page should scroll to show the menu.
|
|
41
|
+
*/
|
|
42
|
+
menuShouldScrollIntoView: boolean;
|
|
43
|
+
}
|
|
44
|
+
export interface MenuProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group>, MenuPlacementProps {
|
|
45
|
+
/**
|
|
46
|
+
* Reference to the internal element, consumed by the MenuPlacer component
|
|
47
|
+
*/
|
|
48
|
+
innerRef: Ref<HTMLDivElement>;
|
|
49
|
+
innerProps: JSX.IntrinsicElements['div'];
|
|
50
|
+
isLoading: boolean;
|
|
51
|
+
placement: CoercedMenuPlacement;
|
|
52
|
+
/**
|
|
53
|
+
* The children to be rendered.
|
|
54
|
+
*/
|
|
55
|
+
children: ReactNode;
|
|
56
|
+
}
|
|
57
|
+
interface PlacerProps {
|
|
58
|
+
placement: CoercedMenuPlacement;
|
|
59
|
+
maxHeight: number;
|
|
60
|
+
}
|
|
61
|
+
interface ChildrenProps {
|
|
62
|
+
ref: Ref<HTMLDivElement>;
|
|
63
|
+
placerProps: PlacerProps;
|
|
64
|
+
}
|
|
65
|
+
export interface MenuPlacerProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> extends CommonProps<Option, IsMulti, Group>, MenuPlacementProps {
|
|
66
|
+
/**
|
|
67
|
+
* The children to be rendered.
|
|
68
|
+
*/
|
|
69
|
+
children: (childrenProps: ChildrenProps) => ReactElement;
|
|
70
|
+
}
|
|
71
|
+
export declare const menuCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ placement, theme: { borderRadius, spacing, colors } }: MenuProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
|
|
72
|
+
export declare const MenuPlacer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MenuPlacerProps<Option, IsMulti, Group>) => ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
73
|
+
declare const Menu: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MenuProps<Option, IsMulti, Group>) => jsx.JSX.Element;
|
|
74
|
+
export default Menu;
|
|
75
|
+
export interface MenuListProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
|
|
76
|
+
/**
|
|
77
|
+
* Set the max height of the Menu component
|
|
78
|
+
*/
|
|
79
|
+
maxHeight: number;
|
|
80
|
+
/**
|
|
81
|
+
* The children to be rendered.
|
|
82
|
+
*/
|
|
83
|
+
children: ReactNode;
|
|
84
|
+
/**
|
|
85
|
+
* Inner ref to DOM ReactNode
|
|
86
|
+
*/
|
|
87
|
+
innerRef: LegacyRef<HTMLUListElement>;
|
|
88
|
+
/**
|
|
89
|
+
* The currently focused option
|
|
90
|
+
*/
|
|
91
|
+
focusedOption: Option;
|
|
92
|
+
/**
|
|
93
|
+
* Props to be passed to the menu-list wrapper.
|
|
94
|
+
*/
|
|
95
|
+
innerProps: JSX.IntrinsicElements['div'];
|
|
96
|
+
}
|
|
97
|
+
export declare const menuListCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ maxHeight, theme: { spacing: { baseUnit }, }, }: MenuListProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
|
|
98
|
+
export declare const MenuList: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MenuListProps<Option, IsMulti, Group>) => jsx.JSX.Element;
|
|
99
|
+
export declare const noOptionsMessageCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ theme: { spacing: { baseUnit }, colors, }, }: NoticeProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
|
|
100
|
+
export declare const loadingMessageCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ theme: { spacing: { baseUnit }, colors, }, }: NoticeProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
|
|
101
|
+
export interface NoticeProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
|
|
102
|
+
/**
|
|
103
|
+
* The children to be rendered.
|
|
104
|
+
*/
|
|
105
|
+
children: ReactNode;
|
|
106
|
+
/**
|
|
107
|
+
* Props to be passed on to the wrapper.
|
|
108
|
+
*/
|
|
109
|
+
innerProps: JSX.IntrinsicElements['div'];
|
|
110
|
+
}
|
|
111
|
+
export declare const NoOptionsMessage: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ children, innerProps, ...restProps }: NoticeProps<Option, IsMulti, Group>) => jsx.JSX.Element;
|
|
112
|
+
export declare const LoadingMessage: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ children, innerProps, ...restProps }: NoticeProps<Option, IsMulti, Group>) => jsx.JSX.Element;
|
|
113
|
+
export interface MenuPortalProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
|
|
114
|
+
appendTo: HTMLElement | undefined;
|
|
115
|
+
children: ReactNode;
|
|
116
|
+
controlElement: HTMLDivElement | null;
|
|
117
|
+
innerProps: JSX.IntrinsicElements['div'];
|
|
118
|
+
menuPlacement: MenuPlacement;
|
|
119
|
+
menuPosition: MenuPosition;
|
|
120
|
+
}
|
|
121
|
+
export interface PortalStyleArgs {
|
|
122
|
+
offset: number;
|
|
123
|
+
position: MenuPosition;
|
|
124
|
+
rect: {
|
|
125
|
+
left: number;
|
|
126
|
+
width: number;
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
export declare const menuPortalCSS: ({ rect, offset, position }: PortalStyleArgs) => CSSObjectWithLabel;
|
|
130
|
+
export declare const MenuPortal: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MenuPortalProps<Option, IsMulti, Group>) => jsx.JSX.Element | null;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { type ComponentType, type ReactNode } from 'react';
|
|
6
|
+
import { jsx } from '@emotion/react';
|
|
7
|
+
import { type SelectProps } from '../select';
|
|
8
|
+
import { type CommonPropsAndClassName, type CSSObjectWithLabel, type GroupBase } from '../types';
|
|
9
|
+
interface MultiValueComponents<Option, IsMulti extends boolean, Group extends GroupBase<Option>> {
|
|
10
|
+
Container: ComponentType<MultiValueGenericProps<Option, IsMulti, Group>>;
|
|
11
|
+
Label: ComponentType<MultiValueGenericProps<Option, IsMulti, Group>>;
|
|
12
|
+
Remove: ComponentType<MultiValueRemoveProps<Option, IsMulti, Group>>;
|
|
13
|
+
}
|
|
14
|
+
export interface MultiValueProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
components: MultiValueComponents<Option, IsMulti, Group>;
|
|
17
|
+
cropWithEllipsis?: boolean;
|
|
18
|
+
data: Option;
|
|
19
|
+
innerProps: JSX.IntrinsicElements['div'];
|
|
20
|
+
isFocused: boolean;
|
|
21
|
+
isDisabled: boolean;
|
|
22
|
+
removeProps: JSX.IntrinsicElements['div'];
|
|
23
|
+
index: number;
|
|
24
|
+
}
|
|
25
|
+
export declare const multiValueCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ theme: { spacing, borderRadius, colors } }: MultiValueProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
|
|
26
|
+
export declare const multiValueLabelCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ theme: { borderRadius, colors }, cropWithEllipsis }: MultiValueProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
|
|
27
|
+
export declare const multiValueRemoveCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ theme: { spacing, borderRadius, colors }, isFocused }: MultiValueProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
|
|
28
|
+
export interface MultiValueGenericProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> {
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
data: any;
|
|
31
|
+
innerProps: {
|
|
32
|
+
className?: string;
|
|
33
|
+
};
|
|
34
|
+
selectProps: SelectProps<Option, IsMulti, Group>;
|
|
35
|
+
}
|
|
36
|
+
export declare const MultiValueGeneric: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ children, innerProps, }: MultiValueGenericProps<Option, IsMulti, Group>) => jsx.JSX.Element;
|
|
37
|
+
export declare const MultiValueContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ children, innerProps, }: MultiValueGenericProps<Option, IsMulti, Group>) => jsx.JSX.Element;
|
|
38
|
+
export declare const MultiValueLabel: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ children, innerProps, }: MultiValueGenericProps<Option, IsMulti, Group>) => jsx.JSX.Element;
|
|
39
|
+
export interface MultiValueRemoveProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> {
|
|
40
|
+
children?: ReactNode;
|
|
41
|
+
data: Option;
|
|
42
|
+
innerProps: JSX.IntrinsicElements['div'];
|
|
43
|
+
selectProps: SelectProps<Option, IsMulti, Group>;
|
|
44
|
+
}
|
|
45
|
+
export declare function MultiValueRemove<Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ children, innerProps, }: MultiValueRemoveProps<Option, IsMulti, Group>): jsx.JSX.Element;
|
|
46
|
+
declare const MultiValue: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: MultiValueProps<Option, IsMulti, Group>) => jsx.JSX.Element;
|
|
47
|
+
export default MultiValue;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { type ReactNode, type RefCallback } from 'react';
|
|
6
|
+
import { jsx } from '@emotion/react';
|
|
7
|
+
import { type CommonPropsAndClassName, type CSSObjectWithLabel, type GroupBase } from '../types';
|
|
8
|
+
export interface OptionProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
|
|
9
|
+
/**
|
|
10
|
+
* The children to be rendered.
|
|
11
|
+
*/
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Inner ref to DOM Node
|
|
15
|
+
*/
|
|
16
|
+
innerRef: RefCallback<HTMLDivElement>;
|
|
17
|
+
/**
|
|
18
|
+
* props passed to the wrapping element for the group.
|
|
19
|
+
*/
|
|
20
|
+
innerProps: JSX.IntrinsicElements['div'];
|
|
21
|
+
/**
|
|
22
|
+
* Text to be displayed representing the option.
|
|
23
|
+
*/
|
|
24
|
+
label: string;
|
|
25
|
+
/**
|
|
26
|
+
* Type is used by the menu to determine whether this is an option or a group.
|
|
27
|
+
* In the case of option this is always `option`. *
|
|
28
|
+
*/
|
|
29
|
+
type: 'option';
|
|
30
|
+
/**
|
|
31
|
+
* The data of the selected option.
|
|
32
|
+
*/
|
|
33
|
+
data: Option;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the option is disabled.
|
|
36
|
+
*/
|
|
37
|
+
isDisabled: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the option is focused.
|
|
40
|
+
*/
|
|
41
|
+
isFocused: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Whether the option is selected.
|
|
44
|
+
*/
|
|
45
|
+
isSelected: boolean;
|
|
46
|
+
}
|
|
47
|
+
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;
|
|
48
|
+
declare const Option: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: OptionProps<Option, IsMulti, Group>) => jsx.JSX.Element;
|
|
49
|
+
export default Option;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { type ReactNode } from 'react';
|
|
6
|
+
import { jsx } from '@emotion/react';
|
|
7
|
+
import { type CommonPropsAndClassName, type CSSObjectWithLabel, type GroupBase } from '../types';
|
|
8
|
+
export interface PlaceholderProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
|
|
9
|
+
/**
|
|
10
|
+
* The children to be rendered.
|
|
11
|
+
*/
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* props passed to the wrapping element for the group.
|
|
15
|
+
*/
|
|
16
|
+
innerProps: JSX.IntrinsicElements['div'];
|
|
17
|
+
isDisabled: boolean;
|
|
18
|
+
isFocused: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const placeholderCSS: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ theme: { spacing, colors } }: PlaceholderProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
|
|
21
|
+
declare const Placeholder: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: PlaceholderProps<Option, IsMulti, Group>) => jsx.JSX.Element;
|
|
22
|
+
export default Placeholder;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { type ReactNode } from 'react';
|
|
6
|
+
import { jsx } from '@emotion/react';
|
|
7
|
+
import { type CommonPropsAndClassName, type CSSObjectWithLabel, type GroupBase } from '../types';
|
|
8
|
+
export interface SingleValueProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
|
|
9
|
+
/**
|
|
10
|
+
* The children to be rendered.
|
|
11
|
+
*/
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* The data of the selected option rendered in the Single Value component.
|
|
15
|
+
*/
|
|
16
|
+
data: Option;
|
|
17
|
+
/**
|
|
18
|
+
* Props passed to the wrapping element for the group.
|
|
19
|
+
*/
|
|
20
|
+
innerProps: JSX.IntrinsicElements['div'];
|
|
21
|
+
/**
|
|
22
|
+
* Whether this is disabled.
|
|
23
|
+
*/
|
|
24
|
+
isDisabled: boolean;
|
|
25
|
+
}
|
|
26
|
+
export declare const css: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ isDisabled, theme: { spacing, colors } }: SingleValueProps<Option, IsMulti, Group>, unstyled: boolean) => CSSObjectWithLabel;
|
|
27
|
+
declare const SingleValue: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: SingleValueProps<Option, IsMulti, Group>) => jsx.JSX.Element;
|
|
28
|
+
export default SingleValue;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ReactElement, type RefAttributes } from 'react';
|
|
2
|
+
import Select from './select';
|
|
3
|
+
import { type GroupBase } from './types';
|
|
4
|
+
import useCreatable, { type CreatableAdditionalProps } from './use-creatable';
|
|
5
|
+
import { type StateManagerProps } from './use-state-manager';
|
|
6
|
+
export type CreatableProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = StateManagerProps<Option, IsMulti, Group> & CreatableAdditionalProps<Option, Group>;
|
|
7
|
+
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;
|
|
8
|
+
declare const CreatableSelect: CreatableSelect;
|
|
9
|
+
export { useCreatable };
|
|
10
|
+
export default CreatableSelect;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const stripDiacritics: (str: string) => string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Option } from './types';
|
|
2
|
+
export interface FilterOptionOption<Option> {
|
|
3
|
+
readonly label: string;
|
|
4
|
+
readonly value: string;
|
|
5
|
+
readonly data: Option;
|
|
6
|
+
}
|
|
7
|
+
interface Config<Option> {
|
|
8
|
+
readonly ignoreCase?: boolean;
|
|
9
|
+
readonly ignoreAccents?: boolean;
|
|
10
|
+
readonly stringify?: (option: FilterOptionOption<Option>) => string;
|
|
11
|
+
readonly trim?: boolean;
|
|
12
|
+
readonly matchFrom?: 'any' | 'start';
|
|
13
|
+
}
|
|
14
|
+
export declare const createFilter: (config?: Config<Option>) => (option: FilterOptionOption<Option>, rawInput: string) => boolean;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type Select from './select';
|
|
2
|
+
import type { GroupBase } from './types';
|
|
3
|
+
import useStateManager from './use-state-manager';
|
|
4
|
+
export { default } from './state-manager';
|
|
5
|
+
export { default as NonceProvider } from './nonce-provider';
|
|
6
|
+
export { mergeStyles } from './styles';
|
|
7
|
+
export { defaultTheme } from './theme';
|
|
8
|
+
export { createFilter } from './filters';
|
|
9
|
+
export { components } from './components';
|
|
10
|
+
export type SelectInstance<Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> = Select<Option, IsMulti, Group>;
|
|
11
|
+
export type { StateManagerProps as Props } from './use-state-manager';
|
|
12
|
+
export { useStateManager };
|
|
13
|
+
export type { SelectComponentsConfig } from './components';
|
|
14
|
+
export type { ContainerProps, IndicatorsContainerProps, ValueContainerProps, } from './components/containers';
|
|
15
|
+
export type { ControlProps } from './components/control';
|
|
16
|
+
export type { GroupProps, GroupHeadingProps } from './components/group';
|
|
17
|
+
export type { ClearIndicatorProps, DropdownIndicatorProps, IndicatorSeparatorProps, LoadingIndicatorProps, } from './components/indicators';
|
|
18
|
+
export type { InputProps } from './components/input';
|
|
19
|
+
export type { MenuListProps, MenuProps, NoticeProps } from './components/menu';
|
|
20
|
+
export type { MultiValueGenericProps, MultiValueProps, MultiValueRemoveProps, } from './components/multi-value';
|
|
21
|
+
export type { OptionProps } from './components/option';
|
|
22
|
+
export type { PlaceholderProps } from './components/placeholder';
|
|
23
|
+
export type { SingleValueProps } from './components/single-value';
|
|
24
|
+
export type { ThemeConfig } from './theme';
|
|
25
|
+
export type { ClassNamesConfig, StylesConfig } from './styles';
|
|
26
|
+
export { type GroupBase, type OptionsOrGroups, type Option, type Options, type SingleValue, type MultiValue, type PropsValue, type OnChangeValue, type Colors, type ThemeSpacing, type Theme, type ClassNamesState, type CX, type GetStyles, type CommonProps, type CommonPropsAndClassName, type ActionMetaBase, type SelectOptionActionMeta, type DeselectOptionActionMeta, type RemoveValueActionMeta, type PopValueActionMeta, type ClearActionMeta, type CreateOptionActionMeta, type InitialInputFocusedActionMeta, type ActionMeta, type SetValueAction, type InputAction, type InputActionMeta, type MenuPlacement, type CoercedMenuPlacement, type MenuPosition, type FocusDirection, type GetOptionLabel, type GetOptionValue, type CSSObjectWithLabel, } from './types';
|
|
27
|
+
export type { OptionContext, GuidanceContext, AriaGuidanceProps, AriaOnChangeProps, AriaOnFilterProps, AriaOnFocusProps, AriaLiveMessages, AriaGuidance, AriaOnChange, AriaOnFilter, AriaOnFocus, } from './accessibility';
|
|
28
|
+
export type { FormatOptionLabelContext, FormatOptionLabelMeta } from './select';
|