@narmi/design_system 6.20.0 → 6.20.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.js +23 -23
- package/dist/index.js.map +1 -1
- package/dist/types/Combobox/ComboboxAction.d.ts +23 -0
- package/dist/types/Combobox/ComboboxAction.d.ts.map +1 -0
- package/dist/types/Combobox/ComboboxCategory.d.ts +16 -0
- package/dist/types/Combobox/ComboboxCategory.d.ts.map +1 -0
- package/dist/types/Combobox/ComboboxHeading.d.ts +36 -0
- package/dist/types/Combobox/ComboboxHeading.d.ts.map +1 -0
- package/dist/types/Combobox/ComboboxItem.d.ts +44 -0
- package/dist/types/Combobox/ComboboxItem.d.ts.map +1 -0
- package/dist/types/Combobox/index.d.ts +146 -0
- package/dist/types/Combobox/index.d.ts.map +1 -0
- package/dist/types/DropdownTrigger/index.d.ts +2 -2
- package/dist/types/DropdownTrigger/index.d.ts.map +1 -1
- package/dist/types/MultiSelect/MultiSelectItem.d.ts +46 -0
- package/dist/types/MultiSelect/MultiSelectItem.d.ts.map +1 -0
- package/dist/types/MultiSelect/index.d.ts +98 -0
- package/dist/types/MultiSelect/index.d.ts.map +1 -0
- package/dist/types/Select/SelectAction.d.ts +21 -0
- package/dist/types/Select/SelectAction.d.ts.map +1 -0
- package/dist/types/Select/SelectCategory.d.ts +28 -0
- package/dist/types/Select/SelectCategory.d.ts.map +1 -0
- package/dist/types/Select/SelectItem.d.ts +44 -0
- package/dist/types/Select/SelectItem.d.ts.map +1 -0
- package/dist/types/Select/index.d.ts +135 -0
- package/dist/types/Select/index.d.ts.map +1 -0
- package/dist/types/index.d.ts +14 -6
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as PropTypes } from 'prop-types';
|
|
3
|
+
export interface ComboboxActionProps {
|
|
4
|
+
/** Side effect to run on selection */
|
|
5
|
+
onSelect: () => void;
|
|
6
|
+
/** Label for action */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Never set on Combobox.Action; `value` belongs to selectable Combobox.Items */
|
|
9
|
+
value?: never;
|
|
10
|
+
searchValue?: never;
|
|
11
|
+
}
|
|
12
|
+
declare const ComboboxAction: {
|
|
13
|
+
({ onSelect }: ComboboxActionProps): React.JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
propTypes: {
|
|
16
|
+
/** Side effect to run on selection */
|
|
17
|
+
onSelect: PropTypes.Validator<(...args: any[]) => any>;
|
|
18
|
+
/** Label for action */
|
|
19
|
+
label: PropTypes.Validator<string>;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default ComboboxAction;
|
|
23
|
+
//# sourceMappingURL=ComboboxAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComboboxAction.d.ts","sourceRoot":"","sources":["../../../src/Combobox/ComboboxAction.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,MAAM,WAAW,mBAAmB;IAClC,sCAAsC;IACtC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,uBAAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,iFAAiF;IACjF,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB;AAID,QAAA,MAAM,cAAc;mBAAyB,mBAAmB;;;QAK9D,sCAAsC;;QAEtC,uBAAuB;;;CAPiD,CAAC;AAW3E,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as PropTypes } from 'prop-types';
|
|
3
|
+
export interface ComboboxCategoryProps {
|
|
4
|
+
label: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
declare const ComboboxCategory: {
|
|
8
|
+
({ children }: ComboboxCategoryProps): React.JSX.Element;
|
|
9
|
+
displayName: string;
|
|
10
|
+
propTypes: {
|
|
11
|
+
label: PropTypes.Validator<string>;
|
|
12
|
+
children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default ComboboxCategory;
|
|
16
|
+
//# sourceMappingURL=ComboboxCategory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComboboxCategory.d.ts","sourceRoot":"","sources":["../../../src/Combobox/ComboboxCategory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,QAAA,MAAM,gBAAgB;mBAAkB,qBAAqB;;;;;;CAE5D,CAAC;AAYF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as PropTypes } from 'prop-types';
|
|
3
|
+
export interface ComboboxHeadingProps {
|
|
4
|
+
/**
|
|
5
|
+
* Text of the heading
|
|
6
|
+
*/
|
|
7
|
+
text: string;
|
|
8
|
+
/**
|
|
9
|
+
* Display variant of heading
|
|
10
|
+
* `bold` - Dark, large headings
|
|
11
|
+
* `hint` - Light, small headings
|
|
12
|
+
*/
|
|
13
|
+
kind?: "bold" | "hint";
|
|
14
|
+
/** Never set on Combobox.Heading; headings are not selectable */
|
|
15
|
+
value?: never;
|
|
16
|
+
searchValue?: never;
|
|
17
|
+
label?: never;
|
|
18
|
+
}
|
|
19
|
+
declare const ComboboxHeading: {
|
|
20
|
+
({ text, kind }: ComboboxHeadingProps): React.JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
propTypes: {
|
|
23
|
+
/**
|
|
24
|
+
* Text of the heading
|
|
25
|
+
*/
|
|
26
|
+
text: PropTypes.Validator<string>;
|
|
27
|
+
/**
|
|
28
|
+
* Display variant of heading
|
|
29
|
+
* `bold` - Dark, large headings
|
|
30
|
+
* `hint` - Light, small headings
|
|
31
|
+
*/
|
|
32
|
+
kind: PropTypes.Requireable<string>;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export default ComboboxHeading;
|
|
36
|
+
//# sourceMappingURL=ComboboxHeading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComboboxHeading.d.ts","sourceRoot":"","sources":["../../../src/Combobox/ComboboxHeading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,iEAAiE;IACjE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,QAAA,MAAM,eAAe;qBAA6B,oBAAoB;;;QAOpE;;WAEG;;QAEH;;;;WAIG;;;CAbJ,CAAC;AAiBF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as PropTypes } from 'prop-types';
|
|
3
|
+
export interface ComboboxItemProps {
|
|
4
|
+
/**
|
|
5
|
+
* String representation of the option.
|
|
6
|
+
*
|
|
7
|
+
* This value is also used as a typeahead; if a user types "n" while
|
|
8
|
+
* the Select is open, highlight will move to the first item with a
|
|
9
|
+
* value starting with `n`.
|
|
10
|
+
*/
|
|
11
|
+
value: string;
|
|
12
|
+
/**
|
|
13
|
+
* Custom typeahead string. By default, typeahead uses `value`.
|
|
14
|
+
* Use this prop to pass in a custom string you'd like the user to search
|
|
15
|
+
* against when using typeahead.
|
|
16
|
+
*/
|
|
17
|
+
searchValue?: string;
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
/** Never set on Combobox.Item; `label` is what identifies a Combobox.Action */
|
|
20
|
+
label?: never;
|
|
21
|
+
}
|
|
22
|
+
declare const ComboboxItem: {
|
|
23
|
+
({ children, value }: ComboboxItemProps): React.JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
propTypes: {
|
|
26
|
+
/**
|
|
27
|
+
* String representation of the option.
|
|
28
|
+
*
|
|
29
|
+
* This value is also used as a typeahead; if a user types "n" while
|
|
30
|
+
* the Select is open, highlight will move to the first item with a
|
|
31
|
+
* value starting with `n`.
|
|
32
|
+
*/
|
|
33
|
+
value: PropTypes.Validator<string>;
|
|
34
|
+
/**
|
|
35
|
+
* Custom typeahead string. By default, typeahead uses `value`.
|
|
36
|
+
* Use this prop to pass in a custom string you'd like the user to search
|
|
37
|
+
* against when using typeahead.
|
|
38
|
+
*/
|
|
39
|
+
searchValue: PropTypes.Requireable<string>;
|
|
40
|
+
children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export default ComboboxItem;
|
|
44
|
+
//# sourceMappingURL=ComboboxItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ComboboxItem.d.ts","sourceRoot":"","sources":["../../../src/Combobox/ComboboxItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,+EAA+E;IAC/E,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,QAAA,MAAM,YAAY;0BAAyB,iBAAiB;;;QAO1D;;;;;;WAMG;;QAEH;;;;WAIG;;;;CAjBJ,CAAC;AAyBF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { VALID_ICON_NAMES } from '../icons/iconNames';
|
|
3
|
+
import { ComboboxItemProps } from './ComboboxItem';
|
|
4
|
+
import { ComboboxHeadingProps } from './ComboboxHeading';
|
|
5
|
+
import { ComboboxCategoryProps } from './ComboboxCategory';
|
|
6
|
+
import { ComboboxActionProps } from './ComboboxAction';
|
|
7
|
+
import { IconName } from '../types/Icon.types';
|
|
8
|
+
export { VALID_ICON_NAMES };
|
|
9
|
+
type ComboboxItemElement = React.ReactElement<ComboboxItemProps>;
|
|
10
|
+
type ComboboxActionElement = React.ReactElement<ComboboxActionProps>;
|
|
11
|
+
type ComboboxHeadingElement = React.ReactElement<ComboboxHeadingProps>;
|
|
12
|
+
type ComboboxChild = ComboboxItemElement | ComboboxActionElement | ComboboxHeadingElement;
|
|
13
|
+
/**
|
|
14
|
+
* @param item Combobox.{Action|Item|Heading} component
|
|
15
|
+
* @returns true if the item is a Combobox.Action
|
|
16
|
+
*/
|
|
17
|
+
export declare const isAction: (item: React.ReactNode) => item is ComboboxActionElement;
|
|
18
|
+
/**
|
|
19
|
+
* @param component a Combobox.Item or Combobox.Heading component
|
|
20
|
+
* @returns true if the item is a selectable Combobox.Item or Action
|
|
21
|
+
*/
|
|
22
|
+
export declare const isSelectable: (component: ComboboxChild | null | undefined) => boolean;
|
|
23
|
+
/**
|
|
24
|
+
* @param inputValue current value of the combobox input
|
|
25
|
+
* @param highlightedIndex index of highlighted item from downshift
|
|
26
|
+
* @param displayedItems list of all items currently displayed
|
|
27
|
+
* @param categoryChildren list of items in category
|
|
28
|
+
* @param selectedItem the currently selected item
|
|
29
|
+
* @returns if the category should be forced open
|
|
30
|
+
*/
|
|
31
|
+
export declare const shouldOpenCategory: (inputValue: string | undefined, highlightedIndex: number, displayedItems: ComboboxChild[], categoryChildren: ComboboxChild[], selectedItem: ComboboxChild | null | undefined) => boolean;
|
|
32
|
+
/**
|
|
33
|
+
* @param displayedItems currently displayed combobox items
|
|
34
|
+
* @param categoryChildren items in category
|
|
35
|
+
* @returns [] containing which category items should be visible
|
|
36
|
+
*/
|
|
37
|
+
export declare const getVisibleChildrenByCategory: (displayedItems: ComboboxChild[], categoryChildren: ComboboxChild[]) => ComboboxChild[];
|
|
38
|
+
/**
|
|
39
|
+
* @param items all selectable Combobox.Item children
|
|
40
|
+
* @param inputValue lowercase value of input
|
|
41
|
+
* @returns Combobox.Item children, filtered by the input value
|
|
42
|
+
*/
|
|
43
|
+
export declare const defaultFilterItemsByInput: (items: ComboboxItemElement[], inputValue: string) => ComboboxItemElement[];
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @param isOpen whether the combobox is open
|
|
47
|
+
* @returns chevron icon that toggles based on the open state of the combobox
|
|
48
|
+
*/
|
|
49
|
+
export declare const defaultRenderEndContent: (isOpen: boolean) => React.JSX.Element;
|
|
50
|
+
export interface ComboboxProps {
|
|
51
|
+
/** Combobox.Item, Combobox.Action, Combobox.Heading, or Combobox.Category children */
|
|
52
|
+
children: React.ReactNode;
|
|
53
|
+
/** Label for the input */
|
|
54
|
+
label: string;
|
|
55
|
+
/** Change callback.
|
|
56
|
+
* Called when an item is selected, with the `value` of the selected item.
|
|
57
|
+
* Called with empty string when the user clears the input.
|
|
58
|
+
*/
|
|
59
|
+
onChange?: (value: string) => void;
|
|
60
|
+
/**
|
|
61
|
+
* Sets value of the input in a controlled manner.
|
|
62
|
+
* When using the `inputValue` prop, you **must** update it via the
|
|
63
|
+
* `onInputChange` handler.
|
|
64
|
+
*/
|
|
65
|
+
inputValue?: string;
|
|
66
|
+
/** Input change callback. Called whenever the user updates the value of the input. */
|
|
67
|
+
onInputChange?: (inputValue: string) => void;
|
|
68
|
+
/**
|
|
69
|
+
* Set to `true` to disable the default behavior of filtering the list
|
|
70
|
+
* as the user types.
|
|
71
|
+
*/
|
|
72
|
+
disableFiltering?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* When `true`, selecting an action will clear any existing selection.
|
|
75
|
+
*/
|
|
76
|
+
clearSelectionOnAction?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Optionally pass a function to customize filtering behavior
|
|
79
|
+
*
|
|
80
|
+
* Signature: `(items, inputValue) => [...filteredItems]`
|
|
81
|
+
*/
|
|
82
|
+
filterItemsByInput?: (items: ComboboxItemElement[], inputValue: string) => ComboboxItemElement[];
|
|
83
|
+
/**
|
|
84
|
+
* Error message.
|
|
85
|
+
* When passed, this will cause the input to render in error state.
|
|
86
|
+
*/
|
|
87
|
+
errorText?: string;
|
|
88
|
+
/** Name of icon to place at the start of the input */
|
|
89
|
+
icon?: IconName;
|
|
90
|
+
/** Optional value for `data-testid` attribute */
|
|
91
|
+
testId?: string;
|
|
92
|
+
/** Function to render content at the end of the input.
|
|
93
|
+
* Defaults to a function that renders a chevron icon that toggles based on the open state of the combobox.
|
|
94
|
+
*
|
|
95
|
+
* Signature: `(isOpen) => React.ReactNode`
|
|
96
|
+
*/
|
|
97
|
+
renderEndContent?: (isOpen: boolean) => React.ReactNode;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Autocomplete input component following the accessible
|
|
101
|
+
* [ARIA combobox pattern](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/combobox_role).
|
|
102
|
+
*
|
|
103
|
+
* Autocomplete options are defined by passing the `Combobox.Item` subcomponent
|
|
104
|
+
* as children. To add heading dividers, use the `Combobox.Heading` subcomponent.
|
|
105
|
+
*
|
|
106
|
+
* By default options will be filtered down as the user types in the input. This
|
|
107
|
+
* behavior can be disabled via the `disableFiltering` prop.
|
|
108
|
+
*/
|
|
109
|
+
declare const Combobox: {
|
|
110
|
+
({ label, onChange, onInputChange, inputValue: inputValueProp, filterItemsByInput, children, disableFiltering, clearSelectionOnAction, errorText, icon, testId, renderEndContent, }: ComboboxProps): React.JSX.Element;
|
|
111
|
+
Item: {
|
|
112
|
+
({ children, value }: ComboboxItemProps): React.JSX.Element;
|
|
113
|
+
displayName: string;
|
|
114
|
+
propTypes: {
|
|
115
|
+
value: import('prop-types').Validator<string>;
|
|
116
|
+
searchValue: import('prop-types').Requireable<string>;
|
|
117
|
+
children: import('prop-types').Requireable<NonNullable<import('prop-types').ReactNodeLike>>;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
Heading: {
|
|
121
|
+
({ text, kind }: ComboboxHeadingProps): React.JSX.Element;
|
|
122
|
+
displayName: string;
|
|
123
|
+
propTypes: {
|
|
124
|
+
text: import('prop-types').Validator<string>;
|
|
125
|
+
kind: import('prop-types').Requireable<string>;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
Category: {
|
|
129
|
+
({ children }: ComboboxCategoryProps): React.JSX.Element;
|
|
130
|
+
displayName: string;
|
|
131
|
+
propTypes: {
|
|
132
|
+
label: import('prop-types').Validator<string>;
|
|
133
|
+
children: import('prop-types').Requireable<NonNullable<import('prop-types').ReactNodeLike>>;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
Action: {
|
|
137
|
+
({ onSelect }: ComboboxActionProps): React.JSX.Element;
|
|
138
|
+
displayName: string;
|
|
139
|
+
propTypes: {
|
|
140
|
+
onSelect: import('prop-types').Validator<(...args: any[]) => any>;
|
|
141
|
+
label: import('prop-types').Validator<string>;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
export default Combobox;
|
|
146
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Combobox/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+C,MAAM,OAAO,CAAC;AAEpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAqB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAwB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAyB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAuB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAIpD,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,KAAK,mBAAmB,GAAG,KAAK,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAC;AACjE,KAAK,qBAAqB,GAAG,KAAK,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;AACrE,KAAK,sBAAsB,GAAG,KAAK,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC;AAEvE,KAAK,aAAa,GACd,mBAAmB,GACnB,qBAAqB,GACrB,sBAAsB,CAAC;AAO3B;;;GAGG;AACH,eAAO,MAAM,QAAQ,GACnB,MAAM,KAAK,CAAC,SAAS,KACpB,IAAI,IAAI,qBAMV,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,WAAW,aAAa,GAAG,IAAI,GAAG,SAAS,YAMvE,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAC7B,YAAY,MAAM,GAAG,SAAS,EAC9B,kBAAkB,MAAM,EACxB,gBAAgB,aAAa,EAAE,EAC/B,kBAAkB,aAAa,EAAE,EACjC,cAAc,aAAa,GAAG,IAAI,GAAG,SAAS,YA2B/C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,GACvC,gBAAgB,aAAa,EAAE,EAC/B,kBAAkB,aAAa,EAAE,oBAYlC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GACpC,OAAO,mBAAmB,EAAE,EAC5B,YAAY,MAAM,0BAKhB,CAAC;AAEL;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,GAAI,QAAQ,OAAO,sBAMtD,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,sFAAsF;IACtF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sFAAsF;IACtF,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,CACnB,KAAK,EAAE,mBAAmB,EAAE,EAC5B,UAAU,EAAE,MAAM,KACf,mBAAmB,EAAE,CAAC;IAC3B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,KAAK,CAAC,SAAS,CAAC;CACzD;AAED;;;;;;;;;GASG;AACH,QAAA,MAAM,QAAQ;yLAaX,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Uf,CAAC;AAMF,eAAe,QAAQ,CAAC"}
|
|
@@ -6,8 +6,8 @@ export interface DropdownTriggerProps extends React.ButtonHTMLAttributes<HTMLBut
|
|
|
6
6
|
showOpenIndicator?: boolean;
|
|
7
7
|
/** Variant of the trigger. Use "table" when used inside table cells */
|
|
8
8
|
kind?: "default" | "table";
|
|
9
|
-
/**
|
|
10
|
-
labelText?:
|
|
9
|
+
/** Content of the `label` element */
|
|
10
|
+
labelText?: ReactNode;
|
|
11
11
|
/** Props to spread onto the `label` element */
|
|
12
12
|
labelProps?: React.LabelHTMLAttributes<HTMLLabelElement>;
|
|
13
13
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/DropdownTrigger/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAc,MAAM,OAAO,CAAC;AAIrD,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/DropdownTrigger/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAc,MAAM,OAAO,CAAC;AAIrD,MAAM,WAAW,oBAAqB,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACzF,2DAA2D;IAC3D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,oEAAoE;IACpE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,uEAAuE;IACvE,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC3B,qCAAqC;IACrC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,+CAA+C;IAC/C,UAAU,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IACzD;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,+DAA+D;IAC/D,kBAAkB,CAAC,EAAE,MAAM,SAAS,CAAC;IACrC,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4DAA4D;IAC5D,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,0DAA0D;IAC1D,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,QAAA,MAAM,eAAe,gGA6EpB,CAAC;AAGF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as PropTypes } from 'prop-types';
|
|
3
|
+
export interface MultiSelectItemProps {
|
|
4
|
+
/**
|
|
5
|
+
* String representation of the option.
|
|
6
|
+
*
|
|
7
|
+
* This value is also used as a typeahead; if a user types "n" while
|
|
8
|
+
* the Select is open, highlight will move to the first item with a
|
|
9
|
+
* value starting with `n`.
|
|
10
|
+
*/
|
|
11
|
+
value: string;
|
|
12
|
+
/** String to use for typeahead behavior */
|
|
13
|
+
searchValue?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Text to display in the token and summary for this item.
|
|
16
|
+
* Falls back to `searchValue`, then `value`, when not provided.
|
|
17
|
+
*/
|
|
18
|
+
tokenLabel?: string;
|
|
19
|
+
/** JSX representation of item */
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
}
|
|
22
|
+
declare const MultiSelectItem: {
|
|
23
|
+
({ children }: MultiSelectItemProps): React.JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
propTypes: {
|
|
26
|
+
/**
|
|
27
|
+
* String representation of the option.
|
|
28
|
+
*
|
|
29
|
+
* This value is also used as a typeahead; if a user types "n" while
|
|
30
|
+
* the Select is open, highlight will move to the first item with a
|
|
31
|
+
* value starting with `n`.
|
|
32
|
+
*/
|
|
33
|
+
value: PropTypes.Validator<string>;
|
|
34
|
+
/** String to use for typeahead behavior */
|
|
35
|
+
searchValue: PropTypes.Requireable<string>;
|
|
36
|
+
/**
|
|
37
|
+
* Text to display in the token and summary for this item.
|
|
38
|
+
* Falls back to `searchValue`, then `value`, when not provided.
|
|
39
|
+
*/
|
|
40
|
+
tokenLabel: PropTypes.Requireable<string>;
|
|
41
|
+
/** JSX representation of item */
|
|
42
|
+
children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export default MultiSelectItem;
|
|
46
|
+
//# sourceMappingURL=MultiSelectItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiSelectItem.d.ts","sourceRoot":"","sources":["../../../src/MultiSelect/MultiSelectItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,MAAM,WAAW,oBAAoB;IACnC;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,QAAA,MAAM,eAAe;mBAAkB,oBAAoB;;;QAKzD;;;;;;WAMG;;QAEH,2CAA2C;;QAE3C;;;WAGG;;QAEH,iCAAiC;;;CApB4C,CAAC;AA2BhF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { UseMultipleSelectionReturnValue } from 'downshift';
|
|
3
|
+
import { MultiSelectItemProps } from './MultiSelectItem';
|
|
4
|
+
type MultiSelectItemElement = React.ReactElement<MultiSelectItemProps>;
|
|
5
|
+
export interface MultiSelectSummaryFormatterArgs {
|
|
6
|
+
/** Currently selected item React elements */
|
|
7
|
+
selectedItems: MultiSelectItemElement[];
|
|
8
|
+
/** downshift helper for token props */
|
|
9
|
+
getSelectedItemProps: UseMultipleSelectionReturnValue<MultiSelectItemElement>["getSelectedItemProps"];
|
|
10
|
+
/** Removes a token */
|
|
11
|
+
removeSelectedItem: (item: MultiSelectItemElement) => void;
|
|
12
|
+
/** Flag indicating if the component is disabled */
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
/** Placeholder text when no items are selected */
|
|
15
|
+
label: string;
|
|
16
|
+
}
|
|
17
|
+
export interface MultiSelectProps {
|
|
18
|
+
/**
|
|
19
|
+
* unique name attribute for the input (used for `id` and `name`).
|
|
20
|
+
* The trigger id falls back to a value derived from `label`.
|
|
21
|
+
*/
|
|
22
|
+
name?: string;
|
|
23
|
+
/** Label for the select control */
|
|
24
|
+
label: string;
|
|
25
|
+
/** MultiSelect.Item children */
|
|
26
|
+
children?: React.ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* When passed, the MultiSelect becomes fully controlled.
|
|
29
|
+
* Use `onSelectedItemsChange` to manage this value.
|
|
30
|
+
*/
|
|
31
|
+
selectedItems?: string[];
|
|
32
|
+
/**
|
|
33
|
+
* Change callback for user actions that select or deselect items.
|
|
34
|
+
* Called with an array of selected item values.
|
|
35
|
+
*/
|
|
36
|
+
onSelectedItemsChange?: (values: string[]) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Disables the input and all user interaction.
|
|
39
|
+
* You may still pass in `selectedItems` if items need to be selected
|
|
40
|
+
* when the input is disabled.
|
|
41
|
+
*/
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Value for the input with the given `name` prop.
|
|
45
|
+
* This should be the value of the field in the submitted form.
|
|
46
|
+
*/
|
|
47
|
+
fieldValue?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Error message.
|
|
50
|
+
* When passed, this will cause the trigger to render in error state.
|
|
51
|
+
*/
|
|
52
|
+
errorText?: string;
|
|
53
|
+
/** Optional value for `data-testid` attribute */
|
|
54
|
+
testId?: string;
|
|
55
|
+
/** Optional label override for the clear all button */
|
|
56
|
+
clearLabel?: string;
|
|
57
|
+
/** If true, renders a "Clear all" button on the right side of the trigger */
|
|
58
|
+
isClearable?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Optional function to format the summary content shown in the trigger.
|
|
61
|
+
* Must return a React node.
|
|
62
|
+
*/
|
|
63
|
+
summaryFormatter?: (args: MultiSelectSummaryFormatterArgs) => React.ReactNode;
|
|
64
|
+
/**
|
|
65
|
+
* Function with signature `(userInputValue, selectItemNode) => {}`,
|
|
66
|
+
* used to customize typeahead filtering behavior.
|
|
67
|
+
* See "Changing Typeahead Behavior" story for example.
|
|
68
|
+
*/
|
|
69
|
+
getTypeaheadString?: (userInput: string, selectItem: MultiSelectItemElement) => string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Accessible multiple select control for giving users the ability to select
|
|
73
|
+
* multiple options from a list of options.
|
|
74
|
+
*
|
|
75
|
+
* Typeahead is enabled based on the `value` prop of `MultiSelect.Item`
|
|
76
|
+
* elements passed in. You may also set a custom `searchValue`
|
|
77
|
+
* on each `MultiSelect.Item` for control over typeahead behavior.
|
|
78
|
+
*
|
|
79
|
+
* - isClearable: if true, a "Clear all" button is rendered on the right side of the input.
|
|
80
|
+
* - clearLabel: overridable text for the clear all button.
|
|
81
|
+
* - summaryFormatter: an optional function that receives the number of selected items and an array of labels,
|
|
82
|
+
* and returns a string summary.
|
|
83
|
+
*/
|
|
84
|
+
declare const MultiSelect: {
|
|
85
|
+
({ name, label, children, selectedItems: selectedItemsProp, onSelectedItemsChange: onChangeProp, disabled, fieldValue, errorText, testId, clearLabel, isClearable, summaryFormatter, getTypeaheadString, }: MultiSelectProps): React.JSX.Element;
|
|
86
|
+
Item: {
|
|
87
|
+
({ children }: MultiSelectItemProps): React.JSX.Element;
|
|
88
|
+
displayName: string;
|
|
89
|
+
propTypes: {
|
|
90
|
+
value: import('prop-types').Validator<string>;
|
|
91
|
+
searchValue: import('prop-types').Requireable<string>;
|
|
92
|
+
tokenLabel: import('prop-types').Requireable<string>;
|
|
93
|
+
children: import('prop-types').Requireable<NonNullable<import('prop-types').ReactNodeLike>>;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
export default MultiSelect;
|
|
98
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/MultiSelect/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAC5D,OAAO,EAGL,+BAA+B,EAChC,MAAM,WAAW,CAAC;AAKnB,OAAwB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAM1E,KAAK,sBAAsB,GAAG,KAAK,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC;AAoCvE,MAAM,WAAW,+BAA+B;IAC9C,6CAA6C;IAC7C,aAAa,EAAE,sBAAsB,EAAE,CAAC;IACxC,uCAAuC;IACvC,oBAAoB,EAAE,+BAA+B,CAAC,sBAAsB,CAAC,CAAC,sBAAsB,CAAC,CAAC;IACtG,sBAAsB;IACtB,kBAAkB,EAAE,CAAC,IAAI,EAAE,sBAAsB,KAAK,IAAI,CAAC;IAC3D,mDAAmD;IACnD,QAAQ,EAAE,OAAO,CAAC;IAClB,kDAAkD;IAClD,KAAK,EAAE,MAAM,CAAC;CACf;AAqCD,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACnD;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6EAA6E;IAC7E,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,CAAC,IAAI,EAAE,+BAA+B,KAAK,KAAK,CAAC,SAAS,CAAC;IAC9E;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,CACnB,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,sBAAsB,KAC/B,MAAM,CAAC;CACb;AAED;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,WAAW;gNAed,gBAAgB;;;;;;;;;;;CAoOlB,CAAC;AAGF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as PropTypes } from 'prop-types';
|
|
3
|
+
export interface SelectActionProps {
|
|
4
|
+
/** Side effect to run on selection */
|
|
5
|
+
onSelect: () => void;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
/** Never set on Select.Action; `value` belongs to selectable Select.Items */
|
|
8
|
+
value?: never;
|
|
9
|
+
searchValue?: never;
|
|
10
|
+
}
|
|
11
|
+
declare const SelectAction: {
|
|
12
|
+
({ children }: SelectActionProps): React.JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
propTypes: {
|
|
15
|
+
/** Side effect to run on selection */
|
|
16
|
+
onSelect: PropTypes.Validator<(...args: any[]) => any>;
|
|
17
|
+
children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default SelectAction;
|
|
21
|
+
//# sourceMappingURL=SelectAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectAction.d.ts","sourceRoot":"","sources":["../../../src/Select/SelectAction.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,MAAM,WAAW,iBAAiB;IAChC,sCAAsC;IACtC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,6EAA6E;IAC7E,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB;AAED,QAAA,MAAM,YAAY;mBAAkB,iBAAiB;;;QAKnD,sCAAsC;;;;CALiC,CAAC;AAa1E,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as PropTypes } from 'prop-types';
|
|
3
|
+
export interface SelectCategoryProps {
|
|
4
|
+
label?: string;
|
|
5
|
+
/**
|
|
6
|
+
* heading: default bold heading
|
|
7
|
+
* label: match input floating label
|
|
8
|
+
*/
|
|
9
|
+
kind?: "heading" | "label";
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
isFlat?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare const SelectCategory: {
|
|
14
|
+
({ children }: SelectCategoryProps): React.JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
propTypes: {
|
|
17
|
+
label: PropTypes.Requireable<string>;
|
|
18
|
+
/**
|
|
19
|
+
* heading: default bold heading
|
|
20
|
+
* label: match input floating label
|
|
21
|
+
*/
|
|
22
|
+
kind: PropTypes.Requireable<string>;
|
|
23
|
+
children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
24
|
+
isFlat: PropTypes.Requireable<boolean>;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export default SelectCategory;
|
|
28
|
+
//# sourceMappingURL=SelectCategory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectCategory.d.ts","sourceRoot":"","sources":["../../../src/Select/SelectCategory.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,QAAA,MAAM,cAAc;mBAAkB,mBAAmB;;;;QAQvD;;;WAGG;;;;;CATJ,CAAC;AAkBF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as PropTypes } from 'prop-types';
|
|
3
|
+
export interface SelectItemProps {
|
|
4
|
+
/**
|
|
5
|
+
* String representation of the option.
|
|
6
|
+
*
|
|
7
|
+
* This value is also used as a typeahead; if a user types "n" while
|
|
8
|
+
* the Select is open, highlight will move to the first item with a
|
|
9
|
+
* value starting with `n`.
|
|
10
|
+
*/
|
|
11
|
+
value: string;
|
|
12
|
+
/**
|
|
13
|
+
* Custom typeahead string. By default typeahead uses `value`.
|
|
14
|
+
* Use this prop to pass in a custom string you'd like the user to search
|
|
15
|
+
* against when using typeahead.
|
|
16
|
+
*/
|
|
17
|
+
searchValue?: string;
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
/** Never set on Select.Item; `onSelect` is what identifies a Select.Action */
|
|
20
|
+
onSelect?: never;
|
|
21
|
+
}
|
|
22
|
+
declare const SelectItem: {
|
|
23
|
+
({ children }: SelectItemProps): React.JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
propTypes: {
|
|
26
|
+
/**
|
|
27
|
+
* String representation of the option.
|
|
28
|
+
*
|
|
29
|
+
* This value is also used as a typeahead; if a user types "n" while
|
|
30
|
+
* the Select is open, highlight will move to the first item with a
|
|
31
|
+
* value starting with `n`.
|
|
32
|
+
*/
|
|
33
|
+
value: PropTypes.Validator<string>;
|
|
34
|
+
/**
|
|
35
|
+
* Custom typeahead string. By default typeahead uses `value`.
|
|
36
|
+
* Use this prop to pass in a custom string you'd like the user to search
|
|
37
|
+
* against when using typeahead.
|
|
38
|
+
*/
|
|
39
|
+
searchValue: PropTypes.Requireable<string>;
|
|
40
|
+
children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export default SelectItem;
|
|
44
|
+
//# sourceMappingURL=SelectItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectItem.d.ts","sourceRoot":"","sources":["../../../src/Select/SelectItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,MAAM,WAAW,eAAe;IAC9B;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,8EAA8E;IAC9E,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB;AAED,QAAA,MAAM,UAAU;mBAAkB,eAAe;;;QAK/C;;;;;;WAMG;;QAEH;;;;WAIG;;;;CAjBgE,CAAC;AAyBtE,eAAe,UAAU,CAAC"}
|