storybook 10.1.0-beta.4 → 10.1.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_browser-chunks/{Color-FTG7SQDA.js → Color-TNPFN3FC.js} +2 -2
- package/dist/_browser-chunks/{WithTooltip-LMROHDUP.js → WithTooltip-IO6J4KBT.js} +2 -2
- package/dist/_node-chunks/{builder-manager-T3A7QLUO.js → builder-manager-OYPBAOYY.js} +13 -13
- package/dist/_node-chunks/{camelcase-WMMYRUH4.js → camelcase-KHLD4CBZ.js} +7 -7
- package/dist/_node-chunks/{chunk-TC7X5DN2.js → chunk-3YPPVXVV.js} +10 -10
- package/dist/_node-chunks/chunk-4JHERXHJ.js +61 -0
- package/dist/_node-chunks/{chunk-TBYOSPAV.js → chunk-4K5Y3HIQ.js} +6 -6
- package/dist/_node-chunks/{chunk-VW25O2YM.js → chunk-5VOKWTHJ.js} +6 -6
- package/dist/_node-chunks/{chunk-NORFPLB6.js → chunk-676RYYTC.js} +7 -7
- package/dist/_node-chunks/{chunk-C6RLDV2P.js → chunk-6O2EILDG.js} +8 -8
- package/dist/_node-chunks/{chunk-JYAXWHGH.js → chunk-6SDCYDUQ.js} +9 -9
- package/dist/_node-chunks/{chunk-HT32VUX7.js → chunk-AIU56TIK.js} +7 -7
- package/dist/_node-chunks/{chunk-RSJK2D7X.js → chunk-CDT6SGHG.js} +6 -6
- package/dist/_node-chunks/{chunk-EFTR6VSG.js → chunk-DCDE2LZP.js} +9 -9
- package/dist/_node-chunks/{chunk-TCLOOFNE.js → chunk-F67RSVRX.js} +7 -7
- package/dist/_node-chunks/{chunk-WGBDDI6W.js → chunk-GRWEJWC6.js} +10 -9
- package/dist/_node-chunks/{chunk-67VVNDJJ.js → chunk-IZ4CTLAY.js} +6 -6
- package/dist/_node-chunks/{chunk-KAVR7KJP.js → chunk-JKZ5HEMT.js} +36 -20
- package/dist/_node-chunks/{chunk-YZ3XRP4N.js → chunk-K43XPHKR.js} +6 -6
- package/dist/_node-chunks/{chunk-VN7SAKM4.js → chunk-KNKOGWDU.js} +6 -6
- package/dist/_node-chunks/chunk-KXDN7S7Y.js +23 -0
- package/dist/_node-chunks/chunk-L3S6HFZ7.js +18 -0
- package/dist/_node-chunks/{chunk-CSFSQ2I4.js → chunk-MKHH5E6J.js} +7 -7
- package/dist/_node-chunks/{chunk-CM44JL5Z.js → chunk-NHZRDKD5.js} +6 -6
- package/dist/_node-chunks/{chunk-KI6KY2ZN.js → chunk-OR5YQT2Y.js} +13 -13
- package/dist/_node-chunks/{chunk-5DEFF2GB.js → chunk-QWPDENGK.js} +7 -7
- package/dist/_node-chunks/{chunk-HDMHX5QM.js → chunk-R4N2FLEZ.js} +7 -7
- package/dist/_node-chunks/{chunk-EFN4RLWH.js → chunk-RNG6NQRW.js} +7 -7
- package/dist/_node-chunks/{chunk-YTTOTUWC.js → chunk-VZ6EDE7M.js} +6 -6
- package/dist/_node-chunks/{chunk-3MVB5IZX.js → chunk-WXWHNHZE.js} +16 -16
- package/dist/_node-chunks/{chunk-EJPOXNSG.js → chunk-XC4RJ4LY.js} +14 -21
- package/dist/_node-chunks/{chunk-PMZEJJNX.js → chunk-YOAOSHXI.js} +7 -7
- package/dist/_node-chunks/{dist-L6XLFQOU.js → dist-BS45SS3Y.js} +9 -9
- package/dist/_node-chunks/{globby-7IXLXFEA.js → globby-WIEUQD7O.js} +9 -9
- package/dist/_node-chunks/{lib-T5L2ZSAG.js → lib-UNDA723W.js} +7 -7
- package/dist/_node-chunks/{mdx-N42X6CFJ-GOOKUTSA.js → mdx-N42X6CFJ-ABE6VGZM.js} +8 -8
- package/dist/_node-chunks/{p-limit-7GKATDEW.js → p-limit-XD6JNZJT.js} +7 -7
- package/dist/babel/index.js +10 -10
- package/dist/bin/core.js +12 -12
- package/dist/bin/dispatcher.js +11 -11
- package/dist/bin/loader.js +9 -9
- package/dist/cli/index.d.ts +3 -1
- package/dist/cli/index.js +18 -18
- package/dist/common/index.d.ts +3 -1
- package/dist/common/index.js +19 -19
- package/dist/components/index.d.ts +131 -117
- package/dist/components/index.js +514 -449
- package/dist/core-server/index.js +33 -33
- package/dist/core-server/presets/common-manager.js +2 -2
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +25 -25
- package/dist/csf-tools/index.js +9 -9
- package/dist/manager/globals-runtime.js +7207 -7142
- package/dist/manager/runtime.js +156 -232
- package/dist/manager-api/index.d.ts +178 -178
- package/dist/manager-api/index.js +1 -1
- package/dist/mocking-utils/index.js +8 -8
- package/dist/node-logger/index.js +9 -9
- package/dist/preview-api/index.d.ts +67 -68
- package/dist/server-errors.js +11 -11
- package/dist/telemetry/index.js +23 -23
- package/package.json +1 -1
- package/dist/_node-chunks/chunk-IQFN7VY4.js +0 -23
- package/dist/_node-chunks/chunk-K7U3BSTR.js +0 -61
- package/dist/_node-chunks/chunk-YN3C74EA.js +0 -18
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ComponentProps, AnchorHTMLAttributes, MouseEvent as MouseEvent$1, ReactNode, ReactElement, SyntheticEvent, HTMLAttributes, Component, RefObject, DOMAttributes, FC, PropsWithChildren, ForwardRefExoticComponent, ButtonHTMLAttributes, RefAttributes, ElementType } from 'react';
|
|
3
|
-
import { color, CSSObject, FunctionInterpolation } from 'storybook/theming';
|
|
4
3
|
import { API_KeyCollection } from 'storybook/manager-api';
|
|
4
|
+
import { color, CSSObject, FunctionInterpolation } from 'storybook/theming';
|
|
5
5
|
import { DecoratorFunction } from 'storybook/internal/csf';
|
|
6
6
|
import { Addon_RenderOptions } from 'storybook/internal/types';
|
|
7
7
|
|
|
@@ -284,6 +284,129 @@ interface ActionBarProps {
|
|
|
284
284
|
}
|
|
285
285
|
declare const ActionBar: ({ actionItems, ...props }: ActionBarProps) => React__default.JSX.Element;
|
|
286
286
|
|
|
287
|
+
declare module 'react' {
|
|
288
|
+
interface ReactElement {
|
|
289
|
+
$$typeof?: symbol | string;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
interface SlotProps extends React$1.HTMLAttributes<HTMLElement> {
|
|
293
|
+
children?: React$1.ReactNode;
|
|
294
|
+
}
|
|
295
|
+
declare const Slot: React$1.ForwardRefExoticComponent<SlotProps & React$1.RefAttributes<HTMLElement>>;
|
|
296
|
+
|
|
297
|
+
interface ButtonProps extends Omit<ComponentProps<typeof StyledButton>, 'as'> {
|
|
298
|
+
as?: ComponentProps<typeof StyledButton>['as'] | typeof Slot;
|
|
299
|
+
asChild?: boolean;
|
|
300
|
+
/**
|
|
301
|
+
* A concise action label for the button announced by screen readers. Needed for buttons without
|
|
302
|
+
* text or with text that relies on visual cues to be understood. Pass false to indicate that the
|
|
303
|
+
* Button's content is already accessible to all. When a string is passed, it is also used as the
|
|
304
|
+
* default tooltip text.
|
|
305
|
+
*/
|
|
306
|
+
ariaLabel?: string | false;
|
|
307
|
+
/**
|
|
308
|
+
* An optional tooltip to display when the Button is hovered. If the Button has no text content,
|
|
309
|
+
* consider making this the same as the aria-label.
|
|
310
|
+
*/
|
|
311
|
+
tooltip?: string;
|
|
312
|
+
/**
|
|
313
|
+
* Only use this flag when tooltips on button interfere with other keyboard interactions, like
|
|
314
|
+
* when building a custom select or menu button. Disables tooltips from the `tooltip`, `shortcut`
|
|
315
|
+
* and `ariaLabel` props.
|
|
316
|
+
*/
|
|
317
|
+
disableAllTooltips?: boolean;
|
|
318
|
+
/**
|
|
319
|
+
* A more thorough description of what the Button does, provided to non-sighted users through an
|
|
320
|
+
* aria-describedby attribute. Use sparingly for buttons that trigger complex actions.
|
|
321
|
+
*/
|
|
322
|
+
ariaDescription?: string;
|
|
323
|
+
/**
|
|
324
|
+
* An optional keyboard shortcut to enable the button. Will be displayed in the tooltip and passed
|
|
325
|
+
* to aria-keyshortcuts for assistive technologies. The binding of the shortcut and action is
|
|
326
|
+
* managed globally in the manager's shortcuts module.
|
|
327
|
+
*/
|
|
328
|
+
shortcut?: API_KeyCollection;
|
|
329
|
+
}
|
|
330
|
+
declare const Button: React__default.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
331
|
+
declare const StyledButton: StyledComponent<{
|
|
332
|
+
theme?: Theme;
|
|
333
|
+
as?: React__default.ElementType;
|
|
334
|
+
} & {
|
|
335
|
+
size?: "small" | "medium";
|
|
336
|
+
padding?: "small" | "medium" | "none";
|
|
337
|
+
variant?: "outline" | "solid" | "ghost";
|
|
338
|
+
active?: boolean;
|
|
339
|
+
disabled?: boolean;
|
|
340
|
+
readOnly?: boolean;
|
|
341
|
+
animating?: boolean;
|
|
342
|
+
animation?: "none" | "rotate360" | "glow" | "jiggle";
|
|
343
|
+
}, React__default.DetailedHTMLProps<React__default.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
344
|
+
declare const IconButton: React__default.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
345
|
+
|
|
346
|
+
interface ToggleButtonProps extends ButtonProps {
|
|
347
|
+
/** Whether the ToggleButton is currently pressed or not. */
|
|
348
|
+
pressed: boolean;
|
|
349
|
+
}
|
|
350
|
+
declare const ToggleButton: React__default.ForwardRefExoticComponent<Omit<ToggleButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
351
|
+
|
|
352
|
+
type TransitionStatus =
|
|
353
|
+
| 'preEnter'
|
|
354
|
+
| 'entering'
|
|
355
|
+
| 'entered'
|
|
356
|
+
| 'preExit'
|
|
357
|
+
| 'exiting'
|
|
358
|
+
| 'exited'
|
|
359
|
+
| 'unmounted';
|
|
360
|
+
|
|
361
|
+
declare const ActionListAction: StyledComponent<Omit<Omit<ButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement> & {
|
|
362
|
+
theme?: Theme;
|
|
363
|
+
}, "ref"> & React__default.RefAttributes<HTMLButtonElement> & {
|
|
364
|
+
theme?: Theme;
|
|
365
|
+
}, {}, {}>;
|
|
366
|
+
declare const ActionList: StyledComponent<{
|
|
367
|
+
theme?: Theme;
|
|
368
|
+
as?: React__default.ElementType;
|
|
369
|
+
}, React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, {}> & {
|
|
370
|
+
Item: StyledComponent<{
|
|
371
|
+
theme?: Theme;
|
|
372
|
+
as?: React__default.ElementType;
|
|
373
|
+
} & {
|
|
374
|
+
active?: boolean;
|
|
375
|
+
transitionStatus?: TransitionStatus;
|
|
376
|
+
}, React__default.DetailedHTMLProps<React__default.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, {}>;
|
|
377
|
+
HoverItem: StyledComponent<{
|
|
378
|
+
theme?: Theme;
|
|
379
|
+
as?: React__default.ElementType;
|
|
380
|
+
} & {
|
|
381
|
+
active?: boolean;
|
|
382
|
+
transitionStatus?: TransitionStatus;
|
|
383
|
+
} & React__default.ClassAttributes<HTMLLIElement> & React__default.LiHTMLAttributes<HTMLLIElement> & {
|
|
384
|
+
theme?: Theme;
|
|
385
|
+
} & {
|
|
386
|
+
targetId: string;
|
|
387
|
+
}, {}, {}>;
|
|
388
|
+
Button: React__default.ForwardRefExoticComponent<Omit<Omit<ButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement> & {
|
|
389
|
+
theme?: Theme;
|
|
390
|
+
}, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
391
|
+
Toggle: React__default.ForwardRefExoticComponent<Omit<Omit<ToggleButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement> & {
|
|
392
|
+
theme?: Theme;
|
|
393
|
+
}, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
394
|
+
Action: StyledComponent<Omit<Omit<ButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement> & {
|
|
395
|
+
theme?: Theme;
|
|
396
|
+
}, "ref"> & React__default.RefAttributes<HTMLButtonElement> & {
|
|
397
|
+
theme?: Theme;
|
|
398
|
+
}, {}, {}>;
|
|
399
|
+
Link: (props: ComponentProps<typeof ActionListAction> & React__default.AnchorHTMLAttributes<HTMLAnchorElement>) => React__default.JSX.Element;
|
|
400
|
+
Text: StyledComponent<{
|
|
401
|
+
theme?: Theme;
|
|
402
|
+
as?: React__default.ElementType;
|
|
403
|
+
}, React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
404
|
+
Icon: StyledComponent<{
|
|
405
|
+
theme?: Theme;
|
|
406
|
+
as?: React__default.ElementType;
|
|
407
|
+
}, React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
408
|
+
};
|
|
409
|
+
|
|
287
410
|
declare const CollapsibleContent: StyledComponent<{
|
|
288
411
|
theme?: Theme;
|
|
289
412
|
as?: React__default.ElementType;
|
|
@@ -340,51 +463,6 @@ declare const Card: React__default.ForwardRefExoticComponent<Omit<CardProps, "re
|
|
|
340
463
|
}, React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
341
464
|
};
|
|
342
465
|
|
|
343
|
-
type TransitionStatus =
|
|
344
|
-
| 'preEnter'
|
|
345
|
-
| 'entering'
|
|
346
|
-
| 'entered'
|
|
347
|
-
| 'preExit'
|
|
348
|
-
| 'exiting'
|
|
349
|
-
| 'exited'
|
|
350
|
-
| 'unmounted';
|
|
351
|
-
|
|
352
|
-
declare const Listbox: StyledComponent<{
|
|
353
|
-
theme?: Theme;
|
|
354
|
-
as?: React__default.ElementType;
|
|
355
|
-
}, React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}> & {
|
|
356
|
-
Item: StyledComponent<{
|
|
357
|
-
theme?: Theme;
|
|
358
|
-
as?: React__default.ElementType;
|
|
359
|
-
} & {
|
|
360
|
-
active?: boolean;
|
|
361
|
-
transitionStatus?: TransitionStatus;
|
|
362
|
-
}, React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
363
|
-
HoverItem: StyledComponent<{
|
|
364
|
-
theme?: Theme;
|
|
365
|
-
as?: React__default.ElementType;
|
|
366
|
-
} & {
|
|
367
|
-
active?: boolean;
|
|
368
|
-
transitionStatus?: TransitionStatus;
|
|
369
|
-
} & React__default.ClassAttributes<HTMLDivElement> & React__default.HTMLAttributes<HTMLDivElement> & {
|
|
370
|
-
theme?: Theme;
|
|
371
|
-
} & {
|
|
372
|
-
targetId: string;
|
|
373
|
-
}, {}, {}>;
|
|
374
|
-
Button: React__default.ForwardRefExoticComponent<Omit<Omit<ButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
375
|
-
Action: StyledComponent<Omit<Omit<ButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>, "ref"> & React__default.RefAttributes<HTMLButtonElement> & {
|
|
376
|
-
theme?: Theme;
|
|
377
|
-
}, {}, {}>;
|
|
378
|
-
Text: StyledComponent<{
|
|
379
|
-
theme?: Theme;
|
|
380
|
-
as?: React__default.ElementType;
|
|
381
|
-
}, React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
382
|
-
Icon: StyledComponent<{
|
|
383
|
-
theme?: Theme;
|
|
384
|
-
as?: React__default.ElementType;
|
|
385
|
-
}, React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
386
|
-
};
|
|
387
|
-
|
|
388
466
|
/*
|
|
389
467
|
* Copyright 2020 Adobe. All rights reserved.
|
|
390
468
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -461,65 +539,6 @@ interface HeadingProps extends HTMLAttributes<HTMLElement> {
|
|
|
461
539
|
level?: number;
|
|
462
540
|
}
|
|
463
541
|
|
|
464
|
-
declare module 'react' {
|
|
465
|
-
interface ReactElement {
|
|
466
|
-
$$typeof?: symbol | string;
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
interface SlotProps extends React$1.HTMLAttributes<HTMLElement> {
|
|
470
|
-
children?: React$1.ReactNode;
|
|
471
|
-
}
|
|
472
|
-
declare const Slot: React$1.ForwardRefExoticComponent<SlotProps & React$1.RefAttributes<HTMLElement>>;
|
|
473
|
-
|
|
474
|
-
interface ButtonProps extends Omit<ComponentProps<typeof StyledButton>, 'as'> {
|
|
475
|
-
as?: ComponentProps<typeof StyledButton>['as'] | typeof Slot;
|
|
476
|
-
asChild?: boolean;
|
|
477
|
-
/**
|
|
478
|
-
* A concise action label for the button announced by screen readers. Needed for buttons without
|
|
479
|
-
* text or with text that relies on visual cues to be understood. Pass false to indicate that the
|
|
480
|
-
* Button's content is already accessible to all. When a string is passed, it is also used as the
|
|
481
|
-
* default tooltip text.
|
|
482
|
-
*/
|
|
483
|
-
ariaLabel?: string | false;
|
|
484
|
-
/**
|
|
485
|
-
* An optional tooltip to display when the Button is hovered. If the Button has no text content,
|
|
486
|
-
* consider making this the same as the aria-label.
|
|
487
|
-
*/
|
|
488
|
-
tooltip?: string;
|
|
489
|
-
/**
|
|
490
|
-
* Only use this flag when tooltips on button interfere with other keyboard interactions, like
|
|
491
|
-
* when building a custom select or menu button. Disables tooltips from the `tooltip`, `shortcut`
|
|
492
|
-
* and `ariaLabel` props.
|
|
493
|
-
*/
|
|
494
|
-
disableAllTooltips?: boolean;
|
|
495
|
-
/**
|
|
496
|
-
* A more thorough description of what the Button does, provided to non-sighted users through an
|
|
497
|
-
* aria-describedby attribute. Use sparingly for buttons that trigger complex actions.
|
|
498
|
-
*/
|
|
499
|
-
ariaDescription?: string;
|
|
500
|
-
/**
|
|
501
|
-
* An optional keyboard shortcut to enable the button. Will be displayed in the tooltip and passed
|
|
502
|
-
* to aria-keyshortcuts for assistive technologies. The binding of the shortcut and action is
|
|
503
|
-
* managed globally in the manager's shortcuts module.
|
|
504
|
-
*/
|
|
505
|
-
shortcut?: API_KeyCollection;
|
|
506
|
-
}
|
|
507
|
-
declare const Button: React__default.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
508
|
-
declare const StyledButton: StyledComponent<{
|
|
509
|
-
theme?: Theme;
|
|
510
|
-
as?: React__default.ElementType;
|
|
511
|
-
} & {
|
|
512
|
-
size?: "small" | "medium";
|
|
513
|
-
padding?: "small" | "medium" | "none";
|
|
514
|
-
variant?: "outline" | "solid" | "ghost";
|
|
515
|
-
active?: boolean;
|
|
516
|
-
disabled?: boolean;
|
|
517
|
-
readOnly?: boolean;
|
|
518
|
-
animating?: boolean;
|
|
519
|
-
animation?: "none" | "rotate360" | "glow" | "jiggle";
|
|
520
|
-
}, React__default.DetailedHTMLProps<React__default.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
521
|
-
declare const IconButton: React__default.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
522
|
-
|
|
523
542
|
declare const Overlay: StyledComponent<{
|
|
524
543
|
theme?: Theme;
|
|
525
544
|
as?: React__default.ElementType;
|
|
@@ -698,19 +717,14 @@ interface ErrorFormatterProps {
|
|
|
698
717
|
}
|
|
699
718
|
declare const ErrorFormatter: ({ error }: ErrorFormatterProps) => React__default.JSX.Element;
|
|
700
719
|
|
|
701
|
-
|
|
702
|
-
/** Whether the ToggleButton is currently pressed or not. */
|
|
703
|
-
pressed: boolean;
|
|
704
|
-
}
|
|
705
|
-
declare const ToggleButton: React__default.ForwardRefExoticComponent<Omit<ToggleButtonProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
706
|
-
|
|
720
|
+
type Value = string | number | null | boolean | undefined;
|
|
707
721
|
interface Option {
|
|
708
722
|
/** Optional rendering of the option. */
|
|
709
723
|
children?: React__default.ReactNode;
|
|
710
724
|
title: string;
|
|
711
725
|
description?: string;
|
|
712
726
|
icon?: React__default.ReactNode;
|
|
713
|
-
value:
|
|
727
|
+
value: Value;
|
|
714
728
|
}
|
|
715
729
|
|
|
716
730
|
interface SelectProps extends Omit<ButtonProps, 'onClick' | 'onChange' | 'onSelect' | 'variant'> {
|
|
@@ -742,16 +756,16 @@ interface SelectProps extends Omit<ButtonProps, 'onClick' | 'onChange' | 'onSele
|
|
|
742
756
|
/** Options available in the select. */
|
|
743
757
|
options: Option[];
|
|
744
758
|
/** IDs of the preselected options. */
|
|
745
|
-
defaultOptions?:
|
|
759
|
+
defaultOptions?: Value | Value[];
|
|
746
760
|
/** Whether the Select should render open. */
|
|
747
761
|
defaultOpen?: boolean;
|
|
748
762
|
/** When set, a reset option is rendered in the Select listbox. */
|
|
749
763
|
onReset?: () => void;
|
|
750
764
|
/** Custom text label for the reset option when it exists. */
|
|
751
765
|
resetLabel?: string;
|
|
752
|
-
onSelect?: (option:
|
|
753
|
-
onDeselect?: (option:
|
|
754
|
-
onChange?: (selected:
|
|
766
|
+
onSelect?: (option: Value) => void;
|
|
767
|
+
onDeselect?: (option: Value) => void;
|
|
768
|
+
onChange?: (selected: Value[]) => void;
|
|
755
769
|
}
|
|
756
770
|
declare const Select: React__default.ForwardRefExoticComponent<Omit<SelectProps, "ref"> & React__default.RefAttributes<HTMLButtonElement>>;
|
|
757
771
|
|
|
@@ -1545,4 +1559,4 @@ declare const components: {
|
|
|
1545
1559
|
};
|
|
1546
1560
|
declare const resetComponents: Record<string, ElementType>;
|
|
1547
1561
|
|
|
1548
|
-
export { A, AbstractToolbar, ActionBar, type ActionItem, AddonPanel, Badge, Bar, type BarProps, Blockquote, Button, type ButtonProps, Card, ClipboardCode, Code, Collapsible, DL, Div, DocumentWrapper, EmptyTabContent, ErrorFormatter, FlexBar, Form, H1, H2, H3, H4, H5, H6, HR, IconButton, Img, LI, Link$1 as Link, ListItem,
|
|
1562
|
+
export { A, AbstractToolbar, ActionBar, type ActionItem, ActionList, AddonPanel, Badge, Bar, type BarProps, Blockquote, Button, type ButtonProps, Card, ClipboardCode, Code, Collapsible, 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 };
|