@zendeskgarden/react-dropdowns 8.47.0 → 8.48.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +300 -311
- package/dist/index.esm.js +115 -122
- package/dist/typings/elements/Autocomplete/Autocomplete.d.ts +1 -2
- package/dist/typings/elements/Combobox/Combobox.d.ts +3 -4
- package/dist/typings/elements/Dropdown/Dropdown.d.ts +16 -4
- package/dist/typings/elements/Fields/Field.d.ts +2 -2
- package/dist/typings/elements/Menu/Items/AddItem.d.ts +1 -1
- package/dist/typings/elements/Menu/Items/MediaFigure.d.ts +3 -3
- package/dist/typings/elements/Menu/Items/MediaItem.d.ts +1 -1
- package/dist/typings/elements/Menu/Items/NextItem.d.ts +1 -1
- package/dist/typings/elements/Menu/Items/PreviousItem.d.ts +1 -1
- package/dist/typings/elements/Menu/Menu.d.ts +1 -2
- package/dist/typings/elements/Multiselect/Multiselect.d.ts +1 -2
- package/dist/typings/elements/Select/Select.d.ts +0 -2
- package/dist/typings/elements/Trigger/Trigger.d.ts +12 -3
- package/dist/typings/index.d.ts +6 -6
- package/dist/typings/styled/items/media/StyledMediaFigure.d.ts +176 -176
- package/dist/typings/styled/select/StyledFauxInput.d.ts +11 -1
- package/package.json +5 -5
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import
|
|
7
|
+
import { PropsWithChildren } from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
8
9
|
import { ControllerStateAndHelpers, StateChangeOptions } from 'downshift';
|
|
9
10
|
export declare const REMOVE_ITEM_STATE_TYPE = "REMOVE_ITEM";
|
|
10
11
|
export interface IDropdownProps {
|
|
@@ -40,7 +41,18 @@ export interface IDropdownProps {
|
|
|
40
41
|
* */
|
|
41
42
|
onInputValueChange?: (inputValue: string, stateAndHelpers: ControllerStateAndHelpers<any>) => void;
|
|
42
43
|
/** Passes customization props to the [Downshift](https://www.downshift-js.com/) component */
|
|
43
|
-
downshiftProps?:
|
|
44
|
+
downshiftProps?: Record<string, any>;
|
|
44
45
|
}
|
|
45
|
-
declare const
|
|
46
|
-
|
|
46
|
+
export declare const Dropdown: {
|
|
47
|
+
(props: PropsWithChildren<IDropdownProps>): JSX.Element;
|
|
48
|
+
propTypes: {
|
|
49
|
+
isOpen: PropTypes.Requireable<boolean>;
|
|
50
|
+
selectedItem: PropTypes.Requireable<any>;
|
|
51
|
+
selectedItems: PropTypes.Requireable<any[]>;
|
|
52
|
+
highlightedIndex: PropTypes.Requireable<number>;
|
|
53
|
+
inputValue: PropTypes.Requireable<string>;
|
|
54
|
+
onSelect: PropTypes.Requireable<(...args: any[]) => any>;
|
|
55
|
+
onStateChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
56
|
+
downshiftProps: PropTypes.Requireable<object>;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import React
|
|
7
|
+
import React from 'react';
|
|
8
8
|
/**
|
|
9
9
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
10
10
|
*/
|
|
11
|
-
export declare const Field: React.
|
|
11
|
+
export declare const Field: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -9,4 +9,4 @@ import { IItemProps } from './Item';
|
|
|
9
9
|
/**
|
|
10
10
|
* @extends LiHTMLAttributes<HTMLLIElement>
|
|
11
11
|
*/
|
|
12
|
-
export declare const AddItem: React.ForwardRefExoticComponent<
|
|
12
|
+
export declare const AddItem: React.ForwardRefExoticComponent<Omit<IItemProps, "component"> & React.RefAttributes<HTMLLIElement>>;
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import
|
|
7
|
+
import { HTMLAttributes } from 'react';
|
|
8
8
|
/**
|
|
9
|
-
* @extends HTMLAttributes<
|
|
9
|
+
* @extends HTMLAttributes<Element>
|
|
10
10
|
*/
|
|
11
|
-
export declare const MediaFigure:
|
|
11
|
+
export declare const MediaFigure: (props: HTMLAttributes<Element>) => JSX.Element;
|
|
@@ -9,4 +9,4 @@ import { IItemProps } from './Item';
|
|
|
9
9
|
/**
|
|
10
10
|
* @extends LiHTMLAttributes<HTMLLIElement>
|
|
11
11
|
*/
|
|
12
|
-
export declare const MediaItem: React.ForwardRefExoticComponent<IItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
12
|
+
export declare const MediaItem: React.ForwardRefExoticComponent<Omit<IItemProps, "component"> & React.RefAttributes<HTMLLIElement>>;
|
|
@@ -9,4 +9,4 @@ import { IItemProps } from './Item';
|
|
|
9
9
|
/**
|
|
10
10
|
* @extends LiHTMLAttributes<HTMLLIElement>
|
|
11
11
|
*/
|
|
12
|
-
export declare const NextItem: React.ForwardRefExoticComponent<
|
|
12
|
+
export declare const NextItem: React.ForwardRefExoticComponent<Omit<IItemProps, "component"> & React.RefAttributes<HTMLLIElement>>;
|
|
@@ -9,4 +9,4 @@ import { IItemProps } from './Item';
|
|
|
9
9
|
/**
|
|
10
10
|
* @extends LiHTMLAttributes<HTMLLIElement>
|
|
11
11
|
*/
|
|
12
|
-
export declare const PreviousItem: React.ForwardRefExoticComponent<
|
|
12
|
+
export declare const PreviousItem: React.ForwardRefExoticComponent<Omit<IItemProps, "component"> & React.RefAttributes<HTMLLIElement>>;
|
|
@@ -41,8 +41,7 @@ export interface IMenuProps extends HTMLAttributes<HTMLUListElement> {
|
|
|
41
41
|
*/
|
|
42
42
|
maxHeight?: string;
|
|
43
43
|
}
|
|
44
|
-
declare const _default: React.FunctionComponent<IMenuProps>;
|
|
45
44
|
/**
|
|
46
45
|
* @extends HTMLAttributes<HTMLUListElement>
|
|
47
46
|
*/
|
|
48
|
-
export
|
|
47
|
+
export declare const Menu: React.ForwardRefExoticComponent<IMenuProps & React.RefAttributes<HTMLUListElement>>;
|
|
@@ -45,8 +45,7 @@ export interface IMultiselectProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
45
45
|
/** Defines the icon rendered before the element's content */
|
|
46
46
|
start?: any;
|
|
47
47
|
}
|
|
48
|
-
declare const _default: React.FunctionComponent<IMultiselectProps & React.RefAttributes<HTMLDivElement>>;
|
|
49
48
|
/**
|
|
50
49
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
51
50
|
*/
|
|
52
|
-
export
|
|
51
|
+
export declare const Multiselect: React.ForwardRefExoticComponent<IMultiselectProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -21,8 +21,6 @@ export interface ISelectProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
21
21
|
start?: any;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* Applies state and a11y attributes to its children. Must be nested within a `<Field>` component.
|
|
25
|
-
*
|
|
26
24
|
* @extends HTMLAttributes<HTMLDivElement>
|
|
27
25
|
*/
|
|
28
26
|
export declare const Select: React.ForwardRefExoticComponent<ISelectProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import
|
|
7
|
+
import { HTMLAttributes } from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
8
9
|
export interface ITriggerProps extends HTMLAttributes<HTMLElement> {
|
|
9
10
|
/** Passes the ref callback to components with non-standard ref props (i.e. `innerRef`) */
|
|
10
11
|
refKey?: string;
|
|
@@ -12,5 +13,13 @@ export interface ITriggerProps extends HTMLAttributes<HTMLElement> {
|
|
|
12
13
|
/**
|
|
13
14
|
* @extends HTMLAttributes<HTMLElement>
|
|
14
15
|
*/
|
|
15
|
-
declare const Trigger:
|
|
16
|
-
|
|
16
|
+
export declare const Trigger: {
|
|
17
|
+
({ children, refKey, ...triggerProps }: ITriggerProps): JSX.Element;
|
|
18
|
+
propTypes: {
|
|
19
|
+
children: PropTypes.Requireable<any>;
|
|
20
|
+
refKey: PropTypes.Requireable<string>;
|
|
21
|
+
};
|
|
22
|
+
defaultProps: {
|
|
23
|
+
refKey: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
package/dist/typings/index.d.ts
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
export {
|
|
7
|
+
export { Dropdown } from './elements/Dropdown/Dropdown';
|
|
8
8
|
export type { IDropdownProps } from './elements/Dropdown/Dropdown';
|
|
9
|
-
export {
|
|
9
|
+
export { Trigger } from './elements/Trigger/Trigger';
|
|
10
10
|
export type { ITriggerProps } from './elements/Trigger/Trigger';
|
|
11
|
-
export {
|
|
11
|
+
export { Autocomplete } from './elements/Autocomplete/Autocomplete';
|
|
12
12
|
export type { IAutocompleteProps } from './elements/Autocomplete/Autocomplete';
|
|
13
|
-
export {
|
|
13
|
+
export { Combobox } from './elements/Combobox/Combobox';
|
|
14
14
|
export type { IComboboxProps } from './elements/Combobox/Combobox';
|
|
15
|
-
export {
|
|
15
|
+
export { Multiselect } from './elements/Multiselect/Multiselect';
|
|
16
16
|
export type { IMultiselectProps } from './elements/Multiselect/Multiselect';
|
|
17
17
|
export { Select } from './elements/Select/Select';
|
|
18
18
|
export type { ISelectProps } from './elements/Select/Select';
|
|
@@ -22,7 +22,7 @@ export { Label } from './elements/Fields/Label';
|
|
|
22
22
|
export type { ILabelProps } from './elements/Fields/Label';
|
|
23
23
|
export { Message } from './elements/Fields/Message';
|
|
24
24
|
export type { IMessageProps } from './elements/Fields/Message';
|
|
25
|
-
export {
|
|
25
|
+
export { Menu } from './elements/Menu/Menu';
|
|
26
26
|
export type { IMenuProps } from './elements/Menu/Menu';
|
|
27
27
|
export { Separator } from './elements/Menu/Separator';
|
|
28
28
|
export { AddItem } from './elements/Menu/Items/AddItem';
|