storybook 10.0.0-beta.1 → 10.0.0-beta.3
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/_node-chunks/{builder-manager-EXW4ETLN.js → builder-manager-DXAEQZJB.js} +16 -16
- package/dist/_node-chunks/{camelcase-VZZFWA2L.js → camelcase-CMMT6PHY.js} +7 -7
- package/dist/_node-chunks/{chunk-U45F2NP6.js → chunk-3SUJKLRV.js} +7 -7
- package/dist/_node-chunks/{chunk-5ZX5SJOP.js → chunk-4TGAX5W7.js} +7 -7
- package/dist/_node-chunks/{chunk-GVCXNIAA.js → chunk-5XVEWBRA.js} +143 -15
- package/dist/_node-chunks/{chunk-EDBXIJN5.js → chunk-6Z44ODDR.js} +7 -7
- package/dist/_node-chunks/{chunk-5V6QH7WC.js → chunk-7EGB7ALG.js} +7 -7
- package/dist/_node-chunks/{chunk-2QZOLZDJ.js → chunk-AKW5OJ2T.js} +9 -9
- package/dist/_node-chunks/chunk-ALWVSNSK.js +62 -0
- package/dist/_node-chunks/{chunk-WDKWVNL2.js → chunk-BV4J7FF6.js} +7 -7
- package/dist/_node-chunks/{chunk-F5J33SXQ.js → chunk-CNKVQCQJ.js} +7 -7
- package/dist/_node-chunks/{chunk-EO4S3VXL.js → chunk-DNOOZ2LS.js} +58 -47
- package/dist/_node-chunks/{chunk-3SGKBLOL.js → chunk-EI44VA3U.js} +8 -8
- package/dist/_node-chunks/{chunk-ICPKUV5G.js → chunk-EVY6P65U.js} +7 -7
- package/dist/_node-chunks/{chunk-CM3UGTR5.js → chunk-IA7M33LK.js} +7 -7
- package/dist/_node-chunks/{chunk-XTSBFCVE.js → chunk-ICETGZAR.js} +7 -7
- package/dist/_node-chunks/chunk-ICFGNVW7.js +1476 -0
- package/dist/_node-chunks/{chunk-PL2PKDRO.js → chunk-KQXC7XVZ.js} +16 -16
- package/dist/_node-chunks/{chunk-32JYCD74.js → chunk-LRQFELIZ.js} +8 -8
- package/dist/_node-chunks/{chunk-LAUOYAOX.js → chunk-MHNUEOON.js} +7 -7
- package/dist/_node-chunks/{chunk-24TGL6EX.js → chunk-MVPVYHBT.js} +7 -7
- package/dist/_node-chunks/{chunk-PMEEE3UE.js → chunk-PA26PSV2.js} +7 -7
- package/dist/_node-chunks/{chunk-FZP2YGG3.js → chunk-PAZJQ2GH.js} +7 -7
- package/dist/_node-chunks/{chunk-QC5FE2D7.js → chunk-PK6SVDYW.js} +7 -7
- package/dist/_node-chunks/{chunk-2G5THETV.js → chunk-QI3AVWUV.js} +12 -12
- package/dist/_node-chunks/{chunk-VNLBDN2Z.js → chunk-R6TLLF24.js} +6 -6
- package/dist/_node-chunks/{chunk-3ZKQWDCG.js → chunk-RUCPXDO3.js} +8 -8
- package/dist/_node-chunks/{chunk-4WNZYNQY.js → chunk-SHXAIHPO.js} +7 -7
- package/dist/_node-chunks/{chunk-WP7DV5JT.js → chunk-TL5RNPZW.js} +10 -10
- package/dist/_node-chunks/{chunk-QJTT4OC2.js → chunk-VDFQYNPZ.js} +8 -8
- package/dist/_node-chunks/{chunk-V2ZF4DUD.js → chunk-WELIADWR.js} +9 -9
- package/dist/_node-chunks/{chunk-6CCUFDHU.js → chunk-WRSYICUI.js} +7 -7
- package/dist/_node-chunks/{chunk-SUMFFLGF.js → chunk-XRAB2RZN.js} +6 -6
- package/dist/_node-chunks/chunk-YRXKNGPR.js +18 -0
- package/dist/_node-chunks/{default-browser-id-JNATP42X.js → default-browser-id-2X5XLPPS.js} +7 -7
- package/dist/_node-chunks/{dist-VZL6D6Y3.js → dist-JSBOOVQK.js} +9 -9
- package/dist/_node-chunks/{globby-GZXJJ4W6.js → globby-YYTLHNUO.js} +9 -9
- package/dist/_node-chunks/{lib-PHT5GCV2.js → lib-DJHADRPZ.js} +11 -11
- package/dist/_node-chunks/{mdx-N42X6CFJ-EPDIV4A2.js → mdx-N42X6CFJ-WT6XCDU6.js} +8 -8
- package/dist/_node-chunks/{p-limit-AJIFSZTI.js → p-limit-HTXI4SGX.js} +8 -8
- package/dist/_node-chunks/{plugin-3VI56CEF.js → plugin-NNRMQ2YK.js} +10 -10
- package/dist/_node-chunks/{plugin-AV4OEKYM.js → plugin-W22F3FQV.js} +10 -10
- package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-E7J5FKLA.js → webpack-inject-mocker-runtime-plugin-VFNVWMAM.js} +10 -10
- package/dist/_node-chunks/{webpack-mock-plugin-VTYGW7HO.js → webpack-mock-plugin-Q4ED2M25.js} +9 -9
- package/dist/babel/index.js +11 -11
- package/dist/bin/core.js +11 -11
- package/dist/bin/dispatcher.js +11 -11
- package/dist/bin/loader.js +8 -8
- package/dist/cli/index.js +20 -20
- package/dist/common/index.js +22 -22
- package/dist/components/index.d.ts +228 -1
- package/dist/core-server/index.d.ts +515 -14
- package/dist/core-server/index.js +36 -36
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +22 -31
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +9 -9
- package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +10 -10
- package/dist/csf/index.js +7 -1
- package/dist/csf-tools/index.d.ts +34 -0
- package/dist/csf-tools/index.js +9 -9
- package/dist/manager/globals-runtime.js +3 -2
- package/dist/manager/runtime.js +1 -12
- package/dist/manager-api/index.d.ts +501 -0
- package/dist/manager-api/index.js +1 -1
- package/dist/manager-errors.d.ts +501 -0
- package/dist/node-logger/index.js +14 -14
- package/dist/preview/runtime.js +9 -2
- package/dist/preview-errors.d.ts +501 -0
- package/dist/router/index.d.ts +668 -10
- package/dist/server-errors.d.ts +501 -0
- package/dist/server-errors.js +10 -10
- package/dist/telemetry/index.js +25 -25
- package/dist/test/index.js +2 -1
- package/dist/types/index.d.ts +523 -9
- package/package.json +2 -4
- package/dist/_node-chunks/chunk-GE6I3YYG.js +0 -62
- package/dist/_node-chunks/chunk-KXCNXWXI.js +0 -18
- package/dist/_node-chunks/chunk-ZMV3WY6R.js +0 -9845
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
2
|
import React__default, { ComponentProps, AnchorHTMLAttributes, MouseEvent, ReactNode, ReactElement, ButtonHTMLAttributes, SyntheticEvent, Component, RefObject, FC, PropsWithChildren, DetailedHTMLProps, RefAttributes, ElementType } from 'react';
|
|
3
|
-
import { Config, PopperOptions } from 'react-popper-tooltip';
|
|
4
3
|
import { Addon_RenderOptions } from 'storybook/internal/types';
|
|
5
4
|
import { FunctionInterpolation } from 'storybook/theming';
|
|
6
5
|
|
|
@@ -720,6 +719,234 @@ declare const Form: StyledComponent<{
|
|
|
720
719
|
Radio: (props: React.InputHTMLAttributes<HTMLInputElement>) => React$1.JSX.Element;
|
|
721
720
|
};
|
|
722
721
|
|
|
722
|
+
declare const top: "top";
|
|
723
|
+
declare const bottom: "bottom";
|
|
724
|
+
declare const right: "right";
|
|
725
|
+
declare const left: "left";
|
|
726
|
+
declare type BasePlacement = typeof top | typeof bottom | typeof right | typeof left;
|
|
727
|
+
declare type VariationPlacement = "top-start" | "top-end" | "bottom-start" | "bottom-end" | "right-start" | "right-end" | "left-start" | "left-end";
|
|
728
|
+
declare type AutoPlacement = "auto" | "auto-start" | "auto-end";
|
|
729
|
+
declare type Placement = AutoPlacement | BasePlacement | VariationPlacement;
|
|
730
|
+
declare const beforeRead: "beforeRead";
|
|
731
|
+
declare const read: "read";
|
|
732
|
+
declare const afterRead: "afterRead";
|
|
733
|
+
declare const beforeMain: "beforeMain";
|
|
734
|
+
declare const main: "main";
|
|
735
|
+
declare const afterMain: "afterMain";
|
|
736
|
+
declare const beforeWrite: "beforeWrite";
|
|
737
|
+
declare const write: "write";
|
|
738
|
+
declare const afterWrite: "afterWrite";
|
|
739
|
+
declare type ModifierPhases = typeof beforeRead | typeof read | typeof afterRead | typeof beforeMain | typeof main | typeof afterMain | typeof beforeWrite | typeof write | typeof afterWrite;
|
|
740
|
+
|
|
741
|
+
declare type Obj = {
|
|
742
|
+
[key: string]: any;
|
|
743
|
+
};
|
|
744
|
+
declare type VisualViewport = EventTarget & {
|
|
745
|
+
width: number;
|
|
746
|
+
height: number;
|
|
747
|
+
offsetLeft: number;
|
|
748
|
+
offsetTop: number;
|
|
749
|
+
scale: number;
|
|
750
|
+
};
|
|
751
|
+
declare type Window = {
|
|
752
|
+
innerHeight: number;
|
|
753
|
+
offsetHeight: number;
|
|
754
|
+
innerWidth: number;
|
|
755
|
+
offsetWidth: number;
|
|
756
|
+
pageXOffset: number;
|
|
757
|
+
pageYOffset: number;
|
|
758
|
+
getComputedStyle: typeof getComputedStyle;
|
|
759
|
+
addEventListener(type: any, listener: any, optionsOrUseCapture?: any): void;
|
|
760
|
+
removeEventListener(type: any, listener: any, optionsOrUseCapture?: any): void;
|
|
761
|
+
Element: Element;
|
|
762
|
+
HTMLElement: HTMLElement;
|
|
763
|
+
Node: Node;
|
|
764
|
+
toString(): "[object Window]";
|
|
765
|
+
devicePixelRatio: number;
|
|
766
|
+
visualViewport?: VisualViewport;
|
|
767
|
+
ShadowRoot: ShadowRoot;
|
|
768
|
+
};
|
|
769
|
+
declare type Rect = {
|
|
770
|
+
width: number;
|
|
771
|
+
height: number;
|
|
772
|
+
x: number;
|
|
773
|
+
y: number;
|
|
774
|
+
};
|
|
775
|
+
declare type Offsets = {
|
|
776
|
+
y: number;
|
|
777
|
+
x: number;
|
|
778
|
+
};
|
|
779
|
+
declare type PositioningStrategy = "absolute" | "fixed";
|
|
780
|
+
declare type StateRects = {
|
|
781
|
+
reference: Rect;
|
|
782
|
+
popper: Rect;
|
|
783
|
+
};
|
|
784
|
+
declare type OffsetData = {
|
|
785
|
+
[key in Placement]?: Offsets;
|
|
786
|
+
};
|
|
787
|
+
declare type State = {
|
|
788
|
+
elements: {
|
|
789
|
+
reference: Element | VirtualElement;
|
|
790
|
+
popper: HTMLElement;
|
|
791
|
+
arrow?: HTMLElement;
|
|
792
|
+
};
|
|
793
|
+
options: OptionsGeneric<any>;
|
|
794
|
+
placement: Placement;
|
|
795
|
+
strategy: PositioningStrategy;
|
|
796
|
+
orderedModifiers: Array<Modifier<any, any>>;
|
|
797
|
+
rects: StateRects;
|
|
798
|
+
scrollParents: {
|
|
799
|
+
reference: Array<Element | Window | VisualViewport>;
|
|
800
|
+
popper: Array<Element | Window | VisualViewport>;
|
|
801
|
+
};
|
|
802
|
+
styles: {
|
|
803
|
+
[key: string]: Partial<CSSStyleDeclaration>;
|
|
804
|
+
};
|
|
805
|
+
attributes: {
|
|
806
|
+
[key: string]: {
|
|
807
|
+
[key: string]: string | boolean;
|
|
808
|
+
};
|
|
809
|
+
};
|
|
810
|
+
modifiersData: {
|
|
811
|
+
arrow?: {
|
|
812
|
+
x?: number;
|
|
813
|
+
y?: number;
|
|
814
|
+
centerOffset: number;
|
|
815
|
+
};
|
|
816
|
+
hide?: {
|
|
817
|
+
isReferenceHidden: boolean;
|
|
818
|
+
hasPopperEscaped: boolean;
|
|
819
|
+
referenceClippingOffsets: SideObject;
|
|
820
|
+
popperEscapeOffsets: SideObject;
|
|
821
|
+
};
|
|
822
|
+
offset?: OffsetData;
|
|
823
|
+
preventOverflow?: Offsets;
|
|
824
|
+
popperOffsets?: Offsets;
|
|
825
|
+
[key: string]: any;
|
|
826
|
+
};
|
|
827
|
+
reset: boolean;
|
|
828
|
+
};
|
|
829
|
+
declare type SetAction<S> = S | ((prev: S) => S);
|
|
830
|
+
declare type Instance = {
|
|
831
|
+
state: State;
|
|
832
|
+
destroy: () => void;
|
|
833
|
+
forceUpdate: () => void;
|
|
834
|
+
update: () => Promise<Partial<State>>;
|
|
835
|
+
setOptions: (setOptionsAction: SetAction<Partial<OptionsGeneric<any>>>) => Promise<Partial<State>>;
|
|
836
|
+
};
|
|
837
|
+
declare type ModifierArguments<Options extends Obj> = {
|
|
838
|
+
state: State;
|
|
839
|
+
instance: Instance;
|
|
840
|
+
options: Partial<Options>;
|
|
841
|
+
name: string;
|
|
842
|
+
};
|
|
843
|
+
declare type Modifier<Name, Options extends Obj> = {
|
|
844
|
+
name: Name;
|
|
845
|
+
enabled: boolean;
|
|
846
|
+
phase: ModifierPhases;
|
|
847
|
+
requires?: Array<string>;
|
|
848
|
+
requiresIfExists?: Array<string>;
|
|
849
|
+
fn: (arg0: ModifierArguments<Options>) => State | void;
|
|
850
|
+
effect?: (arg0: ModifierArguments<Options>) => (() => void) | void;
|
|
851
|
+
options?: Partial<Options>;
|
|
852
|
+
data?: Obj;
|
|
853
|
+
};
|
|
854
|
+
declare type Options = {
|
|
855
|
+
placement: Placement;
|
|
856
|
+
modifiers: Array<Partial<Modifier<any, any>>>;
|
|
857
|
+
strategy: PositioningStrategy;
|
|
858
|
+
onFirstUpdate?: (arg0: Partial<State>) => void;
|
|
859
|
+
};
|
|
860
|
+
declare type OptionsGeneric<TModifier> = {
|
|
861
|
+
placement: Placement;
|
|
862
|
+
modifiers: Array<TModifier>;
|
|
863
|
+
strategy: PositioningStrategy;
|
|
864
|
+
onFirstUpdate?: (arg0: Partial<State>) => void;
|
|
865
|
+
};
|
|
866
|
+
declare type SideObject = {
|
|
867
|
+
top: number;
|
|
868
|
+
left: number;
|
|
869
|
+
right: number;
|
|
870
|
+
bottom: number;
|
|
871
|
+
};
|
|
872
|
+
declare type VirtualElement = {
|
|
873
|
+
getBoundingClientRect: () => ClientRect | DOMRect;
|
|
874
|
+
contextElement?: Element;
|
|
875
|
+
};
|
|
876
|
+
|
|
877
|
+
declare const createPopper: <TModifier extends Partial<Modifier<any, any>>>(reference: Element | VirtualElement, popper: HTMLElement, options?: Partial<OptionsGeneric<TModifier>>) => Instance;
|
|
878
|
+
|
|
879
|
+
declare type TriggerType = 'click' | 'double-click' | 'right-click' | 'hover' | 'focus';
|
|
880
|
+
declare type Config = {
|
|
881
|
+
/**
|
|
882
|
+
* Whether to close the tooltip when its trigger is out of boundary
|
|
883
|
+
* @default false
|
|
884
|
+
*/
|
|
885
|
+
closeOnTriggerHidden?: boolean;
|
|
886
|
+
/**
|
|
887
|
+
* Event or events that trigger the tooltip
|
|
888
|
+
* @default hover
|
|
889
|
+
*/
|
|
890
|
+
trigger?: TriggerType | TriggerType[] | null;
|
|
891
|
+
/**
|
|
892
|
+
* Delay in hiding the tooltip (ms)
|
|
893
|
+
* @default 0
|
|
894
|
+
*/
|
|
895
|
+
delayHide?: number;
|
|
896
|
+
/**
|
|
897
|
+
* Delay in showing the tooltip (ms)
|
|
898
|
+
* @default 0
|
|
899
|
+
*/
|
|
900
|
+
delayShow?: number;
|
|
901
|
+
/**
|
|
902
|
+
* Whether to make the tooltip spawn at cursor position
|
|
903
|
+
* @default false
|
|
904
|
+
*/
|
|
905
|
+
followCursor?: boolean;
|
|
906
|
+
/**
|
|
907
|
+
* Options to MutationObserver, used internally for updating
|
|
908
|
+
* tooltip position based on its DOM changes
|
|
909
|
+
* @default { attributes: true, childList: true, subtree: true }
|
|
910
|
+
*/
|
|
911
|
+
mutationObserverOptions?: MutationObserverInit | null;
|
|
912
|
+
/**
|
|
913
|
+
* Whether tooltip is shown by default
|
|
914
|
+
* @default false
|
|
915
|
+
*/
|
|
916
|
+
defaultVisible?: boolean;
|
|
917
|
+
/**
|
|
918
|
+
* Used to create controlled tooltip
|
|
919
|
+
*/
|
|
920
|
+
visible?: boolean;
|
|
921
|
+
/**
|
|
922
|
+
* Called when the visibility of the tooltip changes
|
|
923
|
+
*/
|
|
924
|
+
onVisibleChange?: (state: boolean) => void;
|
|
925
|
+
/**
|
|
926
|
+
* If `true`, a click outside the trigger element closes the tooltip
|
|
927
|
+
* @default true
|
|
928
|
+
*/
|
|
929
|
+
closeOnOutsideClick?: boolean;
|
|
930
|
+
/**
|
|
931
|
+
* If `true`, hovering the tooltip will keep it open. Normally tooltip closes when the mouse cursor moves out of
|
|
932
|
+
* the trigger element. If it moves to the tooltip element, the tooltip stays open.
|
|
933
|
+
* @default false
|
|
934
|
+
*/
|
|
935
|
+
interactive?: boolean;
|
|
936
|
+
/**
|
|
937
|
+
* Alias for popper.js placement, see https://popper.js.org/docs/v2/constructors/#placement
|
|
938
|
+
*/
|
|
939
|
+
placement?: Placement;
|
|
940
|
+
/**
|
|
941
|
+
* Shorthand for popper.js offset modifier, see https://popper.js.org/docs/v2/modifiers/offset/
|
|
942
|
+
* @default [0, 6]
|
|
943
|
+
*/
|
|
944
|
+
offset?: [number, number];
|
|
945
|
+
};
|
|
946
|
+
declare type PopperOptions = Partial<Options> & {
|
|
947
|
+
createPopper?: typeof createPopper;
|
|
948
|
+
};
|
|
949
|
+
|
|
723
950
|
declare const TargetContainer: StyledComponent<{
|
|
724
951
|
theme?: Theme;
|
|
725
952
|
as?: React__default.ElementType;
|