@mackin.com/styleguide 7.3.0 → 7.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +547 -493
- package/index.js +2502 -2219
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -3,168 +3,60 @@ import * as React from 'react';
|
|
|
3
3
|
import React__default, { ReactNode } from 'react';
|
|
4
4
|
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
declare const mergeClassNames: (...classes: (string | boolean | undefined)[]) => string | undefined;
|
|
10
|
-
declare const getCurrencyDisplay: (value: number, isCents?: boolean | undefined, denomination?: string) => string;
|
|
11
|
-
|
|
12
|
-
declare const Table: (props: {
|
|
13
|
-
caption?: string | JSX.Element;
|
|
14
|
-
children?: any;
|
|
15
|
-
noCellBorder?: boolean;
|
|
16
|
-
className?: string;
|
|
17
|
-
/** Colors alternate rows. */
|
|
18
|
-
altRows?: boolean;
|
|
19
|
-
}) => JSX.Element;
|
|
20
|
-
declare const Tr: (props: {
|
|
21
|
-
className?: string;
|
|
22
|
-
children?: any;
|
|
23
|
-
}) => JSX.Element;
|
|
24
|
-
declare const Th: (props: {
|
|
25
|
-
children?: any;
|
|
26
|
-
align?: Alignment;
|
|
27
|
-
width?: string;
|
|
28
|
-
style?: React.CSSProperties;
|
|
29
|
-
className?: string;
|
|
30
|
-
}) => JSX.Element;
|
|
31
|
-
declare const Td: (props: {
|
|
32
|
-
children?: any;
|
|
33
|
-
align?: Alignment;
|
|
34
|
-
style?: React.CSSProperties;
|
|
35
|
-
colSpan?: number;
|
|
36
|
-
}) => JSX.Element;
|
|
37
|
-
|
|
38
|
-
declare const TdCurrency: (props: {
|
|
39
|
-
value: number;
|
|
40
|
-
cents?: boolean;
|
|
41
|
-
}) => JSX.Element;
|
|
42
|
-
|
|
43
|
-
declare const TdNumber: (props: {
|
|
44
|
-
value: number;
|
|
45
|
-
}) => JSX.Element;
|
|
46
|
-
|
|
47
|
-
declare const ThSort: (props: {
|
|
48
|
-
text: string | JSX.Element;
|
|
49
|
-
onClick: () => void;
|
|
50
|
-
align?: Alignment;
|
|
51
|
-
direction?: 'asc' | 'desc';
|
|
52
|
-
style?: React.CSSProperties;
|
|
53
|
-
width?: string;
|
|
54
|
-
rightContent?: JSX.Element;
|
|
55
|
-
}) => JSX.Element;
|
|
56
|
-
|
|
57
|
-
declare type SortDirection = 'asc' | 'desc';
|
|
58
|
-
interface PagerSortOption<TItem> {
|
|
59
|
-
id: string;
|
|
60
|
-
name?: string;
|
|
61
|
-
sort: (items: TItem[]) => TItem[];
|
|
62
|
-
}
|
|
63
|
-
interface PagerOptions<TItem> {
|
|
64
|
-
/** Defaults to 10. */
|
|
65
|
-
limit?: number;
|
|
66
|
-
/** Defaults to [10] */
|
|
67
|
-
limitOptions?: number[];
|
|
68
|
-
sort?: string;
|
|
69
|
-
sortOptions?: PagerSortOption<TItem>[];
|
|
70
|
-
previous?: ItemPager<TItem>;
|
|
6
|
+
interface AutoCompleteItem {
|
|
7
|
+
id: string | number;
|
|
8
|
+
name: string;
|
|
71
9
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
/**
|
|
77
|
-
get sort(): string | undefined;
|
|
78
|
-
set sort(sortId: string | undefined);
|
|
79
|
-
/** The direction of the current sort when using an option created from addToggleSortOption */
|
|
80
|
-
get sortDirection(): SortDirection | undefined;
|
|
81
|
-
get sortOptions(): PagerSortOption<TItem>[];
|
|
82
|
-
get limit(): number;
|
|
83
|
-
set limit(value: number);
|
|
84
|
-
get limitOptions(): number[];
|
|
85
|
-
get totalPages(): number;
|
|
86
|
-
/** The zero-based page index. */
|
|
87
|
-
get page(): number;
|
|
88
|
-
/** The zero-based page index. */
|
|
89
|
-
set page(value: number);
|
|
90
|
-
get pageItems(): TItem[];
|
|
91
|
-
get totalItems(): number;
|
|
92
|
-
get minItemIndex(): number;
|
|
93
|
-
get maxItemIndex(): number;
|
|
94
|
-
get hasNext(): boolean;
|
|
95
|
-
get hasPrevious(): boolean;
|
|
96
|
-
/**
|
|
97
|
-
* Adds both asc and des sort options
|
|
98
|
-
*
|
|
99
|
-
* @param propPath Prop name or path ('resource.title').
|
|
100
|
-
* @param name Name to display or asc Name and desc Name.
|
|
101
|
-
*/
|
|
102
|
-
addToggleSortOption(propPath: string, name?: string | [string, string]): void;
|
|
103
|
-
/**
|
|
104
|
-
* Toggles between asc and desc.
|
|
105
|
-
* @param sortId The ID or partial ID (no '-asc' or '-desc') of a sort option created through addToggleSortOption
|
|
106
|
-
*/
|
|
107
|
-
toggleSort(sortId: string): void;
|
|
108
|
-
applyFilter(filter?: (item: TItem) => boolean, keepPage?: boolean): void;
|
|
109
|
-
next(): void;
|
|
110
|
-
previous(): void;
|
|
111
|
-
pageByOffset(direction: 1 | -1): void;
|
|
112
|
-
/** Adds the item optionally keeping the current page. */
|
|
113
|
-
add(item: TItem, position?: 'start' | 'end', keepPage?: boolean): void;
|
|
114
|
-
/** Removes the matched item(s). */
|
|
115
|
-
remove(comparer: (item: TItem) => boolean, keepPage?: boolean): void;
|
|
116
|
-
replace(newItem: TItem, comparer: (item: TItem) => boolean): void;
|
|
117
|
-
private _allItems;
|
|
118
|
-
private _page;
|
|
119
|
-
private _limit;
|
|
120
|
-
private _limitOptions;
|
|
121
|
-
private _pageResult;
|
|
122
|
-
private _filteredItems;
|
|
123
|
-
private _sort;
|
|
124
|
-
private _sortOptions;
|
|
125
|
-
private _currentFilter;
|
|
126
|
-
private createPageResult;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
interface PagerStyleProps {
|
|
130
|
-
/** Used for localizations. Defaults to 'of' */
|
|
131
|
-
itemDividerText?: string;
|
|
132
|
-
/** Used for localizations. Defaults to 'No Results' */
|
|
133
|
-
noResultsText?: string;
|
|
134
|
-
/** Used for localizations. Defaults to 'Page' */
|
|
135
|
-
pageText?: string;
|
|
10
|
+
declare type AutocompleteValue = string | AutoCompleteItem;
|
|
11
|
+
interface AutocompleteProps {
|
|
12
|
+
value: AutocompleteValue | undefined;
|
|
13
|
+
round?: boolean;
|
|
14
|
+
/** @deprecated Use theme.controls.borderRadius (global) or style the components individually. */
|
|
136
15
|
rounded?: boolean;
|
|
16
|
+
rightControl?: JSX.Element;
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
id?: string;
|
|
19
|
+
disabled?: boolean;
|
|
137
20
|
className?: string;
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
totalPages?: number;
|
|
21
|
+
inputClassName?: string;
|
|
22
|
+
/** If not set, defaults to 100 */
|
|
23
|
+
maxLength?: number;
|
|
24
|
+
required?: boolean;
|
|
25
|
+
/** Limits what will be show in the autocomplete options. Default is 7. */
|
|
26
|
+
maxShownValues?: number;
|
|
27
|
+
/** The minimum characters before 'getOptions' is called. No default. */
|
|
28
|
+
minChars?: number;
|
|
29
|
+
inputAriaAttributes?: React.AriaAttributes;
|
|
30
|
+
onChange: (value: string) => void;
|
|
31
|
+
getOptions: (value: string) => Promise<AutocompleteValue[]>;
|
|
32
|
+
onPick: (value: AutocompleteValue) => void;
|
|
33
|
+
onKeyPress?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
152
34
|
}
|
|
153
|
-
declare const
|
|
35
|
+
declare const Autocomplete: (p: AutocompleteProps) => JSX.Element;
|
|
154
36
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
37
|
+
/** @deprecated Use Backdrop2 going forward. */
|
|
38
|
+
declare const Backdrop$1: (props: {
|
|
39
|
+
show: boolean;
|
|
40
|
+
onClick?: () => void;
|
|
41
|
+
transparent?: boolean;
|
|
42
|
+
/** If true, the backdrop will hide on larger screens. */
|
|
43
|
+
responsive?: boolean;
|
|
44
|
+
/** If true, the backdrop will hide on smaller screens. */
|
|
45
|
+
reverseResponsive?: boolean;
|
|
46
|
+
children?: React.ReactNode;
|
|
47
|
+
className?: string;
|
|
48
|
+
/** If true, will not prevent scroll when shown. */
|
|
49
|
+
allowScroll?: boolean;
|
|
50
|
+
/** Fade in time. Defaults to 250ms. */
|
|
51
|
+
showTimeMs?: number;
|
|
52
|
+
}) => JSX.Element;
|
|
53
|
+
|
|
54
|
+
declare const Backdrop: (p: {
|
|
55
|
+
children: React__default.ReactNode;
|
|
56
|
+
/** Fade in time. Defaults to 250ms. */
|
|
57
|
+
showTimeMs?: number;
|
|
58
|
+
debug?: boolean;
|
|
59
|
+
}) => JSX.Element;
|
|
168
60
|
|
|
169
61
|
declare type ButtonVariant = 'label' | 'circle' | 'icon' | 'link' | 'inlineLink' | 'primary' | 'secondary' | 'omg' | 'primary2' | 'positive' | 'negative';
|
|
170
62
|
interface ButtonProps {
|
|
@@ -182,7 +74,7 @@ interface ButtonProps {
|
|
|
182
74
|
block?: boolean;
|
|
183
75
|
/** As round as can be. */
|
|
184
76
|
round?: boolean;
|
|
185
|
-
/**
|
|
77
|
+
/** @deprecated Use theme.controls.borderRadius (global) or style the components individually. */
|
|
186
78
|
rounded?: boolean;
|
|
187
79
|
className?: string;
|
|
188
80
|
rightIcon?: JSX.Element;
|
|
@@ -202,16 +94,42 @@ interface ButtonProps {
|
|
|
202
94
|
}
|
|
203
95
|
declare const Button: (props: ButtonProps) => JSX.Element;
|
|
204
96
|
|
|
205
|
-
interface
|
|
97
|
+
interface CalendarProps {
|
|
98
|
+
month: number;
|
|
99
|
+
year: number;
|
|
100
|
+
/** Defaults to 3rem. */
|
|
101
|
+
cellSize?: string;
|
|
102
|
+
smallHeader?: boolean;
|
|
103
|
+
id?: string;
|
|
104
|
+
/** Defaults to true. */
|
|
105
|
+
title?: boolean;
|
|
106
|
+
yearInTitle?: boolean;
|
|
107
|
+
/** Ignored if title is set to false. */
|
|
108
|
+
customTitle?: JSX.Element;
|
|
109
|
+
/** If true, will always show 6 rows / 42 cells. */
|
|
110
|
+
fixedRows?: boolean;
|
|
111
|
+
/** Bolds the current date. */
|
|
112
|
+
showCurrent?: boolean;
|
|
113
|
+
selectedValue?: number;
|
|
114
|
+
/** Renders custom content for each cell. The content will be wrapped in a button if onClick is provided. */
|
|
115
|
+
renderCell?: (date: Date) => JSX.Element;
|
|
116
|
+
/** Used with renderCell with onClick is provided. Will not wrap the cell contents in a button. */
|
|
117
|
+
isCellDisabled?: (date: Date) => boolean;
|
|
118
|
+
onClick?: (date: Date) => void;
|
|
119
|
+
/** This is the ms from Date.valueOf(). */
|
|
120
|
+
min?: number;
|
|
121
|
+
/** This is the ms from Date.valueOf(). */
|
|
122
|
+
max?: number;
|
|
123
|
+
}
|
|
124
|
+
declare const Calendar: (p: CalendarProps) => JSX.Element;
|
|
125
|
+
|
|
126
|
+
interface CheckboxProps extends Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, 'checked' | 'onChange' | 'type'> {
|
|
206
127
|
checked: boolean;
|
|
207
|
-
onChange: (checked: boolean) => void;
|
|
128
|
+
onChange: (checked: boolean, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
129
|
+
readonly?: boolean;
|
|
208
130
|
label?: string;
|
|
209
|
-
children?: React.ReactNode;
|
|
210
|
-
className?: string;
|
|
211
131
|
checkedIcon?: string;
|
|
212
132
|
uncheckedIcon?: string;
|
|
213
|
-
disabled?: boolean;
|
|
214
|
-
readonly?: boolean;
|
|
215
133
|
/** Background color when checked based on the current theme. Mutually exclusive with 'checkedColor'. */
|
|
216
134
|
checkedThemeColor?: 'primary' | 'primary2' | 'secondary';
|
|
217
135
|
/** Background color when checked. Mutually exclusive with 'checkedThemeColor'. */
|
|
@@ -234,22 +152,80 @@ interface ConfirmModalProps {
|
|
|
234
152
|
}
|
|
235
153
|
declare const ConfirmModal: (props: ConfirmModalProps) => JSX.Element;
|
|
236
154
|
|
|
237
|
-
|
|
155
|
+
interface CopyButtonProps {
|
|
156
|
+
/** HTML selector of the target input to copy from. */
|
|
157
|
+
selector: string;
|
|
158
|
+
title?: string;
|
|
159
|
+
}
|
|
160
|
+
declare const CopyButton: (props: CopyButtonProps) => JSX.Element;
|
|
238
161
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
162
|
+
interface DatePickerProps {
|
|
163
|
+
value: number | undefined;
|
|
164
|
+
/** Called with debounce when the input changes. */
|
|
165
|
+
onChange: (value: number | undefined) => void;
|
|
166
|
+
style?: React.CSSProperties;
|
|
167
|
+
/** Defaults to MM/DD/YYYY. */
|
|
168
|
+
placeholder?: string;
|
|
242
169
|
id?: string;
|
|
243
|
-
|
|
170
|
+
disabled?: boolean;
|
|
171
|
+
className?: string;
|
|
172
|
+
inputClassName?: string;
|
|
173
|
+
readOnly?: boolean;
|
|
174
|
+
required?: boolean;
|
|
175
|
+
/** Defaults to 250ms */
|
|
176
|
+
debounceMs?: number;
|
|
177
|
+
/** @deprecated Use theme.controls.borderRadius (global) or style the components individually. */
|
|
178
|
+
rounded?: boolean;
|
|
179
|
+
round?: boolean;
|
|
180
|
+
/** This is the ms from Date.valueOf(). */
|
|
181
|
+
min?: number;
|
|
182
|
+
/** This is the ms from Date.valueOf(). */
|
|
183
|
+
max?: number;
|
|
184
|
+
/** Whether to move the popover on collision with the parent's bounds. Default is true. */
|
|
185
|
+
reposition?: boolean;
|
|
186
|
+
}
|
|
187
|
+
declare const DatePicker: (p: DatePickerProps) => JSX.Element;
|
|
188
|
+
|
|
189
|
+
declare const Divider: () => JSX.Element;
|
|
190
|
+
|
|
191
|
+
declare const ErrorModal: (props: {
|
|
192
|
+
message: string;
|
|
193
|
+
show: boolean;
|
|
194
|
+
id?: string;
|
|
195
|
+
debug?: boolean;
|
|
244
196
|
close: () => void;
|
|
245
197
|
}) => JSX.Element;
|
|
246
198
|
|
|
199
|
+
interface FileUploaderProps {
|
|
200
|
+
onUpload: (files: FileList) => Promise<void>;
|
|
201
|
+
/** Defaults to 'Upload'. */
|
|
202
|
+
buttonText?: string;
|
|
203
|
+
/** Defauts to 'Upload successful'. */
|
|
204
|
+
successMessage?: string | JSX.Element;
|
|
205
|
+
/** Defaults to 'Upload failed.' */
|
|
206
|
+
failureMessage?: string | JSX.Element;
|
|
207
|
+
/** Defaults to 10rem. */
|
|
208
|
+
buttonWidth?: string;
|
|
209
|
+
/** Defaults to 'primary'. */
|
|
210
|
+
buttonVariant?: ButtonVariant;
|
|
211
|
+
maxBytes?: number;
|
|
212
|
+
multiple?: boolean;
|
|
213
|
+
accept?: string;
|
|
214
|
+
/** Defaults to 'Click or drag and drop files.'*/
|
|
215
|
+
instructionMessage?: string;
|
|
216
|
+
/** For additional info below the instructionMessage. */
|
|
217
|
+
infoMessage?: string | JSX.Element;
|
|
218
|
+
}
|
|
219
|
+
declare const FileUploader: (p: FileUploaderProps) => JSX.Element;
|
|
220
|
+
|
|
247
221
|
declare type FormProps = React.ClassAttributes<HTMLFormElement> & React.FormHTMLAttributes<HTMLFormElement>;
|
|
248
222
|
interface IProps extends FormProps {
|
|
249
223
|
inline?: boolean;
|
|
224
|
+
/** If true, preventDefault and stopPropagation will be applied prior to onSubmit being called. Defaults to true. */
|
|
225
|
+
ajax?: boolean;
|
|
250
226
|
}
|
|
251
227
|
/** Use this instead of <form> directly. If we need to fight Chrome's autofill, we can do so at a global level. */
|
|
252
|
-
declare const Form: React.ForwardRefExoticComponent<Pick<IProps, "inline" | "key" | "acceptCharset" | "action" | "autoComplete" | "encType" | "method" | "name" | "noValidate" | "target" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<any>>;
|
|
228
|
+
declare const Form: React.ForwardRefExoticComponent<Pick<IProps, "inline" | "ajax" | "key" | "acceptCharset" | "action" | "autoComplete" | "encType" | "method" | "name" | "noValidate" | "target" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<any>>;
|
|
253
229
|
declare const FormFlexRow: (props: {
|
|
254
230
|
children: React.ReactNode;
|
|
255
231
|
className?: string;
|
|
@@ -307,6 +283,8 @@ declare const InfoPanel: (props: {
|
|
|
307
283
|
variant?: 'info' | 'warning' | 'error' | 'negative' | 'positive';
|
|
308
284
|
className?: string;
|
|
309
285
|
style?: React.CSSProperties;
|
|
286
|
+
/** Defaults to 'p'. */
|
|
287
|
+
tag?: 'p' | 'div';
|
|
310
288
|
}) => JSX.Element;
|
|
311
289
|
|
|
312
290
|
interface InfoTipProps {
|
|
@@ -328,6 +306,24 @@ interface InfoTipProps {
|
|
|
328
306
|
}
|
|
329
307
|
declare const InfoTip: (props: InfoTipProps) => JSX.Element;
|
|
330
308
|
|
|
309
|
+
interface BaseInputProps extends React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> {
|
|
310
|
+
rightControl?: JSX.Element;
|
|
311
|
+
round?: boolean;
|
|
312
|
+
/** The class applied to the wrapping element without this component. Use 'className' to style the input directly. */
|
|
313
|
+
wrapperClassName?: string;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
interface DateInputProps extends Omit<BaseInputProps, 'type' | 'value' | 'onChange' | 'min' | 'max' | 'step' | 'pattern' | 'maxLength'> {
|
|
317
|
+
/** The epoch timestamp. Equivalent to Date.valueOf(). */
|
|
318
|
+
value: number | undefined;
|
|
319
|
+
/** The min epoch timestamp. */
|
|
320
|
+
min?: number;
|
|
321
|
+
/** The max epoch timestamp. */
|
|
322
|
+
max?: number;
|
|
323
|
+
onChange: (value: number | undefined, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
324
|
+
}
|
|
325
|
+
declare const DateInput: React.ForwardRefExoticComponent<Pick<DateInputProps, "value" | "onChange" | "min" | "max" | "rightControl" | "round" | "wrapperClassName" | "key" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "list" | "minLength" | "multiple" | "name" | "placeholder" | "readOnly" | "required" | "size" | "src" | "width" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<any>>;
|
|
326
|
+
|
|
331
327
|
declare type InputValue = string | number | undefined;
|
|
332
328
|
declare type InputType = 'text' | 'number' | 'textarea' | 'date' | 'password' | 'url' | 'email';
|
|
333
329
|
interface InputProps {
|
|
@@ -348,8 +344,9 @@ interface InputProps {
|
|
|
348
344
|
/** Defaults to 'off'. */
|
|
349
345
|
autoComplete?: string;
|
|
350
346
|
autoFocus?: boolean;
|
|
347
|
+
inputAriaAttributes?: React.AriaAttributes;
|
|
351
348
|
/** Called with debounce when the input changes. */
|
|
352
|
-
onChange?: (value: InputValue, name?: string) => void;
|
|
349
|
+
onChange?: (value: InputValue, name?: string, event?: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
353
350
|
onFocus?: (event: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
354
351
|
onBlur?: (event: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
355
352
|
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
@@ -369,8 +366,32 @@ interface InputProps {
|
|
|
369
366
|
rows?: number;
|
|
370
367
|
pattern?: string;
|
|
371
368
|
}
|
|
369
|
+
/** @deprecated Use DateInput, EmailInput, NumberInput, PasswordInput, TextInput, or UrlInput instead. */
|
|
372
370
|
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<any>>;
|
|
373
371
|
|
|
372
|
+
interface NumberInputProps extends Omit<BaseInputProps, 'type' | 'value' | 'onChange' | 'min' | 'max' | 'step'> {
|
|
373
|
+
value: number | undefined;
|
|
374
|
+
min?: number;
|
|
375
|
+
max?: number;
|
|
376
|
+
step?: number;
|
|
377
|
+
onChange: (value: number | undefined, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
378
|
+
}
|
|
379
|
+
declare const NumberInput: React.ForwardRefExoticComponent<Pick<NumberInputProps, "value" | "onChange" | "min" | "max" | "step" | "rightControl" | "round" | "wrapperClassName" | "key" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "list" | "maxLength" | "minLength" | "multiple" | "name" | "pattern" | "placeholder" | "readOnly" | "required" | "size" | "src" | "width" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<any>>;
|
|
380
|
+
|
|
381
|
+
interface TextAreaProps extends Omit<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, 'value' | 'onChange'> {
|
|
382
|
+
value: string | undefined;
|
|
383
|
+
onChange: (value: string | undefined, event: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
384
|
+
}
|
|
385
|
+
declare const TextArea: React.ForwardRefExoticComponent<Pick<TextAreaProps, "value" | "onChange" | "key" | "autoComplete" | "autoFocus" | "cols" | "dirName" | "disabled" | "form" | "maxLength" | "minLength" | "name" | "placeholder" | "readOnly" | "required" | "rows" | "wrap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<any>>;
|
|
386
|
+
|
|
387
|
+
interface TextInputProps extends Omit<BaseInputProps, 'type' | 'value' | 'onChange' | 'min' | 'max' | 'step'> {
|
|
388
|
+
value: string | undefined;
|
|
389
|
+
/** Defaults to 'text'. */
|
|
390
|
+
type?: 'text' | 'email' | 'url' | 'password';
|
|
391
|
+
onChange: (value: string | undefined, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
392
|
+
}
|
|
393
|
+
declare const TextInput: React.ForwardRefExoticComponent<Pick<TextInputProps, "type" | "value" | "onChange" | "rightControl" | "round" | "wrapperClassName" | "key" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "form" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "height" | "list" | "maxLength" | "minLength" | "multiple" | "name" | "pattern" | "placeholder" | "readOnly" | "required" | "size" | "src" | "width" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<any>>;
|
|
394
|
+
|
|
374
395
|
interface LabelProps {
|
|
375
396
|
text: string | JSX.Element;
|
|
376
397
|
children: React.ReactNode;
|
|
@@ -440,6 +461,7 @@ interface OmniLinkProps {
|
|
|
440
461
|
children: React.ReactNode;
|
|
441
462
|
onClick?: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void;
|
|
442
463
|
className?: string;
|
|
464
|
+
style?: React.CSSProperties;
|
|
443
465
|
noRouter?: boolean;
|
|
444
466
|
/** Ignored if 'noRouter' is false */
|
|
445
467
|
target?: string;
|
|
@@ -453,7 +475,7 @@ interface OmniLinkProps {
|
|
|
453
475
|
title?: string;
|
|
454
476
|
/** Only for button variants. */
|
|
455
477
|
round?: boolean;
|
|
456
|
-
/** Only for button variants. */
|
|
478
|
+
/** @deprecated Use theme.controls.borderRadius (global) or style the components individually. Only for button variants. */
|
|
457
479
|
rounded?: boolean;
|
|
458
480
|
/** Only for button variants. */
|
|
459
481
|
small?: boolean;
|
|
@@ -462,192 +484,250 @@ interface OmniLinkProps {
|
|
|
462
484
|
}
|
|
463
485
|
declare const OmniLink: (props: OmniLinkProps) => JSX.Element;
|
|
464
486
|
|
|
465
|
-
declare type
|
|
466
|
-
interface
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
id: T;
|
|
471
|
-
name?: string;
|
|
472
|
-
})[];
|
|
473
|
-
onChange: (value: T) => void;
|
|
474
|
-
id?: string;
|
|
475
|
-
rounded?: boolean;
|
|
476
|
-
disabled?: boolean;
|
|
477
|
-
className?: string;
|
|
478
|
-
readonly?: boolean;
|
|
487
|
+
declare type SortDirection = 'asc' | 'desc';
|
|
488
|
+
interface PagerSortOption<TItem> {
|
|
489
|
+
id: string;
|
|
490
|
+
name?: string;
|
|
491
|
+
sort: (items: TItem[]) => TItem[];
|
|
479
492
|
}
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
493
|
+
interface PagerOptions<TItem> {
|
|
494
|
+
/** Defaults to 10. */
|
|
495
|
+
limit?: number;
|
|
496
|
+
/** Defaults to [10] */
|
|
497
|
+
limitOptions?: number[];
|
|
498
|
+
sort?: string;
|
|
499
|
+
sortOptions?: PagerSortOption<TItem>[];
|
|
500
|
+
previous?: ItemPager<TItem>;
|
|
487
501
|
}
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
502
|
+
/** For in-memory paging. */
|
|
503
|
+
declare class ItemPager<TItem> {
|
|
504
|
+
constructor(allItems: TItem[], options?: PagerOptions<TItem>);
|
|
505
|
+
get allItems(): TItem[];
|
|
506
|
+
/** The ID of the current sort within the sortOptions. */
|
|
507
|
+
get sort(): string | undefined;
|
|
508
|
+
set sort(sortId: string | undefined);
|
|
509
|
+
/** The direction of the current sort when using an option created from addToggleSortOption */
|
|
510
|
+
get sortDirection(): SortDirection | undefined;
|
|
511
|
+
get sortOptions(): PagerSortOption<TItem>[];
|
|
512
|
+
get limit(): number;
|
|
513
|
+
set limit(value: number);
|
|
514
|
+
get limitOptions(): number[];
|
|
515
|
+
get totalPages(): number;
|
|
516
|
+
/** The zero-based page index. */
|
|
517
|
+
get page(): number;
|
|
518
|
+
/** The zero-based page index. */
|
|
519
|
+
set page(value: number);
|
|
520
|
+
get pageItems(): TItem[];
|
|
521
|
+
get totalItems(): number;
|
|
522
|
+
get minItemIndex(): number;
|
|
523
|
+
get maxItemIndex(): number;
|
|
524
|
+
get hasNext(): boolean;
|
|
525
|
+
get hasPrevious(): boolean;
|
|
526
|
+
/**
|
|
527
|
+
* Adds both asc and des sort options
|
|
528
|
+
*
|
|
529
|
+
* @param propPath Prop name or path ('resource.title').
|
|
530
|
+
* @param name Name to display or asc Name and desc Name.
|
|
531
|
+
*/
|
|
532
|
+
addToggleSortOption(propPath: string, name?: string | [string, string]): void;
|
|
533
|
+
/**
|
|
534
|
+
* Toggles between asc and desc.
|
|
535
|
+
* @param sortId The ID or partial ID (no '-asc' or '-desc') of a sort option created through addToggleSortOption
|
|
536
|
+
*/
|
|
537
|
+
toggleSort(sortId: string): void;
|
|
538
|
+
applyFilter(filter?: (item: TItem) => boolean, keepPage?: boolean): void;
|
|
539
|
+
next(): void;
|
|
540
|
+
previous(): void;
|
|
541
|
+
pageByOffset(direction: 1 | -1): void;
|
|
542
|
+
/** Adds the item optionally keeping the current page. */
|
|
543
|
+
add(item: TItem, position?: 'start' | 'end', keepPage?: boolean): void;
|
|
544
|
+
/** Removes the matched item(s). */
|
|
545
|
+
remove(comparer: (item: TItem) => boolean, keepPage?: boolean): void;
|
|
546
|
+
replace(newItem: TItem, comparer: (item: TItem) => boolean): void;
|
|
547
|
+
private _allItems;
|
|
548
|
+
private _page;
|
|
549
|
+
private _limit;
|
|
550
|
+
private _limitOptions;
|
|
551
|
+
private _pageResult;
|
|
552
|
+
private _filteredItems;
|
|
553
|
+
private _sort;
|
|
554
|
+
private _sortOptions;
|
|
555
|
+
private _currentFilter;
|
|
556
|
+
private createPageResult;
|
|
557
|
+
}
|
|
494
558
|
|
|
495
|
-
interface
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
559
|
+
interface PagerStyleProps {
|
|
560
|
+
/** Used for localizations. Defaults to 'of' */
|
|
561
|
+
itemDividerText?: string;
|
|
562
|
+
/** Used for localizations. Defaults to 'No Results' */
|
|
563
|
+
noResultsText?: string;
|
|
564
|
+
/** Used for localizations. Defaults to 'Page' */
|
|
565
|
+
pageText?: string;
|
|
566
|
+
/** @deprecated Use theme.controls.borderRadius (global) or style the components individually. */
|
|
501
567
|
rounded?: boolean;
|
|
502
568
|
className?: string;
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
debounceMs?: number;
|
|
569
|
+
leftControls?: JSX.Element;
|
|
570
|
+
rightControls?: JSX.Element;
|
|
506
571
|
}
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
ellipsis?: boolean;
|
|
519
|
-
style?: React.CSSProperties;
|
|
520
|
-
smaller?: boolean;
|
|
521
|
-
larger?: boolean;
|
|
522
|
-
spacedOut?: boolean;
|
|
523
|
-
lineClamp?: number;
|
|
524
|
-
/** Will remove all margin/padding from specified tag */
|
|
525
|
-
noPad?: boolean;
|
|
526
|
-
leftPad?: string;
|
|
572
|
+
interface PagerProps extends PagerStyleProps {
|
|
573
|
+
canGoNext: boolean;
|
|
574
|
+
canGoPrevious: boolean;
|
|
575
|
+
minItem: number;
|
|
576
|
+
maxItem: number;
|
|
577
|
+
totalItems: number;
|
|
578
|
+
page: (direction: 1 | -1) => void;
|
|
579
|
+
/** For display purposes. Will show under items text if this if present. */
|
|
580
|
+
pageIndex?: number;
|
|
581
|
+
/** For display purposes. Will show under items text if this if present. */
|
|
582
|
+
totalPages?: number;
|
|
527
583
|
}
|
|
528
|
-
declare const
|
|
529
|
-
style: React.CSSProperties;
|
|
530
|
-
className: string;
|
|
531
|
-
}, HTMLElement>;
|
|
584
|
+
declare const Pager: (props: PagerProps) => JSX.Element;
|
|
532
585
|
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
/**
|
|
543
|
-
|
|
544
|
-
checkedIcon?: JSX.Element;
|
|
545
|
-
uncheckedIcon?: JSX.Element;
|
|
546
|
-
variant?: ToggleButtonVariant;
|
|
547
|
-
checkedVariant?: ToggleButtonVariant;
|
|
548
|
-
style?: React.CSSProperties;
|
|
549
|
-
checkedStyle?: React.CSSProperties;
|
|
586
|
+
interface Props$1<T> extends PagerStyleProps {
|
|
587
|
+
pager: ItemPager<T>;
|
|
588
|
+
onPage: (direction: 1 | -1) => void;
|
|
589
|
+
/** Defaults to 'Limit' */
|
|
590
|
+
limitText?: string;
|
|
591
|
+
/** Defaults to 'Sort' */
|
|
592
|
+
sortText?: string;
|
|
593
|
+
onLimit?: (limit: number) => void;
|
|
594
|
+
onSort?: (sort: string) => void;
|
|
595
|
+
/** Shows 'Page X of Y'. */
|
|
596
|
+
showPageText?: boolean;
|
|
550
597
|
}
|
|
551
|
-
declare const
|
|
598
|
+
declare const BoundMemoryPager: <T>(p: Props$1<T>) => JSX.Element;
|
|
552
599
|
|
|
553
|
-
interface
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
/**
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
600
|
+
interface Props<T> extends PagerStyleProps {
|
|
601
|
+
result: PagedResult<T>;
|
|
602
|
+
onPage: (direction: 1 | -1) => void;
|
|
603
|
+
limitOptions?: number[];
|
|
604
|
+
sort?: string | number;
|
|
605
|
+
sortOptions?: {
|
|
606
|
+
id: string | number;
|
|
607
|
+
name?: string;
|
|
608
|
+
}[];
|
|
609
|
+
/** Defaults to 'Limit' */
|
|
610
|
+
limitText?: string;
|
|
611
|
+
/** Defaults to 'Sort' */
|
|
612
|
+
sortText?: string;
|
|
613
|
+
onLimit?: (limit: number) => void;
|
|
614
|
+
onSort?: (sort: string | number) => void;
|
|
615
|
+
/** Shows 'Page X of Y'. */
|
|
616
|
+
showPageText?: boolean;
|
|
569
617
|
}
|
|
570
|
-
declare const
|
|
618
|
+
declare const BoundStaticPager: <T>(p: Props<T>) => JSX.Element;
|
|
571
619
|
|
|
572
|
-
declare
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
620
|
+
declare class PagedResult<T> {
|
|
621
|
+
constructor(items?: T[], total?: number, page?: number, limit?: number);
|
|
622
|
+
static fromDto<T>(dto: {
|
|
623
|
+
[key: string]: any;
|
|
624
|
+
}): PagedResult<T>;
|
|
625
|
+
total: number;
|
|
626
|
+
/** The zero-based page index. */
|
|
627
|
+
page: number;
|
|
628
|
+
limit: number;
|
|
629
|
+
items: T[];
|
|
630
|
+
/** Helper for items.length */
|
|
631
|
+
get length(): number;
|
|
632
|
+
get hasItems(): boolean;
|
|
633
|
+
get previousPage(): number;
|
|
634
|
+
get hasPrevious(): boolean;
|
|
635
|
+
get nextPage(): number;
|
|
636
|
+
get hasNext(): boolean;
|
|
637
|
+
get lastPage(): number;
|
|
638
|
+
get totalPages(): number;
|
|
639
|
+
get minPageItemIndex(): number;
|
|
640
|
+
get maxPageItemIndex(): number;
|
|
641
|
+
/** Returns the first item on the current page. */
|
|
642
|
+
get firstPageItem(): T;
|
|
643
|
+
/** Returns the last item on the current page */
|
|
644
|
+
get lastPageItem(): T;
|
|
645
|
+
getPageRelativeItemIndex(item: T): number;
|
|
646
|
+
getResultRelativeItemIndex(item: T): number | undefined;
|
|
647
|
+
getPreviousItem(fromItem: T): T | undefined;
|
|
648
|
+
getNextItem(fromItem: T): T | undefined;
|
|
649
|
+
getPagingRange(radius: number): number[];
|
|
650
|
+
toJSON(): {
|
|
651
|
+
[key: string]: any;
|
|
652
|
+
};
|
|
653
|
+
clone(newItems?: T[]): PagedResult<T>;
|
|
654
|
+
}
|
|
578
655
|
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
year: number;
|
|
582
|
-
/** Defaults to 3rem. */
|
|
583
|
-
cellSize?: string;
|
|
584
|
-
smallHeader?: boolean;
|
|
585
|
-
id?: string;
|
|
586
|
-
/** Defaults to true. */
|
|
587
|
-
title?: boolean;
|
|
588
|
-
yearInTitle?: boolean;
|
|
589
|
-
/** Ignored if title is set to false. */
|
|
590
|
-
customTitle?: JSX.Element;
|
|
591
|
-
/** If true, will always show 6 rows / 42 cells. */
|
|
592
|
-
fixedRows?: boolean;
|
|
593
|
-
/** Bolds the current date. */
|
|
594
|
-
showCurrent?: boolean;
|
|
595
|
-
selectedValue?: number;
|
|
596
|
-
/** Renders custom content for each cell. The content will be wrapped in a button if onClick is provided. */
|
|
597
|
-
renderCell?: (date: Date) => JSX.Element;
|
|
598
|
-
/** Used with renderCell with onClick is provided. Will not wrap the cell contents in a button. */
|
|
599
|
-
isCellDisabled?: (date: Date) => boolean;
|
|
600
|
-
onClick?: (date: Date) => void;
|
|
601
|
-
/** This is the ms from Date.valueOf(). */
|
|
602
|
-
min?: number;
|
|
603
|
-
/** This is the ms from Date.valueOf(). */
|
|
604
|
-
max?: number;
|
|
656
|
+
declare type PickerValue = string | number;
|
|
657
|
+
interface SelectProps extends Omit<React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, 'value' | 'options' | 'onChange'> {
|
|
605
658
|
}
|
|
606
|
-
|
|
659
|
+
interface PickerProps<T extends PickerValue> extends SelectProps {
|
|
660
|
+
value: T;
|
|
661
|
+
options: (T | {
|
|
662
|
+
id: T;
|
|
663
|
+
name?: string;
|
|
664
|
+
})[];
|
|
665
|
+
onChange: (value: T, event: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
666
|
+
readonly?: boolean;
|
|
667
|
+
/** @deprecated Unused. Picker will always render a 'select' element. */
|
|
668
|
+
type?: 'select';
|
|
669
|
+
/** @deprecated Use theme.controls.borderRadius (global) or style the components individually. */
|
|
670
|
+
rounded?: boolean;
|
|
671
|
+
}
|
|
672
|
+
declare const Picker: <T extends PickerValue>(props: PickerProps<T>) => JSX.Element;
|
|
607
673
|
|
|
608
|
-
interface
|
|
609
|
-
|
|
610
|
-
/**
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
placeholder?: string;
|
|
674
|
+
interface PopoverProps {
|
|
675
|
+
isOpen: boolean;
|
|
676
|
+
/** The content inside the popover. */
|
|
677
|
+
content: JSX.Element;
|
|
678
|
+
/** The element controlling the state of the popover. */
|
|
679
|
+
parent: JSX.Element;
|
|
615
680
|
id?: string;
|
|
616
|
-
disabled?: boolean;
|
|
617
|
-
className?: string;
|
|
618
|
-
inputClassName?: string;
|
|
619
|
-
readOnly?: boolean;
|
|
620
|
-
required?: boolean;
|
|
621
|
-
/** Defaults to 250ms */
|
|
622
|
-
debounceMs?: number;
|
|
623
|
-
rounded?: boolean;
|
|
624
|
-
round?: boolean;
|
|
625
|
-
/** This is the ms from Date.valueOf(). */
|
|
626
|
-
min?: number;
|
|
627
|
-
/** This is the ms from Date.valueOf(). */
|
|
628
|
-
max?: number;
|
|
629
681
|
/** Whether to move the popover on collision with the parent's bounds. Default is true. */
|
|
630
682
|
reposition?: boolean;
|
|
683
|
+
onClickOutside?: (e: MouseEvent) => void;
|
|
684
|
+
/** Popover arrow color. Defaults to theme.colors.border. */
|
|
685
|
+
arrorColor?: string;
|
|
686
|
+
/** Popover border. Defaults to theme.controls.border. */
|
|
687
|
+
border?: string;
|
|
688
|
+
/** Popover background. Defaults to theme.colors.bg. */
|
|
689
|
+
backgroundColor?: string;
|
|
690
|
+
/** Order of positions as the Popover colides with the window edge. */
|
|
691
|
+
positions?: ("bottom" | "left" | "right" | "top")[] | undefined;
|
|
631
692
|
}
|
|
632
|
-
declare const
|
|
693
|
+
declare const Popover: (p: PopoverProps) => JSX.Element;
|
|
633
694
|
|
|
634
|
-
interface
|
|
635
|
-
|
|
695
|
+
interface ProgressBarProps {
|
|
696
|
+
pct: number;
|
|
697
|
+
round?: boolean;
|
|
698
|
+
showPct?: boolean;
|
|
699
|
+
className?: string;
|
|
636
700
|
}
|
|
637
|
-
|
|
638
|
-
|
|
701
|
+
declare const ProgressBar: (props: {
|
|
702
|
+
pct: number;
|
|
703
|
+
round?: boolean;
|
|
704
|
+
showPct?: boolean;
|
|
705
|
+
className?: string;
|
|
706
|
+
}) => JSX.Element;
|
|
707
|
+
|
|
708
|
+
interface SearchBoxProps {
|
|
709
|
+
value: string | undefined;
|
|
710
|
+
onChange: (value: string | undefined | number) => void;
|
|
639
711
|
id?: string;
|
|
712
|
+
placeholder?: string;
|
|
713
|
+
round?: boolean;
|
|
714
|
+
/** @deprecated Use theme.controls.borderRadius (global) or style the components individually. */
|
|
640
715
|
rounded?: boolean;
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
variant?: 'tab' | 'button';
|
|
716
|
+
className?: string;
|
|
717
|
+
onSubmit?: () => Promise<void>;
|
|
718
|
+
/** Defaults to 250ms */
|
|
719
|
+
debounceMs?: number;
|
|
646
720
|
}
|
|
647
|
-
declare const
|
|
721
|
+
declare const SearchBox: (props: SearchBoxProps) => JSX.Element;
|
|
722
|
+
|
|
723
|
+
declare type Alignment = 'left' | 'right' | 'center';
|
|
648
724
|
|
|
649
725
|
declare const GlobalStyles: () => null;
|
|
650
726
|
|
|
727
|
+
/** @deprecated This will not work correctly with emotion/css. Use 'cx' for adding multiple class names together. */
|
|
728
|
+
declare const mergeClassNames: (...classes: (string | boolean | undefined)[]) => string | undefined;
|
|
729
|
+
declare const getCurrencyDisplay: (value: number, isCents?: boolean | undefined, denomination?: string) => string;
|
|
730
|
+
|
|
651
731
|
interface MackinTheme {
|
|
652
732
|
colors: {
|
|
653
733
|
primary: string;
|
|
@@ -700,6 +780,7 @@ interface MackinTheme {
|
|
|
700
780
|
fontSize: string;
|
|
701
781
|
borderWidth: string;
|
|
702
782
|
border: string;
|
|
783
|
+
borderRadius: string;
|
|
703
784
|
height: string;
|
|
704
785
|
heightSmall: string;
|
|
705
786
|
boxShadow: string;
|
|
@@ -710,6 +791,7 @@ interface MackinTheme {
|
|
|
710
791
|
focusOutlineShadow: string;
|
|
711
792
|
focusOutlineRequiredShadow: string;
|
|
712
793
|
roundRadius: string;
|
|
794
|
+
/** @deprecated Use theme.controls.borderRadius (global) or style the components individually. */
|
|
713
795
|
roundedRadius: string;
|
|
714
796
|
disabledOpacity: string;
|
|
715
797
|
formButtonMinWidth: string;
|
|
@@ -740,129 +822,15 @@ interface MackinTheme {
|
|
|
740
822
|
declare const calcDynamicThemeProps: <T extends MackinTheme>(theme: T) => void;
|
|
741
823
|
declare const defaultTheme: MackinTheme;
|
|
742
824
|
|
|
743
|
-
/** Returns a user-provided theme if ThemeProvider was used correctly, or the default theme. */
|
|
744
|
-
declare const useThemeSafely: () => MackinTheme;
|
|
745
|
-
|
|
746
825
|
declare const ThemeProvider: <T extends MackinTheme>(p: {
|
|
747
826
|
children?: ReactNode;
|
|
748
827
|
theme: T;
|
|
749
828
|
}) => JSX.Element;
|
|
750
829
|
|
|
751
|
-
declare const
|
|
752
|
-
disabled?: boolean;
|
|
753
|
-
children?: React.ReactNode;
|
|
754
|
-
style?: React.CSSProperties;
|
|
755
|
-
}) => JSX.Element;
|
|
756
|
-
|
|
757
|
-
interface FileUploaderProps {
|
|
758
|
-
onUpload: (files: FileList) => Promise<void>;
|
|
759
|
-
/** Defaults to 'Upload'. */
|
|
760
|
-
buttonText?: string;
|
|
761
|
-
/** Defauts to 'Upload successful'. */
|
|
762
|
-
successMessage?: string | JSX.Element;
|
|
763
|
-
/** Defaults to 'Upload failed.' */
|
|
764
|
-
failureMessage?: string | JSX.Element;
|
|
765
|
-
/** Defaults to 10rem. */
|
|
766
|
-
buttonWidth?: string;
|
|
767
|
-
/** Defaults to 'primary'. */
|
|
768
|
-
buttonVariant?: ButtonVariant;
|
|
769
|
-
maxBytes?: number;
|
|
770
|
-
multiple?: boolean;
|
|
771
|
-
accept?: string;
|
|
772
|
-
/** Defaults to 'Click or drag and drop files.'*/
|
|
773
|
-
instructionMessage?: string;
|
|
774
|
-
/** For additional info below the instructionMessage. */
|
|
775
|
-
infoMessage?: string | JSX.Element;
|
|
776
|
-
}
|
|
777
|
-
declare const FileUploader: (p: FileUploaderProps) => JSX.Element;
|
|
778
|
-
|
|
779
|
-
interface CopyButtonProps {
|
|
780
|
-
/** HTML selector of the target input to copy from. */
|
|
781
|
-
selector: string;
|
|
782
|
-
title?: string;
|
|
783
|
-
}
|
|
784
|
-
declare const CopyButton: (props: CopyButtonProps) => JSX.Element;
|
|
785
|
-
|
|
786
|
-
interface PopoverProps {
|
|
787
|
-
isOpen: boolean;
|
|
788
|
-
/** The content inside the popover. */
|
|
789
|
-
content: JSX.Element;
|
|
790
|
-
/** The element controlling the state of the popover. */
|
|
791
|
-
parent: JSX.Element;
|
|
792
|
-
id?: string;
|
|
793
|
-
/** Whether to move the popover on collision with the parent's bounds. Default is true. */
|
|
794
|
-
reposition?: boolean;
|
|
795
|
-
onClickOutside?: (e: MouseEvent) => void;
|
|
796
|
-
/** Popover arrow color. Defaults to theme.colors.border. */
|
|
797
|
-
arrorColor?: string;
|
|
798
|
-
/** Popover border. Defaults to theme.controls.border. */
|
|
799
|
-
border?: string;
|
|
800
|
-
/** Popover background. Defaults to theme.colors.bg. */
|
|
801
|
-
backgroundColor?: string;
|
|
802
|
-
/** Order of positions as the Popover colides with the window edge. */
|
|
803
|
-
positions?: ("bottom" | "left" | "right" | "top")[] | undefined;
|
|
804
|
-
}
|
|
805
|
-
declare const Popover: (p: PopoverProps) => JSX.Element;
|
|
806
|
-
|
|
807
|
-
interface TogglePasswordInputProps extends Omit<InputProps, 'type' | 'rightControl'> {
|
|
808
|
-
}
|
|
809
|
-
declare const TogglePasswordInput: (p: TogglePasswordInputProps) => JSX.Element;
|
|
810
|
-
|
|
811
|
-
declare class PagedResult<T> {
|
|
812
|
-
constructor(items?: T[], total?: number, page?: number, limit?: number);
|
|
813
|
-
static fromDto<T>(dto: {
|
|
814
|
-
[key: string]: any;
|
|
815
|
-
}): PagedResult<T>;
|
|
816
|
-
total: number;
|
|
817
|
-
/** The zero-based page index. */
|
|
818
|
-
page: number;
|
|
819
|
-
limit: number;
|
|
820
|
-
items: T[];
|
|
821
|
-
/** Helper for items.length */
|
|
822
|
-
get length(): number;
|
|
823
|
-
get hasItems(): boolean;
|
|
824
|
-
get previousPage(): number;
|
|
825
|
-
get hasPrevious(): boolean;
|
|
826
|
-
get nextPage(): number;
|
|
827
|
-
get hasNext(): boolean;
|
|
828
|
-
get lastPage(): number;
|
|
829
|
-
get totalPages(): number;
|
|
830
|
-
get minPageItemIndex(): number;
|
|
831
|
-
get maxPageItemIndex(): number;
|
|
832
|
-
/** Returns the first item on the current page. */
|
|
833
|
-
get firstPageItem(): T;
|
|
834
|
-
/** Returns the last item on the current page */
|
|
835
|
-
get lastPageItem(): T;
|
|
836
|
-
getPageRelativeItemIndex(item: T): number;
|
|
837
|
-
getResultRelativeItemIndex(item: T): number | undefined;
|
|
838
|
-
getPreviousItem(fromItem: T): T | undefined;
|
|
839
|
-
getNextItem(fromItem: T): T | undefined;
|
|
840
|
-
getPagingRange(radius: number): number[];
|
|
841
|
-
toJSON(): {
|
|
842
|
-
[key: string]: any;
|
|
843
|
-
};
|
|
844
|
-
clone(newItems?: T[]): PagedResult<T>;
|
|
845
|
-
}
|
|
830
|
+
declare const useMediaQuery: (query: string) => boolean;
|
|
846
831
|
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
onPage: (direction: 1 | -1) => void;
|
|
850
|
-
limitOptions?: number[];
|
|
851
|
-
sort?: string | number;
|
|
852
|
-
sortOptions?: {
|
|
853
|
-
id: string | number;
|
|
854
|
-
name?: string;
|
|
855
|
-
}[];
|
|
856
|
-
/** Defaults to 'Limit' */
|
|
857
|
-
limitText?: string;
|
|
858
|
-
/** Defaults to 'Sort' */
|
|
859
|
-
sortText?: string;
|
|
860
|
-
onLimit?: (limit: number) => void;
|
|
861
|
-
onSort?: (sort: string | number) => void;
|
|
862
|
-
/** Shows 'Page X of Y'. */
|
|
863
|
-
showPageText?: boolean;
|
|
864
|
-
}
|
|
865
|
-
declare const BoundStaticPager: <T>(p: Props<T>) => JSX.Element;
|
|
832
|
+
/** Returns a user-provided theme if ThemeProvider was used correctly, or the default theme. */
|
|
833
|
+
declare const useThemeSafely: () => MackinTheme;
|
|
866
834
|
|
|
867
835
|
declare type SliderValue = number | [number, number];
|
|
868
836
|
interface SliderProps<T extends SliderValue> {
|
|
@@ -883,59 +851,145 @@ interface SliderProps<T extends SliderValue> {
|
|
|
883
851
|
}
|
|
884
852
|
declare const Slider: <T extends SliderValue>(p: SliderProps<T>) => JSX.Element;
|
|
885
853
|
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
854
|
+
interface TabHeaderTabProps {
|
|
855
|
+
name: string;
|
|
856
|
+
}
|
|
857
|
+
interface TabHeaderProps {
|
|
858
|
+
tabs: TabHeaderTabProps[];
|
|
859
|
+
id?: string;
|
|
860
|
+
/** @deprecated Use theme.controls.borderRadius (global) or style the components individually. */
|
|
861
|
+
rounded?: boolean;
|
|
862
|
+
/** Defaults to 10rem. */
|
|
863
|
+
maxTabWidth?: string;
|
|
864
|
+
onTabChanged?: (tabIndex: number) => void;
|
|
865
|
+
/** Defaults to 'tab'. */
|
|
866
|
+
variant?: 'tab' | 'button';
|
|
867
|
+
}
|
|
868
|
+
declare const TabHeader: (p: TabHeaderProps) => JSX.Element;
|
|
869
|
+
|
|
870
|
+
declare const Table: (props: {
|
|
871
|
+
caption?: string | JSX.Element;
|
|
872
|
+
children?: any;
|
|
873
|
+
noCellBorder?: boolean;
|
|
896
874
|
className?: string;
|
|
897
|
-
/**
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
875
|
+
/** Colors alternate rows. */
|
|
876
|
+
altRows?: boolean;
|
|
877
|
+
}) => JSX.Element;
|
|
878
|
+
declare const Tr: (props: {
|
|
879
|
+
className?: string;
|
|
880
|
+
children?: any;
|
|
881
|
+
}) => JSX.Element;
|
|
882
|
+
declare const Th: (props: {
|
|
883
|
+
children?: any;
|
|
884
|
+
align?: Alignment;
|
|
885
|
+
width?: string;
|
|
886
|
+
style?: React.CSSProperties;
|
|
887
|
+
className?: string;
|
|
888
|
+
}) => JSX.Element;
|
|
889
|
+
declare const Td: (props: {
|
|
890
|
+
children?: any;
|
|
891
|
+
align?: Alignment;
|
|
892
|
+
style?: React.CSSProperties;
|
|
893
|
+
colSpan?: number;
|
|
901
894
|
}) => JSX.Element;
|
|
902
895
|
|
|
903
|
-
declare const
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
showTimeMs?: number;
|
|
907
|
-
debug?: boolean;
|
|
896
|
+
declare const TdCurrency: (props: {
|
|
897
|
+
value: number;
|
|
898
|
+
cents?: boolean;
|
|
908
899
|
}) => JSX.Element;
|
|
909
900
|
|
|
910
|
-
declare const
|
|
901
|
+
declare const TdNumber: (props: {
|
|
902
|
+
value: number;
|
|
903
|
+
}) => JSX.Element;
|
|
911
904
|
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
905
|
+
declare const ThSort: (props: {
|
|
906
|
+
text: string | JSX.Element;
|
|
907
|
+
onClick: () => void;
|
|
908
|
+
align?: Alignment;
|
|
909
|
+
direction?: 'asc' | 'desc';
|
|
910
|
+
style?: React.CSSProperties;
|
|
911
|
+
width?: string;
|
|
912
|
+
rightContent?: JSX.Element;
|
|
913
|
+
}) => JSX.Element;
|
|
914
|
+
|
|
915
|
+
declare const TabLocker: (props: {
|
|
916
|
+
disabled?: boolean;
|
|
917
|
+
children?: React.ReactNode;
|
|
918
|
+
style?: React.CSSProperties;
|
|
919
|
+
}) => JSX.Element;
|
|
920
|
+
|
|
921
|
+
interface TextProps {
|
|
922
|
+
children: any;
|
|
923
|
+
/** Defaults to 'p'. */
|
|
924
|
+
tag?: 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'span' | 'div';
|
|
925
|
+
align?: Alignment;
|
|
926
|
+
bold?: boolean;
|
|
927
|
+
italics?: boolean;
|
|
928
|
+
className?: string;
|
|
929
|
+
/** You will need to set a width or max-width on the element for this to work. */
|
|
930
|
+
ellipsis?: boolean;
|
|
931
|
+
style?: React.CSSProperties;
|
|
932
|
+
smaller?: boolean;
|
|
933
|
+
larger?: boolean;
|
|
934
|
+
spacedOut?: boolean;
|
|
935
|
+
lineClamp?: number;
|
|
936
|
+
/** Will remove all margin/padding from specified tag */
|
|
937
|
+
noPad?: boolean;
|
|
938
|
+
leftPad?: string;
|
|
915
939
|
}
|
|
916
|
-
declare
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
940
|
+
declare const Text: (props: TextProps) => React.DetailedReactHTMLElement<{
|
|
941
|
+
style: React.CSSProperties;
|
|
942
|
+
className: string;
|
|
943
|
+
}, HTMLElement>;
|
|
944
|
+
|
|
945
|
+
declare type ToggleButtonVariant = 'primary' | 'secondary' | 'omg' | 'primary2' | 'positive' | 'negative';
|
|
946
|
+
interface ToggleButtonProps {
|
|
947
|
+
checked: boolean;
|
|
948
|
+
checkedText: string;
|
|
949
|
+
uncheckedText: string;
|
|
950
|
+
onClick: (event?: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
951
|
+
className?: string;
|
|
952
|
+
checkedClassName?: string;
|
|
924
953
|
disabled?: boolean;
|
|
954
|
+
/** The minimum button size will be set to the themes' formButtonMinWidth. */
|
|
955
|
+
enforceMinWidth?: boolean;
|
|
956
|
+
checkedIcon?: JSX.Element;
|
|
957
|
+
uncheckedIcon?: JSX.Element;
|
|
958
|
+
variant?: ToggleButtonVariant;
|
|
959
|
+
checkedVariant?: ToggleButtonVariant;
|
|
960
|
+
style?: React.CSSProperties;
|
|
961
|
+
checkedStyle?: React.CSSProperties;
|
|
962
|
+
}
|
|
963
|
+
declare const ToggleButton: (props: ToggleButtonProps) => JSX.Element;
|
|
964
|
+
|
|
965
|
+
interface ToggleButtonGroupProps {
|
|
966
|
+
value: string | number;
|
|
967
|
+
options: {
|
|
968
|
+
id: string | number;
|
|
969
|
+
name: string | JSX.Element;
|
|
970
|
+
rightIcon?: JSX.Element;
|
|
971
|
+
activeClass?: string;
|
|
972
|
+
}[];
|
|
973
|
+
onChange: (value: string | number) => void;
|
|
925
974
|
className?: string;
|
|
926
|
-
|
|
927
|
-
/**
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
/** The minimum characters before 'getOptions' is called. No default. */
|
|
933
|
-
minChars?: number;
|
|
934
|
-
onChange: (value: string) => void;
|
|
935
|
-
getOptions: (value: string) => Promise<AutocompleteValue[]>;
|
|
936
|
-
onPick: (value: AutocompleteValue) => void;
|
|
937
|
-
onKeyPress?: (e: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
975
|
+
disabled?: boolean;
|
|
976
|
+
/** The minimum button size will be set to the themes' formButtonMinWidth. */
|
|
977
|
+
enforceMinWidth?: boolean;
|
|
978
|
+
round?: boolean;
|
|
979
|
+
small?: boolean;
|
|
980
|
+
width?: string;
|
|
938
981
|
}
|
|
939
|
-
declare const
|
|
982
|
+
declare const ToggleButtonGroup: (props: ToggleButtonGroupProps) => JSX.Element;
|
|
983
|
+
|
|
984
|
+
interface TogglePasswordInputProps extends Omit<InputProps, 'type' | 'rightControl'> {
|
|
985
|
+
}
|
|
986
|
+
declare const TogglePasswordInput: (p: TogglePasswordInputProps) => JSX.Element;
|
|
987
|
+
|
|
988
|
+
declare const WaitingIndicator: (p: {
|
|
989
|
+
show: boolean;
|
|
990
|
+
minShowTimeMs?: number;
|
|
991
|
+
id?: string;
|
|
992
|
+
debug?: boolean;
|
|
993
|
+
}) => JSX.Element;
|
|
940
994
|
|
|
941
|
-
export { Alignment, Autocomplete, Backdrop$1 as Backdrop, Backdrop as Backdrop2, BoundMemoryPager, BoundStaticPager, Button, ButtonProps, Calendar, CalendarProps, Checkbox, CheckboxProps, ConfirmModal, ConfirmModalProps, CopyButton, DatePicker, DatePickerProps, Divider, ErrorModal, FileUploader, Form, FormColumnRow, FormFlexRow, GlobalStyles, Header, Highlight, ICONS, Icon, Image, InfoPanel, InfoTip, InfoTipProps, Input, InputProps, ItemPager, Label, LabelProps, List, ListItem, MackinTheme, Modal, Nav, OmniLink, OmniLinkProps, PagedResult, Pager, PagerProps, Picker, PickerProps, Popover, ProgressBar, ProgressBarProps, SearchBox, SearchBoxProps, Slider, TabHeader, TabHeaderProps, TabLocker, Table, Td, TdCurrency, TdNumber, Text, TextProps, Th, ThSort, ThemeProvider, ToggleButton, ToggleButtonGroup, ToggleButtonGroupProps, ToggleButtonProps, TogglePasswordInput, Tr, WaitingIndicator, calcDynamicThemeProps, defaultTheme, getCurrencyDisplay, mergeClassNames, useMediaQuery, useThemeSafely };
|
|
995
|
+
export { Alignment, Autocomplete, AutocompleteProps, AutocompleteValue, Backdrop$1 as Backdrop, Backdrop as Backdrop2, BoundMemoryPager, BoundStaticPager, Button, ButtonProps, Calendar, CalendarProps, Checkbox, CheckboxProps, ConfirmModal, ConfirmModalProps, CopyButton, DateInput, DateInputProps, DatePicker, DatePickerProps, Divider, ErrorModal, FileUploader, Form, FormColumnRow, FormFlexRow, GlobalStyles, Header, Highlight, ICONS, Icon, Image, InfoPanel, InfoTip, InfoTipProps, Input, InputProps, ItemPager, Label, LabelProps, List, ListItem, MackinTheme, Modal, Nav, NumberInput, NumberInputProps, OmniLink, OmniLinkProps, PagedResult, Pager, PagerProps, Picker, PickerProps, Popover, ProgressBar, ProgressBarProps, SearchBox, SearchBoxProps, Slider, TabHeader, TabHeaderProps, TabLocker, Table, Td, TdCurrency, TdNumber, Text, TextArea, TextAreaProps, TextInput, TextInputProps, TextProps, Th, ThSort, ThemeProvider, ToggleButton, ToggleButtonGroup, ToggleButtonGroupProps, ToggleButtonProps, TogglePasswordInput, Tr, WaitingIndicator, calcDynamicThemeProps, defaultTheme, getCurrencyDisplay, mergeClassNames, useMediaQuery, useThemeSafely };
|