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