@mackin.com/styleguide 4.2.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 +938 -0
- package/index.js +3126 -0
- package/package.json +30 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,938 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { IconDefinition } from '@fortawesome/fontawesome-svg-core';
|
|
5
|
+
|
|
6
|
+
declare type Alignment = 'left' | 'right' | 'center';
|
|
7
|
+
|
|
8
|
+
declare const mergeClassNames: (...classes: (string | boolean | undefined)[]) => string | undefined;
|
|
9
|
+
declare const getCurrencyDisplay: (value: number, isCents?: boolean | undefined, denomination?: string) => string;
|
|
10
|
+
|
|
11
|
+
/** @jsx jsx */
|
|
12
|
+
|
|
13
|
+
declare const Table: (props: {
|
|
14
|
+
caption?: string | JSX.Element;
|
|
15
|
+
children?: any;
|
|
16
|
+
noCellBorder?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
/** Colors alternate rows. */
|
|
19
|
+
altRows?: boolean;
|
|
20
|
+
}) => jsx.JSX.Element;
|
|
21
|
+
declare const Tr: (props: {
|
|
22
|
+
className?: string;
|
|
23
|
+
children?: any;
|
|
24
|
+
}) => jsx.JSX.Element;
|
|
25
|
+
declare const Th: (props: {
|
|
26
|
+
children?: any;
|
|
27
|
+
align?: Alignment;
|
|
28
|
+
width?: string;
|
|
29
|
+
style?: React.CSSProperties;
|
|
30
|
+
className?: string;
|
|
31
|
+
}) => jsx.JSX.Element;
|
|
32
|
+
declare const Td: (props: {
|
|
33
|
+
children?: any;
|
|
34
|
+
align?: Alignment;
|
|
35
|
+
style?: React.CSSProperties;
|
|
36
|
+
colSpan?: number;
|
|
37
|
+
}) => jsx.JSX.Element;
|
|
38
|
+
|
|
39
|
+
declare const TdCurrency: (props: {
|
|
40
|
+
value: number;
|
|
41
|
+
cents?: boolean;
|
|
42
|
+
}) => JSX.Element;
|
|
43
|
+
|
|
44
|
+
declare const TdNumber: (props: {
|
|
45
|
+
value: number;
|
|
46
|
+
}) => JSX.Element;
|
|
47
|
+
|
|
48
|
+
/** @jsx jsx */
|
|
49
|
+
|
|
50
|
+
declare const ThSort: (props: {
|
|
51
|
+
text: string | JSX.Element;
|
|
52
|
+
onClick: () => void;
|
|
53
|
+
align?: Alignment;
|
|
54
|
+
direction?: 'asc' | 'desc';
|
|
55
|
+
style?: React.CSSProperties;
|
|
56
|
+
width?: string;
|
|
57
|
+
rightContent?: JSX.Element;
|
|
58
|
+
}) => jsx.JSX.Element;
|
|
59
|
+
|
|
60
|
+
declare type SortDirection = 'asc' | 'desc';
|
|
61
|
+
interface PagerSortOption<TItem> {
|
|
62
|
+
id: string;
|
|
63
|
+
name?: string;
|
|
64
|
+
sort: (items: TItem[]) => TItem[];
|
|
65
|
+
}
|
|
66
|
+
interface PagerOptions<TItem> {
|
|
67
|
+
/** Defaults to 10. */
|
|
68
|
+
limit?: number;
|
|
69
|
+
/** Defaults to [10] */
|
|
70
|
+
limitOptions?: number[];
|
|
71
|
+
sort?: string;
|
|
72
|
+
sortOptions?: PagerSortOption<TItem>[];
|
|
73
|
+
previous?: ItemPager<TItem>;
|
|
74
|
+
}
|
|
75
|
+
/** For in-memory paging. */
|
|
76
|
+
declare class ItemPager<TItem> {
|
|
77
|
+
constructor(allItems: TItem[], options?: PagerOptions<TItem>);
|
|
78
|
+
get allItems(): TItem[];
|
|
79
|
+
/** The ID of the current sort within the sortOptions. */
|
|
80
|
+
get sort(): string | undefined;
|
|
81
|
+
set sort(sortId: string | undefined);
|
|
82
|
+
/** The direction of the current sort when using an option created from addToggleSortOption */
|
|
83
|
+
get sortDirection(): SortDirection | undefined;
|
|
84
|
+
get sortOptions(): PagerSortOption<TItem>[];
|
|
85
|
+
get limit(): number;
|
|
86
|
+
set limit(value: number);
|
|
87
|
+
get limitOptions(): number[];
|
|
88
|
+
get totalPages(): number;
|
|
89
|
+
/** The zero-based page index. */
|
|
90
|
+
get page(): number;
|
|
91
|
+
/** The zero-based page index. */
|
|
92
|
+
set page(value: number);
|
|
93
|
+
get pageItems(): TItem[];
|
|
94
|
+
get totalItems(): number;
|
|
95
|
+
get minItemIndex(): number;
|
|
96
|
+
get maxItemIndex(): number;
|
|
97
|
+
get hasNext(): boolean;
|
|
98
|
+
get hasPrevious(): boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Adds both asc and des sort options
|
|
101
|
+
*
|
|
102
|
+
* @param propPath Prop name or path ('resource.title').
|
|
103
|
+
* @param name Name to display or asc Name and desc Name.
|
|
104
|
+
*/
|
|
105
|
+
addToggleSortOption(propPath: string, name?: string | [string, string]): void;
|
|
106
|
+
/**
|
|
107
|
+
* Toggles between asc and desc.
|
|
108
|
+
* @param sortId The ID or partial ID (no '-asc' or '-desc') of a sort option created through addToggleSortOption
|
|
109
|
+
*/
|
|
110
|
+
toggleSort(sortId: string): void;
|
|
111
|
+
applyFilter(filter?: (item: TItem) => boolean, keepPage?: boolean): void;
|
|
112
|
+
next(): void;
|
|
113
|
+
previous(): void;
|
|
114
|
+
pageByOffset(direction: 1 | -1): void;
|
|
115
|
+
/** Adds the item optionally keeping the current page. */
|
|
116
|
+
add(item: TItem, position?: 'start' | 'end', keepPage?: boolean): void;
|
|
117
|
+
/** Removes the matched item(s). */
|
|
118
|
+
remove(comparer: (item: TItem) => boolean, keepPage?: boolean): void;
|
|
119
|
+
replace(newItem: TItem, comparer: (item: TItem) => boolean): void;
|
|
120
|
+
private _allItems;
|
|
121
|
+
private _page;
|
|
122
|
+
private _limit;
|
|
123
|
+
private _limitOptions;
|
|
124
|
+
private _pageResult;
|
|
125
|
+
private _filteredItems;
|
|
126
|
+
private _sort;
|
|
127
|
+
private _sortOptions;
|
|
128
|
+
private _currentFilter;
|
|
129
|
+
private createPageResult;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** @jsx jsx */
|
|
133
|
+
|
|
134
|
+
interface PagerStyleProps {
|
|
135
|
+
/** Used for localizations. Defaults to 'of' */
|
|
136
|
+
itemDividerText?: string;
|
|
137
|
+
/** Used for localizations. Defaults to 'No Results' */
|
|
138
|
+
noResultsText?: string;
|
|
139
|
+
/** Used for localizations. Defaults to 'Page' */
|
|
140
|
+
pageText?: string;
|
|
141
|
+
rounded?: boolean;
|
|
142
|
+
className?: string;
|
|
143
|
+
leftControls?: JSX.Element;
|
|
144
|
+
rightControls?: JSX.Element;
|
|
145
|
+
}
|
|
146
|
+
interface PagerProps extends PagerStyleProps {
|
|
147
|
+
canGoNext: boolean;
|
|
148
|
+
canGoPrevious: boolean;
|
|
149
|
+
minItem: number;
|
|
150
|
+
maxItem: number;
|
|
151
|
+
totalItems: number;
|
|
152
|
+
page: (direction: 1 | -1) => void;
|
|
153
|
+
/** For display purposes. Will show under items text if this if present. */
|
|
154
|
+
pageIndex?: number;
|
|
155
|
+
/** For display purposes. Will show under items text if this if present. */
|
|
156
|
+
totalPages?: number;
|
|
157
|
+
}
|
|
158
|
+
declare const Pager: (props: PagerProps) => jsx.JSX.Element;
|
|
159
|
+
|
|
160
|
+
interface Props$2<T> extends PagerStyleProps {
|
|
161
|
+
pager: ItemPager<T>;
|
|
162
|
+
onPage: (direction: 1 | -1) => void;
|
|
163
|
+
/** Defaults to 'Limit' */
|
|
164
|
+
limitText?: string;
|
|
165
|
+
/** Defaults to 'Sort' */
|
|
166
|
+
sortText?: string;
|
|
167
|
+
onLimit?: (limit: number) => void;
|
|
168
|
+
onSort?: (sort: string) => void;
|
|
169
|
+
/** Shows 'Page X of Y'. */
|
|
170
|
+
showPageText?: boolean;
|
|
171
|
+
}
|
|
172
|
+
declare const BoundMemoryPager: <T>(p: Props$2<T>) => JSX.Element;
|
|
173
|
+
|
|
174
|
+
/** @jsx jsx */
|
|
175
|
+
|
|
176
|
+
declare type ButtonVariant = 'label' | 'circle' | 'icon' | 'link' | 'inlineLink' | 'primary' | 'secondary' | 'omg' | 'primary2' | 'positive' | 'negative';
|
|
177
|
+
interface ButtonProps {
|
|
178
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
179
|
+
onMouseLeave?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
180
|
+
onMouseEnter?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
181
|
+
onFocus?: (event: React.FocusEvent<HTMLButtonElement>) => void;
|
|
182
|
+
onBlur?: (event: React.FocusEvent<HTMLButtonElement>) => void;
|
|
183
|
+
type?: 'button' | 'submit';
|
|
184
|
+
children?: any;
|
|
185
|
+
style?: React.CSSProperties;
|
|
186
|
+
variant?: ButtonVariant;
|
|
187
|
+
/** Defaults to 'center'. */
|
|
188
|
+
textAlign?: 'left' | 'center' | 'right';
|
|
189
|
+
block?: boolean;
|
|
190
|
+
/** As round as can be. */
|
|
191
|
+
round?: boolean;
|
|
192
|
+
/** Just taking the edge off. */
|
|
193
|
+
rounded?: boolean;
|
|
194
|
+
className?: string;
|
|
195
|
+
rightIcon?: JSX.Element;
|
|
196
|
+
leftIcon?: JSX.Element;
|
|
197
|
+
/** full width with max space between the text and the icon */
|
|
198
|
+
iconBlock?: boolean;
|
|
199
|
+
small?: boolean;
|
|
200
|
+
disabled?: boolean;
|
|
201
|
+
/** The button will not respond to click or mouse events, but it will appear normal. */
|
|
202
|
+
readonly?: boolean;
|
|
203
|
+
waiting?: boolean;
|
|
204
|
+
/** The minimum button size will be set to the themes' formButtonMinWidth. */
|
|
205
|
+
enforceMinWidth?: boolean;
|
|
206
|
+
title?: string;
|
|
207
|
+
tabIndex?: number;
|
|
208
|
+
id?: string;
|
|
209
|
+
}
|
|
210
|
+
declare const Button: (props: ButtonProps) => jsx.JSX.Element;
|
|
211
|
+
|
|
212
|
+
/** @jsx jsx */
|
|
213
|
+
|
|
214
|
+
interface CheckboxProps {
|
|
215
|
+
checked: boolean;
|
|
216
|
+
onChange: (checked: boolean) => void;
|
|
217
|
+
label?: string;
|
|
218
|
+
children?: React.ReactNode;
|
|
219
|
+
className?: string;
|
|
220
|
+
checkedIcon?: string;
|
|
221
|
+
uncheckedIcon?: string;
|
|
222
|
+
disabled?: boolean;
|
|
223
|
+
readonly?: boolean;
|
|
224
|
+
}
|
|
225
|
+
declare const Checkbox: (props: CheckboxProps) => jsx.JSX.Element;
|
|
226
|
+
|
|
227
|
+
/** @jsx jsx */
|
|
228
|
+
|
|
229
|
+
interface ConfirmModalProps {
|
|
230
|
+
show: boolean;
|
|
231
|
+
text: string;
|
|
232
|
+
header: string;
|
|
233
|
+
onCancel: () => void;
|
|
234
|
+
onConfirm: () => void;
|
|
235
|
+
confirmText?: string;
|
|
236
|
+
cancelText?: string;
|
|
237
|
+
className?: string;
|
|
238
|
+
variant?: 'omg';
|
|
239
|
+
}
|
|
240
|
+
declare const ConfirmModal: (props: ConfirmModalProps) => jsx.JSX.Element;
|
|
241
|
+
|
|
242
|
+
/** @jsx jsx */
|
|
243
|
+
|
|
244
|
+
declare const Divider: (props: {}) => jsx.JSX.Element;
|
|
245
|
+
|
|
246
|
+
/** @jsx jsx */
|
|
247
|
+
|
|
248
|
+
declare const ErrorModal: (props: {
|
|
249
|
+
message: string;
|
|
250
|
+
show: boolean;
|
|
251
|
+
close: () => void;
|
|
252
|
+
}) => jsx.JSX.Element;
|
|
253
|
+
|
|
254
|
+
/** @jsx jsx */
|
|
255
|
+
|
|
256
|
+
interface FilePickerProps {
|
|
257
|
+
maxBytes?: number;
|
|
258
|
+
multiple?: boolean;
|
|
259
|
+
accept?: string;
|
|
260
|
+
/** Defaults to 'Choose File(s)'. */
|
|
261
|
+
buttonText?: string;
|
|
262
|
+
/** If the handler returns true, the native file input will be cleared. */
|
|
263
|
+
onChange?: (files: FileList | undefined) => boolean | undefined;
|
|
264
|
+
/**
|
|
265
|
+
* Used the facilitate communication between the FilePicker and FileUploader.
|
|
266
|
+
* Temp solution until we merge both together. Don't use! */
|
|
267
|
+
__passClearFilesHandle?: (func: () => void) => void;
|
|
268
|
+
}
|
|
269
|
+
/** Basic implementation here for later abstraction. */
|
|
270
|
+
declare const FilePicker: (props: FilePickerProps) => jsx.JSX.Element;
|
|
271
|
+
|
|
272
|
+
/** @jsx jsx */
|
|
273
|
+
|
|
274
|
+
interface IProps extends React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement> {
|
|
275
|
+
inline?: boolean;
|
|
276
|
+
}
|
|
277
|
+
/** Use this instead of <form> directly. If we need to fight Chrome's autofill, we can do so at a global level. */
|
|
278
|
+
declare const Form: (props: IProps) => jsx.JSX.Element;
|
|
279
|
+
declare const FormFlexRow: (props: {
|
|
280
|
+
children: React.ReactNode;
|
|
281
|
+
className?: string;
|
|
282
|
+
style?: React.CSSProperties;
|
|
283
|
+
justifyContent?: "space-around" | "space-between" | "space-evenly" | "stretch" | "center" | "end" | "flex-end" | "flex-start" | "start";
|
|
284
|
+
}) => jsx.JSX.Element;
|
|
285
|
+
declare const FormColumnRow: (props: {
|
|
286
|
+
children: React.ReactNode;
|
|
287
|
+
cols: number;
|
|
288
|
+
className?: string;
|
|
289
|
+
style?: React.CSSProperties;
|
|
290
|
+
}) => jsx.JSX.Element;
|
|
291
|
+
|
|
292
|
+
/** @jsx jsx */
|
|
293
|
+
|
|
294
|
+
declare const Header: (props: {
|
|
295
|
+
title?: string | JSX.Element;
|
|
296
|
+
toggleMenu?: () => void | undefined;
|
|
297
|
+
/** If true, will hide menu button on larger screens */
|
|
298
|
+
responsive?: boolean;
|
|
299
|
+
rightElements?: JSX.Element;
|
|
300
|
+
inline?: boolean;
|
|
301
|
+
className?: string;
|
|
302
|
+
centerOffsetElements?: JSX.Element;
|
|
303
|
+
noMenu?: boolean;
|
|
304
|
+
/** Will fill the title center aligned with wrapping. */
|
|
305
|
+
fillTitle?: boolean;
|
|
306
|
+
}) => jsx.JSX.Element;
|
|
307
|
+
|
|
308
|
+
/** @jsx jsx */
|
|
309
|
+
|
|
310
|
+
declare const Highlight: (props: {
|
|
311
|
+
text: string;
|
|
312
|
+
highlightText: string;
|
|
313
|
+
}) => jsx.JSX.Element;
|
|
314
|
+
|
|
315
|
+
declare const ICONS: {
|
|
316
|
+
[key: string]: IconDefinition;
|
|
317
|
+
};
|
|
318
|
+
declare const Icon: (props: {
|
|
319
|
+
id: string;
|
|
320
|
+
className?: string | undefined;
|
|
321
|
+
spin?: boolean | undefined;
|
|
322
|
+
style?: React.CSSProperties | undefined;
|
|
323
|
+
onClick?: ((e: React.MouseEvent<SVGSVGElement | HTMLElement, MouseEvent>) => void) | undefined;
|
|
324
|
+
}) => JSX.Element;
|
|
325
|
+
|
|
326
|
+
/** @jsx jsx */
|
|
327
|
+
|
|
328
|
+
declare const Image: (props: {
|
|
329
|
+
src: string;
|
|
330
|
+
alt: string;
|
|
331
|
+
className?: string;
|
|
332
|
+
style?: React.CSSProperties;
|
|
333
|
+
}) => jsx.JSX.Element;
|
|
334
|
+
|
|
335
|
+
/** @jsx jsx */
|
|
336
|
+
|
|
337
|
+
declare const InfoPanel: (props: {
|
|
338
|
+
children: React.ReactNode;
|
|
339
|
+
variant?: 'info' | 'warning' | 'error' | 'negative' | 'positive';
|
|
340
|
+
className?: string;
|
|
341
|
+
style?: React.CSSProperties;
|
|
342
|
+
}) => jsx.JSX.Element;
|
|
343
|
+
|
|
344
|
+
/** @jsx jsx */
|
|
345
|
+
|
|
346
|
+
interface InfoTipProps {
|
|
347
|
+
content?: string | JSX.Element;
|
|
348
|
+
disabled?: boolean;
|
|
349
|
+
onClick?: () => void;
|
|
350
|
+
tabIndex?: number;
|
|
351
|
+
loadOnHover?: () => Promise<void>;
|
|
352
|
+
onClose?: () => void;
|
|
353
|
+
/** Defaults to 'info'. */
|
|
354
|
+
variant?: 'info' | 'modal';
|
|
355
|
+
modalHeader?: string;
|
|
356
|
+
/** Defaults to nav color. */
|
|
357
|
+
bgColor?: string;
|
|
358
|
+
/** Defaults to nav font color. */
|
|
359
|
+
fontColor?: string;
|
|
360
|
+
}
|
|
361
|
+
declare const InfoTip: (props: InfoTipProps) => jsx.JSX.Element;
|
|
362
|
+
|
|
363
|
+
/** @jsx jsx */
|
|
364
|
+
|
|
365
|
+
declare type InputValue = string | number | undefined;
|
|
366
|
+
declare type InputType = 'text' | 'number' | 'textarea' | 'date' | 'password';
|
|
367
|
+
interface InputProps {
|
|
368
|
+
type: InputType;
|
|
369
|
+
style?: React.CSSProperties;
|
|
370
|
+
value?: InputValue;
|
|
371
|
+
rounded?: boolean;
|
|
372
|
+
placeholder?: string;
|
|
373
|
+
id?: string;
|
|
374
|
+
disabled?: boolean;
|
|
375
|
+
className?: string;
|
|
376
|
+
inputClassName?: string;
|
|
377
|
+
readOnly?: boolean;
|
|
378
|
+
required?: boolean;
|
|
379
|
+
/** Defaults to 250ms */
|
|
380
|
+
debounceMs?: number;
|
|
381
|
+
/** Called with debounce when the input changes. */
|
|
382
|
+
onChange?: (value: InputValue) => void;
|
|
383
|
+
onFocus?: (event: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
384
|
+
onBlur?: (event: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
385
|
+
/** Defaults to 100. Ignored for type=number and type=date. */
|
|
386
|
+
maxLength?: number;
|
|
387
|
+
/** Ignored for type=textarea. */
|
|
388
|
+
rightControl?: JSX.Element;
|
|
389
|
+
/** Ignored for type=textarea. */
|
|
390
|
+
round?: boolean;
|
|
391
|
+
/** Only used for type=number and type=date. If type=date, this is the ms from Date.valueOf(). */
|
|
392
|
+
min?: number;
|
|
393
|
+
/** Only used for type=number. If type=date, this is the ms from Date.valueOf(). */
|
|
394
|
+
max?: number;
|
|
395
|
+
/** Only used for type=textarea. Defaults to 10. */
|
|
396
|
+
rows?: number;
|
|
397
|
+
}
|
|
398
|
+
declare const Input: (props: InputProps) => jsx.JSX.Element;
|
|
399
|
+
|
|
400
|
+
/** @jsx jsx */
|
|
401
|
+
|
|
402
|
+
interface LabelProps {
|
|
403
|
+
text: string | JSX.Element;
|
|
404
|
+
children: React.ReactNode;
|
|
405
|
+
static?: boolean;
|
|
406
|
+
htmlFor?: string;
|
|
407
|
+
/** Defaults to 'vertical'. */
|
|
408
|
+
orientation?: 'vertical' | 'horizontal' | 'horizontalReverse';
|
|
409
|
+
/** The alignment of the label text. Defaults to 'left'. Ignored for horizontal and horizontalReverse orientation. */
|
|
410
|
+
align?: 'left' | 'right' | 'center';
|
|
411
|
+
className?: string;
|
|
412
|
+
/** Don't wrap the children in the <label>. Fixes re-focus bugs with the date picker and possible future libraries. */
|
|
413
|
+
noWrap?: boolean;
|
|
414
|
+
/** Smaller text next to the main label. */
|
|
415
|
+
subText?: string | JSX.Element;
|
|
416
|
+
/** Indicates the control this label wraps is optional. Mutually exclusive with subText. */
|
|
417
|
+
optional?: boolean;
|
|
418
|
+
/** Used with static. Will put label text in the same position it would be if there was an input around it. For lining up forms. */
|
|
419
|
+
controlAlign?: boolean;
|
|
420
|
+
}
|
|
421
|
+
declare const Label: (props: LabelProps) => jsx.JSX.Element;
|
|
422
|
+
|
|
423
|
+
/** @jsx jsx */
|
|
424
|
+
|
|
425
|
+
declare const List: (props: {
|
|
426
|
+
children?: any;
|
|
427
|
+
altRowColor?: boolean;
|
|
428
|
+
noLines?: boolean;
|
|
429
|
+
className?: string;
|
|
430
|
+
items?: (string | JSX.Element)[];
|
|
431
|
+
}) => jsx.JSX.Element;
|
|
432
|
+
declare const ListItem: (props: {
|
|
433
|
+
children?: any;
|
|
434
|
+
id?: string | number;
|
|
435
|
+
/** For variant 'full', the content will take up the entire space of the parent (no padding applied by this component). */
|
|
436
|
+
variant?: 'full';
|
|
437
|
+
className?: string;
|
|
438
|
+
}) => jsx.JSX.Element;
|
|
439
|
+
|
|
440
|
+
/** @jsx jsx */
|
|
441
|
+
|
|
442
|
+
interface ModalProps {
|
|
443
|
+
show: boolean;
|
|
444
|
+
children: React.ReactNode;
|
|
445
|
+
close?: () => void;
|
|
446
|
+
noBackground?: boolean;
|
|
447
|
+
closeButton?: boolean;
|
|
448
|
+
heading?: string;
|
|
449
|
+
className?: string;
|
|
450
|
+
scrollable?: boolean;
|
|
451
|
+
id?: string;
|
|
452
|
+
/** Defaults to theme.breakpoints.tablet. */
|
|
453
|
+
maxWidth?: string;
|
|
454
|
+
minWidth?: string;
|
|
455
|
+
/** Selector of the element to focus on initial show. */
|
|
456
|
+
focusSelector?: string;
|
|
457
|
+
}
|
|
458
|
+
declare const Modal: (props: ModalProps) => jsx.JSX.Element;
|
|
459
|
+
|
|
460
|
+
/** @jsx jsx */
|
|
461
|
+
|
|
462
|
+
declare const Nav: (props: {
|
|
463
|
+
show: boolean;
|
|
464
|
+
toggle: () => void;
|
|
465
|
+
children?: React.ReactNode;
|
|
466
|
+
responsive?: boolean;
|
|
467
|
+
className?: string;
|
|
468
|
+
}) => jsx.JSX.Element;
|
|
469
|
+
|
|
470
|
+
/** @jsx jsx */
|
|
471
|
+
|
|
472
|
+
interface OmniLinkProps {
|
|
473
|
+
href: string;
|
|
474
|
+
children: React.ReactNode;
|
|
475
|
+
onClick?: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void;
|
|
476
|
+
className?: string;
|
|
477
|
+
noRouter?: boolean;
|
|
478
|
+
/** Ignored if 'noRouter' is false */
|
|
479
|
+
target?: string;
|
|
480
|
+
rightIcon?: JSX.Element;
|
|
481
|
+
leftIcon?: JSX.Element;
|
|
482
|
+
block?: boolean;
|
|
483
|
+
/** Full width with max space between the text and the icon */
|
|
484
|
+
iconBlock?: boolean;
|
|
485
|
+
/** Corresponds to the button variants of the same name. */
|
|
486
|
+
variant?: 'button' | 'label' | 'icon' | 'circle' | 'primary' | 'secondary' | 'omg' | 'primary2' | 'positive' | 'negative';
|
|
487
|
+
title?: string;
|
|
488
|
+
/** Only for button variants. */
|
|
489
|
+
round?: boolean;
|
|
490
|
+
/** Only for button variants. */
|
|
491
|
+
rounded?: boolean;
|
|
492
|
+
/** Only for button variants. */
|
|
493
|
+
small?: boolean;
|
|
494
|
+
/** Overrides the default color (theme.colors.link) for non-button variants. To be used under exceptional circumstances. To change all link colors, override theme.colors.link directly. */
|
|
495
|
+
colorOverride?: string;
|
|
496
|
+
}
|
|
497
|
+
declare const OmniLink: (props: OmniLinkProps) => jsx.JSX.Element;
|
|
498
|
+
|
|
499
|
+
/** @jsx jsx */
|
|
500
|
+
|
|
501
|
+
declare type PickerValue = string | number;
|
|
502
|
+
interface PickerProps<T extends PickerValue> {
|
|
503
|
+
type: 'select';
|
|
504
|
+
value: T;
|
|
505
|
+
options: (T | {
|
|
506
|
+
id: T;
|
|
507
|
+
name?: string;
|
|
508
|
+
})[];
|
|
509
|
+
onChange: (value: T) => void;
|
|
510
|
+
id?: string;
|
|
511
|
+
rounded?: boolean;
|
|
512
|
+
disabled?: boolean;
|
|
513
|
+
className?: string;
|
|
514
|
+
readonly?: boolean;
|
|
515
|
+
}
|
|
516
|
+
declare const Picker: <T extends PickerValue>(props: PickerProps<T>) => jsx.JSX.Element | null;
|
|
517
|
+
|
|
518
|
+
/** @jsx jsx */
|
|
519
|
+
|
|
520
|
+
interface ProgressBarProps {
|
|
521
|
+
pct: number;
|
|
522
|
+
round?: boolean;
|
|
523
|
+
showPct?: boolean;
|
|
524
|
+
className?: string;
|
|
525
|
+
}
|
|
526
|
+
declare const ProgressBar: (props: {
|
|
527
|
+
pct: number;
|
|
528
|
+
round?: boolean;
|
|
529
|
+
showPct?: boolean;
|
|
530
|
+
className?: string;
|
|
531
|
+
}) => jsx.JSX.Element;
|
|
532
|
+
|
|
533
|
+
/** @jsx jsx */
|
|
534
|
+
|
|
535
|
+
interface SearchBoxProps {
|
|
536
|
+
value: string | undefined;
|
|
537
|
+
onChange: (value: string | undefined | number) => void;
|
|
538
|
+
placeholder?: string;
|
|
539
|
+
round?: boolean;
|
|
540
|
+
rounded?: boolean;
|
|
541
|
+
className?: string;
|
|
542
|
+
onSubmit?: () => Promise<void>;
|
|
543
|
+
}
|
|
544
|
+
declare const SearchBox: (props: SearchBoxProps) => jsx.JSX.Element;
|
|
545
|
+
|
|
546
|
+
interface TextProps {
|
|
547
|
+
children: any;
|
|
548
|
+
/** Defaults to 'p'. */
|
|
549
|
+
tag?: 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'span' | 'div';
|
|
550
|
+
align?: Alignment;
|
|
551
|
+
bold?: boolean;
|
|
552
|
+
italics?: boolean;
|
|
553
|
+
className?: string;
|
|
554
|
+
/** You will need to set a width or max-width on the element for this to work. */
|
|
555
|
+
ellipsis?: boolean;
|
|
556
|
+
style?: React.CSSProperties;
|
|
557
|
+
smaller?: boolean;
|
|
558
|
+
larger?: boolean;
|
|
559
|
+
spacedOut?: boolean;
|
|
560
|
+
lineClamp?: number;
|
|
561
|
+
/** Will remove all margin/padding from specified tag */
|
|
562
|
+
noPad?: boolean;
|
|
563
|
+
leftPad?: string;
|
|
564
|
+
}
|
|
565
|
+
declare const Text: (props: TextProps) => React.DetailedReactHTMLElement<{
|
|
566
|
+
style: React.CSSProperties;
|
|
567
|
+
className: string | undefined;
|
|
568
|
+
}, HTMLElement>;
|
|
569
|
+
|
|
570
|
+
declare type ToggleButtonVariant = 'primary' | 'secondary' | 'omg' | 'primary2' | 'positive' | 'negative';
|
|
571
|
+
interface ToggleButtonProps {
|
|
572
|
+
checked: boolean;
|
|
573
|
+
checkedText: string;
|
|
574
|
+
uncheckedText: string;
|
|
575
|
+
onClick: (event?: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
576
|
+
className?: string;
|
|
577
|
+
checkedClassName?: string;
|
|
578
|
+
disabled?: boolean;
|
|
579
|
+
/** The minimum button size will be set to the themes' formButtonMinWidth. */
|
|
580
|
+
enforceMinWidth?: boolean;
|
|
581
|
+
checkedIcon?: JSX.Element;
|
|
582
|
+
uncheckedIcon?: JSX.Element;
|
|
583
|
+
variant?: ToggleButtonVariant;
|
|
584
|
+
checkedVariant?: ToggleButtonVariant;
|
|
585
|
+
style?: React.CSSProperties;
|
|
586
|
+
checkedStyle?: React.CSSProperties;
|
|
587
|
+
}
|
|
588
|
+
declare const ToggleButton: (props: ToggleButtonProps) => JSX.Element;
|
|
589
|
+
|
|
590
|
+
/** @jsx jsx */
|
|
591
|
+
|
|
592
|
+
interface ToggleButtonGroupProps {
|
|
593
|
+
value: string | number;
|
|
594
|
+
options: {
|
|
595
|
+
id: string | number;
|
|
596
|
+
name: string | JSX.Element;
|
|
597
|
+
rightIcon?: JSX.Element;
|
|
598
|
+
activeClass?: string;
|
|
599
|
+
}[];
|
|
600
|
+
onChange: (value: string | number) => void;
|
|
601
|
+
className?: string;
|
|
602
|
+
disabled?: boolean;
|
|
603
|
+
/** The minimum button size will be set to the themes' formButtonMinWidth. */
|
|
604
|
+
enforceMinWidth?: boolean;
|
|
605
|
+
round?: boolean;
|
|
606
|
+
small?: boolean;
|
|
607
|
+
width?: string;
|
|
608
|
+
}
|
|
609
|
+
declare const ToggleButtonGroup: (props: ToggleButtonGroupProps) => jsx.JSX.Element;
|
|
610
|
+
|
|
611
|
+
/** @jsx jsx */
|
|
612
|
+
|
|
613
|
+
declare const WaitingIndicator: (props: {
|
|
614
|
+
show: boolean;
|
|
615
|
+
}) => jsx.JSX.Element;
|
|
616
|
+
|
|
617
|
+
/** @jsx jsx */
|
|
618
|
+
|
|
619
|
+
interface CalendarProps {
|
|
620
|
+
month: number;
|
|
621
|
+
year: number;
|
|
622
|
+
/** Defaults to 3rem. */
|
|
623
|
+
cellSize?: string;
|
|
624
|
+
smallHeader?: boolean;
|
|
625
|
+
id?: string;
|
|
626
|
+
/** Defaults to true. */
|
|
627
|
+
title?: boolean;
|
|
628
|
+
yearInTitle?: boolean;
|
|
629
|
+
/** Ignored if title is set to false. */
|
|
630
|
+
customTitle?: JSX.Element;
|
|
631
|
+
/** If true, will always show 6 rows / 42 cells. */
|
|
632
|
+
fixedRows?: boolean;
|
|
633
|
+
/** Bolds the current date. */
|
|
634
|
+
showCurrent?: boolean;
|
|
635
|
+
selectedValue?: number;
|
|
636
|
+
/** Renders custom content for each cell. The content will be wrapped in a button if onClick is provided. */
|
|
637
|
+
renderCell?: (date: Date) => JSX.Element;
|
|
638
|
+
/** Used with renderCell with onClick is provided. Will not wrap the cell contents in a button. */
|
|
639
|
+
isCellDisabled?: (date: Date) => boolean;
|
|
640
|
+
onClick?: (date: Date) => void;
|
|
641
|
+
/** This is the ms from Date.valueOf(). */
|
|
642
|
+
min?: number;
|
|
643
|
+
/** This is the ms from Date.valueOf(). */
|
|
644
|
+
max?: number;
|
|
645
|
+
}
|
|
646
|
+
declare const Calendar: (p: CalendarProps) => jsx.JSX.Element;
|
|
647
|
+
|
|
648
|
+
/** @jsx jsx */
|
|
649
|
+
|
|
650
|
+
interface DatePickerProps {
|
|
651
|
+
value: number | undefined;
|
|
652
|
+
/** Called with debounce when the input changes. */
|
|
653
|
+
onChange: (value: number | undefined) => void;
|
|
654
|
+
style?: React.CSSProperties;
|
|
655
|
+
/** Defaults to MM/DD/YYYY. */
|
|
656
|
+
placeholder?: string;
|
|
657
|
+
id?: string;
|
|
658
|
+
disabled?: boolean;
|
|
659
|
+
className?: string;
|
|
660
|
+
inputClassName?: string;
|
|
661
|
+
readOnly?: boolean;
|
|
662
|
+
required?: boolean;
|
|
663
|
+
/** Defaults to 250ms */
|
|
664
|
+
debounceMs?: number;
|
|
665
|
+
rounded?: boolean;
|
|
666
|
+
round?: boolean;
|
|
667
|
+
/** This is the ms from Date.valueOf(). */
|
|
668
|
+
min?: number;
|
|
669
|
+
/** This is the ms from Date.valueOf(). */
|
|
670
|
+
max?: number;
|
|
671
|
+
/** Whether to move the popover on collision with the parent's bounds. Default is true. */
|
|
672
|
+
reposition?: boolean;
|
|
673
|
+
}
|
|
674
|
+
declare const DatePicker: (p: DatePickerProps) => jsx.JSX.Element;
|
|
675
|
+
|
|
676
|
+
/** @jsx jsx */
|
|
677
|
+
|
|
678
|
+
interface TabHeaderTabProps {
|
|
679
|
+
name: string;
|
|
680
|
+
}
|
|
681
|
+
interface TabHeaderProps {
|
|
682
|
+
tabs: TabHeaderTabProps[];
|
|
683
|
+
id?: string;
|
|
684
|
+
rounded?: boolean;
|
|
685
|
+
/** Defaults to 10rem. */
|
|
686
|
+
maxTabWidth?: string;
|
|
687
|
+
onTabChanged?: (tabIndex: number) => void;
|
|
688
|
+
/** Defaults to 'tab'. */
|
|
689
|
+
variant?: 'tab' | 'button';
|
|
690
|
+
}
|
|
691
|
+
declare const TabHeader: (p: TabHeaderProps) => jsx.JSX.Element;
|
|
692
|
+
|
|
693
|
+
interface Props$1 {
|
|
694
|
+
}
|
|
695
|
+
declare const GlobalStyles: (p: Props$1) => JSX.Element;
|
|
696
|
+
|
|
697
|
+
interface MackinTheme {
|
|
698
|
+
colors: {
|
|
699
|
+
primary: string;
|
|
700
|
+
primaryFont: string;
|
|
701
|
+
primary2: string;
|
|
702
|
+
primary2Font: string;
|
|
703
|
+
secondary: string;
|
|
704
|
+
secondary2Font: string;
|
|
705
|
+
info: string;
|
|
706
|
+
infoFont: string;
|
|
707
|
+
warning: string;
|
|
708
|
+
warningFont: string;
|
|
709
|
+
positive: string;
|
|
710
|
+
positiveFont: string;
|
|
711
|
+
negative: string;
|
|
712
|
+
negativeFont: string;
|
|
713
|
+
omg: string;
|
|
714
|
+
omgFont: string;
|
|
715
|
+
bg: string;
|
|
716
|
+
lightBg: string;
|
|
717
|
+
font: string;
|
|
718
|
+
header: string;
|
|
719
|
+
headerFont: string;
|
|
720
|
+
link: string;
|
|
721
|
+
border: string;
|
|
722
|
+
divider: string;
|
|
723
|
+
nav: string;
|
|
724
|
+
navFont: string;
|
|
725
|
+
focusOutline: string;
|
|
726
|
+
focusOutlineRequired: string;
|
|
727
|
+
progressBg: string;
|
|
728
|
+
progressFill: string;
|
|
729
|
+
modalBg: string;
|
|
730
|
+
disabled: string;
|
|
731
|
+
textHighlight: string;
|
|
732
|
+
required: string;
|
|
733
|
+
backdrop: string;
|
|
734
|
+
pagerBg: string;
|
|
735
|
+
[key: string]: string;
|
|
736
|
+
};
|
|
737
|
+
fonts: {
|
|
738
|
+
family: string;
|
|
739
|
+
size: string;
|
|
740
|
+
headerFamily: string;
|
|
741
|
+
};
|
|
742
|
+
controls: {
|
|
743
|
+
padding: string;
|
|
744
|
+
fontSize: string;
|
|
745
|
+
borderWidth: string;
|
|
746
|
+
border: string;
|
|
747
|
+
height: string;
|
|
748
|
+
heightSmall: string;
|
|
749
|
+
boxShadow: string;
|
|
750
|
+
hoverBrightness: string;
|
|
751
|
+
transitionDuration: string;
|
|
752
|
+
transitionEasing: string;
|
|
753
|
+
transition: string;
|
|
754
|
+
focusOutlineShadow: string;
|
|
755
|
+
focusOutlineRequiredShadow: string;
|
|
756
|
+
roundRadius: string;
|
|
757
|
+
roundedRadius: string;
|
|
758
|
+
disabledOpacity: string;
|
|
759
|
+
formButtonMinWidth: string;
|
|
760
|
+
gap: string;
|
|
761
|
+
dividerMargin: string;
|
|
762
|
+
dividerBorder: string;
|
|
763
|
+
headerBoxShadow: string;
|
|
764
|
+
};
|
|
765
|
+
zIndexes: {
|
|
766
|
+
header: number;
|
|
767
|
+
backdrop: number;
|
|
768
|
+
nav: number;
|
|
769
|
+
flyout: number;
|
|
770
|
+
modal: number;
|
|
771
|
+
tooltip: number;
|
|
772
|
+
};
|
|
773
|
+
layout: {
|
|
774
|
+
headerHeight: string;
|
|
775
|
+
headerBodyOffset: string;
|
|
776
|
+
navWidth: string;
|
|
777
|
+
};
|
|
778
|
+
breakpoints: {
|
|
779
|
+
desktop: string;
|
|
780
|
+
tablet: string;
|
|
781
|
+
};
|
|
782
|
+
}
|
|
783
|
+
/** Call this on your theme after messing with the props. It will re-build things that depend on sizes and colors. */
|
|
784
|
+
declare const calcDynamicThemeProps: <T extends MackinTheme>(theme: T) => void;
|
|
785
|
+
declare const defaultTheme: MackinTheme;
|
|
786
|
+
|
|
787
|
+
/** Returns a user-provided theme if ThemeProvider was used correctly, or the default theme. */
|
|
788
|
+
declare const useThemeSafely: () => MackinTheme;
|
|
789
|
+
|
|
790
|
+
/** @jsx jsx */
|
|
791
|
+
|
|
792
|
+
declare const Backdrop: (props: {
|
|
793
|
+
show: boolean;
|
|
794
|
+
onClick?: () => void;
|
|
795
|
+
transparent?: boolean;
|
|
796
|
+
/** If true, the backdrop will hide on larger screens. */
|
|
797
|
+
responsive?: boolean;
|
|
798
|
+
/** If true, the backdrop will hide on smaller screens. */
|
|
799
|
+
reverseResponsive?: boolean;
|
|
800
|
+
children?: React.ReactNode;
|
|
801
|
+
className?: string;
|
|
802
|
+
/** If true, will not prevent scroll when shown. */
|
|
803
|
+
allowScroll?: boolean;
|
|
804
|
+
}) => jsx.JSX.Element;
|
|
805
|
+
|
|
806
|
+
declare const TabLocker: (props: {
|
|
807
|
+
disabled?: boolean;
|
|
808
|
+
children?: React.ReactNode;
|
|
809
|
+
style?: React.CSSProperties;
|
|
810
|
+
}) => JSX.Element;
|
|
811
|
+
|
|
812
|
+
/** @jsx jsx */
|
|
813
|
+
|
|
814
|
+
interface FileUploaderProps extends FilePickerProps {
|
|
815
|
+
onUpload: (files: FileList) => Promise<void>;
|
|
816
|
+
/** Defaults to 'Upload'. */
|
|
817
|
+
buttonText?: string;
|
|
818
|
+
/** Defauts to 'Upload successful'. */
|
|
819
|
+
successMessage?: string | JSX.Element;
|
|
820
|
+
/** Defaults to 'Upload failed.' */
|
|
821
|
+
failureMessage?: string | JSX.Element;
|
|
822
|
+
/** Defaults to 10rem. */
|
|
823
|
+
buttonWidth?: string;
|
|
824
|
+
/** Defaults to 'primary'. */
|
|
825
|
+
buttonVariant?: ButtonVariant;
|
|
826
|
+
/** Will clear all files on upload success. */
|
|
827
|
+
clearOnUpload?: boolean;
|
|
828
|
+
}
|
|
829
|
+
declare const FileUploader: (p: FileUploaderProps) => jsx.JSX.Element;
|
|
830
|
+
|
|
831
|
+
interface CopyButtonProps {
|
|
832
|
+
/** HTML selector of the target input to copy from. */
|
|
833
|
+
selector: string;
|
|
834
|
+
title?: string;
|
|
835
|
+
}
|
|
836
|
+
declare const CopyButton: (props: CopyButtonProps) => JSX.Element;
|
|
837
|
+
|
|
838
|
+
/** @jsx jsx */
|
|
839
|
+
|
|
840
|
+
interface PopoverProps {
|
|
841
|
+
isOpen: boolean;
|
|
842
|
+
/** The content inside the popover. */
|
|
843
|
+
content: JSX.Element;
|
|
844
|
+
/** The element controlling the state of the popover. */
|
|
845
|
+
parent: JSX.Element;
|
|
846
|
+
id?: string;
|
|
847
|
+
/** Whether to move the popover on collision with the parent's bounds. Default is true. */
|
|
848
|
+
reposition?: boolean;
|
|
849
|
+
onClickOutside?: (e: MouseEvent) => void;
|
|
850
|
+
/** Popover arrow color. Defaults to theme.colors.border. */
|
|
851
|
+
arrorColor?: string;
|
|
852
|
+
/** Popover border. Defaults to theme.controls.border. */
|
|
853
|
+
border?: string;
|
|
854
|
+
/** Popover background. Defaults to theme.colors.bg. */
|
|
855
|
+
backgroundColor?: string;
|
|
856
|
+
}
|
|
857
|
+
declare const Popover: (p: PopoverProps) => jsx.JSX.Element;
|
|
858
|
+
|
|
859
|
+
interface TogglePasswordInputProps extends Omit<InputProps, 'type' | 'rightControl'> {
|
|
860
|
+
}
|
|
861
|
+
declare const TogglePasswordInput: (p: TogglePasswordInputProps) => JSX.Element;
|
|
862
|
+
|
|
863
|
+
declare class PagedResult<T> {
|
|
864
|
+
constructor(items?: T[], total?: number, page?: number, limit?: number);
|
|
865
|
+
static fromDto<T>(dto: {
|
|
866
|
+
[key: string]: any;
|
|
867
|
+
}): PagedResult<T>;
|
|
868
|
+
total: number;
|
|
869
|
+
/** The zero-based page index. */
|
|
870
|
+
page: number;
|
|
871
|
+
limit: number;
|
|
872
|
+
items: T[];
|
|
873
|
+
/** Helper for items.length */
|
|
874
|
+
get length(): number;
|
|
875
|
+
get hasItems(): boolean;
|
|
876
|
+
get previousPage(): number;
|
|
877
|
+
get hasPrevious(): boolean;
|
|
878
|
+
get nextPage(): number;
|
|
879
|
+
get hasNext(): boolean;
|
|
880
|
+
get lastPage(): number;
|
|
881
|
+
get totalPages(): number;
|
|
882
|
+
get minPageItemIndex(): number;
|
|
883
|
+
get maxPageItemIndex(): number;
|
|
884
|
+
/** Returns the first item on the current page. */
|
|
885
|
+
get firstPageItem(): T;
|
|
886
|
+
/** Returns the last item on the current page */
|
|
887
|
+
get lastPageItem(): T;
|
|
888
|
+
getPageRelativeItemIndex(item: T): number;
|
|
889
|
+
getResultRelativeItemIndex(item: T): number | undefined;
|
|
890
|
+
getPreviousItem(fromItem: T): T | undefined;
|
|
891
|
+
getNextItem(fromItem: T): T | undefined;
|
|
892
|
+
getPagingRange(radius: number): number[];
|
|
893
|
+
toJSON(): {
|
|
894
|
+
[key: string]: any;
|
|
895
|
+
};
|
|
896
|
+
clone(newItems?: T[]): PagedResult<T>;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
interface Props<T> extends PagerStyleProps {
|
|
900
|
+
result: PagedResult<T>;
|
|
901
|
+
onPage: (direction: 1 | -1) => void;
|
|
902
|
+
limitOptions?: number[];
|
|
903
|
+
sort?: string | number;
|
|
904
|
+
sortOptions?: {
|
|
905
|
+
id: string | number;
|
|
906
|
+
name?: string;
|
|
907
|
+
}[];
|
|
908
|
+
/** Defaults to 'Limit' */
|
|
909
|
+
limitText?: string;
|
|
910
|
+
/** Defaults to 'Sort' */
|
|
911
|
+
sortText?: string;
|
|
912
|
+
onLimit?: (limit: number) => void;
|
|
913
|
+
onSort?: (sort: string | number) => void;
|
|
914
|
+
/** Shows 'Page X of Y'. */
|
|
915
|
+
showPageText?: boolean;
|
|
916
|
+
}
|
|
917
|
+
declare const BoundStaticPager: <T>(p: Props<T>) => JSX.Element;
|
|
918
|
+
|
|
919
|
+
/** @jsx jsx */
|
|
920
|
+
|
|
921
|
+
declare type SliderValue = number | [number, number];
|
|
922
|
+
interface SliderProps<T extends SliderValue> {
|
|
923
|
+
min: number;
|
|
924
|
+
max: number;
|
|
925
|
+
value: T;
|
|
926
|
+
id?: string;
|
|
927
|
+
/** Default is 1. */
|
|
928
|
+
step?: number;
|
|
929
|
+
/** Shows the current value above each handle. */
|
|
930
|
+
showValue?: boolean;
|
|
931
|
+
onChange: (value: T) => void;
|
|
932
|
+
onUpdate?: (value: T) => void;
|
|
933
|
+
/** Used with showValue. Will be called to render the display string. */
|
|
934
|
+
renderValue?: (value: number) => string;
|
|
935
|
+
}
|
|
936
|
+
declare const Slider: <T extends SliderValue>(p: SliderProps<T>) => jsx.JSX.Element;
|
|
937
|
+
|
|
938
|
+
export { Alignment, Backdrop, BoundMemoryPager, BoundStaticPager, Button, ButtonProps, Calendar, CalendarProps, Checkbox, CheckboxProps, ConfirmModal, ConfirmModalProps, CopyButton, DatePicker, DatePickerProps, Divider, ErrorModal, FilePicker, FilePickerProps, 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, ToggleButton, ToggleButtonGroup, ToggleButtonGroupProps, ToggleButtonProps, TogglePasswordInput, Tr, WaitingIndicator, calcDynamicThemeProps, defaultTheme, getCurrencyDisplay, mergeClassNames, useThemeSafely };
|