@prismicio/editor-ui 0.4.22 → 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.
Files changed (47) hide show
  1. package/dist/components/Alert/Alert.d.ts +19 -2
  2. package/dist/components/Alert/Alert.stories.d.ts +5 -3
  3. package/dist/components/Alert/AlertContext.d.ts +2 -6
  4. package/dist/components/Alert/index.d.ts +1 -1
  5. package/dist/components/AnimatedList/DragPreview.d.ts +1 -2
  6. package/dist/components/AnimatedList/dnd.d.ts +6 -7
  7. package/dist/components/BaseInput/BaseInput.d.ts +3 -0
  8. package/dist/components/Button/Button.stories.d.ts +3 -3
  9. package/dist/components/Card/Card.d.ts +7 -2
  10. package/dist/components/ColorInput/ColorSlider.d.ts +3 -1
  11. package/dist/components/DateInput/DateInput.stories.d.ts +39 -5
  12. package/dist/components/Dialog/Dialog.d.ts +9 -3
  13. package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +2 -3
  14. package/dist/components/Form/Form.d.ts +1 -2
  15. package/dist/components/Form/FormInput.css.d.ts +1 -5
  16. package/dist/components/Form/FormInput.d.ts +0 -2
  17. package/dist/components/Icon/PrismicLogo.d.ts +1 -5
  18. package/dist/components/Icon/iconNames.d.ts +1 -1
  19. package/dist/components/SearchInput/SearchInput.d.ts +2 -0
  20. package/dist/components/Select/Select.stories.d.ts +61 -5
  21. package/dist/components/SelectCard/SelectButton.stories.d.ts +1 -1
  22. package/dist/components/Skeleton/Skeleton.d.ts +1 -0
  23. package/dist/components/Switch/Switch.d.ts +1 -2
  24. package/dist/components/Switch/Switch.stories.d.ts +23 -5
  25. package/dist/components/TextLink/TextLink.css.d.ts +1 -1
  26. package/dist/components/TextLink/TextLink.d.ts +1 -2
  27. package/dist/components/Toast/Toast.d.ts +5 -2
  28. package/dist/components/Toast/Toast.stories.d.ts +10 -4
  29. package/dist/components/ToggleButton/ToggleButton.stories.d.ts +2 -2
  30. package/dist/index.cjs.js +118 -116
  31. package/dist/index.d.ts +0 -1
  32. package/dist/index.es.js +8973 -9065
  33. package/dist/style.css +1 -1
  34. package/dist/theme/new/sx.d.ts +1 -0
  35. package/dist/theme/new/theme.d.ts +2 -1
  36. package/package.json +4 -5
  37. package/dist/components/Calendar/Calendar.css.d.ts +0 -2
  38. package/dist/components/Calendar/CalendarCell.css.d.ts +0 -7
  39. package/dist/components/Calendar/CalendarGrid.css.d.ts +0 -1
  40. package/dist/components/CropperControls/CropperControls.css.d.ts +0 -3
  41. package/dist/components/CropperControls/CropperControls.d.ts +0 -29
  42. package/dist/components/CropperControls/CropperControls.stories.d.ts +0 -61
  43. package/dist/components/CropperControls/index.d.ts +0 -1
  44. package/dist/components/Gradient/Gradient.css.d.ts +0 -1
  45. package/dist/components/Icon/PrismicLogo.css.d.ts +0 -1
  46. package/dist/components/Switch/Switch.css.d.ts +0 -3
  47. package/dist/components/Video/Video.css.d.ts +0 -11
@@ -1,9 +1,26 @@
1
1
  import type { ReactNode } from "react";
2
+ import { type IconName } from "../Icon";
3
+ type Colors = "error" | "default";
2
4
  type Props = {
3
5
  title: string;
4
6
  subtitle?: ReactNode;
5
- footerButtons?: ReactNode;
6
7
  onClose?: () => void;
8
+ color?: Colors;
9
+ footerButtons?: FooterButtons;
7
10
  };
8
- export declare function Alert({ title, subtitle, footerButtons, onClose }: Props): JSX.Element;
11
+ export interface FooterButtons {
12
+ /** Dismiss button in the footer, displayed first */
13
+ dismiss?: {
14
+ text: string;
15
+ onClick?: () => void;
16
+ };
17
+ /** Main action button in the footer, displayed second */
18
+ action?: {
19
+ text: string;
20
+ onClick: () => void;
21
+ /** Icon displayed on the right of the button, defaults to arrowForward */
22
+ icon?: IconName;
23
+ };
24
+ }
25
+ export declare function Alert(props: Props): JSX.Element;
9
26
  export {};
