@protonradio/proton-ui 0.11.0-beta.19 → 0.11.0-beta.2

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 (50) hide show
  1. package/README.md +73 -153
  2. package/dist/constants.cjs.js +1 -1
  3. package/dist/constants.cjs.js.map +1 -1
  4. package/dist/constants.d.ts +147 -4
  5. package/dist/constants.es.js +19 -7
  6. package/dist/constants.es.js.map +1 -1
  7. package/dist/hooks.cjs.js +1 -1
  8. package/dist/hooks.cjs.js.map +1 -1
  9. package/dist/hooks.d.ts +5 -34
  10. package/dist/hooks.es.js +4 -36
  11. package/dist/hooks.es.js.map +1 -1
  12. package/dist/icons.svg +10 -10
  13. package/dist/index.cjs.js +12 -12
  14. package/dist/index.cjs.js.map +1 -1
  15. package/dist/index.d.ts +296 -500
  16. package/dist/index.es.js +11431 -10145
  17. package/dist/index.es.js.map +1 -1
  18. package/dist/palettes-BX86v-qb.js +2 -0
  19. package/dist/palettes-BX86v-qb.js.map +1 -0
  20. package/dist/palettes-mcF0lNKY.mjs +171 -0
  21. package/dist/palettes-mcF0lNKY.mjs.map +1 -0
  22. package/dist/style.css +1 -1
  23. package/dist/useBreakpoint-CjRyGKN-.mjs.map +1 -1
  24. package/dist/useBreakpoint-DA-JqOu3.js.map +1 -1
  25. package/dist/utils.cjs.js +1 -1
  26. package/dist/utils.cjs.js.map +1 -1
  27. package/dist/utils.d.ts +45 -33
  28. package/dist/utils.es.js +451 -17
  29. package/dist/utils.es.js.map +1 -1
  30. package/package.json +100 -104
  31. package/dist/breakpoint-9y1_8U_b.mjs +0 -10
  32. package/dist/breakpoint-9y1_8U_b.mjs.map +0 -1
  33. package/dist/breakpoint-DtqbboOa.js +0 -2
  34. package/dist/breakpoint-DtqbboOa.js.map +0 -1
  35. package/dist/darkTheme-DUWn6YJ-.mjs +0 -345
  36. package/dist/darkTheme-DUWn6YJ-.mjs.map +0 -1
  37. package/dist/darkTheme-ann6VTfq.js +0 -2
  38. package/dist/darkTheme-ann6VTfq.js.map +0 -1
  39. package/dist/image-BlhKzTx8.js +0 -2
  40. package/dist/image-BlhKzTx8.js.map +0 -1
  41. package/dist/image-C8M6y5Op.mjs +0 -205
  42. package/dist/image-C8M6y5Op.mjs.map +0 -1
  43. package/dist/navigation-BB0MBIiR.js +0 -2
  44. package/dist/navigation-BB0MBIiR.js.map +0 -1
  45. package/dist/navigation-Bj7Pex9j.mjs +0 -43
  46. package/dist/navigation-Bj7Pex9j.mjs.map +0 -1
  47. package/dist/theme-DQsfWeLo.mjs +0 -12
  48. package/dist/theme-DQsfWeLo.mjs.map +0 -1
  49. package/dist/theme-Dc0Ahjq9.js +0 -2
  50. package/dist/theme-Dc0Ahjq9.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,102 +1,70 @@
1
- import { AriaButtonProps } from '@react-aria/button';
2
- import { AriaDialogProps } from '@react-aria/dialog';
3
- import { AriaPopoverProps } from '@react-aria/overlays';
4
- import { AriaTableProps } from '@react-aria/table';
1
+ import { AriaDialogProps } from 'react-aria';
2
+ import { AriaPopoverProps } from 'react-aria';
3
+ import { AriaTableProps } from 'react-aria';
5
4
  import { ColumnProps } from '@react-stately/table';
6
5
  import { default as default_2 } from 'react';
7
6
  import { DOMProps } from '@react-types/shared';
8
7
  import { ForwardRefExoticComponent } from 'react';
9
8
  import { JSX as JSX_2 } from 'react/jsx-runtime';
10
- import { OverlayTriggerProps } from '@react-stately/overlays';
11
- import { OverlayTriggerState } from '@react-stately/overlays';
12
- import { PressEvent } from '@react-types/shared';
9
+ import { OverlayTriggerProps } from 'react-stately';
10
+ import { OverlayTriggerState } from 'react-stately';
11
+ import { PressEvent } from 'react-aria';
13
12
  import { ReactNode } from 'react';
14
13
  import { RefAttributes } from 'react';
15
14
  import { RowProps } from '@react-stately/table';
16
15
  import { Section } from '@react-stately/table';
17
- import { Selection as Selection_2 } from '@react-types/shared';
16
+ import { Selection as Selection_2 } from 'react-stately';
17
+ import { Selection as Selection_3 } from 'react-aria-components';
18
18
  import { TableBodyProps } from '@react-stately/table';
19
19
  import { TableHeader } from '@react-stately/table';
20
- import { TableStateProps } from '@react-stately/table';
20
+ import { TableStateProps } from 'react-stately';
21
21
  import { TooltipProps as TooltipProps_2 } from 'react-aria-components';
22
22
  import { TooltipTriggerComponentProps } from 'react-aria-components';
23
23
 
24
24
  /**
25
25
  * ActionMenu to display a menu of actions.
26
26
  * Renders a list of actions as a focusable menu, or non-focusable children.
27
- *
28
- * API:
29
- * - {@link ActionMenuProps}
27
+ * @interface ActionMenuProps
30
28
  */
31
- export declare const ActionMenu: ({ isOpen, selectionMode, selectedKeys, defaultSelectedKeys, disabledKeys, children, showCancel, cancelButtonText, actions, title, onSelectionChange, onClose, "data-testid": testId, }: ActionMenuProps) => JSX_2.Element;
29
+ export declare const ActionMenu: ({ isOpen, selectionMode, selectedKeys, defaultSelectedKeys, disabledKeys, children, showCancel, cancelButtonText, actions, onSelectionChange, onClose, "data-testid": testId, }: ActionMenuProps) => JSX_2.Element;
32
30
 
33
31
  declare interface ActionMenuAction {
34
32
  key: string;
35
33
  label?: ReactNode;
36
- description?: ReactNode;
37
34
  to?: string;
38
35
  onAction?: (key: string) => void;
39
36
  children?: ActionMenuAction[];
40
37
  }
41
38
 
