storybook 10.1.0-alpha.0 → 10.1.0-alpha.10

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 (91) hide show
  1. package/dist/_browser-chunks/{Color-7ZNS6F6B.js → Color-FQNEU7YS.js} +79 -60
  2. package/dist/_browser-chunks/{chunk-BOOOPFZF.js → WithTooltip-6NHN2GXF.js} +25 -17
  3. package/dist/_browser-chunks/{chunk-RNE2IUTB.js → chunk-AW46NMGV.js} +9 -1
  4. package/dist/_browser-chunks/{chunk-C4XOKMDU.js → chunk-QMY4G4R2.js} +49 -49
  5. package/dist/_browser-chunks/{syntaxhighlighter-DK2ODWXH.js → syntaxhighlighter-RJZASWHL.js} +5 -5
  6. package/dist/_node-chunks/{builder-manager-OTO33TIA.js → builder-manager-HA7CYFCK.js} +32 -12
  7. package/dist/_node-chunks/camelcase-QALD4XFE.js +18 -0
  8. package/dist/_node-chunks/{chunk-O4KUWXD6.js → chunk-2XY53ALL.js} +8 -8
  9. package/dist/_node-chunks/{chunk-Q4CZSEBO.js → chunk-3CBQMG2A.js} +7 -7
  10. package/dist/_node-chunks/{chunk-L5WAZZY3.js → chunk-3WDAPZYQ.js} +7 -7
  11. package/dist/_node-chunks/{chunk-6C7OBGYG.js → chunk-4ZB555EJ.js} +7 -7
  12. package/dist/_node-chunks/{chunk-RKANIOER.js → chunk-52DXKXY3.js} +8 -8
  13. package/dist/_node-chunks/{chunk-HYNQ2IX4.js → chunk-5OVB4A6F.js} +7 -7
  14. package/dist/_node-chunks/chunk-AGHGNXGH.js +18 -0
  15. package/dist/_node-chunks/{chunk-OYGAWJQE.js → chunk-B23X5ZCK.js} +7 -7
  16. package/dist/_node-chunks/{chunk-HHTKRAIE.js → chunk-B2DAHWJK.js} +25 -7
  17. package/dist/_node-chunks/{chunk-FDDQACQD.js → chunk-CC4PW5MJ.js} +7 -7
  18. package/dist/_node-chunks/{chunk-Q6QFW2Y7.js → chunk-D7NIZELR.js} +67 -59
  19. package/dist/_node-chunks/{chunk-EFJRT54D.js → chunk-DO5Q3H4L.js} +7 -7
  20. package/dist/_node-chunks/{chunk-VW3GGAQI.js → chunk-ECK7WVFX.js} +12 -12
  21. package/dist/_node-chunks/{chunk-XI2VU32X.js → chunk-EUH3NHXA.js} +7 -7
  22. package/dist/_node-chunks/{chunk-YS6OLN4N.js → chunk-F3XOPI6H.js} +7 -7
  23. package/dist/_node-chunks/{chunk-NTB3C5XQ.js → chunk-FOQHPHCV.js} +7 -7
  24. package/dist/_node-chunks/{chunk-HIGKW2KB.js → chunk-G6EL47NS.js} +7 -7
  25. package/dist/_node-chunks/{chunk-QOI32MCO.js → chunk-GFLS4TJB.js} +7 -7
  26. package/dist/_node-chunks/{chunk-2WZNP46P.js → chunk-J3XZKWHE.js} +8 -8
  27. package/dist/_node-chunks/{chunk-LOF6SIRE.js → chunk-LE63EHJ5.js} +12 -12
  28. package/dist/_node-chunks/{chunk-RR6Q3657.js → chunk-M47XA42S.js} +9 -9
  29. package/dist/_node-chunks/{chunk-VL6WDGIU.js → chunk-OOI74AL3.js} +6 -6
  30. package/dist/_node-chunks/{chunk-AITYHU22.js → chunk-OVXB5GGT.js} +7 -7
  31. package/dist/_node-chunks/chunk-PRJHT3GJ.js +61 -0
  32. package/dist/_node-chunks/{chunk-SV7ZHC5Z.js → chunk-Q52PVUSU.js} +7 -7
  33. package/dist/_node-chunks/{chunk-NTAOH664.js → chunk-RMHAL25C.js} +9 -9
  34. package/dist/_node-chunks/{chunk-A6T2YN75.js → chunk-SDCF5RNN.js} +15 -15
  35. package/dist/_node-chunks/{chunk-3ICYWJ3N.js → chunk-UJ5SJ23M.js} +7 -7
  36. package/dist/_node-chunks/{chunk-FWW4IJCM.js → chunk-UPHK4ETU.js} +19 -17
  37. package/dist/_node-chunks/{chunk-O3OJUFKU.js → chunk-V7VURIPB.js} +8 -8
  38. package/dist/_node-chunks/{chunk-6M2IPO4E.js → chunk-VPR5IBMG.js} +6 -6
  39. package/dist/_node-chunks/{chunk-27W6KHQ2.js → chunk-X4XU27M6.js} +7 -7
  40. package/dist/_node-chunks/{chunk-ZFRTME73.js → chunk-ZHSCUGNP.js} +1467 -148
  41. package/dist/_node-chunks/{dist-BA2GAJJB.js → dist-6TXHNR5C.js} +9 -9
  42. package/dist/_node-chunks/{globby-4HAI4KJH.js → globby-PBTV6PX6.js} +9 -9
  43. package/dist/_node-chunks/{lib-ITRY6RT7.js → lib-4RTDZVGX.js} +7 -7
  44. package/dist/_node-chunks/{mdx-N42X6CFJ-7PULFTZI.js → mdx-N42X6CFJ-COWEH7KR.js} +8 -8
  45. package/dist/_node-chunks/{p-limit-63FY4KTG.js → p-limit-PBVZQOFY.js} +7 -7
  46. package/dist/_node-chunks/{plugin-2BSKCSMA.js → plugin-6ZPCS4LI.js} +10 -10
  47. package/dist/_node-chunks/{plugin-JEBMTDIB.js → plugin-EOZKYZAG.js} +10 -10
  48. package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-AZ7YPMMD.js → webpack-inject-mocker-runtime-plugin-35HMSMR5.js} +10 -10
  49. package/dist/_node-chunks/{webpack-mock-plugin-7IF6PA2O.js → webpack-mock-plugin-GT3MA5E2.js} +9 -9
  50. package/dist/babel/index.js +11 -11
  51. package/dist/bin/core.js +11 -11
  52. package/dist/bin/dispatcher.js +11 -11
  53. package/dist/bin/loader.js +9 -9
  54. package/dist/cli/index.js +50 -74
  55. package/dist/common/index.d.ts +210 -3
  56. package/dist/common/index.js +28 -20
  57. package/dist/components/index.d.ts +472 -280
  58. package/dist/components/index.js +20367 -75
  59. package/dist/core-server/index.js +1128 -247
  60. package/dist/core-server/presets/common-manager.js +1143 -2230
  61. package/dist/core-server/presets/common-override-preset.js +9 -9
  62. package/dist/core-server/presets/common-preset.js +27 -27
  63. package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +9 -9
  64. package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +10 -10
  65. package/dist/csf/index.js +13 -6
  66. package/dist/csf-tools/index.d.ts +15 -4
  67. package/dist/csf-tools/index.js +9 -9
  68. package/dist/manager/globals-runtime.js +40951 -26253
  69. package/dist/manager/runtime.js +1688 -2693
  70. package/dist/manager-api/index.d.ts +11 -3
  71. package/dist/manager-api/index.js +53 -6
  72. package/dist/node-logger/index.d.ts +1 -1
  73. package/dist/node-logger/index.js +473 -448
  74. package/dist/preview/runtime.js +903 -896
  75. package/dist/preview-api/index.d.ts +68 -67
  76. package/dist/preview-api/index.js +5 -5
  77. package/dist/server-errors.js +10 -10
  78. package/dist/telemetry/index.js +24 -24
  79. package/dist/test/index.js +547 -547
  80. package/dist/theming/create.d.ts +4 -2
  81. package/dist/theming/create.js +1 -1
  82. package/dist/theming/index.d.ts +9 -6
  83. package/dist/theming/index.js +13 -6
  84. package/dist/types/index.d.ts +50 -5
  85. package/package.json +14 -6
  86. package/dist/_browser-chunks/WithTooltip-SK46ZJ2J.js +0 -13
  87. package/dist/_browser-chunks/chunk-I74EUU5O.js +0 -5809
  88. package/dist/_node-chunks/camelcase-HURSU73A.js +0 -18
  89. package/dist/_node-chunks/chunk-P7ZABCRS.js +0 -18
  90. package/dist/_node-chunks/chunk-QWBT2XCX.js +0 -61
  91. package/dist/_browser-chunks/{chunk-W4QKLQSC.js → chunk-RW5PKMWM.js} +5 -5