@@ -1,21 +1,23 @@
1
1
  declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, {
2
2
  title: string;
3
3
  subtitle?: import("react").ReactNode;
4
- footerButtons?: import("react").ReactNode;
5
4
  onClose?: (() => void) | undefined;
5
+ color?: ("default" | "error") | undefined;
6
+ footerButtons?: import("./Alert").FooterButtons | undefined;
6
7
  }>;
7
8
  export default _default;
8
9
  export declare const Default: {
9
10
  render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, {
10
11
  title: string;
11
12
  subtitle?: import("react").ReactNode;
12
- footerButtons?: import("react").ReactNode;
13
13
  onClose?: (() => void) | undefined;
14
+ color?: ("default" | "error") | undefined;
15
+ footerButtons?: import("./Alert").FooterButtons | undefined;
14
16
  }>;
15
17
  args: {
16
18
  title: string;
17
19
  subtitle: string;
18
- onClose: () => null;
20
+ onClose: () => void;
19
21
  };
20
22
  name: string;
21
23
  };
@@ -1,14 +1,10 @@
1
1
  import { type ReactNode, type RefObject } from "react";
2
- import type { IconName } from "../Icon";
2
+ import { type FooterButtons } from ".";
3
3
  export interface AlertConfig {
4
4
  id?: string;
5
5
  title: string;
6
6
  subtitle: ReactNode;
7
- buttons?: {
8
- text: string;
9
- onClick: () => void;
10
- icon?: IconName;
11
- }[];
7
+ buttons?: FooterButtons;
12
8
  onRetry?: () => void;
13
9
  }
14
10
  interface AlertContext {
@@ -1,2 +1,2 @@
1
- export { Alert } from "./Alert";
1
+ export { Alert, type FooterButtons } from "./Alert";
2
2
  export { type AlertConfig, AlertProvider, useAlert } from "./AlertContext";
@@ -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: HandlerOf<HTMLElement>) => void;
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: HandlerOf<number>;
24
- onDragEnd: Handler;
25
- onDragLeave: Handler;
26
- onDrop: Handler;
27
- onDragOver: HandlerOf<{
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>;
@@ -1,5 +1,8 @@
1
1
  import { type KeyboardEvent, type ReactNode } from "react";
2
2
  import type { SX, ThemeKeys } from "../../theme/new";
3
+ /**
4
+ * Flexible base Input, provided with no height or block padding.
5
+ */
3
6
  export interface BaseInputProps {
4
7
  autoComplete?: string;
5
8
  id?: string;
@@ -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 { PropsWithChildren, ReactNode } from "react";
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
- export declare function CardHeader(props: PropsWithChildren): JSX.Element;
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
- export declare const ColorSlider: (props: Omit<ColorSliderStateOptions, "locale" | "channel">) => JSX.Element;
2
+ type Props = Omit<ColorSliderStateOptions, "locale" | "channel">;
3
+ export declare function ColorSlider(props: Props): JSX.Element;
4
+ export {};
@@ -1,10 +1,44 @@
1
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./DateInput").DateInputProps>;
2
- export default _default;
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
- render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./DateInput").DateInputProps>;
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
- readOnly: boolean;
7
- mode: string;
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 | "auto";
6
- height: number | "auto";
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
- position?: "center" | "bottomRight";
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
  /**
@@ -42,6 +47,7 @@ type ActionsProps = {
42
47
  cancel?: {
43
48
  text: string;
44
49
  };
50
+ link?: ReactNode;
45
51
  /**
46
52
  * If true, the actions will be rendered in the dialog grid area `footer`.
47
53
  */
@@ -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: Handler) => ReactNode;
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: Handler) => boolean;
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: Handler;
6
+ onSubmit: () => void;
8
7
  }
9
8
  export declare function Form(props: FormProps): JSX.Element;