42
39
  declare interface ActionMenuProps {
43
- /** The actions of the menu
44
- * - type {@link ActionMenuAction}[]
45
- */
46
- actions?: ActionMenuAction[];
47
- /** The text of the cancel button */
48
- cancelButtonText?: string;
49
- /** The children of the menu */
40
+ isOpen: boolean;
41
+ selectionMode?: "single" | "multiple" | "none";
42
+ selectedKeys?: string[];
43
+ defaultSelectedKeys?: string[];
44
+ disabledKeys?: string[];
50
45
  children?: ReactNode | ((props: {
51
46
  close: () => void;
52
47
  }) => ReactNode);
53
- /** The test id of the menu */
54
- "data-testid"?: string;
55
- /** The keys of the default selected items */
56
- defaultSelectedKeys?: string[];
57
- /** The keys of the disabled items */
58
- disabledKeys?: string[];
59
- /** Whether the menu is open
60
- * @default false
61
- */
62
- isOpen: boolean;
63
- /** The callback function to close the menu */
48
+ showCancel?: boolean;
49
+ cancelButtonText?: string;
50
+ actions?: ActionMenuAction[];
51
+ id?: string;
64
52
  onClose?: () => void;
65
- /** The callback function to change the selection
66
- * - type {@link Selection}
67
- */
68
53
  onSelectionChange?: (keys: Selection_2) => void;
69
- /** The selection mode of the menu
70
- * @default "single"
71
- */
72
- selectionMode?: "single" | "multiple" | "none";
73
- /** The keys of the selected items */
74
- selectedKeys?: string[];
75
- /** Whether to show the cancel button */
76
- showCancel?: boolean;
77
- /** The title of the menu */
78
- title?: string;
54
+ "data-testid"?: string;
79
55
  }
80
56
 
81
- /**
82
- * A badge component for displaying status, categories, or counts with various visual styles.
83
- *
84
- * API:
85
- * - {@link BadgeProps}
86
- * - extends {@link React.HTMLAttributes}
87
- */
88
57
  export declare const Badge: ({ variant, children, ...props }: BadgeProps) => JSX_2.Element;
89
58
 
90
- declare interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
91
- /**
92
- * The content to display within the badge.
93
- */
94
- children: ReactNode;
59
+ export declare interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
95
60
  /**
96
61
  * The badge's visual aesthetic.
97
- * - type {@link BadgeVariant}
98
62
  */
99
63
  variant?: BadgeVariant;
64
+ /**
65
+ * The content to display within the badge.
66
+ */
67
+ children: ReactNode;
100
68
  }
101
69
 
102
70
  export declare type BadgeVariant = "primary" | "secondary" | "transparent" | "success" | "warning" | "danger";
@@ -105,96 +73,60 @@ export declare const BadgeVariants: Record<BadgeVariant, BadgeVariant>;
105
73
 
106
74
  /**
107
75
  * A banner used to display a success, warning, or error message.
108
- *
109
- * API:
110
- * - {@link BannerProps}
111
- * - extends {@link BannerIconProps}
76
+ * @interface BannerProps
112
77
  */
