@prismicio/editor-ui 0.4.23 → 0.4.24
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/components/Alert/Alert.stories.d.ts +1 -1
- package/dist/components/AnimatedList/DragPreview.d.ts +1 -2
- package/dist/components/AnimatedList/dnd.d.ts +6 -7
- package/dist/components/Button/Button.stories.d.ts +3 -3
- package/dist/components/Card/Card.d.ts +7 -2
- package/dist/components/ColorInput/ColorSlider.d.ts +3 -1
- package/dist/components/DateInput/DateInput.stories.d.ts +39 -5
- package/dist/components/Dialog/Dialog.d.ts +8 -3
- package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +2 -3
- package/dist/components/Form/Form.d.ts +1 -2
- package/dist/components/Icon/iconNames.d.ts +1 -1
- package/dist/components/SelectCard/SelectButton.stories.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +1 -0
- package/dist/components/Toast/Toast.d.ts +5 -2
- package/dist/components/Toast/Toast.stories.d.ts +10 -4
- package/dist/components/ToggleButton/ToggleButton.stories.d.ts +2 -2
- package/dist/index.cjs.js +110 -108
- package/dist/index.d.ts +0 -1
- package/dist/index.es.js +7892 -7983
- package/dist/style.css +1 -1
- package/dist/theme/new/sx.d.ts +1 -0
- package/package.json +2 -3
- package/dist/components/CropperControls/CropperControls.css.d.ts +0 -3
- package/dist/components/CropperControls/CropperControls.d.ts +0 -29
- package/dist/components/CropperControls/CropperControls.stories.d.ts +0 -61
- package/dist/components/CropperControls/index.d.ts +0 -1
- package/dist/components/Video/Video.css.d.ts +0 -11
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { HandlerOf } from "@prismicio/editor-support/Type";
|
|
2
1
|
import { type ReactElement } from "react";
|
|
3
|
-
export type DragPreviewRenderer = (draggedKey: string, callback:
|
|
2
|
+
export type DragPreviewRenderer = (draggedKey: string, callback: (element: HTMLElement) => void) => void;
|
|
4
3
|
export interface DragPreviewProps {
|
|
5
4
|
children: (key: string) => ReactElement;
|
|
6
5
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Handler, HandlerOf } from "@prismicio/editor-support/Type";
|
|
2
1
|
import { type LiHTMLAttributes, type ReactElement, type ReactNode, type RefObject } from "react";
|
|
3
2
|
import { type DragPreviewRenderer } from "./DragPreview";
|
|
4
3
|
import { type State } from "./layout";
|
|
@@ -20,16 +19,16 @@ export type DragState = {
|
|
|
20
19
|
previewRef: RefObject<DragPreviewRenderer>;
|
|
21
20
|
dragIndex: number | undefined;
|
|
22
21
|
dropIndex: number | undefined;
|
|
23
|
-
onDragStart:
|
|
24
|
-
onDragEnd:
|
|
25
|
-
onDragLeave:
|
|
26
|
-
onDrop:
|
|
27
|
-
onDragOver:
|
|
22
|
+
onDragStart: (index: number) => void;
|
|
23
|
+
onDragEnd: () => void;
|
|
24
|
+
onDragLeave: () => void;
|
|
25
|
+
onDrop: () => void;
|
|
26
|
+
onDragOver: (args: {
|
|
28
27
|
clientX: number;
|
|
29
28
|
clientY: number;
|
|
30
29
|
rect: DOMRect;
|
|
31
30
|
itemIndex: number;
|
|
32
|
-
}
|
|
31
|
+
}) => void;
|
|
33
32
|
};
|
|
34
33
|
export interface UseDndListItemProps<ITEM> {
|
|
35
34
|
itemState: State<ITEM>;
|
|
@@ -7,7 +7,7 @@ declare const meta: {
|
|
|
7
7
|
control: {
|
|
8
8
|
type: string;
|
|
9
9
|
};
|
|
10
|
-
options: readonly ["add", "alert", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "autoFixHigh", "block", "calendarToday", "centerFocusWeak", "check", "checkBox", "checkBoxOutlinedBlank", "chevronLeft", "chevronRight", "close", "cloud", "cloudUpload", "code", "colorLens", "contentCopy", "crop", "cropLandscape", "cropPortrait", "dataObject", "database", "dateRange", "delete", "description", "desktopWindows", "dragIndicator", "driveFileMove", "edit", "event", "expandLess", "expandMore", "firstPage", "folder", "formatBold", "formatClear", "formatItalic", "formatListBulleted", "formatListNumbered", "formatTextDirectionRToL", "hideImage", "image", "imageSearch", "insertDriveFile", "inventory", "keyboardArrowDown", "keyboardArrowUp", "label", "link", "linkOff", "lock", "looks1", "looks2", "looks3", "looks4", "looks5", "looks6", "moreVert", "musicNote", "notes", "openInFull", "openInNew", "phoneIphone", "photo", "pin", "place", "preview", "prismic", "public", "refresh", "save", "schedule", "search", "smartDisplay", "tabletMac", "tag", "textFields", "toggleOff", "unfoldMore", "unsplash", "viewDay", "visibility", "zoomOutMap"];
|
|
10
|
+
options: readonly ["add", "alert", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "autoFixHigh", "block", "calendarToday", "centerFocusWeak", "check", "checkBox", "checkBoxOutlinedBlank", "chevronLeft", "chevronRight", "close", "cloud", "cloudUpload", "code", "colorLens", "contentCopy", "crop", "cropLandscape", "cropPortrait", "dataObject", "database", "dateRange", "delete", "description", "desktopWindows", "dragIndicator", "driveFileMove", "edit", "event", "expandLess", "expandMore", "firstPage", "folder", "formatBold", "formatClear", "formatItalic", "formatListBulleted", "formatListNumbered", "formatTextDirectionRToL", "hideImage", "image", "imageSearch", "insertDriveFile", "inventory", "keyboardArrowDown", "keyboardArrowUp", "label", "link", "linkOff", "lock", "looks1", "looks2", "looks3", "looks4", "looks5", "looks6", "moreVert", "musicNote", "notes", "openInFull", "openInNew", "phoneIphone", "photo", "pin", "place", "preview", "prismic", "public", "refresh", "save", "schedule", "search", "smartDisplay", "tabletMac", "tag", "textFields", "toggleOff", "unfoldMore", "unsplash", "upload", "viewDay", "visibility", "zoomOutMap"];
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
};
|
|
@@ -23,8 +23,8 @@ export declare const Default: {
|
|
|
23
23
|
flexContent?: boolean | undefined;
|
|
24
24
|
textWeight?: "bold" | "normal" | undefined;
|
|
25
25
|
sx?: import("../../theme/new").SX | undefined;
|
|
26
|
-
startIcon?: "visibility" | "search" | "link" | "description" | "code" | "block" | "add" | "alert" | "arrowBack" | "arrowDownward" | "arrowDropDown" | "arrowDropDownCircle" | "arrowForward" | "arrowUpward" | "autoFixHigh" | "calendarToday" | "centerFocusWeak" | "check" | "checkBox" | "checkBoxOutlinedBlank" | "chevronLeft" | "chevronRight" | "close" | "cloud" | "cloudUpload" | "colorLens" | "contentCopy" | "crop" | "cropLandscape" | "cropPortrait" | "dataObject" | "database" | "dateRange" | "delete" | "desktopWindows" | "dragIndicator" | "driveFileMove" | "edit" | "event" | "expandLess" | "expandMore" | "firstPage" | "folder" | "formatBold" | "formatClear" | "formatItalic" | "formatListBulleted" | "formatListNumbered" | "formatTextDirectionRToL" | "hideImage" | "image" | "imageSearch" | "insertDriveFile" | "inventory" | "keyboardArrowDown" | "keyboardArrowUp" | "label" | "linkOff" | "lock" | "looks1" | "looks2" | "looks3" | "looks4" | "looks5" | "looks6" | "moreVert" | "musicNote" | "notes" | "openInFull" | "openInNew" | "phoneIphone" | "photo" | "pin" | "place" | "preview" | "prismic" | "public" | "refresh" | "save" | "schedule" | "smartDisplay" | "tabletMac" | "tag" | "textFields" | "toggleOff" | "unfoldMore" | "unsplash" | "viewDay" | "zoomOutMap" | undefined;
|
|
27
|
-
endIcon?: "visibility" | "search" | "link" | "description" | "code" | "block" | "add" | "alert" | "arrowBack" | "arrowDownward" | "arrowDropDown" | "arrowDropDownCircle" | "arrowForward" | "arrowUpward" | "autoFixHigh" | "calendarToday" | "centerFocusWeak" | "check" | "checkBox" | "checkBoxOutlinedBlank" | "chevronLeft" | "chevronRight" | "close" | "cloud" | "cloudUpload" | "colorLens" | "contentCopy" | "crop" | "cropLandscape" | "cropPortrait" | "dataObject" | "database" | "dateRange" | "delete" | "desktopWindows" | "dragIndicator" | "driveFileMove" | "edit" | "event" | "expandLess" | "expandMore" | "firstPage" | "folder" | "formatBold" | "formatClear" | "formatItalic" | "formatListBulleted" | "formatListNumbered" | "formatTextDirectionRToL" | "hideImage" | "image" | "imageSearch" | "insertDriveFile" | "inventory" | "keyboardArrowDown" | "keyboardArrowUp" | "label" | "linkOff" | "lock" | "looks1" | "looks2" | "looks3" | "looks4" | "looks5" | "looks6" | "moreVert" | "musicNote" | "notes" | "openInFull" | "openInNew" | "phoneIphone" | "photo" | "pin" | "place" | "preview" | "prismic" | "public" | "refresh" | "save" | "schedule" | "smartDisplay" | "tabletMac" | "tag" | "textFields" | "toggleOff" | "unfoldMore" | "unsplash" | "viewDay" | "zoomOutMap" | undefined;
|
|
26
|
+
startIcon?: "visibility" | "search" | "link" | "description" | "code" | "block" | "add" | "alert" | "arrowBack" | "arrowDownward" | "arrowDropDown" | "arrowDropDownCircle" | "arrowForward" | "arrowUpward" | "autoFixHigh" | "calendarToday" | "centerFocusWeak" | "check" | "checkBox" | "checkBoxOutlinedBlank" | "chevronLeft" | "chevronRight" | "close" | "cloud" | "cloudUpload" | "colorLens" | "contentCopy" | "crop" | "cropLandscape" | "cropPortrait" | "dataObject" | "database" | "dateRange" | "delete" | "desktopWindows" | "dragIndicator" | "driveFileMove" | "edit" | "event" | "expandLess" | "expandMore" | "firstPage" | "folder" | "formatBold" | "formatClear" | "formatItalic" | "formatListBulleted" | "formatListNumbered" | "formatTextDirectionRToL" | "hideImage" | "image" | "imageSearch" | "insertDriveFile" | "inventory" | "keyboardArrowDown" | "keyboardArrowUp" | "label" | "linkOff" | "lock" | "looks1" | "looks2" | "looks3" | "looks4" | "looks5" | "looks6" | "moreVert" | "musicNote" | "notes" | "openInFull" | "openInNew" | "phoneIphone" | "photo" | "pin" | "place" | "preview" | "prismic" | "public" | "refresh" | "save" | "schedule" | "smartDisplay" | "tabletMac" | "tag" | "textFields" | "toggleOff" | "unfoldMore" | "unsplash" | "upload" | "viewDay" | "zoomOutMap" | undefined;
|
|
27
|
+
endIcon?: "visibility" | "search" | "link" | "description" | "code" | "block" | "add" | "alert" | "arrowBack" | "arrowDownward" | "arrowDropDown" | "arrowDropDownCircle" | "arrowForward" | "arrowUpward" | "autoFixHigh" | "calendarToday" | "centerFocusWeak" | "check" | "checkBox" | "checkBoxOutlinedBlank" | "chevronLeft" | "chevronRight" | "close" | "cloud" | "cloudUpload" | "colorLens" | "contentCopy" | "crop" | "cropLandscape" | "cropPortrait" | "dataObject" | "database" | "dateRange" | "delete" | "desktopWindows" | "dragIndicator" | "driveFileMove" | "edit" | "event" | "expandLess" | "expandMore" | "firstPage" | "folder" | "formatBold" | "formatClear" | "formatItalic" | "formatListBulleted" | "formatListNumbered" | "formatTextDirectionRToL" | "hideImage" | "image" | "imageSearch" | "insertDriveFile" | "inventory" | "keyboardArrowDown" | "keyboardArrowUp" | "label" | "linkOff" | "lock" | "looks1" | "looks2" | "looks3" | "looks4" | "looks5" | "looks6" | "moreVert" | "musicNote" | "notes" | "openInFull" | "openInNew" | "phoneIphone" | "photo" | "pin" | "place" | "preview" | "prismic" | "public" | "refresh" | "save" | "schedule" | "smartDisplay" | "tabletMac" | "tag" | "textFields" | "toggleOff" | "unfoldMore" | "unsplash" | "upload" | "viewDay" | "zoomOutMap" | undefined;
|
|
28
28
|
renderStartIcon?: ((icon: import("react").ReactNode) => import("react").ReactNode) | undefined;
|
|
29
29
|
renderEndIcon?: ((icon: import("react").ReactNode) => import("react").ReactNode) | undefined;
|
|
30
30
|
onClick?: ((event: import("react").MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
2
|
import type { SX } from "../../theme/new";
|
|
3
3
|
import { type TextProps } from "../Text";
|
|
4
4
|
export interface CardProps {
|
|
@@ -10,10 +10,15 @@ export interface CardProps {
|
|
|
10
10
|
sx?: SX;
|
|
11
11
|
}
|
|
12
12
|
export declare function Card(props: CardProps): JSX.Element;
|
|
13
|
-
|
|
13
|
+
interface CardHeaderProps {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
sx?: SX;
|
|
16
|
+
}
|
|
17
|
+
export declare function CardHeader(props: CardHeaderProps): JSX.Element;
|
|
14
18
|
interface CardHeaderTitleProps {
|
|
15
19
|
children?: ReactNode;
|
|
16
20
|
variant?: TextProps["variant"];
|
|
21
|
+
sx?: SX;
|
|
17
22
|
}
|
|
18
23
|
export declare function CardHeaderTitle(props: CardHeaderTitleProps): JSX.Element;
|
|
19
24
|
interface CardHeaderActionsProps {
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { type ColorSliderStateOptions } from "@react-stately/color";
|
|
2
|
-
|
|
2
|
+
type Props = Omit<ColorSliderStateOptions, "locale" | "channel">;
|
|
3
|
+
export declare function ColorSlider(props: Props): JSX.Element;
|
|
4
|
+
export {};
|
|
@@ -1,10 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { Time } from "@internationalized/date";
|
|
2
|
+
import { DateInput } from "./DateInput";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof DateInput;
|
|
6
|
+
argTypes: {
|
|
7
|
+
mode: {
|
|
8
|
+
control: {
|
|
9
|
+
type: string;
|
|
10
|
+
};
|
|
11
|
+
options: string[];
|
|
12
|
+
};
|
|
13
|
+
"aria-labelledby": {};
|
|
14
|
+
value: {};
|
|
15
|
+
onValueChange: {};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
3
19
|
export declare const Default: {
|
|
4
|
-
|
|
20
|
+
decorators: ((_Story: import("@storybook/types").PartialStoryFn<import("@storybook/react/dist/types-0a347bb9").R, {
|
|
21
|
+
value?: Date | undefined;
|
|
22
|
+
mode: "date" | "date-time";
|
|
23
|
+
defaultTime?: Time | undefined;
|
|
24
|
+
disabled?: boolean | undefined;
|
|
25
|
+
minValue?: "tomorrow" | undefined;
|
|
26
|
+
"aria-labelledby": string;
|
|
27
|
+
sx?: import("../../theme/new").SX | undefined;
|
|
28
|
+
onValueChange: (value?: Date | undefined) => void;
|
|
29
|
+
}>, { args }: import("@storybook/types").StoryContext<import("@storybook/react/dist/types-0a347bb9").R, {
|
|
30
|
+
value?: Date | undefined;
|
|
31
|
+
mode: "date" | "date-time";
|
|
32
|
+
defaultTime?: Time | undefined;
|
|
33
|
+
disabled?: boolean | undefined;
|
|
34
|
+
minValue?: "tomorrow" | undefined;
|
|
35
|
+
"aria-labelledby": string;
|
|
36
|
+
sx?: import("../../theme/new").SX | undefined;
|
|
37
|
+
onValueChange: (value?: Date | undefined) => void;
|
|
38
|
+
}>) => JSX.Element)[];
|
|
5
39
|
args: {
|
|
6
|
-
|
|
7
|
-
|
|
40
|
+
mode: "date";
|
|
41
|
+
"aria-labelledby": string;
|
|
8
42
|
};
|
|
9
43
|
name: string;
|
|
10
44
|
};
|
|
@@ -2,8 +2,8 @@ import { type DialogContentProps } from "@radix-ui/react-dialog";
|
|
|
2
2
|
import { type FC, type PropsWithChildren, type ReactNode } from "react";
|
|
3
3
|
import { type IconName } from "../Icon";
|
|
4
4
|
export interface Custom {
|
|
5
|
-
width: number |
|
|
6
|
-
height: number |
|
|
5
|
+
width: number | string;
|
|
6
|
+
height: number | string;
|
|
7
7
|
}
|
|
8
8
|
export interface DialogProps {
|
|
9
9
|
modal?: boolean;
|
|
@@ -15,7 +15,12 @@ export interface DialogProps {
|
|
|
15
15
|
onAnimationEnd?: () => void;
|
|
16
16
|
hasClose?: boolean;
|
|
17
17
|
size?: "small" | "large" | "fullscreen" | Custom;
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* The position of the dialog in the viewport.
|
|
20
|
+
* @default "top" - The dialog is positioned at the center, top of the viewport. This covers most cases.
|
|
21
|
+
* "center" - The dialog is centered in the viewport. Useful for large, almost fullscreen dialogs.
|
|
22
|
+
*/
|
|
23
|
+
position?: "center" | "bottomRight" | "top";
|
|
19
24
|
onPointerDownOutside?: DialogContentProps["onPointerDownOutside"];
|
|
20
25
|
}
|
|
21
26
|
/**
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { type Fetcher } from "@prismicio/editor-support/Suspense";
|
|
2
|
-
import type { Handler } from "@prismicio/editor-support/Type";
|
|
3
2
|
import React, { type ReactNode } from "react";
|
|
4
3
|
export interface ErrorBoundaryProps {
|
|
5
4
|
children?: ReactNode;
|
|
6
|
-
renderError?: (error: unknown, reset:
|
|
5
|
+
renderError?: (error: unknown, reset: () => void) => ReactNode;
|
|
7
6
|
onError?: (error: unknown) => void;
|
|
8
7
|
}
|
|
9
8
|
interface State {
|
|
@@ -11,7 +10,7 @@ interface State {
|
|
|
11
10
|
handleError?: boolean;
|
|
12
11
|
requests: Map<Fetcher, Map<string, unknown[]>>;
|
|
13
12
|
}
|
|
14
|
-
type ErrorInterceptor = (error: unknown, resetBoundary:
|
|
13
|
+
type ErrorInterceptor = (error: unknown, resetBoundary: () => void) => boolean;
|
|
15
14
|
export declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, State> {
|
|
16
15
|
constructor(props: ErrorBoundaryProps);
|
|
17
16
|
static registerGlobalErrorInterceptor(value: ErrorInterceptor): void;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type { Handler } from "@prismicio/editor-support/Type";
|
|
2
1
|
import type { ReactNode } from "react";
|
|
3
2
|
import type { SX } from "../../theme/new";
|
|
4
3
|
export interface FormProps {
|
|
5
4
|
children?: ReactNode;
|
|
6
5
|
sx?: SX;
|
|
7
|
-
onSubmit:
|
|
6
|
+
onSubmit: () => void;
|
|
8
7
|
}
|
|
9
8
|
export declare function Form(props: FormProps): JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const iconNames: readonly ["add", "alert", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "autoFixHigh", "block", "calendarToday", "centerFocusWeak", "check", "checkBox", "checkBoxOutlinedBlank", "chevronLeft", "chevronRight", "close", "cloud", "cloudUpload", "code", "colorLens", "contentCopy", "crop", "cropLandscape", "cropPortrait", "dataObject", "database", "dateRange", "delete", "description", "desktopWindows", "dragIndicator", "driveFileMove", "edit", "event", "expandLess", "expandMore", "firstPage", "folder", "formatBold", "formatClear", "formatItalic", "formatListBulleted", "formatListNumbered", "formatTextDirectionRToL", "hideImage", "image", "imageSearch", "insertDriveFile", "inventory", "keyboardArrowDown", "keyboardArrowUp", "label", "link", "linkOff", "lock", "looks1", "looks2", "looks3", "looks4", "looks5", "looks6", "moreVert", "musicNote", "notes", "openInFull", "openInNew", "phoneIphone", "photo", "pin", "place", "preview", "prismic", "public", "refresh", "save", "schedule", "search", "smartDisplay", "tabletMac", "tag", "textFields", "toggleOff", "unfoldMore", "unsplash", "viewDay", "visibility", "zoomOutMap"];
|
|
1
|
+
export declare const iconNames: readonly ["add", "alert", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "autoFixHigh", "block", "calendarToday", "centerFocusWeak", "check", "checkBox", "checkBoxOutlinedBlank", "chevronLeft", "chevronRight", "close", "cloud", "cloudUpload", "code", "colorLens", "contentCopy", "crop", "cropLandscape", "cropPortrait", "dataObject", "database", "dateRange", "delete", "description", "desktopWindows", "dragIndicator", "driveFileMove", "edit", "event", "expandLess", "expandMore", "firstPage", "folder", "formatBold", "formatClear", "formatItalic", "formatListBulleted", "formatListNumbered", "formatTextDirectionRToL", "hideImage", "image", "imageSearch", "insertDriveFile", "inventory", "keyboardArrowDown", "keyboardArrowUp", "label", "link", "linkOff", "lock", "looks1", "looks2", "looks3", "looks4", "looks5", "looks6", "moreVert", "musicNote", "notes", "openInFull", "openInNew", "phoneIphone", "photo", "pin", "place", "preview", "prismic", "public", "refresh", "save", "schedule", "search", "smartDisplay", "tabletMac", "tag", "textFields", "toggleOff", "unfoldMore", "unsplash", "upload", "viewDay", "visibility", "zoomOutMap"];
|
|
2
2
|
export type IconName = typeof iconNames[number];
|
|
@@ -15,6 +15,7 @@ export declare function Skeleton(props: Props): import("react").DetailedReactHTM
|
|
|
15
15
|
flexGrow?: 1 | undefined;
|
|
16
16
|
flexShrink?: 0 | undefined;
|
|
17
17
|
flexBasis?: 0 | undefined;
|
|
18
|
+
flexWrap?: "wrap" | undefined;
|
|
18
19
|
alignSelf?: "center" | "stretch" | undefined;
|
|
19
20
|
justifySelf?: "center" | "stretch" | undefined;
|
|
20
21
|
visibility?: "hidden" | "visible" | undefined;
|
|
@@ -7,15 +7,18 @@ type Props = {
|
|
|
7
7
|
icon?: IconName;
|
|
8
8
|
loadingIndicator?: boolean;
|
|
9
9
|
title: string;
|
|
10
|
-
seconds
|
|
10
|
+
seconds?: number;
|
|
11
11
|
action?: {
|
|
12
12
|
title: string;
|
|
13
13
|
onClick: () => void;
|
|
14
14
|
};
|
|
15
|
+
cancel?: {
|
|
16
|
+
onClick: () => void;
|
|
17
|
+
};
|
|
15
18
|
};
|
|
16
19
|
/**
|
|
17
20
|
* We don't use the radix ui toast because of a bug with the timeout.
|
|
18
21
|
* Radix's Toast task tracker is here: https://github.com/radix-ui/primitives/issues/1171
|
|
19
22
|
*/
|
|
20
|
-
export declare const Toast: ({ anchor, open, onOpenChange, icon, loadingIndicator, title, seconds, action }: Props) => JSX.Element;
|
|
23
|
+
export declare const Toast: ({ anchor, open, onOpenChange, icon, loadingIndicator, title, seconds, action, cancel }: Props) => JSX.Element;
|
|
21
24
|
export {};
|
|
@@ -3,14 +3,17 @@ declare const _default: import("@storybook/types").ComponentAnnotations<import("
|
|
|
3
3
|
anchor: React.ReactNode;
|
|
4
4
|
open: boolean;
|
|
5
5
|
onOpenChange?: ((open: boolean) => void) | undefined;
|
|
6
|
-
icon?: "visibility" | "search" | "link" | "description" | "code" | "block" | "add" | "alert" | "arrowBack" | "arrowDownward" | "arrowDropDown" | "arrowDropDownCircle" | "arrowForward" | "arrowUpward" | "autoFixHigh" | "calendarToday" | "centerFocusWeak" | "check" | "checkBox" | "checkBoxOutlinedBlank" | "chevronLeft" | "chevronRight" | "close" | "cloud" | "cloudUpload" | "colorLens" | "contentCopy" | "crop" | "cropLandscape" | "cropPortrait" | "dataObject" | "database" | "dateRange" | "delete" | "desktopWindows" | "dragIndicator" | "driveFileMove" | "edit" | "event" | "expandLess" | "expandMore" | "firstPage" | "folder" | "formatBold" | "formatClear" | "formatItalic" | "formatListBulleted" | "formatListNumbered" | "formatTextDirectionRToL" | "hideImage" | "image" | "imageSearch" | "insertDriveFile" | "inventory" | "keyboardArrowDown" | "keyboardArrowUp" | "label" | "linkOff" | "lock" | "looks1" | "looks2" | "looks3" | "looks4" | "looks5" | "looks6" | "moreVert" | "musicNote" | "notes" | "openInFull" | "openInNew" | "phoneIphone" | "photo" | "pin" | "place" | "preview" | "prismic" | "public" | "refresh" | "save" | "schedule" | "smartDisplay" | "tabletMac" | "tag" | "textFields" | "toggleOff" | "unfoldMore" | "unsplash" | "viewDay" | "zoomOutMap" | undefined;
|
|
6
|
+
icon?: "visibility" | "search" | "link" | "description" | "code" | "block" | "add" | "alert" | "arrowBack" | "arrowDownward" | "arrowDropDown" | "arrowDropDownCircle" | "arrowForward" | "arrowUpward" | "autoFixHigh" | "calendarToday" | "centerFocusWeak" | "check" | "checkBox" | "checkBoxOutlinedBlank" | "chevronLeft" | "chevronRight" | "close" | "cloud" | "cloudUpload" | "colorLens" | "contentCopy" | "crop" | "cropLandscape" | "cropPortrait" | "dataObject" | "database" | "dateRange" | "delete" | "desktopWindows" | "dragIndicator" | "driveFileMove" | "edit" | "event" | "expandLess" | "expandMore" | "firstPage" | "folder" | "formatBold" | "formatClear" | "formatItalic" | "formatListBulleted" | "formatListNumbered" | "formatTextDirectionRToL" | "hideImage" | "image" | "imageSearch" | "insertDriveFile" | "inventory" | "keyboardArrowDown" | "keyboardArrowUp" | "label" | "linkOff" | "lock" | "looks1" | "looks2" | "looks3" | "looks4" | "looks5" | "looks6" | "moreVert" | "musicNote" | "notes" | "openInFull" | "openInNew" | "phoneIphone" | "photo" | "pin" | "place" | "preview" | "prismic" | "public" | "refresh" | "save" | "schedule" | "smartDisplay" | "tabletMac" | "tag" | "textFields" | "toggleOff" | "unfoldMore" | "unsplash" | "upload" | "viewDay" | "zoomOutMap" | undefined;
|
|
7
7
|
loadingIndicator?: boolean | undefined;
|
|
8
8
|
title: string;
|
|
9
|
-
seconds
|
|
9
|
+
seconds?: number | undefined;
|
|
10
10
|
action?: {
|
|
11
11
|
title: string;
|
|
12
12
|
onClick: () => void;
|
|
13
13
|
} | undefined;
|
|
14
|
+
cancel?: {
|
|
15
|
+
onClick: () => void;
|
|
16
|
+
} | undefined;
|
|
14
17
|
}>;
|
|
15
18
|
export default _default;
|
|
16
19
|
export declare const Default: {
|
|
@@ -18,14 +21,17 @@ export declare const Default: {
|
|
|
18
21
|
anchor: React.ReactNode;
|
|
19
22
|
open: boolean;
|
|
20
23
|
onOpenChange?: ((open: boolean) => void) | undefined;
|
|
21
|
-
icon?: "visibility" | "search" | "link" | "description" | "code" | "block" | "add" | "alert" | "arrowBack" | "arrowDownward" | "arrowDropDown" | "arrowDropDownCircle" | "arrowForward" | "arrowUpward" | "autoFixHigh" | "calendarToday" | "centerFocusWeak" | "check" | "checkBox" | "checkBoxOutlinedBlank" | "chevronLeft" | "chevronRight" | "close" | "cloud" | "cloudUpload" | "colorLens" | "contentCopy" | "crop" | "cropLandscape" | "cropPortrait" | "dataObject" | "database" | "dateRange" | "delete" | "desktopWindows" | "dragIndicator" | "driveFileMove" | "edit" | "event" | "expandLess" | "expandMore" | "firstPage" | "folder" | "formatBold" | "formatClear" | "formatItalic" | "formatListBulleted" | "formatListNumbered" | "formatTextDirectionRToL" | "hideImage" | "image" | "imageSearch" | "insertDriveFile" | "inventory" | "keyboardArrowDown" | "keyboardArrowUp" | "label" | "linkOff" | "lock" | "looks1" | "looks2" | "looks3" | "looks4" | "looks5" | "looks6" | "moreVert" | "musicNote" | "notes" | "openInFull" | "openInNew" | "phoneIphone" | "photo" | "pin" | "place" | "preview" | "prismic" | "public" | "refresh" | "save" | "schedule" | "smartDisplay" | "tabletMac" | "tag" | "textFields" | "toggleOff" | "unfoldMore" | "unsplash" | "viewDay" | "zoomOutMap" | undefined;
|
|
24
|
+
icon?: "visibility" | "search" | "link" | "description" | "code" | "block" | "add" | "alert" | "arrowBack" | "arrowDownward" | "arrowDropDown" | "arrowDropDownCircle" | "arrowForward" | "arrowUpward" | "autoFixHigh" | "calendarToday" | "centerFocusWeak" | "check" | "checkBox" | "checkBoxOutlinedBlank" | "chevronLeft" | "chevronRight" | "close" | "cloud" | "cloudUpload" | "colorLens" | "contentCopy" | "crop" | "cropLandscape" | "cropPortrait" | "dataObject" | "database" | "dateRange" | "delete" | "desktopWindows" | "dragIndicator" | "driveFileMove" | "edit" | "event" | "expandLess" | "expandMore" | "firstPage" | "folder" | "formatBold" | "formatClear" | "formatItalic" | "formatListBulleted" | "formatListNumbered" | "formatTextDirectionRToL" | "hideImage" | "image" | "imageSearch" | "insertDriveFile" | "inventory" | "keyboardArrowDown" | "keyboardArrowUp" | "label" | "linkOff" | "lock" | "looks1" | "looks2" | "looks3" | "looks4" | "looks5" | "looks6" | "moreVert" | "musicNote" | "notes" | "openInFull" | "openInNew" | "phoneIphone" | "photo" | "pin" | "place" | "preview" | "prismic" | "public" | "refresh" | "save" | "schedule" | "smartDisplay" | "tabletMac" | "tag" | "textFields" | "toggleOff" | "unfoldMore" | "unsplash" | "upload" | "viewDay" | "zoomOutMap" | undefined;
|
|
22
25
|
loadingIndicator?: boolean | undefined;
|
|
23
26
|
title: string;
|
|
24
|
-
seconds
|
|
27
|
+
seconds?: number | undefined;
|
|
25
28
|
action?: {
|
|
26
29
|
title: string;
|
|
27
30
|
onClick: () => void;
|
|
28
31
|
} | undefined;
|
|
32
|
+
cancel?: {
|
|
33
|
+
onClick: () => void;
|
|
34
|
+
} | undefined;
|
|
29
35
|
}>;
|
|
30
36
|
args: {
|
|
31
37
|
icon: string;
|
|
@@ -19,13 +19,13 @@ declare const meta: {
|
|
|
19
19
|
control: {
|
|
20
20
|
type: string;
|
|
21
21
|
};
|
|
22
|
-
options: readonly ["add", "alert", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "autoFixHigh", "block", "calendarToday", "centerFocusWeak", "check", "checkBox", "checkBoxOutlinedBlank", "chevronLeft", "chevronRight", "close", "cloud", "cloudUpload", "code", "colorLens", "contentCopy", "crop", "cropLandscape", "cropPortrait", "dataObject", "database", "dateRange", "delete", "description", "desktopWindows", "dragIndicator", "driveFileMove", "edit", "event", "expandLess", "expandMore", "firstPage", "folder", "formatBold", "formatClear", "formatItalic", "formatListBulleted", "formatListNumbered", "formatTextDirectionRToL", "hideImage", "image", "imageSearch", "insertDriveFile", "inventory", "keyboardArrowDown", "keyboardArrowUp", "label", "link", "linkOff", "lock", "looks1", "looks2", "looks3", "looks4", "looks5", "looks6", "moreVert", "musicNote", "notes", "openInFull", "openInNew", "phoneIphone", "photo", "pin", "place", "preview", "prismic", "public", "refresh", "save", "schedule", "search", "smartDisplay", "tabletMac", "tag", "textFields", "toggleOff", "unfoldMore", "unsplash", "viewDay", "visibility", "zoomOutMap"];
|
|
22
|
+
options: readonly ["add", "alert", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "autoFixHigh", "block", "calendarToday", "centerFocusWeak", "check", "checkBox", "checkBoxOutlinedBlank", "chevronLeft", "chevronRight", "close", "cloud", "cloudUpload", "code", "colorLens", "contentCopy", "crop", "cropLandscape", "cropPortrait", "dataObject", "database", "dateRange", "delete", "description", "desktopWindows", "dragIndicator", "driveFileMove", "edit", "event", "expandLess", "expandMore", "firstPage", "folder", "formatBold", "formatClear", "formatItalic", "formatListBulleted", "formatListNumbered", "formatTextDirectionRToL", "hideImage", "image", "imageSearch", "insertDriveFile", "inventory", "keyboardArrowDown", "keyboardArrowUp", "label", "link", "linkOff", "lock", "looks1", "looks2", "looks3", "looks4", "looks5", "looks6", "moreVert", "musicNote", "notes", "openInFull", "openInNew", "phoneIphone", "photo", "pin", "place", "preview", "prismic", "public", "refresh", "save", "schedule", "search", "smartDisplay", "tabletMac", "tag", "textFields", "toggleOff", "unfoldMore", "unsplash", "upload", "viewDay", "visibility", "zoomOutMap"];
|
|
23
23
|
};
|
|
24
24
|
endIcon: {
|
|
25
25
|
control: {
|
|
26
26
|
type: string;
|
|
27
27
|
};
|
|
28
|
-
options: readonly ["add", "alert", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "autoFixHigh", "block", "calendarToday", "centerFocusWeak", "check", "checkBox", "checkBoxOutlinedBlank", "chevronLeft", "chevronRight", "close", "cloud", "cloudUpload", "code", "colorLens", "contentCopy", "crop", "cropLandscape", "cropPortrait", "dataObject", "database", "dateRange", "delete", "description", "desktopWindows", "dragIndicator", "driveFileMove", "edit", "event", "expandLess", "expandMore", "firstPage", "folder", "formatBold", "formatClear", "formatItalic", "formatListBulleted", "formatListNumbered", "formatTextDirectionRToL", "hideImage", "image", "imageSearch", "insertDriveFile", "inventory", "keyboardArrowDown", "keyboardArrowUp", "label", "link", "linkOff", "lock", "looks1", "looks2", "looks3", "looks4", "looks5", "looks6", "moreVert", "musicNote", "notes", "openInFull", "openInNew", "phoneIphone", "photo", "pin", "place", "preview", "prismic", "public", "refresh", "save", "schedule", "search", "smartDisplay", "tabletMac", "tag", "textFields", "toggleOff", "unfoldMore", "unsplash", "viewDay", "visibility", "zoomOutMap"];
|
|
28
|
+
options: readonly ["add", "alert", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "autoFixHigh", "block", "calendarToday", "centerFocusWeak", "check", "checkBox", "checkBoxOutlinedBlank", "chevronLeft", "chevronRight", "close", "cloud", "cloudUpload", "code", "colorLens", "contentCopy", "crop", "cropLandscape", "cropPortrait", "dataObject", "database", "dateRange", "delete", "description", "desktopWindows", "dragIndicator", "driveFileMove", "edit", "event", "expandLess", "expandMore", "firstPage", "folder", "formatBold", "formatClear", "formatItalic", "formatListBulleted", "formatListNumbered", "formatTextDirectionRToL", "hideImage", "image", "imageSearch", "insertDriveFile", "inventory", "keyboardArrowDown", "keyboardArrowUp", "label", "link", "linkOff", "lock", "looks1", "looks2", "looks3", "looks4", "looks5", "looks6", "moreVert", "musicNote", "notes", "openInFull", "openInNew", "phoneIphone", "photo", "pin", "place", "preview", "prismic", "public", "refresh", "save", "schedule", "search", "smartDisplay", "tabletMac", "tag", "textFields", "toggleOff", "unfoldMore", "unsplash", "upload", "viewDay", "visibility", "zoomOutMap"];
|
|
29
29
|
};
|
|
30
30
|
};
|
|
31
31
|
};
|