@@ -1,8 +1,4 @@
1
- export declare const input: {
2
- small: string;
3
- medium: string;
4
- large: string;
5
- };
1
+ export declare const input: string;
6
2
  export declare const inputPadding: {
7
3
  normal: string;
8
4
  withIcon: string;
@@ -1,7 +1,6 @@
1
1
  import { type ClipboardEventHandler, type KeyboardEventHandler } from "react";
2
2
  import type { SX } from "../../theme/new";
3
3
  import { type IconName } from "../Icon";
4
- import * as styles from "./FormInput.css";
5
4
  export interface FormInputProps {
6
5
  type?: "text" | "email" | "password";
7
6
  disabled?: boolean;
@@ -9,7 +8,6 @@ export interface FormInputProps {
9
8
  placeholder?: string;
10
9
  value: string;
11
10
  error?: boolean;
12
- size?: keyof typeof styles.input;
13
11
  icon?: IconName;
14
12
  autoComplete?: AutoCompleteValue;
15
13
  sx?: SX;
@@ -1,5 +1 @@
1
- interface Props {
2
- pulse?: boolean;
3
- }
4
- export declare const PrismicLogo: import("react").MemoExoticComponent<({ pulse }: Props) => JSX.Element>;
5
- export {};
1
+ export declare const PrismicLogo: import("react").MemoExoticComponent<() => 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];
@@ -1,8 +1,10 @@
1
+ import type { SX } from "../../theme/new";
1
2
  export interface SearchInputProps {
2
3
  value: string;
3
4
  placeholder?: string;
4
5
  maxLength?: number;
5
6
  isLoading?: boolean;
7
+ sx?: SX;
6
8
  onValueChange: (value: string) => void;
7
9
  }
8
10
  export declare function SearchInput(props: SearchInputProps): JSX.Element;
@@ -1,12 +1,68 @@
1
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./Select").SelectProps<string>>;
2
- export default _default;
1
+ import { Select } from "./Select";
2
+ declare const meta: {
3
+ title: string;
4
+ component: typeof Select;
5
+ argTypes: {
6
+ autoComplete: {
7
+ control: {
8
+ type: string;
9
+ };
10
+ };
11
+ children: {
12
+ control: {
13
+ disable: boolean;
14
+ };
15
+ };
16
+ id: {
17
+ control: {
18
+ type: string;
19
+ };
20
+ };
21
+ name: {
22
+ control: {
23
+ type: string;
24
+ };
25
+ };
26
+ onValueChange: {};
27
+ value: {};
28
+ size: {
29
+ control: {
30
+ type: string;
31
+ };
32
+ options: string[];
33
+ };
34
+ color: {
35
+ control: {
36
+ type: string;
37
+ };
38
+ options: string[];
39
+ };
40
+ constrainContentWidth: {
41
+ control: {
42
+ type: string;
43
+ };
44
+ };
45
+ side: {
46
+ control: {
47
+ type: string;
48
+ };
49
+ options: string[];
50
+ };
51
+ sideOffset: {
52
+ control: {
53
+ type: string;
54
+ step: number;
55
+ };
56
+ };
57
+ };
58
+ };
59
+ export default meta;
3
60
  export declare const Default: {
4
61
  args: {
5
62
  children: JSX.Element;
6
- disabled: boolean;
63
+ disabled: false;
7
64
  placeholder: string;
8
- size: string;
9
- variant: string;
65
+ size: "medium";
10
66
  };
11
67
  name: string;
12
68
  };
@@ -6,7 +6,7 @@ export declare const Default: {
6
6
  title: string;
7
7
  subtitle: string;
8
8
  selected: boolean;
9
- onSelect: () => null;
9
+ onSelect: () => void;
10
10
  };
11
11
  name: string;
12
12
  };
@@ -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;
@@ -1,8 +1,7 @@
1
1
  import type { SX } from "../../theme/new";
2
- import * as styles from "./Switch.css";
3
2
  export interface SwitchProps {
4
3
  id?: string;
5
- size?: keyof typeof styles.size;
4
+ size?: "small" | "medium";
6
5
  disabled?: boolean;
7
6
  checked?: boolean;
8
7
  sx?: SX;
@@ -1,10 +1,28 @@
1
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./Switch").SwitchProps>;
2
- export default _default;
1
+ import { Switch } from "./Switch";
2
+ declare const meta: {
3
+ title: string;
4
+ component: typeof Switch;
5
+ argTypes: {
6
+ id: {
7
+ control: {
8
+ type: string;
9
+ };
10
+ };
11
+ size: {
12
+ control: {
13
+ type: string;
14
+ };
15
+ options: string[];
16
+ };
17
+ onCheckedChange: {};
18
+ };
19
+ };
20
+ export default meta;
3
21
  export declare const Default: {
4
22
  args: {
5
- checked: boolean;
6
- disabled: boolean;
7
- size: string;
23
+ checked: false;
24
+ disabled: false;
25
+ size: "medium";
8
26
  };
9
27
  name: string;
10
28
  };
@@ -3,6 +3,6 @@ export declare const underline: string;
3
3
  export declare const inline: string;
4
4
  export declare const hoverColor: {
5
5
  readonly indigo11: "indigo10";
6
- readonly grey11: "grey10";
6
+ readonly purple11: "purple10";
7
7
  readonly tomato11: "tomato10";
8
8
  };
@@ -2,9 +2,8 @@ export interface TextLinkProps {
2
2
  href: string;
3
3
  children: string;
4
4
  underline?: boolean;
5
- color?: "grey11" | "indigo11" | "tomato11";
5
+ color?: "indigo11" | "purple11" | "tomato11";
6
6
  inline?: boolean;
7
- onClick?: () => void;
8
7
  }
9
8
  /**
10
9
  * A basic link with a single line of text.
@@ -7,15 +7,18 @@ type Props = {
7
7
  icon?: IconName;
8
8
  loadingIndicator?: boolean;
9
9
  title: string;
10
- seconds: number;
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: number;
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: number;
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;