113
78
  export declare const Banner: {
114
79
  ({ variant, rounded, icon, compact, children, "data-testid": dataTestId, }: BannerProps): JSX_2.Element;
115
- displayName: string;
116
- /**
117
- * Renders an h3 styled banner.
118
- */
119
- Title: {
120
- ({ children, "data-testid": dataTestId, }: {
121
- children: ReactNode;
122
- "data-testid"?: string;
123
- }): JSX_2.Element;
124
- displayName: string;
125
- };
126
- /**
127
- * Renders a p styled banner.
128
- */
129
- Content: {
130
- ({ children, "data-testid": dataTestId, }: {
131
- children: ReactNode;
132
- "data-testid"?: string;
133
- }): JSX_2.Element;
134
- displayName: string;
135
- };
136
- /**
137
- * Renders an icon inline with the banner title.
138
- *
139
- * API:
140
- * - {@link BannerIconProps}
141
- */
142
- Icon: {
143
- ({ icon, "data-testid": dataTestId }: BannerIconProps): JSX_2.Element;
144
- displayName: string;
145
- };
146
- /**
147
- * Renders a Proton Button.
148
- * - @prop buttonProps {@link ButtonProps}
149
- */
150
- Action: {
151
- ({ children, ...buttonProps }: ButtonProps): JSX_2.Element;
152
- displayName: string;
80
+ Title: ({ children, ...props }: {
81
+ children: ReactNode;
82
+ }) => JSX_2.Element;
83
+ Content: ({ children, ...props }: {
84
+ children: ReactNode;
85
+ }) => JSX_2.Element;
86
+ Icon: ({ children, icon, ...props }: BannerIconProps) => JSX_2.Element;
87
+ Action: ({ children, ...props }: ButtonProps) => JSX_2.Element;
88
+ Actions: default_2.FC<BannerActionsProps>;
89
+ icons: {
90
+ success: JSX_2.Element;
91
+ warning: JSX_2.Element;
92
+ danger: JSX_2.Element;
153
93
  };
154
- /**
155
- * Renders Proton Buttons in a responsive actions grid.
156
- */
157
- Actions: {
158
- ({ children }: {
159
- children: ReactNode;
160
- }): JSX_2.Element;
161
- displayName: string;
94
+ variants: {
95
+ readonly default: "default";
96
+ readonly success: "success";
97
+ readonly warning: "warning";
98
+ readonly danger: "danger";
162
99
  };
163
100
  };
164
101
 
165
- export declare const BANNER_ICONS: {
166
- success: JSX_2.Element;
167
- warning: JSX_2.Element;
168
- danger: JSX_2.Element;
169
- };
170
-
171
- export declare const BANNER_VARIANTS: {
172
- readonly default: "default";
173
- readonly success: "success";
174
- readonly warning: "warning";
175
- readonly danger: "danger";
176
- };
102
+ declare interface BannerActionsProps {
103
+ children: ReactNode;
104
+ }
177
105
 
178
106
  declare interface BannerIconProps {
179
- /**
180
- * Optional custom icon or children for the icon area.
181
- */
182
- children?: ReactNode;
183
107
  /**
184
108
  * The icon to display in the banner.
185
- * Can be a boolean to conditionally show or hide, or a ReactNode to provide a custom icon.
109
+ * Can be a boolean to conditionally show or hide,
110
+ * or a ReactNode to provide a custom icon.
186
111
  */
187
112
  icon?: boolean | ReactNode;
188
113
  /**
189
- * The data-testid to display within the banner.
114
+ * Optional custom icon or children for the icon area.
190
115
  */
191
- "data-testid"?: string;
116
+ children?: ReactNode;
192
117
  }
193
118
 
194
119
  declare interface BannerProps extends BannerIconProps {
120
+ /**
121
+ * The banner's visual aesthetic.
122
+ */
123
+ variant?: BannerVariant;
124
+ /**
125
+ * Round the corners of the banner.
126
+ */
127
+ rounded?: boolean;
195
128
  /**
196
129
  * Compact padding around the content of the banner.
197
- * @default true
198
130
  */
199
131
  compact?: boolean;
200
132
  /**
@@ -205,16 +137,6 @@ declare interface BannerProps extends BannerIconProps {
205
137
  * The data-testid to display within the banner.
206
138
  */
207
139
  "data-testid"?: string;
208
- /**
209
- * Round the corners of the banner.
210
- * @default true
211
- */
212
- rounded?: boolean;
213
- /**
214
- * The banner's visual aesthetic.
215
- * - type {@link BannerVariant}
216
- */
217
- variant?: BannerVariant;
218
140
  }
219
141
 
220
142
  export declare type BannerVariant = "default" | "success" | "warning" | "danger";
@@ -270,7 +192,6 @@ declare interface BaseInputProps {
270
192
  /**
271
193
  * The type attribute of the input element.
272
194
  * @external https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/type
273
- * @default "text"
274
195
  */
275
196
  type?: string;
276
197
  /**
@@ -281,24 +202,14 @@ declare interface BaseInputProps {
281
202
  }
282
203
 
283
204
  /**
284
- * A customizable button component that can render as either a button or anchor element.
285
- *
286
- * API:
287
- * - {@link ButtonProps}
288
- * - extends {@link AriaButtonProps}
205
+ * A customizable button component that can render as either a button or anchor element
206
+ * @interface ButtonProps
289
207
  */
290
- export declare const Button: ForwardRefExoticComponent<ButtonProps & RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
208
+ export declare function Button({ variant, size, fullWidth, icon, to, target, onPress, type, isDisabled, "data-testid": testId, children, __textShift, }: ButtonProps): JSX_2.Element;
291
209
 
292
- /**
293
- * A radio button group component that allows selection of a single option from multiple choices.
294
- *
295
- * API:
296
- * - {@link ButtonGroupProps}
297
- */
298
210
  export declare function ButtonGroup(props: ButtonGroupProps): JSX_2.Element;
299
211
 
300
212
  export declare namespace ButtonGroup {
301
- var displayName: string;
302
213
  var Option: (props: ButtonGroupOptionProps) => JSX_2.Element;
303
214
  }
304
215
 
@@ -334,82 +245,72 @@ declare interface ButtonGroupProps {
334
245
  children?: React.ReactNode;
335
246
  }
336
247
 
337
- declare interface ButtonProps extends AriaButtonProps<"button"> {
248
+ declare interface ButtonProps {
338
249
  /** The button's visual aesthetic
339
- * - type {@link ButtonVariant}
250
+ * @param {ButtonVariant} variant
340
251
  */
341
252
  variant?: ButtonVariant;
342
253
  /** The size of the button
343
- * - type {@link ButtonSize}
344
- * @default "medium"
254
+ * @param {ButtonSize} size
255
+ * @default "fullWidth"
345
256
  */
346
257
  size?: ButtonSize;
347
258
  /** Should the button be full width?
348
- * @default false
259
+ * @param {boolean} fullWidth
349
260
  */
350
261
  fullWidth?: boolean;
351
- /** The prefix to display within the button */
262
+ /** The prefix to display within the button
263
+ * @param {React.ReactNode} icon
264
+ */
352
265
  icon?: React.ReactNode;
353
- /** Should the button be non-interactive? */
266
+ /** Should the button be non-interactive?
267
+ * @param {boolean} isDisabled
268
+ */
354
269
  isDisabled?: boolean;
355
- /** The URL that the button should link to. Turns the element into an `a` tag. If the URL is external, you should pass the entire URL to the `to` prop (e.g. `https://example.com`). */
270
+ /** The URL that the button should link to. Turns the element into an `a` tag. If the URL is external, you should pass the entire URL to the `to` prop (e.g. `https://example.com`).
271
+ * @param {string} to
272
+ */
356
273
  to?: string;
357
- /** The target attribute for the link. Defaults to `_blank` if the URL is external. */
358
- target?: "_blank" | "_self" | "_parent" | "_top" | string;
359
- /** Called when the button is pressed (on release, not keydown) */
274
+ /** The target attribute for the link. Defaults to `_blank` if the URL is external.
275
+ * @param {string} target
276
+ */
277
+ target?: "_blank" | "_self" | "_parent" | "_top";
278
+ /** Called when the button is pressed (on release, not keydown)
279
+ * @param {(e: PressEvent) => void} onPress
280
+ */
360
281
  onPress?: (e: PressEvent) => void;
361
- /** The type of button */
282
+ /** The type of button
283
+ * @param {"button" | "submit" | "reset"} type
284
+ */
362
285
  type?: "button" | "submit" | "reset";
363
- /** The test ID for the button */
286
+ /** The test ID for the button
287
+ * @param {string} dataTestId
288
+ */
364
289
  "data-testid"?: string;
365
- /** The content to display within the button */
290
+ /** The content to display within the button
291
+ * @param {React.ReactNode} children
292
+ */
366
293
  children?: React.ReactNode;
294
+ /** DO NOT USE. INTERNAL USE ONLY. Will be used in calculation for the shift of the button text. Represents the # of horizontal pixels to shift.
295
+ * @param {number} __textShift
296
+ */
297
+ __textShift?: number;
367
298
  }
368
299
 
369
- export declare type ButtonSize = "small" | "medium" | "large" | "xlarge" | "2xlarge";
370
-
371
- export declare const ButtonSizes: Record<ButtonSize, ButtonSize>;
300
+ declare type ButtonSize = "small" | "medium" | "large" | "xlarge" | "2xlarge";
372
301
 
373
302
  export declare type ButtonVariant = "primary" | "secondary" | "success" | "danger" | "translucent";
374
303
 
375
- export declare const ButtonVariants: Record<ButtonVariant, ButtonVariant>;
376
-
377
- /**
378
- * A button with a select menu.
379
- *
380
- * API:
381
- * - {@link ButtonWithSelectProps}
382
- * - extends {@link ButtonProps}
383
- */
384
304
  export declare function ButtonWithSelect({ items, defaultValue, children, onSelectionChange, disabledKeys, selectedKey, icon, variant, fullWidth, onPress, ...buttonProps }: ButtonWithSelectProps): JSX_2.Element;
385
305
 
386
- export declare namespace ButtonWithSelect {
387
- var displayName: string;
388
- }
389
-
390
- declare interface ButtonWithSelectProps extends ButtonProps {
391
- /**
392
- * The default value of the select menu.
393
- */
306
+ declare type ButtonWithSelectProps = {
307
+ items: MenuItemType[];
394
308
  defaultValue?: string;
395
- /**
396
- * The keys of the disabled items.
397
- */
398
- disabledKeys?: string[];
399
- /**
400
- * The items to display in the select menu.
401
- * - type {@link ActionMenuAction}
402
- */
403
- items: ActionMenuAction[];
404
- /**
405
- * The callback function to call when the selection changes.
406
- */
309
+ children: default_2.ReactNode;
407
310
  onSelectionChange?: (key: string) => void;
408
- /**
409
- * The key of the selected item.
410
- */
411
311
  selectedKey?: string;
412
- }
312
+ disabledKeys?: string[];
313
+ } & ButtonProps;
413
314
 
414
315
  export declare const Cell: <T>(props: ProtonColumnProps<T>) => JSX.Element;
415
316
 
@@ -417,9 +318,7 @@ export declare const Column: <T>(props: ProtonColumnProps<T>) => JSX.Element;
417
318
 
418
319
  /**
419
320
  * Input with a button to copy value to the clipboard.
420
- *
421
- * API:
422
- * - {@link CopyInputProps}
321
+ * @interface CopyInputProps
423
322
  */
424
323
  export declare function CopyInput({ name, value, isDisabled, onError, onSuccess, }: CopyInputProps): JSX_2.Element;
425
324
 
@@ -438,10 +337,6 @@ declare interface CopyInputProps {
438
337
 
439
338
  /**
440
339
  * Intended use in overlay containers such as modals or popovers.
441
- *
442
- * API:
443
- * - {@link DialogProps}
444
- * - extends {@link AriaDialogProps}
445
340
  */
446
341
  export declare function Dialog({ title, children, ...props }: DialogProps): JSX_2.Element;
447
342
 
@@ -457,8 +352,7 @@ declare interface DialogProps extends AriaDialogProps {
457
352
  * to create a sense of depth or hierarchy in the UI. It uses the `--proton-control__background-color-light`
458
353
  * CSS variable which is theme-aware and will adapt to light, dark, and custom-dark themes.
459
354
  *
460
- * API:
461
- * - {@link ElevationProps}
355
+ * @interface ElevationProps
462
356
  */
463
357
  export declare const Elevation: ({ children, hasPrimaryGradient, "data-testid": dataTestId, }: ElevationProps) => JSX_2.Element;
464
358
 
@@ -467,29 +361,23 @@ declare interface ElevationProps {
467
361
  * The content to be displayed within the elevation.
468
362
  */
469
363
  children?: ReactNode;
470
- /**
471
- * The data-testid attribute for testing purposes.
472
- */
473
- "data-testid"?: string;
474
364
  /**
475
365
  * Whether the elevation should have a background gradient.
476
366
  * @important only works in custom dark mode
477
367
  * @default false
478
368
  */
479
369
  hasPrimaryGradient?: boolean;
370
+ /**
371
+ * The data-testid attribute for testing purposes.
372
+ */
373
+ "data-testid"?: string;
480
374
  }
481
375
 
482
- /**
483
- * An icon component that displays SVG icons from a sprite sheet or inline.
484
- *
485
- * API:
486
- * - {@link IconProps}
487
- */
488
- export declare function Icon(props: IconProps): JSX_2.Element;
376
+ export declare function Icon(props: Omit<IconProps, "svgContent">): JSX_2.Element;
489
377
 
490
378
  declare type IconID = "external-link" | "caret-down" | "caret-right" | "chevron-right" | "chevron-left" | "chevron-up" | "chevron-down";
491
379
 
492
- export declare interface IconProps {
380
+ declare interface IconProps {
493
381
  /**
494
382
  * The spritesheet ID defined in the Icons spritesheet.
495
383
  */
@@ -506,9 +394,7 @@ export declare interface IconProps {
506
394
 
507
395
  /**
508
396
  * ImageOverlay component for displaying an image with a blur effect.
509
- *
510
- * API:
511
- * - {@link ImageBackgroundProps}
397
+ * @interface ImageBackgroundProps
512
398
  */
513
399
  export declare function ImageBackground({ image, imageUrl, onLoad, }: ImageBackgroundProps): JSX_2.Element;
514
400
 
@@ -534,122 +420,136 @@ declare interface ImageBackgroundProps {
534
420
 
535
421
  /**
536
422
  * A controlled and customizable input component with support for labels, prefixes, suffixes, and error states.
537
- *
538
- * API:
539
- * - {@link BaseInputProps}
540
423
  */
541
424
  export declare const Input: default_2.ForwardRefExoticComponent<BaseInputProps & default_2.RefAttributes<HTMLInputElement>>;
542
425
 
426
+ declare type MenuItemType = ActionMenuAction;
427
+
543
428
  declare interface MenuProps {
544
- /** Custom trigger component. If not provided, defaults to ellipsis icon.
545
- * - @prop triggerProps {@link TriggerProps}
546
- */
547
- renderTrigger?: (triggerProps: TriggerProps) => ReactNode;
548
- /** Size of the trigger icon
549
- * @default 24
550
- */
429
+ /** The id of the menu */
430
+ menuId?: string;
431
+ /** Custom trigger component. If not provided, defaults to ellipsis icon */
432
+ renderTrigger?: (triggerProps: TriggerProps, isOpen: boolean) => ReactNode;
433
+ /** Size of the trigger icon */
551
434
  size?: number;
552
- /** Title of the parent menu */
553
- title?: string;
554
- /** Array of menu actions/items to display
555
- * - type {@link ActionMenuAction}[]
556
- */
557
- items: ActionMenuAction[];
558
- /** Whether the menu is disabled
559
- * @default false
560
- */
435
+ /** Array of menu actions/items to display */
436
+ items: MenuItemType[];
437
+ /** Whether the menu is disabled */
561
438
  disabled?: boolean;
562
439
  /** Callback when menu closes */
563
440
  onClose?: () => void;
564
441
  /** Test ID for the trigger component */
565
- triggerTestId?: string;
442
+ testId?: string;
566
443
  /** Test ID for the menu */
567
444
  menuTestId?: string;
568
445
  /** Callback when a menu item is selected */
569
- onSelectionChange?: (key: string) => void;
446
+ onSelectionChange?: (keys: Selection_3) => void;
570
447
  /** The key of the selected item */
571
448
  selectedKey?: string;
572
449
  /** The keys of the disabled items */
573
450
  disabledKeys?: string[];
574
451
  }
575
452
 
576
- /**
577
- * A component that displays either a popover menu or an action menu
578
- * depending on the screen size when the menu trigger is pressed.
579
- *
580
- * API:
581
- * - {@link MenuProps}
582
- */
583
- export declare function MenuTrigger({ renderTrigger, size, title, items, disabled, onClose, triggerTestId, menuTestId, onSelectionChange, selectedKey, disabledKeys, }: MenuProps): JSX_2.Element;
453
+ export declare function MenuTrigger({ renderTrigger, menuId, size, items, disabled, onClose, testId: triggerTestId, menuTestId, onSelectionChange, selectedKey, disabledKeys, }: MenuProps): JSX_2.Element;
584
454
 
585
455
  export declare const Modal: (({ isOpen, onClose, title, subtitle, body, children, isOverlay, "data-testid": dataTestId, }: ModalProps) => JSX_2.Element) & {
586
- /**
587
- * Renders a h2 styled title
588
- * */
589
456
  Title: ({ children }: {
590
457
  children: React.ReactNode;
591
458
  }) => JSX_2.Element;
592
- /**
593
- * Renders a h3 styled subtitle
594
- * */
595
459
  Subtitle: ({ children }: {
596
460
  children: React.ReactNode;
597
461
  }) => JSX_2.Element;
598
- /**
599
- * Renders a div styled body
600
- * */
601
462
  Body: ({ children }: {
602
463
  children: React.ReactNode;
603
464
  }) => JSX_2.Element;
604
- /**
605
- * Renders a Proton Button action
606
- * - @prop buttonProps {@link ButtonProps}
607
- * */
608
- Action: (buttonProps: ButtonProps) => JSX_2.Element;
609
- /**
610
- * Renders a group of Proton Buttons
611
- * */
465
+ Action: (props: ButtonProps) => JSX_2.Element;
612
466
  Actions: ({ children }: {
613
467
  children: React.ReactNode;
614
468
  }) => JSX_2.Element;
615
469
  };
616
470
 
617
471
  declare interface ModalProps {
618
- /**
619
- * Optional body text content for the modal
620
- * */
621
- body?: string;
622
- /**
623
- * Content to render inside the modal
624
- * */
625
- children: React.ReactNode;
626
- /**
627
- * data-testid for the modal
628
- * */
629
- "data-testid"?: string;
630
472
  /**
631
473
  * Controls the visibility of the modal
632
474
  * */
633
475
  isOpen: boolean;
476
+ /**
477
+ * Callback function when modal is closed
478
+ * */
479
+ onClose?: () => void;
634
480
  /**
635
481
  * Whether to show the modal with an overlay background.
636
482
  * @default true
637
483
  * */
638
484
  isOverlay?: boolean;
639
485
  /**
640
- * Callback function when modal is closed
486
+ * Optional title text for the modal header
641
487
  * */
642
- onClose?: () => void;
488
+ title?: string;
643
489
  /**
644
490
  * Optional subtitle text below the modal title
645
491
  * */
646
492
  subtitle?: string;
647
493
  /**
648
- * Optional title text for the modal header
494
+ * Optional body text content for the modal
649
495
  * */
650
- title?: string;
496
+ body?: string;
497
+ /**
498
+ * Content to render inside the modal
499
+ * */
500
+ children: React.ReactNode;
501
+ /**
502
+ * data-testid for the modal
503
+ * */
504
+ "data-testid"?: string;
651
505
  }
652
506
 
507
+ declare type Palette = {
508
+ BASE_COLOR: string;
509
+ BRAND: {
510
+ PRIMARY: string;
511
+ PRIMARY_LIGHT: string;
512
+ SECONDARY: string;
513
+ };
514
+ PRIMARY: {
515
+ PRIMARY_SUPER_DARK: string;
516
+ PRIMARY_DARK: string;
517
+ PRIMARY_MEDIUM: string;
518
+ PRIMARY_MEDIUM_LIGHT: string;
519
+ PRIMARY_LIGHT: string;
520
+ PRIMARY_LIGHTEST: string;
521
+ PRIMARY_SUPER_LIGHT: string;
522
+ };
523
+ SECONDARY: {
524
+ SECONDARY_SUPER_DARK: string;
525
+ SECONDARY_DARK: string;
526
+ SECONDARY_MEDIUM: string;
527
+ SECONDARY_MEDIUM_LIGHT: string;
528
+ SECONDARY_LIGHT: string;
529
+ SECONDARY_LIGHTEST: string;
530
+ SECONDARY_SUPER_LIGHT: string;
531
+ };
532
+ SUCCESS: {
533
+ SUCCESS_DARK: string;
534
+ SUCCESS_MEDIUM: string;
535
+ SUCCESS_LIGHT: string;
536
+ SUCCESS_SUPER_LIGHT: string;
537
+ };
538
+ WARNING: {
539
+ WARNING_DARK: string;
540
+ WARNING_MEDIUM: string;
541
+ WARNING_LIGHT: string;
542
+ WARNING_SUPER_LIGHT: string;
543
+ };
544
+ DANGER: {
545
+ DANGER_SUPER_DARK: string;
546
+ DANGER_DARK: string;
547
+ DANGER_MEDIUM: string;
548
+ DANGER_LIGHT: string;
549
+ DANGER_SUPER_LIGHT: string;
550
+ };
551
+ };
552
+
653
553
  /**
654
554
  * Popover is an unstyled popover component that handles positioning. It should be used
655
555
  * with the Dialog component to provide a styled popover.
@@ -657,109 +557,39 @@ declare interface ModalProps {
657
557
  * A popover displays interactive content in context with a trigger element.
658
558
  * A tooltip displays a description of an element on hover or focus.
659
559
  *
660
- * @see {@link usePopoverTrigger} for a complete usage example
661
- *
662
- * API:
663
- * - {@link PopoverProps}
664
- * - extends {@link AriaPopoverProps}
560
+ * @interface PopoverProps
665
561
  */
666
562
  export declare function Popover({ children, state, arrow, offset, ...props }: PopoverProps): JSX_2.Element;
667
563
 
668
564
  declare interface PopoverProps extends Omit<AriaPopoverProps, "popoverRef"> {
669
- /**
670
- * Whether to show an arrow on the popover.
671
- */
672
- arrow?: boolean;
673
565
  /**
674
566
  * Content to display within the popover.
675
567
  */
676
568
  children: default_2.ReactNode;
569
+ /**
570
+ * The `isOpen` state of the popover and the methods to toggle it.
571
+ */
572
+ state: OverlayTriggerState;
677
573
  /**
678
574
  * Can optionally forward the ref to the popover.
679
575
  */
680
576
  popoverRef?: default_2.RefObject<HTMLDivElement>;
681
577
  /**
682
- * The `isOpen` state of the popover and the methods to toggle it.
683
- * - type {@link OverlayTriggerState}
578
+ * Whether to show an arrow on the popover.
684
579
  */
685
- state: OverlayTriggerState;
580
+ arrow?: boolean;
686
581
  }
687
582
 
688
- declare type ProtonColorScale = {
689
- SUPER_DARK: string;
690
- DARK: string;
691
- MEDIUM: string;
692
- MEDIUM_LIGHT: string;
693
- LIGHT: string;
694
- LIGHTEST: string;
695
- SUPER_LIGHT: string;
696
- WHITE: string;
697
- };
698
-
699
583
  export declare interface ProtonColumnProps<T> extends ColumnProps<T> {
700
584
  align?: "left" | "center" | "right";
701
585
  onClick?: (key: string) => void;
702
586
  }
703
587
 
704
- declare type ProtonPalette = {
705
- BASE_COLOR: string;
706
- BRAND: {
707
- PRIMARY: string;
708
- PRIMARY_LIGHT: string;
709
- PRIMARY_SUPER_LIGHT: string;
710
- SECONDARY: string;
711
- SECONDARY_LIGHT: string;
712
- SECONDARY_SUPER_LIGHT: string;
713
- };
714
- PRIMARY: ProtonColorScale;
715
- SECONDARY: ProtonColorScale;
716
- GRAYSCALE: ProtonColorScale;
717
- };
718
-
719
588
  export declare interface ProtonRowProps<T = object> extends RowProps<T> {
720
589
  backgroundColor?: string;
721
590
  onClick?: (key: string) => void;
722
591
  }
723
592
 
724
- declare interface ProtonStyleSheet {
725
- "--proton-control__background-color": string;
726
- "--proton-control__background-color-light": string;
727
- "--proton-control__text-color": string;
728
- "--proton-control__title-color": string;
729
- "--proton-control__border-color": string;
730
- "--proton-control__shadow-color": string;
731
- "--proton-control__hover-color": string;
732
- "--proton-control__border-radius": string;
733
- "--proton-control__interactive-color": string;
734
- "--proton-color__primary": string;
735
- "--proton-color__primary-light": string;
736
- "--proton-color__primary-super-light": string;
737
- "--proton-color__secondary": string;
738
- "--proton-color__secondary-light": string;
739
- "--proton-color__secondary-super-light": string;
740
- "--proton-color__danger-super-dark": string;
741
- "--proton-color__danger-dark": string;
742
- "--proton-color__danger-medium": string;
743
- "--proton-color__danger-light": string;
744
- "--proton-color__danger-super-light": string;
745
- "--proton-color__warning-dark": string;
746
- "--proton-color__warning-medium": string;
747
- "--proton-color__warning-light": string;
748
- "--proton-color__warning-super-light": string;
749
- "--proton-color__success-dark": string;
750
- "--proton-color__success-medium": string;
751
- "--proton-color__success-light": string;
752
- "--proton-color__success-super-light": string;
753
- "--proton-color__gray-super-dark": string;
754
- "--proton-color__gray-dark": string;
755
- "--proton-color__gray-medium": string;
756
- "--proton-color__gray-medium-light": string;
757
- "--proton-color__gray-light": string;
758
- "--proton-color__gray-lightest": string;
759
- "--proton-color__gray-super-light": string;
760
- "--proton-color__white": string;
761
- }
762
-
763
593
  export declare interface ProtonTableBodyProps<T = object> extends TableBodyProps<T> {
764
594
  showLines?: boolean;
765
595
  }
@@ -768,17 +598,11 @@ export declare const Row: <T = object>(props: ProtonRowProps<T>) => JSX.Element;
768
598
 
769
599
  /**
770
600
  * Base Overlay component for creating modal-like backgrounds.
771
- *
772
- * API:
773
- * - {@link ScreenOverlayProps}
601
+ * @interface ScreenOverlayProps
774
602
  */
775
603
  export declare const ScreenOverlay: ForwardRefExoticComponent<Omit<ScreenOverlayProps, "ref"> & RefAttributes<HTMLDivElement>>;
776
604
 
777
605
  declare interface ScreenOverlayProps {
778
- /**
779
- * Children to render inside the overlay.
780
- */
781
- children?: React.ReactNode;
782
606
  /**
783
607
  * Whether to fade in the overlay.
784
608
  */
@@ -791,14 +615,14 @@ declare interface ScreenOverlayProps {
791
615
  * Ref to the overlay element.
792
616
  */
793
617
  ref?: React.RefObject<HTMLDivElement>;
618
+ /**
619
+ * Children to render inside the overlay.
620
+ */
621
+ children?: React.ReactNode;
794
622
  }
795
623
 
796
624
  /**
797
625
  * A search input component with optional clear functionality and URL parameter sync.
798
- *
799
- * API:
800
- * - {@link SearchInputProps}
801
- * - extends {@link BaseInputProps}
802
626
  */
803
627
  export declare const SearchInput: ({ name, placeholder, autoComplete, isClearable, isDisabled, error, defaultValue, value: controlledValue, "data-testid": testId, onChange, onClear, }: SearchInputProps) => JSX_2.Element;
804
628
 
@@ -820,16 +644,9 @@ export { Section }
820
644
  /**
821
645
  * A dropdown select menu that opens a popover on desktop and an action menu on mobile.
822
646
  * Supports controlled and uncontrolled modes.
823
- *
824
- * API:
825
- * - {@link SelectProps}
826
647
  */
827
648
  export declare function Select({ label, name, isDisabled, disabledKeys, selectedKey, onSelectionChange, defaultSelectedKey, onOpen, onClose, items, "data-testid": testId, }: SelectProps): JSX_2.Element;
828
649
 
829
- export declare namespace Select {
830
- var displayName: string;
831
- }
832
-
833
650
  declare interface SelectItem {
834
651
  label: string;
835
652
  key: string;
@@ -837,42 +654,36 @@ declare interface SelectItem {
837
654
  }
838
655
 
839
656
  declare interface SelectProps {
657
+ /** The name of the select field */
658
+ name: string;
659
+ /** Label to display above the select
660
+ * @external https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label#text
661
+ */
662
+ label?: string;
663
+ /** Whether the select is disabled */
664
+ isDisabled?: boolean;
840
665
  /** Array of keys that should be disabled
841
666
  * @example ["Thing 1", "Thing 2"]
842
667
  */
843
668
  disabledKeys?: string[];
669
+ /** Currently selected key */
670
+ selectedKey?: string;
671
+ /** Callback fired when selection changes */
672
+ onSelectionChange?: (key: string) => void;
844
673
  /** The key of the default selected item */
845
674
  defaultSelectedKey?: string;
846
- /** Test ID for the select */
847
- "data-testid"?: string;
848
- /** Whether the select is disabled */
849
- isDisabled?: boolean;
675
+ /** Callback fired when the menu opens */
676
+ onOpen?: () => void;
677
+ /** Callback fired when the menu closes */
678
+ onClose?: () => void;
850
679
  /** Array of items to display
851
680
  * @example [{ key: "thing-1", label: "Thing 1" }, { key: "thing-2", label: "Thing 2" }]
852
681
  */
853
682
  items: SelectItem[];
854
- /** Label to display above the select
855
- * @external https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label#text
856
- */
857
- label?: string;
858
- /** The name of the select field */
859
- name: string;
860
- /** Callback fired when the menu closes */
861
- onClose?: () => void;
862
- /** Callback fired when the menu opens */
863
- onOpen?: () => void;
864
- /** Callback fired when selection changes */
865
- onSelectionChange?: (key: string) => void;
866
- /** Currently selected key */
867
- selectedKey?: string;
683
+ /** Test ID for the select */
684
+ "data-testid"?: string;
868
685
  }
869
686
 
870
- /**
871
- * A toggle switch component for boolean state control with support for controlled and uncontrolled modes.
872
- *
873
- * API:
874
- * - {@link SwitchProps}
875
- */
876
687
  export declare function Switch(props: SwitchProps): JSX_2.Element;
877
688
 
878
689
  declare interface SwitchProps {
@@ -903,14 +714,6 @@ declare interface SwitchProps {
903
714
  children?: React.ReactNode;
904
715
  }
905
716
 
906
- /**
907
- * A table component that displays data in a grid format.
908
- *
909
- * API:
910
- * - {@link TableProps}
911
- * - extends {@link AriaTableProps}
912
- * - extends {@link TableStateProps}<object>
913
- */
914
717
  export declare function Table(props: TableProps): JSX_2.Element;
915
718
 
916
719
  export declare const TableBody: <T = object>(props: ProtonTableBodyProps<T>) => JSX.Element;
@@ -925,9 +728,7 @@ declare interface TableProps extends AriaTableProps, TableStateProps<object> {
925
728
 
926
729
  /**
927
730
  * A component that displays text with an ellipsis when it overflows its container.
928
- *
929
- * API:
930
- * - {@link TextEllipsisProps}
731
+ * @interface TextEllipsisProps
931
732
  */
932
733
  export declare const TextEllipsis: ({ children, maxWidth, singleLine, lines, title, "data-testid": testId, }: TextEllipsisProps) => JSX_2.Element;
933
734
 
@@ -964,10 +765,7 @@ declare interface TextEllipsisProps {
964
765
 
965
766
  /**
966
767
  * A component that displays text with emphasis. Provide tooltipProps to wrap the text in a tooltip trigger.
967
- *
968
- * API:
969
- * - {@link TextEmphasisProps}
970
- * - extends {@link React.HTMLAttributes}
768
+ * @interface TextEmphasisProps
971
769
  */
972
770
  export declare const TextEmphasis: ({ to, children, tooltipProps, "data-testid": testId, }: TextEmphasisProps) => JSX_2.Element;
973
771
 
@@ -995,9 +793,8 @@ declare type Theme = (typeof THEMES)[keyof typeof THEMES];
995
793
  declare interface ThemeContextType {
996
794
  theme: Theme;
997
795
  className: string;
998
- style: ProtonStyleSheet;
999
- palette: ProtonPalette;
1000
- hasPalette?: boolean;
796
+ style: ThemeVariables;
797
+ palette: Palette;
1001
798
  }
1002
799
 
1003
800
  export declare const ThemeProvider: default_2.FC<ThemeProviderProps>;
@@ -1005,40 +802,66 @@ export declare const ThemeProvider: default_2.FC<ThemeProviderProps>;
1005
802
  declare interface ThemeProviderProps {
1006
803
  theme: Theme;
1007
804
  children: ReactNode;
1008
- palette?: ProtonPalette;
805
+ palette?: Palette;
1009
806
  }
1010
807
 
1011
808
  declare const THEMES: {
1012
809
  readonly DARK: "dark";
810
+ readonly CUSTOM_DARK: "custom-dark";
1013
811
  readonly LIGHT: "light";
1014
812
  };
1015
813
 
814
+ declare interface ThemeVariables {
815
+ "--proton-control__background-color": string;
816
+ "--proton-control__background-color-light": string;
817
+ "--proton-control__text-color": string;
818
+ "--proton-control__border-color": string;
819
+ "--proton-control__shadow-color": string;
820
+ "--proton-color__primary": string;
821
+ "--proton-color__primary-light": string;
822
+ "--proton-color__secondary": string;
823
+ "--proton-control__primary-super-dark": string;
824
+ "--proton-control__primary-dark": string;
825
+ "--proton-control__primary-medium": string;
826
+ "--proton-control__primary-medium-light": string;
827
+ "--proton-control__primary-light": string;
828
+ "--proton-control__primary-lightest": string;
829
+ "--proton-control__primary-super-light": string;
830
+ "--proton-control__secondary-super-dark": string;
831
+ "--proton-control__secondary-dark": string;
832
+ "--proton-control__secondary-medium": string;
833
+ "--proton-control__secondary-medium-light": string;
834
+ "--proton-control__secondary-light": string;
835
+ "--proton-control__secondary-lightest": string;
836
+ "--proton-control__secondary-super-light": string;
837
+ }
838
+
1016
839
  /**
1017
- * A component that displays a loading tombstone. For use as a placeholder while loading content.
1018
- *
1019
- * API:
1020
- * - {@link TombstoneProps}
840
+ * A component that displays a loading tombstone. For use as a placeholder while loading content
841
+ * @interface TombstoneProps
1021
842
  */
1022
843
  export declare const Tombstone: ({ width, height, borderRadius, }: TombstoneProps) => JSX_2.Element;
1023
844
 
1024
845
  declare interface TombstoneProps {
1025
846
  /**
1026
- * The border radius of the tombstone.
1027
- * @default "4px"
847
+ * The width of the tombstone.
848
+ * @default "100%"
1028
849
  */
1029
- borderRadius?: string;
850
+ width?: string;
1030
851
  /**
1031
852
  * The height of the tombstone.
1032
853
  * @default "1.5rem"
1033
854
  */
1034
855
  height?: string;
1035
856
  /**
1036
- * The width of the tombstone.
1037
- * @default "100%"
857
+ * The border radius of the tombstone.
858
+ * @default "4px"
1038
859
  */
1039
- width?: string;
860
+ borderRadius?: string;
1040
861
  }
1041
862
 
863
+ export declare function Tooltip({ children, arrow, ...props }: TooltipProps): JSX_2.Element;
864
+
1042
865
  export declare interface TooltipProps extends Omit<TooltipProps_2, "children"> {
1043
866
  children: React.ReactNode;
1044
867
  arrow?: boolean;
@@ -1051,18 +874,6 @@ export declare interface TooltipProps extends Omit<TooltipProps_2, "children"> {
1051
874
  *
1052
875
  * If you wish to disable the trigger click feature, you can set the `disableTriggerClick` prop.
1053
876
  * This is useful when using an info only Tooltip that might wrap a clickable element.
1054
- *
1055
- * API:
1056
- * - {@link TooltipTriggerProps}
1057
- * - extends {@link TooltipProps}
1058
- * - extends {@link TooltipTriggerComponentProps}
1059
- *
1060
- * @example
1061
- * ```tsx
1062
- <TooltipTrigger content={...} placement="top" arrow isDisabled={disabled}>
1063
- {children}
1064
- </TooltipTrigger>
1065
- * ```
1066
877
  */
1067
878
  export declare function TooltipTrigger({ children, delay, closeDelay, isDisabled, defaultOpen, onOpenChange, disableTriggerClick, content, ...tooltipProps }: TooltipTriggerProps): JSX_2.Element;
1068
879
 
@@ -1078,46 +889,24 @@ export declare interface TooltipTriggerProps extends TooltipProps, TooltipTrigge
1078
889
  disableTriggerClick?: boolean;
1079
890
  }
1080
891
 
892
+ /**
893
+ * A component that displays either a popover menu or an action menu
894
+ * depending on the screen size when the menu trigger is pressed.
895
+ *
896
+ * @param {MenuProps} props - The props for the MenuTrigger component.
897
+ * @returns {JSX.Element} - The MenuTrigger component.
898
+ */
1081
899
  declare interface TriggerProps {
1082
- disabled?: boolean;
1083
- isOpen?: boolean;
1084
- setIsOpen?: (isOpen: boolean) => void;
1085
- triggerRef: React.RefObject<HTMLButtonElement>;
900
+ isDisabled?: boolean;
901
+ "data-testid"?: string;
902
+ ref?: React.RefObject<HTMLButtonElement>;
903
+ onPress?: () => void;
904
+ "aria-label": string;
1086
905
  }
1087
906
 
1088
907
  /**
1089
908
  * Hook for creating a popover trigger. This hook manages the state and events for the popover
1090
909
  * and popover trigger. For examples see Popover.stories.tsx.
1091
- *
1092
- * API:
1093
- * - {@link OverlayTriggerProps}
1094
- *
1095
- * @example
1096
- * ```tsx
1097
- * let { buttonProps, overlayProps, buttonRef, state } = usePopoverTrigger();
1098
- *
1099
- * return (
1100
- * <div>
1101
- * <button {...buttonProps} ref={buttonRef}>
1102
- * Trigger
1103
- * </button>
1104
- *
1105
- * {state.isOpen && (
1106
- * <Popover
1107
- * state={state}
1108
- * triggerRef={buttonRef}
1109
- * arrow={props.arrow}
1110
- * offset={props.offset}
1111
- * placement={props.placement}
1112
- * >
1113
- * <Dialog {...overlayProps} title="Popover">
1114
- * Here is some popover content
1115
- * </Dialog>
1116
- * </Popover>
1117
- * )}
1118
- * </div>
1119
- * );
1120
- * ```
1121
910
  */
1122
911
  export declare function usePopoverTrigger(props?: OverlayTriggerProps): {
1123
912
  buttonProps: default_2.ButtonHTMLAttributes<HTMLButtonElement>;
@@ -1131,8 +920,10 @@ export declare const useTheme: () => ThemeContextType;
1131
920
  /**
1132
921
  * A waveform visualization component that displays audio data with interactive features.
1133
922
  *
1134
- * API:
1135
- * - {@link WaveformProps}
923
+ * @component
924
+ * @interface WaveformProps
925
+ *
926
+ * @returns {JSX.Element} A waveform visualization with optional timestamps and interactive features
1136
927
  */
1137
928
  export declare function Waveform({ data: waveformData, resolution, startDuration, endDuration, currentTime, showTimestamps, totalDuration, disabled, disabledMessage, onClick, "data-testid": testId, }: WaveformProps): JSX_2.Element;
1138
929
 
@@ -1142,14 +933,6 @@ declare interface WaveformProps {
1142
933
  * If not provided, uses a sample sine wave.
1143
934
  */
1144
935
  data?: number[];
1145
- /**
1146
- * Current playback position in seconds.
1147
- */
1148
- currentTime?: number;
1149
- /**
1150
- * Test ID for testing purposes.
1151
- */
1152
- "data-testid"?: string;
1153
936
  /**
1154
937
  * Whether the entire waveform is disabled.
1155
938
  */
@@ -1159,29 +942,42 @@ declare interface WaveformProps {
1159
942
  */
1160
943
  disabledMessage?: string;
1161
944
  /**
1162
- * End time to display until in seconds.
945
+ * Total duration of the audio in seconds.
1163
946
  */
1164
- endDuration?: number;
947
+ totalDuration: number;
1165
948
  /**
1166
- * Click handler that receives the clicked position (0-1) and event.
949
+ * Current playback position in seconds.
1167
950
  */
1168
- onClick?: (position: number, e: React.MouseEvent<HTMLDivElement>) => void;
951
+ currentTime?: number;
1169
952
  /**
1170
953
  * Width in pixels of each waveform bar.
1171
954
  */
1172
955
  resolution?: number;
956
+ /**
957
+ * Start time to display from in seconds.
958
+ */
959
+ startDuration?: number;
960
+ /**
961
+ * End time to display until in seconds.
962
+ */
963
+ endDuration?: number;
1173
964
  /**
1174
965
  * Whether to show timestamp markers.
1175
966
  */
1176
967
  showTimestamps?: boolean;
1177
968
  /**
1178
- * Start time to display from in seconds.
969
+ * Click handler that receives the clicked position (0-1) and event.
1179
970
  */
1180
- startDuration?: number;
971
+ onClick?: (position: number, e: React.MouseEvent<HTMLDivElement>) => void;
1181
972
  /**
1182
- * Total duration of the audio in seconds.
973
+ * Test ID for testing purposes.
1183
974
  */
1184
- totalDuration: number;
975
+ "data-testid"?: string;
1185
976
  }
1186
977
 
1187
978
  export { }
979
+
980
+
981
+ declare namespace ButtonGroup {
982
+ var Option: (props: ButtonGroupOptionProps) => import("react/jsx-runtime").JSX.Element;
983
+ }