@indico-data/design-system 3.0.9 → 3.1.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/.storybook/main.ts +3 -0
- package/lib/components/badge/types.d.ts +4 -0
- package/lib/components/button/types.d.ts +52 -2
- package/lib/components/card/Card.d.ts +5 -0
- package/lib/components/floatUI/types.d.ts +7 -0
- package/lib/components/forms/checkbox/Checkbox.d.ts +7 -0
- package/lib/components/forms/date/datePicker/types.d.ts +13 -0
- package/lib/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.d.ts +21 -0
- package/lib/components/forms/date/inputDatePicker/SingleInputDatePicker.d.ts +13 -0
- package/lib/components/forms/date/inputDateRangePicker/InputDateRangePicker.d.ts +14 -0
- package/lib/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.d.ts +14 -0
- package/lib/components/forms/numberInput/NumberInput.d.ts +4 -0
- package/lib/components/forms/passwordInput/PasswordInput.d.ts +1 -0
- package/lib/components/forms/radio/Radio.d.ts +6 -0
- package/lib/components/forms/select/Select.d.ts +10 -0
- package/lib/components/forms/textarea/Textarea.d.ts +7 -0
- package/lib/components/forms/timePicker/TimePicker.d.ts +5 -0
- package/lib/components/forms/toggle/Toggle.d.ts +7 -0
- package/lib/components/icons/types.d.ts +5 -0
- package/lib/components/loading-indicators/BarSpinner/BarSpinner.d.ts +4 -0
- package/lib/components/loading-indicators/CirclePulse/CirclePulse.d.ts +2 -0
- package/lib/components/menu/Menu.d.ts +1 -0
- package/lib/components/modal/types.d.ts +22 -0
- package/lib/components/pagination/types.d.ts +4 -0
- package/lib/components/pill/types.d.ts +3 -0
- package/lib/components/skeleton/Skeleton.d.ts +5 -0
- package/lib/components/stepper/types.d.ts +9 -0
- package/lib/components/table/types.d.ts +9 -0
- package/lib/components/tanstackTable/TankstackTable.types.d.ts +25 -0
- package/lib/components/tanstackTable/components/ActionBar/ActionBar.d.ts +4 -0
- package/lib/components/tooltip/Tooltip.d.ts +6 -0
- package/lib/components/truncate/types.d.ts +4 -0
- package/lib/index.css +10 -0
- package/lib/index.d.ts +277 -2
- package/lib/index.esm.css +10 -0
- package/lib/index.esm.js +124 -119
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +124 -119
- package/lib/index.js.map +1 -1
- package/package.json +2 -1
- package/src/components/badge/Badge.stories.tsx +0 -4
- package/src/components/badge/types.ts +4 -0
- package/src/components/button/Button.stories.tsx +5 -18
- package/src/components/button/types.ts +52 -2
- package/src/components/card/Card.stories.tsx +0 -5
- package/src/components/card/Card.tsx +5 -0
- package/src/components/floatUI/FloatUI.stories.tsx +0 -11
- package/src/components/floatUI/types.ts +7 -0
- package/src/components/forms/checkbox/Checkbox.stories.tsx +0 -7
- package/src/components/forms/checkbox/Checkbox.tsx +7 -0
- package/src/components/forms/date/datePicker/DatePicker.stories.tsx +0 -33
- package/src/components/forms/date/datePicker/styles/DatePicker.scss +10 -0
- package/src/components/forms/date/datePicker/types.ts +14 -0
- package/src/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.stories.tsx +32 -19
- package/src/components/forms/date/iconTriggerDatePicker/IconTriggerDatePicker.tsx +31 -1
- package/src/components/forms/date/inputDatePicker/SingleInputDatePicker.stories.tsx +27 -22
- package/src/components/forms/date/inputDatePicker/SingleInputDatePicker.tsx +23 -2
- package/src/components/forms/date/inputDateRangePicker/InputDateRangePicker.stories.tsx +23 -32
- package/src/components/forms/date/inputDateRangePicker/InputDateRangePicker.tsx +24 -2
- package/src/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.stories.tsx +23 -28
- package/src/components/forms/date/inputDateTimePicker/SingleInputDateTimePicker.tsx +25 -1
- package/src/components/forms/numberInput/NumberInput.stories.tsx +0 -4
- package/src/components/forms/numberInput/NumberInput.tsx +4 -0
- package/src/components/forms/passwordInput/PasswordInput.stories.tsx +0 -1
- package/src/components/forms/passwordInput/PasswordInput.tsx +1 -0
- package/src/components/forms/radio/Radio.stories.tsx +0 -6
- package/src/components/forms/radio/Radio.tsx +6 -0
- package/src/components/forms/select/Select.stories.tsx +1 -14
- package/src/components/forms/select/Select.tsx +10 -0
- package/src/components/forms/textarea/Textarea.stories.tsx +0 -7
- package/src/components/forms/textarea/Textarea.tsx +7 -0
- package/src/components/forms/timePicker/TimePicker.stories.tsx +0 -5
- package/src/components/forms/timePicker/TimePicker.tsx +26 -1
- package/src/components/forms/timePicker/__tests__/TimePicker.test.tsx +4 -2
- package/src/components/forms/toggle/Toggle.stories.tsx +0 -7
- package/src/components/forms/toggle/Toggle.tsx +7 -0
- package/src/components/icons/Icon.stories.tsx +0 -7
- package/src/components/icons/types.ts +5 -0
- package/src/components/loading-indicators/BarSpinner/BarSpinner.stories.tsx +0 -5
- package/src/components/loading-indicators/BarSpinner/BarSpinner.tsx +4 -0
- package/src/components/loading-indicators/CirclePulse/CirclePulse.stories.tsx +0 -3
- package/src/components/loading-indicators/CirclePulse/CirclePulse.tsx +2 -0
- package/src/components/menu/Menu.stories.tsx +0 -3
- package/src/components/menu/Menu.tsx +1 -0
- package/src/components/modal/Modal.stories.tsx +1 -25
- package/src/components/modal/types.ts +22 -0
- package/src/components/pagination/Pagination.stories.tsx +0 -4
- package/src/components/pagination/types.ts +4 -0
- package/src/components/pill/Pill.stories.tsx +0 -3
- package/src/components/pill/types.ts +3 -0
- package/src/components/skeleton/Skeleton.stories.tsx +0 -7
- package/src/components/skeleton/Skeleton.tsx +5 -0
- package/src/components/stepper/Stepper.stories.tsx +0 -19
- package/src/components/stepper/types.ts +9 -0
- package/src/components/table/Table.stories.tsx +0 -35
- package/src/components/table/types.ts +9 -0
- package/src/components/tanstackTable/TankstackTable.types.ts +25 -0
- package/src/components/tanstackTable/TanstackTable.stories.tsx +0 -29
- package/src/components/tanstackTable/components/ActionBar/ActionBar.stories.tsx +0 -4
- package/src/components/tanstackTable/components/ActionBar/ActionBar.tsx +4 -0
- package/src/components/tooltip/Tooltip.stories.tsx +0 -8
- package/src/components/tooltip/Tooltip.tsx +6 -0
- package/src/components/truncate/Truncate.stories.tsx +0 -8
- package/src/components/truncate/types.ts +4 -0
package/lib/index.d.ts
CHANGED
|
@@ -181,10 +181,15 @@ type IconSizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
|
181
181
|
type IndiconName = keyof typeof indicons;
|
|
182
182
|
type IconName = IndiconName | `fa-${IconName$1}`;
|
|
183
183
|
type IconProps = PermafrostComponent & {
|
|
184
|
+
/** The name of the icon */
|
|
184
185
|
name: IconName;
|
|
186
|
+
/** Accessible label for the icon */
|
|
185
187
|
ariaLabel?: string;
|
|
188
|
+
/** Size of the icon */
|
|
186
189
|
size?: IconSizes;
|
|
190
|
+
/** Inline styles for the icon */
|
|
187
191
|
style?: CSSProperties;
|
|
192
|
+
/** Click event handler */
|
|
188
193
|
onClick?: MouseEventHandler<SVGElement>;
|
|
189
194
|
};
|
|
190
195
|
|
|
@@ -204,22 +209,34 @@ interface PinnableColumn<T> extends TableColumn$1<T> {
|
|
|
204
209
|
}
|
|
205
210
|
type TableColumn<T> = PinnableColumn<T>;
|
|
206
211
|
interface TableProps<T> extends Omit<IDataTableProps<T>, 'paginationComponent' | 'direction' | 'subHeaderAlign'> {
|
|
212
|
+
/** The columns to display in the table. All columns require a unique id property. For pinned columns, please see the pinned example below. */
|
|
207
213
|
columns: TableColumn<T>[];
|
|
214
|
+
/** Disables the Table section */
|
|
208
215
|
isDisabled?: boolean;
|
|
216
|
+
/** It sets the loading of the table */
|
|
209
217
|
isLoading?: boolean;
|
|
218
|
+
/** Accepts: ltr, rtl, or auto. When set to auto (default), RDT will attempt to detect direction by checking the HTML and DIV tags. For cases where you need to force rtl, or ltr just set this option manually (i.e. SSR). */
|
|
210
219
|
direction?: Direction;
|
|
220
|
+
/** Show a sub header between the table and table header */
|
|
211
221
|
subHeaderAlign?: 'left' | 'right' | 'center';
|
|
222
|
+
/** Enables height to be set to the full height of the container */
|
|
212
223
|
isFullHeight?: boolean;
|
|
224
|
+
/** The text to display in the total entries section. This is hidden if 1. No pagination exists, 2. No string is passed. */
|
|
213
225
|
totalEntriesText?: string;
|
|
226
|
+
/** Allows the pinning of columns to the left hand side. This is required when using the column pin API */
|
|
214
227
|
canPinColumns?: boolean;
|
|
228
|
+
/** Callback that receives the IDs of the pinned columns when they change. */
|
|
215
229
|
onPinnedColumnsChange?: (pinnedColumnIds: any[]) => void;
|
|
216
230
|
}
|
|
217
231
|
|
|
218
232
|
type PillSize = 'sm' | 'md' | 'lg';
|
|
219
233
|
type PillColor = SemanticColor | 'neutral';
|
|
220
234
|
interface PillProps {
|
|
235
|
+
/** The content displayed inside the pill */
|
|
221
236
|
children: React$1.ReactNode | React$1.ReactNode[];
|
|
237
|
+
/** Applies a CSS class to change the style of the pill */
|
|
222
238
|
color?: PillColor;
|
|
239
|
+
/** Applies a CSS class to change the size of the pill */
|
|
223
240
|
size?: PillSize;
|
|
224
241
|
className?: string;
|
|
225
242
|
}
|
|
@@ -237,21 +254,71 @@ type ButtonVariants = 'solid' | 'outline' | 'link' | 'action' | 'destructive' |
|
|
|
237
254
|
type ButtonSizes = 'xs' | 'sm' | 'md' | 'lg';
|
|
238
255
|
type ButtonTypes = 'button' | 'submit' | 'reset';
|
|
239
256
|
interface ButtonProps {
|
|
257
|
+
/**
|
|
258
|
+
* The class name to apply to the button
|
|
259
|
+
*/
|
|
240
260
|
className?: string;
|
|
261
|
+
/**
|
|
262
|
+
* The aria-label to apply to the button
|
|
263
|
+
*/
|
|
241
264
|
ariaLabel: string;
|
|
265
|
+
/**
|
|
266
|
+
* The children to apply to the button
|
|
267
|
+
*/
|
|
242
268
|
children?: React.ReactNode | React.ReactNode[];
|
|
269
|
+
/**
|
|
270
|
+
* The function to call when the mouse enters the button
|
|
271
|
+
*/
|
|
243
272
|
onMouseEnter?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
273
|
+
/**
|
|
274
|
+
* The function to call when the mouse exits the button
|
|
275
|
+
*/
|
|
244
276
|
onMouseExit?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
245
|
-
|
|
246
|
-
|
|
277
|
+
/**
|
|
278
|
+
* The function to call when the button is clicked
|
|
279
|
+
*/
|
|
247
280
|
onClick?: (...args: any[]) => void;
|
|
281
|
+
/**
|
|
282
|
+
* The function to call when the button is pressed
|
|
283
|
+
*/
|
|
284
|
+
onKeyDown?: (event: React.KeyboardEvent<HTMLButtonElement>) => void;
|
|
285
|
+
/**
|
|
286
|
+
* Determines the visual style and emphasis level of the button
|
|
287
|
+
*/
|
|
248
288
|
variant?: ButtonVariants;
|
|
289
|
+
/**
|
|
290
|
+
* Disables the button and shows a load spinner on the left hand side of the button children by default.
|
|
291
|
+
* If iconLeft is passed, the loading icon will be displayed on the left hand side of the iconLeft.
|
|
292
|
+
* If iconRight is passed, the loading icon will be displayed on the right hand side of the iconRight.
|
|
293
|
+
*/
|
|
294
|
+
isLoading?: boolean;
|
|
295
|
+
/**
|
|
296
|
+
* Makes the button round, pill-shaped when true
|
|
297
|
+
*/
|
|
249
298
|
isPill?: boolean;
|
|
299
|
+
/**
|
|
300
|
+
* The icon to display on the left hand side of the button
|
|
301
|
+
*/
|
|
250
302
|
iconLeft?: IconName;
|
|
303
|
+
/**
|
|
304
|
+
* The icon to display on the right hand side of the button
|
|
305
|
+
*/
|
|
251
306
|
iconRight?: IconName;
|
|
307
|
+
/**
|
|
308
|
+
* Controls the button's padding and text size
|
|
309
|
+
*/
|
|
252
310
|
size?: ButtonSizes;
|
|
311
|
+
/**
|
|
312
|
+
* The type of the button
|
|
313
|
+
*/
|
|
253
314
|
type?: ButtonTypes;
|
|
315
|
+
/**
|
|
316
|
+
* URL destination for the button when it needs to function as a link
|
|
317
|
+
*/
|
|
254
318
|
href?: string;
|
|
319
|
+
/**
|
|
320
|
+
* Disables the button
|
|
321
|
+
*/
|
|
255
322
|
isDisabled?: boolean;
|
|
256
323
|
}
|
|
257
324
|
|
|
@@ -292,11 +359,17 @@ declare const LabeledInput: React$1.ForwardRefExoticComponent<Omit<InputProps &
|
|
|
292
359
|
|
|
293
360
|
interface RadioProps {
|
|
294
361
|
ref?: React$1.LegacyRef<HTMLInputElement>;
|
|
362
|
+
/** This explains what button group this radio belongs to. */
|
|
295
363
|
id: string;
|
|
364
|
+
/** The label for the Radio field */
|
|
296
365
|
label: string;
|
|
366
|
+
/** The name for the Radio field */
|
|
297
367
|
name: string;
|
|
368
|
+
/** This holds the value that will be emitted when the radio is selected */
|
|
298
369
|
value?: string;
|
|
370
|
+
/** onChange event handler */
|
|
299
371
|
onChange: (e: React$1.ChangeEvent<HTMLInputElement>) => void;
|
|
372
|
+
/** Toggles the disabled state of the Radio field */
|
|
300
373
|
isDisabled?: boolean;
|
|
301
374
|
defaultChecked?: boolean;
|
|
302
375
|
}
|
|
@@ -304,12 +377,19 @@ declare const Radio: React$1.ForwardRefExoticComponent<Omit<RadioProps, "ref"> &
|
|
|
304
377
|
|
|
305
378
|
interface CheckboxProps {
|
|
306
379
|
ref?: React$1.LegacyRef<HTMLInputElement>;
|
|
380
|
+
/** This explains what button group this checkbox belongs to. */
|
|
307
381
|
id: string;
|
|
382
|
+
/** The label for the checkbox field */
|
|
308
383
|
label: string;
|
|
384
|
+
/** The name for the checkbox field */
|
|
309
385
|
name: string;
|
|
386
|
+
/** This holds the value that will be emitted when the checkbox is selected */
|
|
310
387
|
value?: string;
|
|
388
|
+
/** Toggles the checked state of the checkbox field when true */
|
|
311
389
|
isChecked?: boolean | undefined;
|
|
390
|
+
/** onChange event handler */
|
|
312
391
|
onChange: (e: React$1.ChangeEvent<HTMLInputElement>) => void;
|
|
392
|
+
/** Toggles the disabled state of the checkbox field */
|
|
313
393
|
isDisabled?: boolean;
|
|
314
394
|
defaultChecked?: boolean;
|
|
315
395
|
className?: string;
|
|
@@ -318,12 +398,19 @@ declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<CheckboxProps, "r
|
|
|
318
398
|
|
|
319
399
|
interface ToggleProps {
|
|
320
400
|
ref?: React$1.LegacyRef<HTMLInputElement>;
|
|
401
|
+
/** This explains what button group this toggle belongs to. */
|
|
321
402
|
id: string;
|
|
403
|
+
/** The label for the toggle field */
|
|
322
404
|
label?: string;
|
|
405
|
+
/** The name for the toggle field */
|
|
323
406
|
name: string;
|
|
407
|
+
/** This holds the value that will be emitted when the toggle is selected */
|
|
324
408
|
value?: string;
|
|
409
|
+
/** onChange event handler */
|
|
325
410
|
onChange: (e: React$1.ChangeEvent<HTMLInputElement>) => void;
|
|
411
|
+
/** This disables the toggle */
|
|
326
412
|
isDisabled?: boolean;
|
|
413
|
+
/** This is the state of the toggle */
|
|
327
414
|
isChecked?: boolean;
|
|
328
415
|
defaultChecked?: boolean;
|
|
329
416
|
}
|
|
@@ -338,12 +425,19 @@ interface TextareaProps extends LabelProps {
|
|
|
338
425
|
isDisabled?: boolean;
|
|
339
426
|
errorMessage?: string | undefined;
|
|
340
427
|
helpText?: string;
|
|
428
|
+
/** The number of rows for the textarea field */
|
|
341
429
|
rows?: number;
|
|
430
|
+
/** Specifies the visible width of a text area */
|
|
342
431
|
cols?: number;
|
|
432
|
+
/** Sets the textarea field to readonly */
|
|
343
433
|
readonly?: boolean;
|
|
434
|
+
/** Sets the wrap attribute for the textarea field */
|
|
344
435
|
wrap?: 'hard' | 'soft';
|
|
436
|
+
/** Specifies which form the text area belongs to */
|
|
345
437
|
form?: string;
|
|
438
|
+
/** Specifies the maximum number of characters allowed in the text area */
|
|
346
439
|
maxLength?: number;
|
|
440
|
+
/** Specifies that a text area should automatically get focus when the page loads */
|
|
347
441
|
autofocus?: boolean;
|
|
348
442
|
defaultValue?: string;
|
|
349
443
|
tabIndex?: number;
|
|
@@ -360,31 +454,49 @@ interface PasswordInputProps extends LabelProps {
|
|
|
360
454
|
isDisabled?: boolean;
|
|
361
455
|
errorMessage?: string | undefined;
|
|
362
456
|
helpText?: string;
|
|
457
|
+
/** Toggles the visibility of the password */
|
|
363
458
|
hasShowPassword?: boolean;
|
|
364
459
|
defaultValue?: string;
|
|
365
460
|
}
|
|
366
461
|
declare const LabeledPasswordInput: React$1.ForwardRefExoticComponent<Omit<Omit<PasswordInputProps, "ref"> & React$1.RefAttributes<HTMLInputElement> & LabelProps, "ref"> & React$1.RefAttributes<any>>;
|
|
367
462
|
|
|
368
463
|
interface SelectProps<OptionType extends SelectOption> extends Props$4<OptionType> {
|
|
464
|
+
/** Options for the select component */
|
|
369
465
|
options: OptionType[];
|
|
466
|
+
/** The label for the select component */
|
|
370
467
|
label?: string;
|
|
468
|
+
/** The name of the select component */
|
|
371
469
|
name?: string;
|
|
470
|
+
/** Toggles the visibility of the label */
|
|
372
471
|
hasHiddenLabel?: boolean;
|
|
472
|
+
/** Additional CSS class for the select component */
|
|
473
|
+
className?: string;
|
|
474
|
+
/** The prefix to use for the CSS class names. Changing this will result in losing all default styles */
|
|
475
|
+
classNamePrefix?: string;
|
|
476
|
+
/** Event handler for when the selected value changes */
|
|
477
|
+
onChange?: (newValue: any, actionMeta: any) => void;
|
|
373
478
|
}
|
|
374
479
|
declare const LabeledSelect: React$1.ForwardRefExoticComponent<SelectProps<SelectOption> & LabelProps & React$1.RefAttributes<any>>;
|
|
375
480
|
|
|
376
481
|
interface DatePickerProps {
|
|
377
482
|
ref?: React.LegacyRef<HTMLInputElement>;
|
|
483
|
+
/** The selected day(s). */
|
|
378
484
|
selected?: Date | DateRange | undefined;
|
|
485
|
+
/** Event handler when a day is selected. */
|
|
379
486
|
onSelect?: OnSelectHandler<Date> | OnSelectHandler<DateRange>;
|
|
487
|
+
/** Allows you to select a single day, a range of days, or multiple days. */
|
|
380
488
|
mode?: Mode;
|
|
489
|
+
/** Accepts a CSS class name */
|
|
381
490
|
className?: string;
|
|
491
|
+
/** The layout of the caption. Enables you to add or remove the dropdown navigation for months/years */
|
|
382
492
|
captionLayout?: 'dropdown' | 'dropdown-months' | 'dropdown-years' | 'label';
|
|
383
493
|
id?: string;
|
|
384
494
|
month?: Date;
|
|
385
495
|
defaultMonth?: Date;
|
|
386
496
|
startMonth?: Date | undefined;
|
|
497
|
+
/** Whether to show the time picker. */
|
|
387
498
|
hasTimePicker?: boolean;
|
|
499
|
+
/** The time value to display in the date picker. */
|
|
388
500
|
timeValue?: string;
|
|
389
501
|
endMonth?: Date;
|
|
390
502
|
components?: Partial<CustomComponents>;
|
|
@@ -395,8 +507,11 @@ interface DatePickerProps {
|
|
|
395
507
|
firstWeekContainsDate?: 1 | 4;
|
|
396
508
|
today?: Date;
|
|
397
509
|
isRequired?: any;
|
|
510
|
+
/** The minimum date that can be selected. */
|
|
398
511
|
min?: number;
|
|
512
|
+
/** The maximum date that can be selected. */
|
|
399
513
|
max?: number;
|
|
514
|
+
/** Callback when the time changes. */
|
|
400
515
|
onTimeChange?: (time: string) => void;
|
|
401
516
|
onMonthChange?: MonthChangeEventHandler;
|
|
402
517
|
onNextClick?: MonthChangeEventHandler;
|
|
@@ -406,15 +521,23 @@ interface DatePickerProps {
|
|
|
406
521
|
timeTabIndex?: number;
|
|
407
522
|
dateTabIndex?: number;
|
|
408
523
|
}
|
|
524
|
+
interface PortalOptions {
|
|
525
|
+
rootId?: string;
|
|
526
|
+
}
|
|
409
527
|
|
|
410
528
|
declare const DatePicker: (props: DatePickerProps) => react_jsx_runtime.JSX.Element;
|
|
411
529
|
|
|
412
530
|
interface TimePickerProps {
|
|
413
531
|
ref?: React.LegacyRef<HTMLInputElement>;
|
|
532
|
+
/** The time value to be displayed in the input field */
|
|
414
533
|
timeValue?: string;
|
|
534
|
+
/** The label for the time picker */
|
|
415
535
|
label?: string;
|
|
536
|
+
/** The name of the input field */
|
|
416
537
|
name?: string;
|
|
538
|
+
/** Hides the input label in an accessible way (visually hides the label) */
|
|
417
539
|
hasHiddenLabel?: boolean;
|
|
540
|
+
/** returns an object with the time and errors if they exist */
|
|
418
541
|
onTimeChange?: (time: string) => void;
|
|
419
542
|
className?: string;
|
|
420
543
|
isReadOnly?: boolean;
|
|
@@ -425,30 +548,51 @@ interface TimePickerProps {
|
|
|
425
548
|
declare const TimePicker: ({ ref, timeValue, label, name, hasHiddenLabel, onTimeChange, className, isDisabled, isReadOnly, tabIndex, ...rest }: TimePickerProps) => react_jsx_runtime.JSX.Element;
|
|
426
549
|
|
|
427
550
|
interface Props$3 {
|
|
551
|
+
/** Allows you to select a single day, a range of days, or multiple days. */
|
|
428
552
|
mode?: Mode;
|
|
553
|
+
/** A label for assistive technologies. */
|
|
429
554
|
ariaLabel: string;
|
|
555
|
+
/** Disable dates before this date. */
|
|
430
556
|
disableBeforeDate?: Date;
|
|
557
|
+
/** Disable dates after this date. */
|
|
431
558
|
disableAfterDate?: Date;
|
|
559
|
+
/** Disable the date picker. */
|
|
432
560
|
isDisabled?: boolean;
|
|
561
|
+
/** The id of the input field. */
|
|
433
562
|
id: string;
|
|
563
|
+
/** The label for the input field. */
|
|
434
564
|
label?: string;
|
|
565
|
+
/** Event handler when a day is selected. */
|
|
435
566
|
onSelect?: (selected: Date | DateRange | undefined) => void;
|
|
436
567
|
selected?: Date | DateRange | undefined;
|
|
568
|
+
/** The icon to use as a trigger. */
|
|
437
569
|
triggerIcon: IconName;
|
|
570
|
+
/** The size of the trigger icon. */
|
|
438
571
|
triggerIconSize: IconSizes;
|
|
572
|
+
/** Whether the date picker is open. */
|
|
439
573
|
isOpen?: boolean;
|
|
574
|
+
/** Clear the selected date(s) when the date picker closes. */
|
|
440
575
|
clearOnClose?: boolean;
|
|
576
|
+
/** Accepts a CSS class name */
|
|
441
577
|
className?: string;
|
|
442
578
|
initialMonth?: Date;
|
|
443
579
|
'data-testid'?: string;
|
|
580
|
+
/** The portal options for the date picker. Follows floating-ui options. */
|
|
581
|
+
portalOptions?: PortalOptions;
|
|
582
|
+
/** Whether the date picker is a portal. */
|
|
583
|
+
isPortal?: boolean;
|
|
584
|
+
/** The floating options for the date picker. Follows floating-ui options. */
|
|
585
|
+
floatingOptions?: UseFloatingOptions;
|
|
444
586
|
}
|
|
445
587
|
declare const IconTriggerDatePicker: (props: Props$3) => react_jsx_runtime.JSX.Element;
|
|
446
588
|
|
|
447
589
|
interface SingleInputDatePickerProps {
|
|
590
|
+
/** A label for assistive technologies. */
|
|
448
591
|
ariaLabel: string;
|
|
449
592
|
disableBeforeDate?: Date;
|
|
450
593
|
disableAfterDate?: Date;
|
|
451
594
|
isDisabled?: boolean;
|
|
595
|
+
/** The layout of the caption. Enables you to add or remove the dropdown navigation for months/years */
|
|
452
596
|
captionLayout?: 'dropdown' | 'dropdown-months' | 'dropdown-years' | 'label';
|
|
453
597
|
id?: string;
|
|
454
598
|
label?: string;
|
|
@@ -457,20 +601,30 @@ interface SingleInputDatePickerProps {
|
|
|
457
601
|
selected?: Date;
|
|
458
602
|
isOpen?: boolean;
|
|
459
603
|
clearOnClose?: boolean;
|
|
604
|
+
/** Accepts a CSS class name */
|
|
460
605
|
className?: string;
|
|
461
606
|
inputIconName?: IconName;
|
|
462
607
|
isClearable?: boolean;
|
|
463
608
|
inputPlaceholder?: string;
|
|
464
609
|
errorMessage?: string | undefined;
|
|
610
|
+
/** Whether the label is hidden. */
|
|
465
611
|
hasHiddenLabel?: boolean;
|
|
466
612
|
'data-testid'?: string;
|
|
613
|
+
/** The ref of the input field. */
|
|
467
614
|
ref?: React.LegacyRef<HTMLInputElement>;
|
|
615
|
+
/** Whether the date picker is read only. */
|
|
468
616
|
isReadOnly?: boolean;
|
|
617
|
+
/** The tab index of the input field. */
|
|
469
618
|
tabIndex?: number;
|
|
619
|
+
portalOptions?: PortalOptions;
|
|
620
|
+
floatingOptions?: UseFloatingOptions;
|
|
621
|
+
/** Whether the date picker is a portal. */
|
|
622
|
+
isPortal?: boolean;
|
|
470
623
|
}
|
|
471
624
|
declare function SingleInputDatePicker(props: SingleInputDatePickerProps): react_jsx_runtime.JSX.Element;
|
|
472
625
|
|
|
473
626
|
interface InputDateRangePickerProps {
|
|
627
|
+
/** A label for assistive technologies. */
|
|
474
628
|
ariaLabel: string;
|
|
475
629
|
disableBeforeDate?: Date;
|
|
476
630
|
disableAfterDate?: Date;
|
|
@@ -481,6 +635,7 @@ interface InputDateRangePickerProps {
|
|
|
481
635
|
month?: Date;
|
|
482
636
|
selected?: DateRange | undefined;
|
|
483
637
|
isOpen?: boolean;
|
|
638
|
+
/** Whether the date picker is open. */
|
|
484
639
|
setIsOpen?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
485
640
|
className?: string;
|
|
486
641
|
inputIconName?: IconName;
|
|
@@ -488,21 +643,32 @@ interface InputDateRangePickerProps {
|
|
|
488
643
|
toErrorMessage?: string | undefined;
|
|
489
644
|
fromErrorMessage?: string | undefined;
|
|
490
645
|
'data-testid'?: string;
|
|
646
|
+
/** The gutter width for the date picker. */
|
|
491
647
|
gutterWidth?: number;
|
|
492
648
|
fromLabel?: string;
|
|
493
649
|
toLabel?: string;
|
|
494
650
|
closeOnSelect?: boolean;
|
|
495
651
|
clearOnClose?: boolean;
|
|
652
|
+
/** Whether the label is hidden. */
|
|
496
653
|
hasHiddenLabel?: boolean;
|
|
654
|
+
/** The ref of the input field. */
|
|
497
655
|
ref?: React.LegacyRef<HTMLInputElement>;
|
|
656
|
+
/** Whether the from input is read only. */
|
|
498
657
|
isFromReadOnly?: boolean;
|
|
658
|
+
/** Whether the to input is read only. */
|
|
499
659
|
isToReadOnly?: boolean;
|
|
500
660
|
toTabIndex?: number;
|
|
661
|
+
/** The tab index of the from input field. */
|
|
501
662
|
fromTabIndex?: number;
|
|
663
|
+
portalOptions?: PortalOptions;
|
|
664
|
+
floatingOptions?: UseFloatingOptions;
|
|
665
|
+
/** Whether the date picker is a portal. */
|
|
666
|
+
isPortal?: boolean;
|
|
502
667
|
}
|
|
503
668
|
declare function InputDateRangePicker(props: InputDateRangePickerProps): react_jsx_runtime.JSX.Element;
|
|
504
669
|
|
|
505
670
|
interface SingleInputDateTimePickerProps {
|
|
671
|
+
/** A label for assistive technologies. */
|
|
506
672
|
ariaLabel: string;
|
|
507
673
|
disableBeforeDate?: Date;
|
|
508
674
|
disableAfterDate?: Date;
|
|
@@ -521,14 +687,25 @@ interface SingleInputDateTimePickerProps {
|
|
|
521
687
|
inputPlaceholder?: string;
|
|
522
688
|
errorMessage?: string | undefined;
|
|
523
689
|
'data-testid'?: string;
|
|
690
|
+
/** Whether the label is hidden. */
|
|
524
691
|
hasHiddenLabel?: boolean;
|
|
692
|
+
/** The time value to display. */
|
|
525
693
|
timeValue?: string;
|
|
694
|
+
/** Callback function that is called when the time is changed. */
|
|
526
695
|
onTimeChange?: (time: string) => void;
|
|
696
|
+
/** Whether the date picker is read only. */
|
|
527
697
|
isReadOnly?: boolean;
|
|
698
|
+
/** The ref of the input field. */
|
|
528
699
|
ref?: React.LegacyRef<HTMLInputElement>;
|
|
700
|
+
/** The ref of the time picker input field. */
|
|
529
701
|
timePickerRef?: React.LegacyRef<HTMLInputElement>;
|
|
530
702
|
dateTabIndex?: number;
|
|
703
|
+
/** The tab index of the time input field. */
|
|
531
704
|
timeTabIndex?: number;
|
|
705
|
+
portalOptions?: PortalOptions;
|
|
706
|
+
floatingOptions?: UseFloatingOptions;
|
|
707
|
+
/** Whether the date picker is a portal. */
|
|
708
|
+
isPortal?: boolean;
|
|
532
709
|
}
|
|
533
710
|
declare function SingleInputDateTimePicker(props: SingleInputDateTimePickerProps): react_jsx_runtime.JSX.Element;
|
|
534
711
|
|
|
@@ -547,33 +724,50 @@ interface FormProps {
|
|
|
547
724
|
declare const Form: ({ children, onSubmit, action, method, target, autocomplete, noValidate, enctype, rel, ...rest }: FormProps) => react_jsx_runtime.JSX.Element;
|
|
548
725
|
|
|
549
726
|
type Props$2 = {
|
|
727
|
+
/** Additional classes for the skeleton component */
|
|
550
728
|
className?: string;
|
|
729
|
+
/** The height of the skeleton component, either in px (number) or a generic string (e.g. "20px", "50%", "100%") */
|
|
551
730
|
height?: number | string;
|
|
731
|
+
/** The width of the skeleton component, either in px (number) or a generic string (e.g. "20px", "50%", "100%") */
|
|
552
732
|
width?: number | string;
|
|
733
|
+
/** Sets the skeleton component to be a circle */
|
|
553
734
|
isCircle?: boolean;
|
|
735
|
+
/** Sets the skeleton component to be full height */
|
|
554
736
|
isFullHeight?: boolean;
|
|
555
737
|
};
|
|
556
738
|
declare const Skeleton: ({ className, height, width, isCircle, isFullHeight, ...rest }: Props$2) => react_jsx_runtime.JSX.Element;
|
|
557
739
|
|
|
558
740
|
type Props$1 = {
|
|
741
|
+
/** Additional classes for the card component */
|
|
559
742
|
className?: string;
|
|
743
|
+
/** The content of the card */
|
|
560
744
|
children: React$1.ReactNode;
|
|
745
|
+
/** The title of the card */
|
|
561
746
|
title?: string;
|
|
747
|
+
/** The subtitle of the card */
|
|
562
748
|
subtitle?: string;
|
|
749
|
+
/** Adds a box shadow to the card */
|
|
563
750
|
hasBoxShadow?: boolean;
|
|
564
751
|
};
|
|
565
752
|
declare const Card: React$1.FC<Props$1>;
|
|
566
753
|
|
|
567
754
|
type FloatUIProps = {
|
|
755
|
+
/** An array of exactly two elements: the first element is the trigger that opens the FloatUI, and the second element is the content displayed within the FloatUI. */
|
|
568
756
|
children: [ReactElement, ReactElement];
|
|
757
|
+
/** Sets the aria-label attribute for the FloatUI. */
|
|
569
758
|
ariaLabel: string;
|
|
759
|
+
/** Options for configuring the floating UI behavior. For more, see the [floating-ui docs](https://floating-ui.com/docs/useFloating#options). */
|
|
570
760
|
floatingOptions?: UseFloatingOptions;
|
|
761
|
+
/** Controls the visibility of the FloatUI (for controlled mode). */
|
|
571
762
|
isOpen?: boolean;
|
|
572
763
|
className?: string;
|
|
764
|
+
/** Controls whether the FloatUI content is rendered as a portal (i.e. rendered outside the app root and into the body) */
|
|
573
765
|
isPortal?: boolean;
|
|
766
|
+
/** Options for configuring the portal behavior. Includes the rootId, which is the id of the root element to render the portal into. */
|
|
574
767
|
portalOptions?: {
|
|
575
768
|
rootId?: string;
|
|
576
769
|
};
|
|
770
|
+
/** Function to toggle the visibility of the FloatUI (for controlled mode). */
|
|
577
771
|
setIsOpen?: React.Dispatch<React.SetStateAction<boolean>>;
|
|
578
772
|
};
|
|
579
773
|
|
|
@@ -581,6 +775,7 @@ declare function FloatUI({ children, ariaLabel, isOpen: controlledIsOpen, setIsO
|
|
|
581
775
|
|
|
582
776
|
type MenuProps = {
|
|
583
777
|
children: React$1.ReactNode;
|
|
778
|
+
/** The class name to apply to the Menu component. */
|
|
584
779
|
className?: string;
|
|
585
780
|
};
|
|
586
781
|
declare function Menu({ children, className, ...rest }: MenuProps): react_jsx_runtime.JSX.Element;
|
|
@@ -589,32 +784,52 @@ declare const Pill: ({ children, className, color, size, ...rest }: PillProps) =
|
|
|
589
784
|
|
|
590
785
|
type BadgeSizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
591
786
|
interface BadgeProps {
|
|
787
|
+
/** Additional classes for the badge component */
|
|
592
788
|
className?: string;
|
|
789
|
+
/** The content of the badge (superseded by the string prop) */
|
|
593
790
|
children?: React.ReactNode;
|
|
791
|
+
/** The string to display in the badge. (supersedes children prop) */
|
|
594
792
|
string?: string;
|
|
793
|
+
/** The size of the badge */
|
|
595
794
|
size?: BadgeSizes;
|
|
596
795
|
}
|
|
597
796
|
|
|
598
797
|
declare const Badge: ({ className, children, size, string, ...rest }: BadgeProps) => react_jsx_runtime.JSX.Element;
|
|
599
798
|
|
|
600
799
|
interface ModalProps {
|
|
800
|
+
/** Additional classes for the badge component */
|
|
601
801
|
className?: string;
|
|
802
|
+
/** The content of the badge (superseded by the string prop) */
|
|
602
803
|
children?: React.ReactNode;
|
|
804
|
+
/** Whether the modal is open */
|
|
603
805
|
isOpen: boolean;
|
|
806
|
+
/** Callback function to be called when the modal is closed */
|
|
604
807
|
onRequestClose?: () => void;
|
|
808
|
+
/** Additional classes for the portal element */
|
|
605
809
|
portalClassName?: string;
|
|
810
|
+
/** Additional classes for the overlay element */
|
|
606
811
|
overlayClassName?: string;
|
|
812
|
+
/** The element to use as the app element */
|
|
607
813
|
appElement?: HTMLElement;
|
|
814
|
+
/** Whether the modal should close when the overlay is clicked */
|
|
608
815
|
shouldCloseOnOverlayClick?: boolean;
|
|
816
|
+
/** Whether the modal should close when the escape key is pressed */
|
|
609
817
|
shouldCloseOnEsc?: boolean;
|
|
610
818
|
testId?: string;
|
|
819
|
+
/** Custom content element for the modal */
|
|
611
820
|
contentElement?: (props: any, children: React.ReactNode) => React.ReactElement;
|
|
821
|
+
/** Custom overlay element for the modal */
|
|
612
822
|
overlayElement?: (props: any, contentElement: React.ReactElement) => React.ReactElement;
|
|
823
|
+
/** The position of the modal opens on the page */
|
|
613
824
|
position?: 'top' | 'center';
|
|
614
825
|
parentSelector?: () => HTMLElement;
|
|
826
|
+
/** The title of the modal */
|
|
615
827
|
title?: string;
|
|
828
|
+
/** The subtitle of the modal */
|
|
616
829
|
subtitle?: string;
|
|
830
|
+
/** The footer of the modal. It accepts a React Component */
|
|
617
831
|
footer?: React.ReactNode;
|
|
832
|
+
/** The maximum width of the modal in pixels */
|
|
618
833
|
maxWidthInPixels?: number;
|
|
619
834
|
}
|
|
620
835
|
interface ConfirmationModalProps extends ModalProps {
|
|
@@ -622,11 +837,17 @@ interface ConfirmationModalProps extends ModalProps {
|
|
|
622
837
|
dontShowAgain?: boolean;
|
|
623
838
|
}) => void | Promise<void> | Promise<boolean>;
|
|
624
839
|
onCancelRequest?: () => void | Promise<void> | Promise<boolean>;
|
|
840
|
+
/** Whether the modal should have a checkbox to not show again */
|
|
625
841
|
hasDontShowAgainCheckbox?: boolean;
|
|
842
|
+
/** The variant of the confirmation button. */
|
|
626
843
|
confirmationButtonVariant?: ButtonVariants;
|
|
844
|
+
/** The text of the confirmation button */
|
|
627
845
|
confirmationButtonText?: string;
|
|
846
|
+
/** The text of the cancel button */
|
|
628
847
|
cancelButtonText?: string;
|
|
848
|
+
/** The icon of the modal */
|
|
629
849
|
icon?: IconName;
|
|
850
|
+
/** The status of the modal. This will determine the color of the icon. */
|
|
630
851
|
status?: 'info' | 'success' | 'error';
|
|
631
852
|
}
|
|
632
853
|
|
|
@@ -635,10 +856,15 @@ declare const Modal: ({ className, children, isOpen, onRequestClose, portalClass
|
|
|
635
856
|
declare const ConfirmationModal: ({ className, overlayClassName, testId, isOpen, onRequestClose, portalClassName, appElement, parentSelector, shouldCloseOnOverlayClick, shouldCloseOnEsc, contentElement, overlayElement, footer, children, onConfirmRequest, onCancelRequest, confirmationButtonText, cancelButtonText, confirmationButtonVariant, icon, title, status, maxWidthInPixels, hasDontShowAgainCheckbox, }: ConfirmationModalProps) => react_jsx_runtime.JSX.Element;
|
|
636
857
|
|
|
637
858
|
type WithPaginationProps = {
|
|
859
|
+
/** Number of rows to display per pagination page. */
|
|
638
860
|
rowsPerPage: number;
|
|
861
|
+
/** Total number of rows in the table. */
|
|
639
862
|
rowCount: number;
|
|
863
|
+
/** Callback when the page changes. */
|
|
640
864
|
onChangePage: (page: number) => void;
|
|
865
|
+
/** Current page number. */
|
|
641
866
|
currentPage: number;
|
|
867
|
+
/** Text to display for the total number of entries. */
|
|
642
868
|
totalEntriesText?: string;
|
|
643
869
|
showPagination: true;
|
|
644
870
|
};
|
|
@@ -652,33 +878,53 @@ type WithoutPaginationProps = {
|
|
|
652
878
|
};
|
|
653
879
|
type PaginationProps$1 = WithPaginationProps | WithoutPaginationProps;
|
|
654
880
|
type Props<T extends object> = {
|
|
881
|
+
/** Array of data items. These are the items that will be displayed in the table cell. */
|
|
655
882
|
data: T[];
|
|
883
|
+
/** Striped rows */
|
|
656
884
|
isStriped?: boolean;
|
|
885
|
+
/** Column definitions including an `id` field. This is how you define your table structure. */
|
|
657
886
|
columns: ColumnDef<T & {
|
|
658
887
|
id: string;
|
|
659
888
|
}>[];
|
|
889
|
+
/** Additional option for class names. */
|
|
660
890
|
className?: string;
|
|
891
|
+
/** class name for styling the action bar. */
|
|
661
892
|
actionBarClassName?: string;
|
|
893
|
+
/** Component for table actions with selected items. */
|
|
662
894
|
TableActions?: React.ComponentType<{
|
|
663
895
|
selectedItems: Row$1<any>[];
|
|
664
896
|
unselectRows: () => void;
|
|
665
897
|
}>;
|
|
898
|
+
/** Error state of the table. */
|
|
666
899
|
error?: {
|
|
667
900
|
hasError: boolean;
|
|
668
901
|
errorMessage?: string;
|
|
669
902
|
};
|
|
903
|
+
/** Enables row selection or defines selection conditions. */
|
|
670
904
|
enableRowSelection?: boolean | ((row: Row$1<T>) => boolean);
|
|
905
|
+
/** Function to clear applied filters. */
|
|
671
906
|
clearFilters?: () => void;
|
|
907
|
+
/** Indicates if filters are applied. */
|
|
672
908
|
hasFilters?: boolean;
|
|
909
|
+
/** When this is true, the table is considered to be in a loading state. */
|
|
673
910
|
isLoading?: boolean;
|
|
911
|
+
/** Message to display when the table is loading. */
|
|
674
912
|
isLoadingMessage?: string;
|
|
913
|
+
/** Columns that are pinned by default. */
|
|
675
914
|
defaultPinnedColumns?: string[];
|
|
915
|
+
/** Callback when a row is clicked. */
|
|
676
916
|
onClickRow?: ((row: Row$1<T>) => void) | null;
|
|
917
|
+
/** Callback when a row is clicked. */
|
|
677
918
|
onRowClick?: (row: T) => void;
|
|
919
|
+
/** Array of active rows. */
|
|
678
920
|
activeRows?: string[];
|
|
921
|
+
/** Row selection state. */
|
|
679
922
|
rowSelection?: Record<string, boolean>;
|
|
923
|
+
/** Callback when a row is selected. */
|
|
680
924
|
onRowSelectionChange?: (updater: Record<string, boolean>) => void;
|
|
925
|
+
/** Callback when all rows are selected. */
|
|
681
926
|
onSelectAllChange?: (isSelected: boolean) => void;
|
|
927
|
+
/** You may pass a default sorting state to the table. This will be used to sort the table by default. This is useful if you want to sort the table by a column by default. */
|
|
682
928
|
defaultSorting?: SortingState;
|
|
683
929
|
} & PaginationProps$1;
|
|
684
930
|
|
|
@@ -688,27 +934,39 @@ declare function TanstackTable<T extends object>({ columns: defaultColumns, data
|
|
|
688
934
|
|
|
689
935
|
interface TooltipProps {
|
|
690
936
|
id: string;
|
|
937
|
+
/** Whether the tooltip should be shown on click */
|
|
691
938
|
clickToShow?: boolean;
|
|
939
|
+
/** The delay in milliseconds before the tooltip is shown */
|
|
692
940
|
delayShow?: number;
|
|
941
|
+
/** The delay in milliseconds before the tooltip is hidden */
|
|
693
942
|
delayHide?: number;
|
|
694
943
|
children: React.ReactNode;
|
|
944
|
+
/** This is an override for the z-index of the tooltip */
|
|
695
945
|
zIndex?: number;
|
|
946
|
+
/** The placement of the tooltip */
|
|
696
947
|
place?: PlacesType;
|
|
948
|
+
/** The content of the tooltip */
|
|
697
949
|
[key: string]: any;
|
|
698
950
|
}
|
|
699
951
|
declare const Tooltip: ({ id, clickToShow, delayShow, delayHide, children, zIndex, place, ...rest }: TooltipProps) => react_jsx_runtime.JSX.Element;
|
|
700
952
|
|
|
701
953
|
interface PaginationProps {
|
|
954
|
+
/** The total number of pages to be displayed */
|
|
702
955
|
totalPages: number;
|
|
956
|
+
/** The current page displayed in the input field. */
|
|
703
957
|
currentPage?: number;
|
|
958
|
+
/** The css class name for the pagination component */
|
|
704
959
|
className?: string;
|
|
960
|
+
/** The callback function that is called when the page changes. */
|
|
705
961
|
onChange?: (value: number) => void;
|
|
706
962
|
}
|
|
707
963
|
|
|
708
964
|
declare const Pagination: ({ totalPages, currentPage, onChange, className, ...rest }: PaginationProps) => react_jsx_runtime.JSX.Element;
|
|
709
965
|
|
|
710
966
|
interface CirclePulseProps {
|
|
967
|
+
/** The size of the circle */
|
|
711
968
|
size?: 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
969
|
+
/** The class name of the circle pulse */
|
|
712
970
|
className?: string;
|
|
713
971
|
[key: string]: any;
|
|
714
972
|
}
|
|
@@ -716,25 +974,38 @@ declare function CirclePulse({ size, className, ...rest }: CirclePulseProps): re
|
|
|
716
974
|
|
|
717
975
|
declare function BarSpinner({ width, id, height, className, ...rest }: {
|
|
718
976
|
'data-testid'?: string;
|
|
977
|
+
/** The width of the bar spinner */
|
|
719
978
|
width?: number;
|
|
979
|
+
/** The id of the tooltip. This needs to match the element that holds it's data attribute */
|
|
720
980
|
id?: string;
|
|
981
|
+
/** The height of the bar spinner */
|
|
721
982
|
height?: number;
|
|
983
|
+
/** The class name of the bar spinner */
|
|
722
984
|
className?: string;
|
|
723
985
|
[key: string]: any;
|
|
724
986
|
}): react_jsx_runtime.JSX.Element;
|
|
725
987
|
|
|
726
988
|
interface StepperProps {
|
|
989
|
+
/** An array of step objects that define the stepper navigation. */
|
|
727
990
|
steps: Step[];
|
|
728
991
|
currentStep?: number;
|
|
992
|
+
/** The header content for the legend. */
|
|
729
993
|
legendHeader?: ReactNode;
|
|
994
|
+
/** The footer content for the legend. */
|
|
730
995
|
legendFooter?: ReactNode;
|
|
996
|
+
/** The function to call when the back button is clicked. */
|
|
731
997
|
onBackClick: () => void;
|
|
998
|
+
/** The function to call when the next button is clicked. */
|
|
732
999
|
onNextClick: () => void;
|
|
1000
|
+
/** The function to call when the finish button is clicked. */
|
|
733
1001
|
onFinishClick: () => void;
|
|
1002
|
+
/** Any item passed to this component as a child will be rendered as a step. */
|
|
734
1003
|
children: React.ReactNode;
|
|
1004
|
+
/** The function to call when a step is clicked ont he legend. */
|
|
735
1005
|
onStepClick: (step: number) => void;
|
|
736
1006
|
}
|
|
737
1007
|
interface Step {
|
|
1008
|
+
/** Display text for the step in the sidebar/legend */
|
|
738
1009
|
label: string;
|
|
739
1010
|
isCompleted?: boolean;
|
|
740
1011
|
isNextDisabled?: boolean;
|
|
@@ -745,9 +1016,13 @@ interface Step {
|
|
|
745
1016
|
declare const Stepper: ({ currentStep: externalCurrentStep, legendHeader, legendFooter, steps, onBackClick, onNextClick, onFinishClick, children, onStepClick, }: StepperProps) => react_jsx_runtime.JSX.Element;
|
|
746
1017
|
|
|
747
1018
|
interface TruncateProps {
|
|
1019
|
+
/** The number of lines to truncate the text to. If left blank, it will default to 1 line. */
|
|
748
1020
|
lineClamp?: number;
|
|
1021
|
+
/** The string to truncate. This value will also be displayed in the tooltip when the text is truncated. */
|
|
749
1022
|
truncateString: string;
|
|
1023
|
+
/** Whether to show the tooltip. If left blank, it will default to true. If set to false, the tooltip will not be shown. */
|
|
750
1024
|
hasTooltip?: boolean;
|
|
1025
|
+
/** The id of the tooltip. If an ID is not provided, it will generate one from uuid */
|
|
751
1026
|
tooltipId?: string;
|
|
752
1027
|
[key: string]: any;
|
|
753
1028
|
}
|