@@ -1,7 +1,9 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { ComponentProps, AnchorHTMLAttributes, MouseEvent, ReactNode, ReactElement, ButtonHTMLAttributes, SyntheticEvent, Component, RefObject, FC, PropsWithChildren, DetailedHTMLProps, RefAttributes, ElementType } from 'react';
2
+ import React__default, { ComponentProps, AnchorHTMLAttributes, MouseEvent as MouseEvent$1, ReactNode, ReactElement, HTMLAttributes, ButtonHTMLAttributes, SyntheticEvent, Component, RefObject, DOMAttributes, FC, PropsWithChildren, ForwardRefExoticComponent, RefAttributes, ElementType } from 'react';
3
+ import { DecoratorFunction } from 'storybook/internal/csf';
4
+ import { API_KeyCollection } from 'storybook/manager-api';
3
5
  import { Addon_RenderOptions } from 'storybook/internal/types';
4
- import { FunctionInterpolation } from 'storybook/theming';
6
+ import { CSSObject, FunctionInterpolation } from 'storybook/theming';
5
7
 
6
8
  interface ComponentSelector {
7
9
  __emotion_styles: any;
@@ -197,10 +199,10 @@ interface LinkProps extends LinkInnerProps, LinkStylesProps, AProps {
197
199
  cancel?: boolean;
198
200
  className?: string;
199
201
  style?: object;
200
- onClick?: (e: MouseEvent) => void;
202
+ onClick?: (e: MouseEvent$1) => void;
201
203
  href?: string;
202
204
  }
203
- declare const Link$1: ({ cancel, children, onClick, withArrow, containsIcon, className, style, ...rest }: LinkProps) => React__default.JSX.Element;
205
+ declare const Link$1: React__default.ForwardRefExoticComponent<LinkProps & React__default.RefAttributes<HTMLAnchorElement>>;
204
206
 
205
207
  declare const DocumentWrapper: StyledComponent<{
206
208
  theme?: Theme;
@@ -274,7 +276,7 @@ declare function createCopyToClipboardFunction(): typeof copyUsingClipboardAPI;
274
276
  interface ActionItem {
275
277
  title: string | ReactElement;
276
278
  className?: string;
277
- onClick: (e: MouseEvent<HTMLButtonElement>) => void;
279
+ onClick: (e: MouseEvent$1<HTMLButtonElement>) => void;
278
280
  disabled?: boolean;
279
281
  }
280
282
  interface ActionBarProps {
@@ -282,253 +284,164 @@ interface ActionBarProps {
282
284
  }
283
285
  declare const ActionBar: ({ actionItems, ...props }: ActionBarProps) => React__default.JSX.Element;
284
286
 
285
- type Scope<C = any> = {
286
- [scopeName: string]: React$1.Context<C>[];
287
- } | undefined;
288
- type ScopeHook = (scope: Scope) => {
289
- [__scopeProp: string]: Scope;
290
- };
291
- interface CreateScope {
292
- scopeName: string;
293
- (): ScopeHook;
294
- }
287
+ /*
288
+ * Copyright 2020 Adobe. All rights reserved.
289
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
290
+ * you may not use this file except in compliance with the License. You may obtain a copy
291
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
292
+ *
293
+ * Unless required by applicable law or agreed to in writing, software distributed under
294
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
295
+ * OF ANY KIND, either express or implied. See the License for the specific language
296
+ * governing permissions and limitations under the License.
297
+ */
295
298
 
296
- declare const NODES: readonly ["a", "button", "div", "form", "h2", "h3", "img", "input", "label", "li", "nav", "ol", "p", "select", "span", "svg", "ul"];
297
- type Primitives = {
298
- [E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E>;
299
- };
300
- type PrimitivePropsWithRef<E extends React$1.ElementType> = React$1.ComponentPropsWithRef<E> & {
301
- asChild?: boolean;
302
- };
303
- interface PrimitiveForwardRefComponent<E extends React$1.ElementType> extends React$1.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {
304
- }
305
- declare const Primitive: Primitives;
306
299
 
307
- type PrimitiveDivProps$3 = React$1.ComponentPropsWithoutRef<typeof Primitive.div>;
308
- interface DismissableLayerProps$1 extends PrimitiveDivProps$3 {
309
- /**
310
- * When `true`, hover/focus/click interactions will be disabled on elements outside
311
- * the `DismissableLayer`. Users will need to click twice on outside elements to
312
- * interact with them: once to close the `DismissableLayer`, and again to trigger the element.
313
- */
314
- disableOutsidePointerEvents?: boolean;
315
- /**
316
- * Event handler called when the escape key is down.
317
- * Can be prevented.
318
- */
319
- onEscapeKeyDown?: (event: KeyboardEvent) => void;
320
- /**
321
- * Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`.
322
- * Can be prevented.
323
- */
324
- onPointerDownOutside?: (event: PointerDownOutsideEvent) => void;
325
- /**
326
- * Event handler called when the focus moves outside of the `DismissableLayer`.
327
- * Can be prevented.
328
- */
329
- onFocusOutside?: (event: FocusOutsideEvent) => void;
330
- /**
331
- * Event handler called when an interaction happens outside the `DismissableLayer`.
332
- * Specifically, when a `pointerdown` event happens outside or focus moves outside of it.
333
- * Can be prevented.
334
- */
335
- onInteractOutside?: (event: PointerDownOutsideEvent | FocusOutsideEvent) => void;
336
- /**
337
- * Handler called when the `DismissableLayer` should be dismissed
338
- */
339
- onDismiss?: () => void;
340
- }
341
- declare const DismissableLayer: React$1.ForwardRefExoticComponent<DismissableLayerProps$1 & React$1.RefAttributes<HTMLDivElement>>;
342
- type PointerDownOutsideEvent = CustomEvent<{
343
- originalEvent: PointerEvent;
344
- }>;
345
- type FocusOutsideEvent = CustomEvent<{
346
- originalEvent: FocusEvent;
347
- }>;
348
-
349
- type PrimitiveDivProps$2 = React$1.ComponentPropsWithoutRef<typeof Primitive.div>;
350
- interface FocusScopeProps$1 extends PrimitiveDivProps$2 {
351
- /**
352
- * When `true`, tabbing from last item will focus first tabbable
353
- * and shift+tab from first item will focus last tababble.
354
- * @defaultValue false
355
- */
356
- loop?: boolean;
357
- /**
358
- * When `true`, focus cannot escape the focus scope via keyboard,
359
- * pointer, or a programmatic focus.
360
- * @defaultValue false
361
- */
362
- trapped?: boolean;
363
- /**
364
- * Event handler called when auto-focusing on mount.
365
- * Can be prevented.
366
- */
367
- onMountAutoFocus?: (event: Event) => void;
368
- /**
369
- * Event handler called when auto-focusing on unmount.
370
- * Can be prevented.
371
- */
372
- onUnmountAutoFocus?: (event: Event) => void;
373
- }
374
- declare const FocusScope: React$1.ForwardRefExoticComponent<FocusScopeProps$1 & React$1.RefAttributes<HTMLDivElement>>;
375
300
 
376
- type PrimitiveDivProps$1 = React$1.ComponentPropsWithoutRef<typeof Primitive.div>;
377
- interface PortalProps$1 extends PrimitiveDivProps$1 {
378
- /**
379
- * An optional container where the portaled content should be appended.
380
- */
381
- container?: Element | DocumentFragment | null;
301
+ type Placement$1 = 'bottom' | 'bottom left' | 'bottom right' | 'bottom start' | 'bottom end' |
302
+ 'top' | 'top left' | 'top right' | 'top start' | 'top end' |
303
+ 'left' | 'left top' | 'left bottom' | 'start' | 'start top' | 'start bottom' |
304
+ 'right' | 'right top' | 'right bottom' | 'end' | 'end top' | 'end bottom';
305
+
306
+ interface PositionProps {
307
+ /**
308
+ * The placement of the element with respect to its anchor element.
309
+ * @default 'bottom'
310
+ */
311
+ placement?: Placement$1,
312
+ /**
313
+ * The placement padding that should be applied between the element and its
314
+ * surrounding container.
315
+ * @default 12
316
+ */
317
+ containerPadding?: number,
318
+ /**
319
+ * The additional offset applied along the main axis between the element and its
320
+ * anchor element.
321
+ * @default 0
322
+ */
323
+ offset?: number,
324
+ /**
325
+ * The additional offset applied along the cross axis between the element and its
326
+ * anchor element.
327
+ * @default 0
328
+ */
329
+ crossOffset?: number,
330
+ /**
331
+ * Whether the element should flip its orientation (e.g. top to bottom or left to right) when
332
+ * there is insufficient room for it to render completely.
333
+ * @default true
334
+ */
335
+ shouldFlip?: boolean,
336
+ // /**
337
+ // * The element that should be used as the bounding container when calculating container offset
338
+ // * or whether it should flip.
339
+ // */
340
+ // boundaryElement?: Element,
341
+ /** Whether the element is rendered. */
342
+ isOpen?: boolean
343
+ }
344
+
345
+ declare global {
346
+ namespace FormatjsIntl {
347
+ interface Message {
348
+ }
349
+ interface IntlConfig {
350
+ }
351
+ interface Formats {
352
+ }
353
+ }
382
354
  }
383
- declare const Portal$1: React$1.ForwardRefExoticComponent<PortalProps$1 & React$1.RefAttributes<HTMLDivElement>>;
384
355
 
385
- declare const createDialogScope: CreateScope;
386
- interface DialogProps {
387
- children?: React$1.ReactNode;
388
- open?: boolean;
389
- defaultOpen?: boolean;
390
- onOpenChange?(open: boolean): void;
391
- modal?: boolean;
356
+ interface TextProps extends HTMLAttributes<HTMLElement> {
357
+ elementType?: string;
392
358
  }
393
- declare const Dialog: React$1.FC<DialogProps>;
394
- type PrimitiveButtonProps = React$1.ComponentPropsWithoutRef<typeof Primitive.button>;
395
- interface DialogTriggerProps extends PrimitiveButtonProps {
359
+ interface HeadingProps extends HTMLAttributes<HTMLElement> {
360
+ level?: number;
396
361
  }
397
- declare const DialogTrigger: React$1.ForwardRefExoticComponent<DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
398
- type PortalProps = React$1.ComponentPropsWithoutRef<typeof Portal$1>;
399
- interface DialogPortalProps {
400
- children?: React$1.ReactNode;
401
- /**
402
- * Specify a container element to portal the content into.
403
- */
404
- container?: PortalProps['container'];
362
+
363
+ type TransitionStatus =
364
+ | 'preEnter'
365
+ | 'entering'
366
+ | 'entered'
367
+ | 'preExit'
368
+ | 'exiting'
369
+ | 'exited'
370
+ | 'unmounted';
371
+
372
+ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
373
+ asChild?: boolean;
374
+ size?: 'small' | 'medium';
375
+ padding?: 'small' | 'medium' | 'none';
376
+ variant?: 'outline' | 'solid' | 'ghost';
377
+ onClick?: (event: SyntheticEvent) => void;
378
+ active?: boolean;
379
+ disabled?: boolean;
380
+ animation?: 'none' | 'rotate360' | 'glow' | 'jiggle';
405
381
  /**
406
- * Used to force mounting when more control is needed. Useful when
407
- * controlling animation with React animation libraries.
382
+ * A concise action label for the button announced by screen readers. Needed for buttons without
383
+ * text or with text that relies on visual cues to be understood. Pass false to indicate that the
384
+ * Button's content is already accessible to all. When a string is passed, it is also used as the
385
+ * default tooltip text.
408
386
  */
409
- forceMount?: true;
410
- }
411
- declare const DialogPortal: React$1.FC<DialogPortalProps>;
412
- interface DialogOverlayProps extends DialogOverlayImplProps {
387
+ ariaLabel?: string | false;
413
388
  /**
414
- * Used to force mounting when more control is needed. Useful when
415
- * controlling animation with React animation libraries.
389
+ * An optional tooltip to display when the Button is hovered. If the Button has no text content,
390
+ * consider making this the same as the aria-label.
416
391
  */
417
- forceMount?: true;
418
- }
419
- declare const DialogOverlay: React$1.ForwardRefExoticComponent<DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>>;
420
- type PrimitiveDivProps = React$1.ComponentPropsWithoutRef<typeof Primitive.div>;
421
- interface DialogOverlayImplProps extends PrimitiveDivProps {
422
- }
423
- interface DialogContentProps extends DialogContentTypeProps {
392
+ tooltip?: string;
424
393
  /**
425
- * Used to force mounting when more control is needed. Useful when
426
- * controlling animation with React animation libraries.
394
+ * Only use this flag when tooltips on button interfere with other keyboard interactions, like
395
+ * when building a custom select or menu button. Disables tooltips from the `tooltip`, `shortcut`
396
+ * and `ariaLabel` props.
427
397
  */
428
- forceMount?: true;
429
- }
430
- declare const DialogContent: React$1.ForwardRefExoticComponent<DialogContentProps & React$1.RefAttributes<HTMLDivElement>>;
431
- interface DialogContentTypeProps extends Omit<DialogContentImplProps, 'trapFocus' | 'disableOutsidePointerEvents'> {
432
- }
433
- type DismissableLayerProps = React$1.ComponentPropsWithoutRef<typeof DismissableLayer>;
434
- type FocusScopeProps = React$1.ComponentPropsWithoutRef<typeof FocusScope>;
435
- interface DialogContentImplProps extends Omit<DismissableLayerProps, 'onDismiss'> {
398
+ disableAllTooltips?: boolean;
436
399
  /**
437
- * When `true`, focus cannot escape the `Content` via keyboard,
438
- * pointer, or a programmatic focus.
439
- * @defaultValue false
400
+ * A more thorough description of what the Button does, provided to non-sighted users through an
401
+ * aria-describedby attribute. Use sparingly for buttons that trigger complex actions.
440
402
  */
441
- trapFocus?: FocusScopeProps['trapped'];
403
+ ariaDescription?: string;
442
404
  /**
443
- * Event handler called when auto-focusing on open.
444
- * Can be prevented.
405
+ * An optional keyboard shortcut to enable the button. Will be displayed in the tooltip and passed
406
+ * to aria-keyshortcuts for assistive technologies. The binding of the shortcut and action is
407
+ * managed globally in the manager's shortcuts module.
445
408
  */
446
- onOpenAutoFocus?: FocusScopeProps['onMountAutoFocus'];
447
- /**
448
- * Event handler called when auto-focusing on close.
449
- * Can be prevented.
450
- */
451
- onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];
452
- }
453
- type PrimitiveHeading2Props = React$1.ComponentPropsWithoutRef<typeof Primitive.h2>;
454
- interface DialogTitleProps extends PrimitiveHeading2Props {
455
- }
456
- declare const DialogTitle: React$1.ForwardRefExoticComponent<DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>>;
457
- type PrimitiveParagraphProps = React$1.ComponentPropsWithoutRef<typeof Primitive.p>;
458
- interface DialogDescriptionProps extends PrimitiveParagraphProps {
459
- }
460
- declare const DialogDescription: React$1.ForwardRefExoticComponent<DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>>;
461
- interface DialogCloseProps extends PrimitiveButtonProps {
462
- }
463
- declare const DialogClose: React$1.ForwardRefExoticComponent<DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
464
- declare const WarningProvider: React$1.FC<{
465
- contentName: string;
466
- titleName: string;
467
- docsSlug: string;
468
- } & {
469
- children: React$1.ReactNode;
470
- }>;
471
- declare const Root: React$1.FC<DialogProps>;
472
- declare const Trigger: React$1.ForwardRefExoticComponent<DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
473
- declare const Portal: React$1.FC<DialogPortalProps>;
474
- declare const Overlay$1: React$1.ForwardRefExoticComponent<DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>>;
475
- declare const Content$1: React$1.ForwardRefExoticComponent<DialogContentProps & React$1.RefAttributes<HTMLDivElement>>;
476
- declare const Title$1: React$1.ForwardRefExoticComponent<DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>>;
477
- declare const Description$1: React$1.ForwardRefExoticComponent<DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>>;
478
- declare const Close: React$1.ForwardRefExoticComponent<DialogCloseProps & React$1.RefAttributes<HTMLButtonElement>>;
479
-
480
- declare const Dialog$1_Close: typeof Close;
481
- declare const Dialog$1_Dialog: typeof Dialog;
482
- declare const Dialog$1_DialogClose: typeof DialogClose;
483
- type Dialog$1_DialogCloseProps = DialogCloseProps;
484
- declare const Dialog$1_DialogContent: typeof DialogContent;
485
- type Dialog$1_DialogContentProps = DialogContentProps;
486
- declare const Dialog$1_DialogDescription: typeof DialogDescription;
487
- type Dialog$1_DialogDescriptionProps = DialogDescriptionProps;
488
- declare const Dialog$1_DialogOverlay: typeof DialogOverlay;
489
- type Dialog$1_DialogOverlayProps = DialogOverlayProps;
490
- declare const Dialog$1_DialogPortal: typeof DialogPortal;
491
- type Dialog$1_DialogPortalProps = DialogPortalProps;
492
- type Dialog$1_DialogProps = DialogProps;
493
- declare const Dialog$1_DialogTitle: typeof DialogTitle;
494
- type Dialog$1_DialogTitleProps = DialogTitleProps;
495
- declare const Dialog$1_DialogTrigger: typeof DialogTrigger;
496
- type Dialog$1_DialogTriggerProps = DialogTriggerProps;
497
- declare const Dialog$1_Portal: typeof Portal;
498
- declare const Dialog$1_Root: typeof Root;
499
- declare const Dialog$1_Trigger: typeof Trigger;
500
- declare const Dialog$1_WarningProvider: typeof WarningProvider;
501
- declare const Dialog$1_createDialogScope: typeof createDialogScope;
502
- declare namespace Dialog$1 {
503
- export { Dialog$1_Close as Close, Content$1 as Content, Description$1 as Description, Dialog$1_Dialog as Dialog, Dialog$1_DialogClose as DialogClose, type Dialog$1_DialogCloseProps as DialogCloseProps, Dialog$1_DialogContent as DialogContent, type Dialog$1_DialogContentProps as DialogContentProps, Dialog$1_DialogDescription as DialogDescription, type Dialog$1_DialogDescriptionProps as DialogDescriptionProps, Dialog$1_DialogOverlay as DialogOverlay, type Dialog$1_DialogOverlayProps as DialogOverlayProps, Dialog$1_DialogPortal as DialogPortal, type Dialog$1_DialogPortalProps as DialogPortalProps, type Dialog$1_DialogProps as DialogProps, Dialog$1_DialogTitle as DialogTitle, type Dialog$1_DialogTitleProps as DialogTitleProps, Dialog$1_DialogTrigger as DialogTrigger, type Dialog$1_DialogTriggerProps as DialogTriggerProps, Overlay$1 as Overlay, Dialog$1_Portal as Portal, Dialog$1_Root as Root, Title$1 as Title, Dialog$1_Trigger as Trigger, Dialog$1_WarningProvider as WarningProvider, Dialog$1_createDialogScope as createDialogScope };
504
- }
505
-
506
- interface ButtonProps$1 extends ButtonHTMLAttributes<HTMLButtonElement> {
507
- asChild?: boolean;
508
- size?: 'small' | 'medium';
509
- padding?: 'small' | 'medium' | 'none';
510
- variant?: 'outline' | 'solid' | 'ghost';
511
- onClick?: (event: SyntheticEvent) => void;
512
- disabled?: boolean;
513
- active?: boolean;
514
- animation?: 'none' | 'rotate360' | 'glow' | 'jiggle';
409
+ shortcut?: API_KeyCollection;
515
410
  }
516
- declare const Button: React__default.ForwardRefExoticComponent<ButtonProps$1 & React__default.RefAttributes<HTMLButtonElement>>;
517
-
518
- declare const IconButton: React__default.ForwardRefExoticComponent<ButtonProps$1 & React__default.RefAttributes<HTMLButtonElement>>;
411
+ declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
412
+ declare const IconButton: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
519
413
 
520
414
  declare const Overlay: StyledComponent<{
521
415
  theme?: Theme;
522
416
  as?: React__default.ElementType;
417
+ } & {
418
+ $status?: TransitionStatus;
419
+ $transitionDuration?: number;
523
420
  }, React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
524
421
  declare const Container: StyledComponent<{
525
422
  theme?: Theme;
526
423
  as?: React__default.ElementType;
527
424
  } & {
528
- width?: number;
529
- height?: number;
425
+ $variant: "dialog" | "bottom-drawer";
426
+ $status?: TransitionStatus;
427
+ $transitionDuration?: number;
428
+ width?: number | string;
429
+ height?: number | string;
530
430
  }, React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
531
- declare const CloseButton: (props: React__default.ComponentProps<typeof IconButton>) => React__default.JSX.Element;
431
+ interface CloseProps {
432
+ asChild?: boolean;
433
+ children?: React__default.ReactElement<{
434
+ onClick?: (event: React__default.MouseEvent) => void;
435
+ }, string | React__default.JSXElementConstructor<{
436
+ onClick?: (event: React__default.MouseEvent) => void;
437
+ }>>;
438
+ onClick?: (event: React__default.MouseEvent) => void;
439
+ }
440
+ declare const Close: ({ asChild, children, onClick, ...props }: CloseProps) => React__default.JSX.Element;
441
+ declare const Dialog: {
442
+ Close: () => React__default.JSX.Element;
443
+ };
444
+ declare const CloseButton: ({ ariaLabel, ...props }: React__default.ComponentProps<typeof Button>) => React__default.JSX.Element;
532
445
  declare const Content: StyledComponent<{
533
446
  theme?: Theme;
534
447
  as?: React__default.ElementType;
@@ -541,11 +454,13 @@ declare const Col: StyledComponent<{
541
454
  theme?: Theme;
542
455
  as?: React__default.ElementType;
543
456
  }, React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
544
- declare const Header: (props: React__default.ComponentProps<typeof Col>) => React__default.JSX.Element;
545
- declare const Title: StyledComponent<DialogTitleProps & React__default.RefAttributes<HTMLHeadingElement> & {
457
+ declare const Header: ({ hasClose, ...props }: React__default.ComponentProps<typeof Col> & {
458
+ hasClose?: boolean;
459
+ }) => React__default.JSX.Element;
460
+ declare const Title: StyledComponent<HeadingProps & React__default.RefAttributes<HTMLHeadingElement> & {
546
461
  theme?: Theme;
547
462
  }, {}, {}>;
548
- declare const Description: StyledComponent<DialogDescriptionProps & React__default.RefAttributes<HTMLParagraphElement> & {
463
+ declare const Description: StyledComponent<TextProps & React__default.RefAttributes<HTMLElement> & {
549
464
  theme?: Theme;
550
465
  }, {}, {}>;
551
466
  declare const Actions: StyledComponent<{
@@ -561,35 +476,61 @@ declare const Error$1: ({ children, ...props }: {
561
476
  } & ComponentProps<typeof ErrorWrapper>) => React__default.JSX.Element;
562
477
 
563
478
  declare const Components_Actions: typeof Actions;
479
+ declare const Components_Close: typeof Close;
564
480
  declare const Components_CloseButton: typeof CloseButton;
565
481
  declare const Components_Col: typeof Col;
566
482
  declare const Components_Container: typeof Container;
567
483
  declare const Components_Content: typeof Content;
568
484
  declare const Components_Description: typeof Description;
485
+ declare const Components_Dialog: typeof Dialog;
569
486
  declare const Components_ErrorWrapper: typeof ErrorWrapper;
570
487
  declare const Components_Header: typeof Header;
571
488
  declare const Components_Overlay: typeof Overlay;
572
489
  declare const Components_Row: typeof Row;
573
490
  declare const Components_Title: typeof Title;
574
491
  declare namespace Components {
575
- export { Components_Actions as Actions, Components_CloseButton as CloseButton, Components_Col as Col, Components_Container as Container, Components_Content as Content, Components_Description as Description, Error$1 as Error, Components_ErrorWrapper as ErrorWrapper, Components_Header as Header, Components_Overlay as Overlay, Components_Row as Row, Components_Title as Title };
492
+ export { Components_Actions as Actions, Components_Close as Close, Components_CloseButton as CloseButton, Components_Col as Col, Components_Container as Container, Components_Content as Content, Components_Description as Description, Components_Dialog as Dialog, Error$1 as Error, Components_ErrorWrapper as ErrorWrapper, Components_Header as Header, Components_Overlay as Overlay, Components_Row as Row, Components_Title as Title };
576
493
  }
577
494
 
578
- type ContentProps = React__default.ComponentProps<typeof Content$1>;
579
- interface ModalProps extends Omit<React__default.ComponentProps<typeof Root>, 'children'> {
580
- width?: number;
581
- height?: number;
582
- children: React__default.ReactNode;
583
- onEscapeKeyDown?: ContentProps['onEscapeKeyDown'];
584
- onInteractOutside?: ContentProps['onInteractOutside'];
585
- className?: string;
495
+ interface ModalProps extends HTMLAttributes<HTMLDivElement> {
586
496
  container?: HTMLElement;
587
497
  portalSelector?: string;
588
- }
589
- declare function BaseModal({ children, width, height, onEscapeKeyDown, onInteractOutside, className, container, portalSelector, ...rootProps }: ModalProps): React__default.JSX.Element;
590
- declare const Modal: typeof BaseModal & typeof Components & {
591
- Dialog: typeof Dialog$1;
592
- };
498
+ /** Width of the Modal. Defaults to `740`. */
499
+ width?: number | string;
500
+ /** Height of the Modal. Defaults to `auto`. */
501
+ height?: number | string;
502
+ /** Modal content. */
503
+ children: React__default.ReactNode;
504
+ /** Additional class names for the Modal. */
505
+ className?: string;
506
+ /** Controlled state: whether the Modal is currently open. */
507
+ open?: boolean;
508
+ /** Uncontrolled state: whether the Modal is initially open on the first. */
509
+ defaultOpen?: boolean;
510
+ /** @deprecated Use `dismissOnEscape` instead. */
511
+ onEscapeKeyDown?: (event: KeyboardEvent) => void;
512
+ /** @deprecated Use `dismissOnInteractOutside` instead. */
513
+ onInteractOutside?: (event: FocusEvent | MouseEvent | TouchEvent) => void;
514
+ /** Handler called when visibility of the Modal changes. */
515
+ onOpenChange?: (isOpen: boolean) => void;
516
+ /** The accessible name for the modal. */
517
+ ariaLabel?: string;
518
+ /** Whether the modal can be dismissed by clicking outside. Defaults to `true`. */
519
+ dismissOnClickOutside?: boolean;
520
+ /** Whether the modal can be dismissed by pressing Escape. Defaults to `true`. */
521
+ dismissOnEscape?: boolean;
522
+ /** Transition duration, so we can slow down transitions on mobile. */
523
+ transitionDuration?: number;
524
+ /** The max dimensions, initial position and animations of the Modal. Defaults to 'dialog'. */
525
+ variant?: 'dialog' | 'bottom-drawer';
526
+ }
527
+ declare function BaseModal({ container, portalSelector, children, width, height, ariaLabel, dismissOnClickOutside, dismissOnEscape, className, open, onEscapeKeyDown, onInteractOutside, onOpenChange, defaultOpen, transitionDuration, variant, ...props }: ModalProps): React__default.JSX.Element | null;
528
+ declare const Modal: typeof BaseModal & typeof Components;
529
+ /**
530
+ * Storybook decorator to help render Modals in stories with multiple theme layouts. Internal to
531
+ * Storybook. Use at your own risk.
532
+ */
533
+ declare const ModalDecorator: DecoratorFunction;
593
534
 
594
535
  interface SpacedProps {
595
536
  children?: React__default.ReactNode;
@@ -611,6 +552,7 @@ interface ScrollAreaProps {
611
552
  className?: string;
612
553
  offset?: number;
613
554
  scrollbarSize?: number;
555
+ scrollPadding?: number | string;
614
556
  }
615
557
  declare const ScrollArea: React__default.ForwardRefExoticComponent<ScrollAreaProps & React__default.RefAttributes<HTMLDivElement>>;
616
558
 
@@ -646,6 +588,63 @@ interface ErrorFormatterProps {
646
588
  }
647
589
  declare const ErrorFormatter: ({ error }: ErrorFormatterProps) => React__default.JSX.Element;
648
590
 
591
+ interface ToggleButtonProps extends ButtonProps {
592
+ /** Whether the ToggleButton is currently pressed or not. */
593
+ pressed: boolean;
594
+ }
595
+ declare const ToggleButton: React__default.ForwardRefExoticComponent<ToggleButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
596
+
597
+ interface Option {
598
+ /** Optional rendering of the option. */
599
+ children?: React__default.ReactNode;
600
+ title: string;
601
+ description?: string;
602
+ icon?: React__default.ReactNode;
603
+ value: string;
604
+ }
605
+
606
+ interface SelectProps extends Omit<ButtonProps, 'onClick' | 'onChange' | 'onSelect' | 'variant'> {
607
+ size?: 'small' | 'medium';
608
+ padding?: 'small' | 'medium' | 'none';
609
+ /**
610
+ * Whether multiple options can be selected. In single select mode, this component acts like a
611
+ * HTML select element where the selected option follows focus. In multi select mode, it acts like
612
+ * a combobox and does not autoclose on select or autoselect the focused option.
613
+ */
614
+ multiSelect?: boolean;
615
+ /**
616
+ * Mandatory label that explains what is being selected. Do not include "change", "toggle" or
617
+ * "select" verbs in the label. Instead, only describe the type of content with a noun.
618
+ */
619
+ ariaLabel: string;
620
+ /**
621
+ * Label for the Select component. In single-select mode, is replaced by the currently selected
622
+ * option's title.
623
+ */
624
+ children?: React__default.ReactNode;
625
+ /**
626
+ * Icon shown next to the Select's children, still displayed when a value is selected and Select
627
+ * shows that value instead of children.
628
+ */
629
+ icon?: React__default.ReactNode;
630
+ /** Whether the Select is currently disabled. */
631
+ disabled?: boolean;
632
+ /** Options available in the select. */
633
+ options: Option[];
634
+ /** IDs of the preselected options. */
635
+ defaultOptions?: string | string[];
636
+ /** Whether the Select should render open. */
637
+ defaultOpen?: boolean;
638
+ /** When set, a reset option is rendered in the Select listbox. */
639
+ onReset?: () => void;
640
+ /** Custom text label for the reset option when it exists. */
641
+ resetLabel?: string;
642
+ onSelect?: (option: string) => void;
643
+ onDeselect?: (option: string) => void;
644
+ onChange?: (selected: string[]) => void;
645
+ }
646
+ declare const Select: React__default.ForwardRefExoticComponent<SelectProps & React__default.RefAttributes<HTMLButtonElement>>;
647
+
649
648
  type Sizes = '100%' | 'flex' | 'auto';
650
649
  type Alignments = 'end' | 'center' | 'start';
651
650
  type ValidationStates = 'valid' | 'error' | 'warn';
@@ -716,11 +715,106 @@ declare const Form: StyledComponent<{
716
715
  } & React$1.RefAttributes<HTMLTextAreaElement>, {}, {}> & {
717
716
  displayName: string;
718
717
  };
719
- Button: React$1.ForwardRefExoticComponent<ButtonProps$1 & React$1.RefAttributes<HTMLButtonElement>>;
718
+ Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
720
719
  Checkbox: (props: React.InputHTMLAttributes<HTMLInputElement>) => React$1.JSX.Element;
721
720
  Radio: (props: React.InputHTMLAttributes<HTMLInputElement>) => React$1.JSX.Element;
722
721
  };
723
722
 
723
+ type BasicPlacement = 'top' | 'bottom' | 'left' | 'right';
724
+ type PlacementWithModifier = 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end' | 'right-start' | 'right-end';
725
+ type PopperPlacement = BasicPlacement | PlacementWithModifier;
726
+ declare const convertToReactAriaPlacement: (p: PopperPlacement) => NonNullable<PositionProps["placement"]>;
727
+
728
+ interface PopoverProps extends HTMLAttributes<HTMLDivElement> {
729
+ /** Content of the popover. */
730
+ children: React__default.ReactNode;
731
+ /** Preset popover color taken from the theme, affecting both bathground and foreground. */
732
+ color?: 'default' | 'inverse' | 'positive' | 'negative' | 'warning' | 'none';
733
+ /** Whether the popover is rendered with a decorative window-like appearance. */
734
+ hasChrome: boolean;
735
+ /** Optional callback connected to a close button. Then button is shown only when passed. */
736
+ onHide?: () => void;
737
+ /** Optional custom label for the close button, if there is one. */
738
+ hideLabel?: string;
739
+ /** Padding between the content and popover edge. */
740
+ padding?: number | string;
741
+ }
742
+ declare const Popover: React__default.ForwardRefExoticComponent<PopoverProps & React__default.RefAttributes<HTMLDivElement>>;
743
+
744
+ interface PopoverProviderProps {
745
+ /** Whether to display the Popover in a prestyled container. True by default. */
746
+ hasChrome?: boolean;
747
+ /**
748
+ * Whether to display a close button in the top right corner of the popover overlay. Can overlap
749
+ * with overlay content, make sure to test your use case. False by default.
750
+ */
751
+ hasCloseButton?: boolean;
752
+ /** Optional custom label for the close button, if there is one. */
753
+ closeLabel?: string;
754
+ /** Optional custom padding for the popover overlay. */
755
+ padding?: number | string;
756
+ /** Distance between the trigger and Popover. Customize only if you have a good reason to. */
757
+ offset?: number;
758
+ /**
759
+ * Placement of the Popover. Start and End variants involve additional JS dimension calculations
760
+ * and should be used sparingly. Left and Right get inverted in RTL.
761
+ */
762
+ placement?: PopperPlacement;
763
+ /**
764
+ * Popover content. Pass a function to receive a onHide callback to collect to your close button,
765
+ * or if you want to wait for the popover to be opened to call your content component.
766
+ */
767
+ popover: ReactNode | ((props: {
768
+ onHide: () => void;
769
+ }) => ReactNode);
770
+ /** Popover trigger, must be a single child with click/press events. Must forward refs. */
771
+ children: ReactElement<DOMAttributes<Element>, string>;
772
+ /** Uncontrolled state: whether the Popover is initially visible. */
773
+ defaultVisible?: boolean;
774
+ /** Controlled state: whether the Popover is visible. */
775
+ visible?: boolean;
776
+ /** Controlled state: fires when user interaction causes the Popover to change visibility. */
777
+ onVisibleChange?: (isVisible: boolean) => void;
778
+ }
779
+ declare const PopoverProvider: ({ placement: placementProp, hasChrome, hasCloseButton, closeLabel, offset, padding, popover, children, defaultVisible, visible, onVisibleChange, ...props }: PopoverProviderProps) => React__default.JSX.Element;
780
+
781
+ type TooltipProps = Omit<PopoverProps, 'onHide' | 'hideLabel'>;
782
+ declare const Tooltip: React__default.ForwardRefExoticComponent<TooltipProps & React__default.RefAttributes<HTMLDivElement>>;
783
+
784
+ interface TooltipNoteProps {
785
+ note: string;
786
+ }
787
+ declare const TooltipNote: ({ note, ...props }: TooltipNoteProps) => React__default.JSX.Element;
788
+
789
+ interface TooltipProviderProps {
790
+ /** Tooltips trigger on hover and focus by default. To trigger on focus only, set this to `true`. */
791
+ triggerOnFocusOnly?: boolean;
792
+ /** Distance between the trigger and tooltip. Customize only if you have a good reason to. */
793
+ offset?: number;
794
+ /**
795
+ * Placement of the tooltip. Start and End variants involve additional JS dimension calculations
796
+ * and should be used sparingly. Left and Right get inverted in RTL.
797
+ */
798
+ placement?: PopperPlacement;
799
+ /** Tooltip content */
800
+ tooltip: ReactNode;
801
+ /** Tooltip trigger, must be a single child that can receive focus and click/key events. */
802
+ children: ReactElement<DOMAttributes<Element>, string>;
803
+ /** Delay before showing the tooltip, defaults to 200ms. Always instant on focus. */
804
+ delayShow?: number;
805
+ /** Delay before hiding the tooltip, defaults to 400ms. */
806
+ delayHide?: number;
807
+ /** Uncontrolled state: whether the tooltip is visible by default. */
808
+ defaultVisible?: boolean;
809
+ /** Deprecated property - use defaultVisible instead. */
810
+ startOpen?: boolean;
811
+ /** Controlled state: whether the tooltip is visible. */
812
+ visible?: boolean;
813
+ /** Controlled state: fires when user interaction causes the tooltip to change visibility. */
814
+ onVisibleChange?: (isVisible: boolean) => void;
815
+ }
816
+ declare const TooltipProvider: ({ triggerOnFocusOnly, placement: placementProp, offset, tooltip, children, defaultVisible, startOpen, delayShow, delayHide, visible, onVisibleChange, ...props }: TooltipProviderProps) => React__default.JSX.Element;
817
+
724
818
  declare const top: "top";
725
819
  declare const bottom: "bottom";
726
820
  declare const right: "right";
@@ -984,7 +1078,7 @@ interface WithTooltipStateProps extends Omit<WithTooltipPureProps, 'onVisibleCha
984
1078
 
985
1079
  declare const LazyWithTooltip: React__default.LazyExoticComponent<({ startOpen, onVisibleChange: onChange, ...rest }: WithTooltipStateProps) => React__default.JSX.Element>;
986
1080
  declare const WithTooltip: (props: ComponentProps<typeof LazyWithTooltip>) => React__default.JSX.Element;
987
- declare const LazyWithTooltipPure: React__default.LazyExoticComponent<({ svg, trigger, closeOnOutsideClick, placement, modifiers, hasChrome, defaultVisible, withArrows, offset, tooltip, children, closeOnTriggerHidden, mutationObserverOptions, delayHide, visible, interactive, delayShow, strategy, followCursor, onVisibleChange, portalContainer, ...props }: WithTooltipPureProps) => React__default.JSX.Element>;
1081
+ declare const LazyWithTooltipPure: React__default.LazyExoticComponent<React__default.FC<WithTooltipPureProps>>;
988
1082
  declare const WithTooltipPure: (props: ComponentProps<typeof LazyWithTooltipPure>) => React__default.JSX.Element;
989
1083
 
990
1084
  interface TooltipMessageProps {
@@ -998,11 +1092,6 @@ interface TooltipMessageProps {
998
1092
  }
999
1093
  declare const TooltipMessage: ({ title, desc, links }: TooltipMessageProps) => React__default.JSX.Element;
1000
1094
 
1001
- interface TooltipNoteProps {
1002
- note: string;
1003
- }
1004
- declare const TooltipNote: ({ note, ...props }: TooltipNoteProps) => React__default.JSX.Element;
1005
-
1006
1095
  interface ItemProps {
1007
1096
  disabled?: boolean;
1008
1097
  href?: string;
@@ -1011,7 +1100,7 @@ interface ItemProps {
1011
1100
  declare const Item: StyledComponent<{
1012
1101
  theme?: Theme;
1013
1102
  as?: React__default.ElementType;
1014
- } & ItemProps, React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
1103
+ } & ItemProps, React__default.DetailedHTMLProps<React__default.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
1015
1104
  type LinkWrapperType = (props: any) => ReactNode;
1016
1105
  interface ListItemProps extends Omit<ComponentProps<typeof Item>, 'title'> {
1017
1106
  loading?: boolean;
@@ -1026,7 +1115,7 @@ interface ListItemProps extends Omit<ComponentProps<typeof Item>, 'title'> {
1026
1115
  LinkWrapper?: LinkWrapperType;
1027
1116
  isIndented?: boolean;
1028
1117
  }
1029
- declare const ListItem: (props: ListItemProps) => React__default.JSX.Element;
1118
+ declare const ListItem: React__default.ForwardRefExoticComponent<Omit<ListItemProps, "ref"> & React__default.RefAttributes<unknown>>;
1030
1119
 
1031
1120
  declare const List: StyledComponent<{
1032
1121
  theme?: Theme;
@@ -1051,16 +1140,13 @@ interface TooltipLinkListProps extends ComponentProps<typeof List> {
1051
1140
  }
1052
1141
  declare const TooltipLinkList: ({ links, LinkWrapper, ...props }: TooltipLinkListProps) => React__default.JSX.Element;
1053
1142
 
1054
- declare const TabBar: StyledComponent<{
1055
- theme?: Theme;
1056
- as?: React__default.ElementType;
1057
- }, React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
1143
+ declare const TabBar: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLDivElement> & React__default.RefAttributes<HTMLDivElement>>;
1058
1144
  interface TabWrapperProps {
1059
1145
  active: boolean;
1060
1146
  render?: () => ReactElement;
1061
1147
  children?: ReactNode;
1062
1148
  }
1063
- declare const TabWrapper: FC<TabWrapperProps>;
1149
+ declare const TabWrapper: React__default.ForwardRefExoticComponent<TabWrapperProps & React__default.RefAttributes<HTMLDivElement>>;
1064
1150
  interface TabsProps {
1065
1151
  children?: ReactElement<{
1066
1152
  children: FC<Addon_RenderOptions & PropsWithChildren>;
@@ -1100,24 +1186,13 @@ declare class TabsState extends Component<TabsStateProps, TabsStateState> {
1100
1186
  render(): React__default.JSX.Element;
1101
1187
  }
1102
1188
 
1103
- interface Props {
1104
- title: React__default.ReactNode;
1105
- description?: React__default.ReactNode;
1106
- footer?: React__default.ReactNode;
1107
- }
1108
- declare const EmptyTabContent: ({ title, description, footer }: Props) => React__default.JSX.Element;
1109
-
1110
- interface ButtonProps extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
1111
- href?: never;
1112
- target?: never;
1113
- }
1114
- interface TabButtonProps {
1189
+ interface TabButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
1115
1190
  active?: boolean;
1191
+ children: ReactNode;
1192
+ id?: string;
1116
1193
  textColor?: string;
1117
1194
  }
1118
- declare const TabButton: StyledComponent<Omit<ButtonProps, "ref"> & RefAttributes<HTMLButtonElement> & {
1119
- theme?: Theme;
1120
- } & TabButtonProps, {}, {}>;
1195
+ declare const TabButton: ForwardRefExoticComponent<TabButtonProps & RefAttributes<HTMLButtonElement>>;
1121
1196
 
1122
1197
  interface SeparatorProps {
1123
1198
  force?: boolean;
@@ -1128,17 +1203,16 @@ declare const Separator: StyledComponent<{
1128
1203
  } & SeparatorProps, React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
1129
1204
  declare const interleaveSeparators: (list: any[]) => any;
1130
1205
 
1131
- interface UnstyledBarProps extends ScrollAreaProps {
1132
- scrollable?: boolean;
1133
- }
1134
- interface BarProps extends UnstyledBarProps {
1206
+ interface BarProps {
1135
1207
  backgroundColor?: string;
1136
1208
  border?: boolean;
1209
+ className?: string;
1210
+ children?: React__default.ReactNode;
1211
+ scrollable?: boolean;
1212
+ innerStyle?: CSSObject;
1137
1213
  }
1138
- declare const Bar: StyledComponent<UnstyledBarProps & {
1139
- theme?: Theme;
1140
- } & BarProps, {}, {}>;
1141
- interface FlexBarProps extends ComponentProps<typeof Bar> {
1214
+ declare const Bar: React__default.ForwardRefExoticComponent<BarProps & React__default.RefAttributes<HTMLDivElement>>;
1215
+ interface FlexBarProps extends BarProps {
1142
1216
  border?: boolean;
1143
1217
  backgroundColor?: string;
1144
1218
  }
@@ -1147,11 +1221,129 @@ declare const FlexBar: {
1147
1221
  displayName: string;
1148
1222
  };
1149
1223
 
1224
+ interface Props {
1225
+ title: React__default.ReactNode;
1226
+ description?: React__default.ReactNode;
1227
+ footer?: React__default.ReactNode;
1228
+ }
1229
+ declare const EmptyTabContent: ({ title, description, footer }: Props) => React__default.JSX.Element;
1230
+
1150
1231
  interface AddonPanelProps {
1151
1232
  active: boolean;
1152
1233
  children: ReactElement;
1234
+ hasScrollbar?: boolean;
1235
+ }
1236
+ declare const AddonPanel: ({ active, children, hasScrollbar }: AddonPanelProps) => React__default.JSX.Element;
1237
+
1238
+ interface AbstractToolbarProps {
1239
+ className?: string;
1240
+ children?: React__default.ReactNode;
1241
+ 'aria-label'?: string;
1242
+ 'aria-labelledby'?: string;
1243
+ }
1244
+ declare const AbstractToolbar: FC<AbstractToolbarProps>;
1245
+ interface ToolbarProps extends AbstractToolbarProps, BarProps {
1246
+ }
1247
+ declare const Toolbar: FC<ToolbarProps>;
1248
+
1249
+ interface TabPanelProps extends HTMLAttributes<HTMLDivElement> {
1250
+ /** The state of the tab list. Primary mechanism for using the tabpanel. */
1251
+ state: ReturnType<typeof useTabsState>;
1252
+ /**
1253
+ * Whether the panel adds a vertical scrollbar. Disable if you want to use fixed or sticky
1254
+ * positioning on part of the tab's content. True by default.
1255
+ */
1256
+ hasScrollbar?: boolean;
1257
+ /**
1258
+ * Whether to render only the active tab's content, or all tabs. When true, non-selected tabs are
1259
+ * rendered with the hidden attribute and do not affect the accessibility object model.
1260
+ */
1261
+ renderAllChildren?: boolean;
1262
+ }
1263
+ declare const TabPanel: FC<TabPanelProps>;
1264
+
1265
+ interface TabProps {
1266
+ id: string;
1267
+ 'aria-label'?: string;
1268
+ title: FC | ReactNode | string;
1269
+ children?: FC | ReactNode;
1270
+ isDisabled?: boolean;
1271
+ }
1272
+ interface useTabsStateProps {
1273
+ defaultSelected?: string;
1274
+ selected?: string;
1275
+ onSelectionChange?: (key: string) => void;
1276
+ tabs: TabProps[];
1277
+ }
1278
+ declare const useTabsState: ({ defaultSelected, onSelectionChange, selected, tabs, }: useTabsStateProps) => unknown;
1279
+ interface TabsViewProps extends HTMLAttributes<HTMLDivElement> {
1280
+ /** List of tabs and their associated panel. */
1281
+ tabs: TabProps[];
1282
+ /** ID of the tab that should be selected on first render. */
1283
+ defaultSelected?: string;
1284
+ /** ID of the current tab if in controlled rendering mode. */
1285
+ selected?: string;
1286
+ /** Called when the selected tab changes, use if you want to control the component state. */
1287
+ onSelectionChange?: (key: string) => void;
1288
+ /**
1289
+ * Optional tools to avoid rendering two toolbars in a layout.
1290
+ *
1291
+ * @warning Only use this if the tools act upon the entire layout,
1292
+ * not upon a single tab panel. If you want to edit which tools are
1293
+ * visible based on the current tab, then you musn't use `tools` and
1294
+ * should handle your own toolbar inside the tabpanel instead.
1295
+ */
1296
+ tools?: ReactElement;
1297
+ /** Background color for the bar containing the tabs and tools. */
1298
+ backgroundColor?: string;
1299
+ /** Style properties for the inner layout container in the bar containing the tabs and tools. */
1300
+ barInnerStyle?: React__default.CSSProperties;
1301
+ /** Show tools instead of the empty state if there are no tabs. */
1302
+ showToolsWhenEmpty?: boolean;
1303
+ /** Custom UI for the empty state shown when there are no tabs. */
1304
+ emptyState?: ReactNode;
1305
+ /** Optional ID. */
1306
+ id?: string;
1307
+ /** Props to pass to the TabPanel component. */
1308
+ panelProps?: Omit<ComponentProps<typeof TabPanel>, 'state'>;
1309
+ }
1310
+ declare const TabsView: FC<TabsViewProps>;
1311
+
1312
+ interface TabListProps extends HTMLAttributes<HTMLDivElement> {
1313
+ state: ReturnType<typeof useTabsState>;
1314
+ }
1315
+ declare const TabList: FC<TabListProps>;
1316
+
1317
+ interface StatelessTabListProps {
1318
+ children?: ReactNode;
1319
+ }
1320
+ declare const StatelessTabList: FC<StatelessTabListProps>;
1321
+
1322
+ interface StatelessTabPanelProps {
1323
+ /** Content of the tab panel. */
1324
+ children: ReactNode;
1325
+ /** Unique id of the TabPanel, must match that of its corresponding Tab. */
1326
+ name: string;
1327
+ /**
1328
+ * Whether the panel adds a vertical scrollbar. Disable if you want to use fixed or sticky
1329
+ * positioning on part of the tab's content. True by default.
1330
+ */
1331
+ hasScrollbar?: boolean;
1332
+ }
1333
+ declare const StatelessTabPanel: FC<StatelessTabPanelProps>;
1334
+
1335
+ interface StatelessTabsViewProps extends Omit<TabsViewProps, 'tabs'> {
1336
+ children: ReactNode;
1337
+ }
1338
+ declare const StatelessTabsView: FC<StatelessTabsViewProps>;
1339
+
1340
+ interface StatelessTabProps {
1341
+ /** Unique id of the Tab, must match that of its corresponding TabPanel. */
1342
+ name: string;
1343
+ /** Tab button content */
1344
+ children: React__default.ReactNode;
1153
1345
  }
1154
- declare const AddonPanel: ({ active, children }: AddonPanelProps) => React__default.JSX.Element;
1346
+ declare const StatelessTab: FC<StatelessTabProps>;
1155
1347
 
1156
1348
  type StorybookLogoProps = {
1157
1349
  alt: string;
@@ -1243,4 +1435,4 @@ declare const components: {
1243
1435
  };
1244
1436
  declare const resetComponents: Record<string, ElementType>;
1245
1437
 
1246
- export { A, ActionBar, type ActionItem, AddonPanel, Badge, Bar, Blockquote, Button, ClipboardCode, Code, DL, Div, DocumentWrapper, EmptyTabContent, ErrorFormatter, FlexBar, Form, H1, H2, H3, H4, H5, H6, HR, IconButton, Img, LI, Link$1 as Link, ListItem, Loader, Modal, OL, P, Placeholder, Pre, ProgressSpinner, ResetWrapper, ScrollArea, Separator, Spaced, Span, StorybookIcon, StorybookLogo, type SupportedLanguage, SyntaxHighlighter, type SyntaxHighlighterFormatTypes, type SyntaxHighlighterProps, type SyntaxHighlighterRendererProps, TT, TabBar, TabButton, TabWrapper, Table, Tabs, TabsState, TooltipLinkList, type Link as TooltipLinkListLink, TooltipMessage, TooltipNote, UL, WithTooltip, WithTooltipPure, Zoom, codeCommon, components, createCopyToClipboardFunction, getStoryHref, interleaveSeparators, nameSpaceClassNames, resetComponents, withReset };
1438
+ export { A, AbstractToolbar, ActionBar, type ActionItem, AddonPanel, Badge, Bar, type BarProps, Blockquote, Button, type ButtonProps, ClipboardCode, Code, DL, Div, DocumentWrapper, EmptyTabContent, ErrorFormatter, FlexBar, Form, H1, H2, H3, H4, H5, H6, HR, IconButton, Img, LI, Link$1 as Link, ListItem, Loader, Modal, ModalDecorator, OL, P, Placeholder, Popover, type PopoverProps, PopoverProvider, type PopoverProviderProps, type PopperPlacement, Pre, ProgressSpinner, ResetWrapper, ScrollArea, Select, Separator, Spaced, Span, StatelessTab, StatelessTabList, type StatelessTabListProps, StatelessTabPanel, type StatelessTabPanelProps, type StatelessTabProps, StatelessTabsView, type StatelessTabsViewProps, StorybookIcon, StorybookLogo, type SupportedLanguage, SyntaxHighlighter, type SyntaxHighlighterFormatTypes, type SyntaxHighlighterProps, type SyntaxHighlighterRendererProps, TT, TabBar, TabButton, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, TabWrapper, Table, Tabs, TabsState, TabsView, type TabsViewProps, ToggleButton, Toolbar, Tooltip, TooltipLinkList, type Link as TooltipLinkListLink, TooltipMessage, TooltipNote, type TooltipNoteProps, type TooltipProps, TooltipProvider, type TooltipProviderProps, UL, WithTooltip, WithTooltipPure, Zoom, codeCommon, components, convertToReactAriaPlacement, createCopyToClipboardFunction, getStoryHref, interleaveSeparators, nameSpaceClassNames, resetComponents, useTabsState, withReset };