@prismicio/editor-ui 0.4.45 → 0.4.46

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 (30) hide show
  1. package/dist/components/Alert/Alert.d.ts +2 -2
  2. package/dist/components/Alert/Alert.stories.d.ts +1 -1
  3. package/dist/components/AnimatedElement/AnimatedElement.d.ts +2 -1
  4. package/dist/components/AnimatedElement/AnimatedElement.stories.d.ts +4 -2
  5. package/dist/components/BaseInput/BaseInput.d.ts +3 -2
  6. package/dist/components/Button/Button.stories.d.ts +3 -3
  7. package/dist/components/Card/Card.d.ts +1 -1
  8. package/dist/components/Card/Card.stories.d.ts +1 -1
  9. package/dist/components/CodeBlock/CodeBlock.d.ts +1 -1
  10. package/dist/components/CodeBlock/CodeBlock.stories.d.ts +1 -1
  11. package/dist/components/CodeBlock/LazyCodeBlock.d.ts +2 -0
  12. package/dist/components/CodeBlock/index.d.ts +1 -0
  13. package/dist/components/DropdownMenu/DropdownMenu.d.ts +1 -1
  14. package/dist/components/Icon/iconNames.d.ts +1 -1
  15. package/dist/components/Kbd/Kbd.d.ts +12 -0
  16. package/dist/components/Kbd/Kbd.stories.d.ts +16 -0
  17. package/dist/components/Kbd/index.d.ts +1 -0
  18. package/dist/components/ProgressBar/ProgressBar.d.ts +13 -1
  19. package/dist/components/ProgressBar/ProgressBar.stories.d.ts +14 -0
  20. package/dist/components/Select/Select.d.ts +8 -3
  21. package/dist/components/Select/Select.stories.d.ts +6 -0
  22. package/dist/components/TextInput/TextInput.d.ts +1 -0
  23. package/dist/components/Toast/Toast.d.ts +4 -1
  24. package/dist/components/Toast/ToastContext.d.ts +2 -2
  25. package/dist/components/ToggleButton/ToggleButton.stories.d.ts +2 -2
  26. package/dist/index.cjs.js +171 -176
  27. package/dist/index.d.ts +2 -1
  28. package/dist/index.es.js +17976 -19663
  29. package/dist/style.css +1 -1
  30. package/package.json +22 -22
@@ -1,10 +1,10 @@
1
1
  import type { ReactNode } from "react";
2
2
  import { type IconName } from "../Icon";
3
3
  import type { IconButtonProps } from "../IconButton/IconButton";
4
- export type Colors = "error" | "info" | "default";
4
+ export type Colors = "error" | "warn" | "info" | "default";
5
5
  export type AlertProps = {
6
6
  icon?: IconName;
7
- title: string;
7
+ title?: string;
8
8
  /**
9
9
  * Indicates if the title is in a loading state. When true, an animated ellipsis is displayed next to the title.
10
10
  */
@@ -7,7 +7,7 @@ declare const meta: {
7
7
  argTypes: {
8
8
  icon: {
9
9
  control: string;
10
- options: readonly ["add", "alert", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "attachFile", "autoFixHigh", "biToggle", "block", "calendarToday", "centerFocusWeak", "check", "checkBox", "checkBoxOutlinedBlank", "chevronLeft", "chevronRight", "close", "cloud", "cloudUpload", "code", "colorLens", "contentCopy", "createNewFolder", "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", "invite", "javascript", "json", "keyboardArrowDown", "keyboardArrowUp", "label", "language", "link", "linkOff", "lock", "looks1", "looks2", "looks3", "looks4", "looks5", "looks6", "markdown", "migrationRelease", "moreVert", "multipleStop", "musicNote", "notStarted", "notes", "openInFull", "openInNew", "outbound", "phoneIphone", "photo", "pin", "place", "playCircle", "preview", "prismic", "public", "refresh", "save", "schedule", "search", "sentimentSatisfied", "settings", "settingsEthernet", "smartDisplay", "svelte", "tabletMac", "tag", "terminal", "textFields", "title", "toggleOff", "translate", "typescript", "unfoldMore", "unsplash", "upload", "videocam", "viewDay", "visibility", "vue", "zoomOutMap"];
10
+ options: readonly ["add", "alert", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "attachFile", "autoFixHigh", "biToggle", "block", "calendarToday", "centerFocusWeak", "check", "checkBox", "checkBoxOutlinedBlank", "chevronLeft", "chevronRight", "close", "cloud", "cloudUpload", "code", "colorLens", "contentCopy", "contentPaste", "createNewFolder", "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", "invite", "javascript", "json", "keyboardArrowDown", "keyboardArrowUp", "label", "language", "link", "linkOff", "lock", "looks1", "looks2", "looks3", "looks4", "looks5", "looks6", "migrationRelease", "moreVert", "multipleStop", "musicNote", "notStarted", "notes", "openInFull", "openInNew", "outbound", "phoneIphone", "photo", "pin", "place", "playCircle", "preview", "prismic", "public", "refresh", "save", "schedule", "search", "sentimentSatisfied", "settings", "settingsEthernet", "smartDisplay", "svelte", "tabletMac", "tag", "terminal", "textFields", "title", "toggleOff", "translate", "typescript", "unfoldMore", "unsplash", "upload", "videocam", "viewDay", "visibility", "vue", "zoomOutMap"];
11
11
  };
12
12
  color: {
13
13
  control: string;
@@ -12,6 +12,7 @@ export interface AnimatedElementProps {
12
12
  };
13
13
  enterDuration?: AnimationDuration;
14
14
  exitDuration?: AnimationDuration;
15
+ focusable?: boolean;
15
16
  sx?: SX;
16
17
  }
17
18
  /**
@@ -23,7 +24,7 @@ export interface AnimatedElementProps {
23
24
  * If you only need to animate a single element's entrance (and not exit/swap), you don't need this component:
24
25
  * you can just set a CSS animation on the element styles.
25
26
  */
26
- export declare function AnimatedElement(props: AnimatedElementProps): JSX.Element;
27
+ export declare const AnimatedElement: import("react").ForwardRefExoticComponent<AnimatedElementProps & import("react").RefAttributes<HTMLDivElement>>;
27
28
  type AnimationDuration = ThemeKeys<"transitionDuration">;
28
29
  type OnlyChild = ReactElement | null | undefined | false | 0;
29
30
  export {};
@@ -1,8 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { AnimatedElement } from "./AnimatedElement";
3
2
  declare const meta: {
4
3
  title: string;
5
- component: typeof AnimatedElement;
4
+ component: import("react").ForwardRefExoticComponent<import("./AnimatedElement").AnimatedElementProps & import("react").RefAttributes<HTMLDivElement>>;
6
5
  };
7
6
  export default meta;
8
7
  export declare const Default: {
@@ -18,7 +17,10 @@ export declare const Default: {
18
17
  } | undefined;
19
18
  enterDuration?: 0 | 100 | 75 | 150 | 200 | 250 | 300 | 400 | undefined;
20
19
  exitDuration?: 0 | 100 | 75 | 150 | 200 | 250 | 300 | 400 | undefined;
20
+ focusable?: boolean | undefined;
21
21
  sx?: import("../../theme").SX | undefined;
22
+ ref?: import("react").Ref<HTMLDivElement> | undefined;
23
+ key?: import("react").Key | null | undefined;
22
24
  }) => JSX.Element;
23
25
  args: {
24
26
  children: null;
@@ -18,7 +18,8 @@ export interface BaseInputProps {
18
18
  padding?: Padding;
19
19
  value: string;
20
20
  variant?: "normal" | "link" | "success" | "error";
21
- cursor?: "text" | "pointer";
21
+ cursor?: "text" | "pointer" | "default";
22
+ textOverflow?: "ellipsis";
22
23
  maxLength?: number;
23
24
  disabled?: boolean;
24
25
  type?: "text" | "email" | "password" | "number";
@@ -30,7 +31,7 @@ export interface BaseInputProps {
30
31
  onPaste?: ClipboardEventHandler<HTMLInputElement>;
31
32
  role?: AriaRole;
32
33
  /**
33
- * AutoFocus can cause assesibilty issues when used, especially in forms.
34
+ * AutoFocus can cause accessibility issues when used, especially in forms.
34
35
  * https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus#accessibility_concerns
35
36
  */
36
37
  autoFocus?: boolean;
@@ -8,7 +8,7 @@ declare const meta: {
8
8
  control: {
9
9
  type: string;
10
10
  };
11
- options: readonly ["add", "alert", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "attachFile", "autoFixHigh", "biToggle", "block", "calendarToday", "centerFocusWeak", "check", "checkBox", "checkBoxOutlinedBlank", "chevronLeft", "chevronRight", "close", "cloud", "cloudUpload", "code", "colorLens", "contentCopy", "createNewFolder", "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", "invite", "javascript", "json", "keyboardArrowDown", "keyboardArrowUp", "label", "language", "link", "linkOff", "lock", "looks1", "looks2", "looks3", "looks4", "looks5", "looks6", "markdown", "migrationRelease", "moreVert", "multipleStop", "musicNote", "notStarted", "notes", "openInFull", "openInNew", "outbound", "phoneIphone", "photo", "pin", "place", "playCircle", "preview", "prismic", "public", "refresh", "save", "schedule", "search", "sentimentSatisfied", "settings", "settingsEthernet", "smartDisplay", "svelte", "tabletMac", "tag", "terminal", "textFields", "title", "toggleOff", "translate", "typescript", "unfoldMore", "unsplash", "upload", "videocam", "viewDay", "visibility", "vue", "zoomOutMap"];
11
+ options: readonly ["add", "alert", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "attachFile", "autoFixHigh", "biToggle", "block", "calendarToday", "centerFocusWeak", "check", "checkBox", "checkBoxOutlinedBlank", "chevronLeft", "chevronRight", "close", "cloud", "cloudUpload", "code", "colorLens", "contentCopy", "contentPaste", "createNewFolder", "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", "invite", "javascript", "json", "keyboardArrowDown", "keyboardArrowUp", "label", "language", "link", "linkOff", "lock", "looks1", "looks2", "looks3", "looks4", "looks5", "looks6", "migrationRelease", "moreVert", "multipleStop", "musicNote", "notStarted", "notes", "openInFull", "openInNew", "outbound", "phoneIphone", "photo", "pin", "place", "playCircle", "preview", "prismic", "public", "refresh", "save", "schedule", "search", "sentimentSatisfied", "settings", "settingsEthernet", "smartDisplay", "svelte", "tabletMac", "tag", "terminal", "textFields", "title", "toggleOff", "translate", "typescript", "unfoldMore", "unsplash", "upload", "videocam", "viewDay", "visibility", "vue", "zoomOutMap"];
12
12
  };
13
13
  };
14
14
  };
@@ -24,8 +24,8 @@ export declare const Default: {
24
24
  flexContent?: boolean | undefined;
25
25
  textWeight?: "bold" | "normal" | undefined;
26
26
  sx?: import("../../theme").SX | undefined;
27
- startIcon?: "translate" | "visibility" | "search" | "link" | "description" | "code" | "add" | "alert" | "arrowBack" | "arrowDownward" | "arrowDropDown" | "arrowDropDownCircle" | "arrowForward" | "arrowUpward" | "attachFile" | "autoFixHigh" | "biToggle" | "block" | "calendarToday" | "centerFocusWeak" | "check" | "checkBox" | "checkBoxOutlinedBlank" | "chevronLeft" | "chevronRight" | "close" | "cloud" | "cloudUpload" | "colorLens" | "contentCopy" | "createNewFolder" | "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" | "invite" | "javascript" | "json" | "keyboardArrowDown" | "keyboardArrowUp" | "label" | "language" | "linkOff" | "lock" | "looks1" | "looks2" | "looks3" | "looks4" | "looks5" | "looks6" | "markdown" | "migrationRelease" | "moreVert" | "multipleStop" | "musicNote" | "notStarted" | "notes" | "openInFull" | "openInNew" | "outbound" | "phoneIphone" | "photo" | "pin" | "place" | "playCircle" | "preview" | "prismic" | "public" | "refresh" | "save" | "schedule" | "sentimentSatisfied" | "settings" | "settingsEthernet" | "smartDisplay" | "svelte" | "tabletMac" | "tag" | "terminal" | "textFields" | "title" | "toggleOff" | "typescript" | "unfoldMore" | "unsplash" | "upload" | "videocam" | "viewDay" | "vue" | "zoomOutMap" | undefined;
28
- endIcon?: "translate" | "visibility" | "search" | "link" | "description" | "code" | "add" | "alert" | "arrowBack" | "arrowDownward" | "arrowDropDown" | "arrowDropDownCircle" | "arrowForward" | "arrowUpward" | "attachFile" | "autoFixHigh" | "biToggle" | "block" | "calendarToday" | "centerFocusWeak" | "check" | "checkBox" | "checkBoxOutlinedBlank" | "chevronLeft" | "chevronRight" | "close" | "cloud" | "cloudUpload" | "colorLens" | "contentCopy" | "createNewFolder" | "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" | "invite" | "javascript" | "json" | "keyboardArrowDown" | "keyboardArrowUp" | "label" | "language" | "linkOff" | "lock" | "looks1" | "looks2" | "looks3" | "looks4" | "looks5" | "looks6" | "markdown" | "migrationRelease" | "moreVert" | "multipleStop" | "musicNote" | "notStarted" | "notes" | "openInFull" | "openInNew" | "outbound" | "phoneIphone" | "photo" | "pin" | "place" | "playCircle" | "preview" | "prismic" | "public" | "refresh" | "save" | "schedule" | "sentimentSatisfied" | "settings" | "settingsEthernet" | "smartDisplay" | "svelte" | "tabletMac" | "tag" | "terminal" | "textFields" | "title" | "toggleOff" | "typescript" | "unfoldMore" | "unsplash" | "upload" | "videocam" | "viewDay" | "vue" | "zoomOutMap" | undefined;
27
+ startIcon?: "translate" | "visibility" | "search" | "link" | "description" | "code" | "add" | "alert" | "arrowBack" | "arrowDownward" | "arrowDropDown" | "arrowDropDownCircle" | "arrowForward" | "arrowUpward" | "attachFile" | "autoFixHigh" | "biToggle" | "block" | "calendarToday" | "centerFocusWeak" | "check" | "checkBox" | "checkBoxOutlinedBlank" | "chevronLeft" | "chevronRight" | "close" | "cloud" | "cloudUpload" | "colorLens" | "contentCopy" | "contentPaste" | "createNewFolder" | "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" | "invite" | "javascript" | "json" | "keyboardArrowDown" | "keyboardArrowUp" | "label" | "language" | "linkOff" | "lock" | "looks1" | "looks2" | "looks3" | "looks4" | "looks5" | "looks6" | "migrationRelease" | "moreVert" | "multipleStop" | "musicNote" | "notStarted" | "notes" | "openInFull" | "openInNew" | "outbound" | "phoneIphone" | "photo" | "pin" | "place" | "playCircle" | "preview" | "prismic" | "public" | "refresh" | "save" | "schedule" | "sentimentSatisfied" | "settings" | "settingsEthernet" | "smartDisplay" | "svelte" | "tabletMac" | "tag" | "terminal" | "textFields" | "title" | "toggleOff" | "typescript" | "unfoldMore" | "unsplash" | "upload" | "videocam" | "viewDay" | "vue" | "zoomOutMap" | undefined;
28
+ endIcon?: "translate" | "visibility" | "search" | "link" | "description" | "code" | "add" | "alert" | "arrowBack" | "arrowDownward" | "arrowDropDown" | "arrowDropDownCircle" | "arrowForward" | "arrowUpward" | "attachFile" | "autoFixHigh" | "biToggle" | "block" | "calendarToday" | "centerFocusWeak" | "check" | "checkBox" | "checkBoxOutlinedBlank" | "chevronLeft" | "chevronRight" | "close" | "cloud" | "cloudUpload" | "colorLens" | "contentCopy" | "contentPaste" | "createNewFolder" | "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" | "invite" | "javascript" | "json" | "keyboardArrowDown" | "keyboardArrowUp" | "label" | "language" | "linkOff" | "lock" | "looks1" | "looks2" | "looks3" | "looks4" | "looks5" | "looks6" | "migrationRelease" | "moreVert" | "multipleStop" | "musicNote" | "notStarted" | "notes" | "openInFull" | "openInNew" | "outbound" | "phoneIphone" | "photo" | "pin" | "place" | "playCircle" | "preview" | "prismic" | "public" | "refresh" | "save" | "schedule" | "sentimentSatisfied" | "settings" | "settingsEthernet" | "smartDisplay" | "svelte" | "tabletMac" | "tag" | "terminal" | "textFields" | "title" | "toggleOff" | "typescript" | "unfoldMore" | "unsplash" | "upload" | "videocam" | "viewDay" | "vue" | "zoomOutMap" | undefined;
29
29
  renderStartIcon?: ((icon: import("react").ReactNode) => import("react").ReactNode) | undefined;
30
30
  renderEndIcon?: ((icon: import("react").ReactNode) => import("react").ReactNode) | undefined;
31
31
  hotkeys?: import("react-hotkeys-hook").Keys | undefined;
@@ -5,7 +5,7 @@ import { type TextProps } from "../Text";
5
5
  export interface CardProps {
6
6
  children?: ReactNode;
7
7
  color?: "grey1" | "grey2" | "grey3" | "indigo2" | "purple1";
8
- variant?: "dashed" | "elevated" | "outlined" | "selected";
8
+ variant?: "animated-light" | "animated-dark" | "dashed" | "elevated" | "outlined" | "selected";
9
9
  radius?: 4 | 6;
10
10
  paddingBlock?: 0 | 8 | 12 | 16 | 28;
11
11
  paddingInline?: 0 | 16 | 24 | 32;
@@ -34,7 +34,7 @@ export declare const Default: {
34
34
  render: (args: {
35
35
  children?: import("react").ReactNode;
36
36
  color?: "grey1" | "grey2" | "grey3" | "indigo2" | "purple1" | undefined;
37
- variant?: "dashed" | "selected" | "elevated" | "outlined" | undefined;
37
+ variant?: "dashed" | "selected" | "animated-light" | "animated-dark" | "elevated" | "outlined" | undefined;
38
38
  radius?: 4 | 6 | undefined;
39
39
  paddingBlock?: 0 | 8 | 12 | 16 | 28 | undefined;
40
40
  paddingInline?: 0 | 16 | 24 | 32 | undefined;
@@ -1,4 +1,4 @@
1
- export declare const supportedLanguages: readonly ["typescript", "tsx", "javascript", "jsx", "vue", "svelte", "plaintext", "json", "bash", "markdown"];
1
+ export declare const supportedLanguages: readonly ["typescript", "tsx", "javascript", "jsx", "vue", "svelte", "plaintext", "json", "bash"];
2
2
  export interface CodeBlockProps {
3
3
  title?: string;
4
4
  language: typeof supportedLanguages[number];
@@ -4,7 +4,7 @@ declare const meta: {
4
4
  component: typeof CodeBlock;
5
5
  argTypes: {
6
6
  language: {
7
- options: readonly ["typescript", "tsx", "javascript", "jsx", "vue", "svelte", "plaintext", "json", "bash", "markdown"];
7
+ options: readonly ["typescript", "tsx", "javascript", "jsx", "vue", "svelte", "plaintext", "json", "bash"];
8
8
  control: {
9
9
  type: string;
10
10
  };
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const LazyCodeBlock: import("react").LazyExoticComponent<typeof import("./CodeBlock").CodeBlock>;
@@ -1 +1,2 @@
1
1
  export { CodeBlock } from "./CodeBlock";
2
+ export { LazyCodeBlock } from "./LazyCodeBlock";
@@ -26,7 +26,7 @@ export interface DropdownMenuContentProps {
26
26
  align?: "center" | "end" | "start";
27
27
  side?: "bottom" | "left" | "right" | "top";
28
28
  sideOffset?: number;
29
- minWidth?: 128 | 256;
29
+ minWidth?: 128 | 256 | "full-trigger-width";
30
30
  children: ReactNode;
31
31
  asPortal?: boolean;
32
32
  maxHeight?: 256 | 400;
@@ -1,2 +1,2 @@
1
- export declare const iconNames: readonly ["add", "alert", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "attachFile", "autoFixHigh", "biToggle", "block", "calendarToday", "centerFocusWeak", "check", "checkBox", "checkBoxOutlinedBlank", "chevronLeft", "chevronRight", "close", "cloud", "cloudUpload", "code", "colorLens", "contentCopy", "createNewFolder", "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", "invite", "javascript", "json", "keyboardArrowDown", "keyboardArrowUp", "label", "language", "link", "linkOff", "lock", "looks1", "looks2", "looks3", "looks4", "looks5", "looks6", "markdown", "migrationRelease", "moreVert", "multipleStop", "musicNote", "notStarted", "notes", "openInFull", "openInNew", "outbound", "phoneIphone", "photo", "pin", "place", "playCircle", "preview", "prismic", "public", "refresh", "save", "schedule", "search", "sentimentSatisfied", "settings", "settingsEthernet", "smartDisplay", "svelte", "tabletMac", "tag", "terminal", "textFields", "title", "toggleOff", "translate", "typescript", "unfoldMore", "unsplash", "upload", "videocam", "viewDay", "visibility", "vue", "zoomOutMap"];
1
+ export declare const iconNames: readonly ["add", "alert", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "attachFile", "autoFixHigh", "biToggle", "block", "calendarToday", "centerFocusWeak", "check", "checkBox", "checkBoxOutlinedBlank", "chevronLeft", "chevronRight", "close", "cloud", "cloudUpload", "code", "colorLens", "contentCopy", "contentPaste", "createNewFolder", "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", "invite", "javascript", "json", "keyboardArrowDown", "keyboardArrowUp", "label", "language", "link", "linkOff", "lock", "looks1", "looks2", "looks3", "looks4", "looks5", "looks6", "migrationRelease", "moreVert", "multipleStop", "musicNote", "notStarted", "notes", "openInFull", "openInNew", "outbound", "phoneIphone", "photo", "pin", "place", "playCircle", "preview", "prismic", "public", "refresh", "save", "schedule", "search", "sentimentSatisfied", "settings", "settingsEthernet", "smartDisplay", "svelte", "tabletMac", "tag", "terminal", "textFields", "title", "toggleOff", "translate", "typescript", "unfoldMore", "unsplash", "upload", "videocam", "viewDay", "visibility", "vue", "zoomOutMap"];
2
2
  export type IconName = typeof iconNames[number];
@@ -0,0 +1,12 @@
1
+ interface Props {
2
+ /**
3
+ * The keyboard key or keys this component should display.
4
+ * Note that "mod" is a special value meaning whichever is the mod key for OSX or Windows/Linux systems.
5
+ */
6
+ value: string | string[];
7
+ }
8
+ /**
9
+ * Represents a span of inline text denoting textual user input from a keyboard.
10
+ */
11
+ export declare function Kbd(props: Props): JSX.Element;
12
+ export {};
@@ -0,0 +1,16 @@
1
+ import { Kbd } from "./Kbd";
2
+ declare const meta: {
3
+ title: string;
4
+ component: typeof Kbd;
5
+ argTypes: {};
6
+ };
7
+ export default meta;
8
+ export declare const Default: {
9
+ name: string;
10
+ args: {
11
+ value: string[];
12
+ };
13
+ render: (args: {
14
+ value: string | string[];
15
+ }) => JSX.Element;
16
+ };
@@ -0,0 +1 @@
1
+ export { Kbd } from "./Kbd";
@@ -24,11 +24,23 @@ interface ProgressBarProps {
24
24
  */
25
25
  displayLabel?: boolean;
26
26
  /**
27
- * The color of the progress bar.
27
+ * The color of the progress indicator.
28
28
  *
29
29
  * @defaultValue "green9"
30
30
  */
31
31
  color?: ThemeKeys<"color">;
32
+ /**
33
+ * The color of the progress bar track.
34
+ *
35
+ * @defaultValue "grey4"
36
+ */
37
+ backgroundColor?: ThemeKeys<"color">;
38
+ /**
39
+ * The color of the label.
40
+ *
41
+ * @defaultValue "grey11"
42
+ */
43
+ labelColor?: ThemeKeys<"color">;
32
44
  /**
33
45
  * Whether to collapse the indicator bar. Used for idle and complete states.
34
46
  *
@@ -29,6 +29,18 @@ declare const meta: {
29
29
  type: string;
30
30
  };
31
31
  };
32
+ backgroundColor: {
33
+ options: string[];
34
+ control: {
35
+ type: string;
36
+ };
37
+ };
38
+ labelColor: {
39
+ options: string[];
40
+ control: {
41
+ type: string;
42
+ };
43
+ };
32
44
  height: {
33
45
  defaultValue: string;
34
46
  options: string[];
@@ -59,6 +71,8 @@ export declare const Default: {
59
71
  getValueLabel?: ((value: number, max: number) => string) | undefined;
60
72
  displayLabel?: boolean | undefined;
61
73
  color?: "inherit" | "currentColor" | "transparent" | "white" | "black" | "grey1" | "grey2" | "grey3" | "grey4" | "grey5" | "grey6" | "grey7" | "grey8" | "grey9" | "grey10" | "grey11" | "grey12" | "dark12" | "indigo2" | "indigo4" | "indigo5" | "indigo7" | "indigo10" | "indigo11" | "indigo12" | "green3" | "green4" | "green9" | "green10" | "green11" | "green12" | "amber3" | "amber4" | "amber9" | "amber10" | "amber11" | "amber12" | "tomato1" | "tomato2" | "tomato3" | "tomato4" | "tomato6" | "tomato7" | "tomato9" | "tomato10" | "tomato11" | "tomato12" | "purple1" | "purple2" | "purple3" | "purple4" | "purple5" | "purple6" | "purple7" | "purple8" | "purple9" | "purple10" | "purple11" | "purple12" | "greyAlpha1" | undefined;
74
+ backgroundColor?: "inherit" | "currentColor" | "transparent" | "white" | "black" | "grey1" | "grey2" | "grey3" | "grey4" | "grey5" | "grey6" | "grey7" | "grey8" | "grey9" | "grey10" | "grey11" | "grey12" | "dark12" | "indigo2" | "indigo4" | "indigo5" | "indigo7" | "indigo10" | "indigo11" | "indigo12" | "green3" | "green4" | "green9" | "green10" | "green11" | "green12" | "amber3" | "amber4" | "amber9" | "amber10" | "amber11" | "amber12" | "tomato1" | "tomato2" | "tomato3" | "tomato4" | "tomato6" | "tomato7" | "tomato9" | "tomato10" | "tomato11" | "tomato12" | "purple1" | "purple2" | "purple3" | "purple4" | "purple5" | "purple6" | "purple7" | "purple8" | "purple9" | "purple10" | "purple11" | "purple12" | "greyAlpha1" | undefined;
75
+ labelColor?: "inherit" | "currentColor" | "transparent" | "white" | "black" | "grey1" | "grey2" | "grey3" | "grey4" | "grey5" | "grey6" | "grey7" | "grey8" | "grey9" | "grey10" | "grey11" | "grey12" | "dark12" | "indigo2" | "indigo4" | "indigo5" | "indigo7" | "indigo10" | "indigo11" | "indigo12" | "green3" | "green4" | "green9" | "green10" | "green11" | "green12" | "amber3" | "amber4" | "amber9" | "amber10" | "amber11" | "amber12" | "tomato1" | "tomato2" | "tomato3" | "tomato4" | "tomato6" | "tomato7" | "tomato9" | "tomato10" | "tomato11" | "tomato12" | "purple1" | "purple2" | "purple3" | "purple4" | "purple5" | "purple6" | "purple7" | "purple8" | "purple9" | "purple10" | "purple11" | "purple12" | "greyAlpha1" | undefined;
62
76
  height?: "normal" | "collapsed" | undefined;
63
77
  transition?: "slow" | "fast" | undefined;
64
78
  }) => JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import type { ReactNode } from "react";
2
2
  import { type SX } from "../../theme";
3
3
  import { type IconName } from "../Icon";
4
- export interface SelectProps<VALUE extends string> {
4
+ export type SelectProps<VALUE extends string> = {
5
5
  disabled?: boolean;
6
6
  id?: string;
7
7
  name?: string;
@@ -11,7 +11,6 @@ export interface SelectProps<VALUE extends string> {
11
11
  placeholder?: ReactNode;
12
12
  autoComplete?: string;
13
13
  value?: VALUE;
14
- constrainContentWidth?: boolean;
15
14
  side?: "bottom" | "top" | "left" | "right";
16
15
  sideOffset?: number;
17
16
  flexContent?: boolean;
@@ -26,7 +25,13 @@ export interface SelectProps<VALUE extends string> {
26
25
  renderTrigger?: (params: RenderTriggerParams) => ReactNode;
27
26
  renderStartIcon?: (icon: ReactNode) => ReactNode;
28
27
  onValueChange?: (value: VALUE) => void;
29
- }
28
+ } & ({
29
+ constrainContentWidth: true;
30
+ position?: "popper";
31
+ } | {
32
+ constrainContentWidth?: false;
33
+ position?: "popper" | "item-aligned";
34
+ });
30
35
  /**
31
36
  * A Select component supporting string text options.
32
37
  * Empty string options are not supported.
@@ -42,6 +42,12 @@ declare const meta: {
42
42
  type: string;
43
43
  };
44
44
  };
45
+ position: {
46
+ control: {
47
+ type: string;
48
+ };
49
+ options: string[];
50
+ };
45
51
  side: {
46
52
  control: {
47
53
  type: string;
@@ -14,6 +14,7 @@ export interface TextInputProps {
14
14
  variant?: BaseInputProps["variant"];
15
15
  maxLength?: BaseInputProps["maxLength"];
16
16
  cursor?: BaseInputProps["cursor"];
17
+ textOverflow?: BaseInputProps["textOverflow"];
17
18
  sx?: SX;
18
19
  onKeyDown?: BaseInputProps["onKeyDown"];
19
20
  onValueChange?: BaseInputProps["onValueChange"];
@@ -27,7 +27,10 @@ export type ToastProps = {
27
27
  } & (InlineToastProps | CardToastProps);
28
28
  /**
29
29
  * We don't use the radix ui toast because of a bug with the timeout.
30
- * Radix's Toast task tracker is here: https://github.com/radix-ui/primitives/issues/1171
30
+ * Also, in general, there are lots of issues around radix's Toast in their bug tracker and they don't fix much.
31
+ * Example: https://github.com/radix-ui/primitives/pull/2236
32
+ * It also doesn't help at all when it comes to providing an imperative API: https://github.com/radix-ui/primitives/issues/2804
33
+ * They also never finished implementing it: https://github.com/radix-ui/primitives/issues/1171
31
34
  */
32
35
  export declare function Toast(props: ToastProps): JSX.Element;
33
36
  export {};
@@ -13,10 +13,10 @@ interface ToastConfig {
13
13
  };
14
14
  icon?: IconName;
15
15
  }
16
+ export declare function ToastProvider(props: PropsWithChildren): JSX.Element;
17
+ export declare function useToast(): ToastContext;
16
18
  interface ToastContext {
17
19
  showToast: (config: ToastConfig) => void;
18
20
  }
19
21
  declare const ToastContext: import("react").Context<ToastContext>;
20
- export declare function ToastProvider(props: PropsWithChildren): JSX.Element;
21
- export declare function useToast(): ToastContext;
22
22
  export {};
@@ -20,13 +20,13 @@ declare const meta: {
20
20
  control: {
21
21
  type: string;
22
22
  };
23
- options: readonly ["add", "alert", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "attachFile", "autoFixHigh", "biToggle", "block", "calendarToday", "centerFocusWeak", "check", "checkBox", "checkBoxOutlinedBlank", "chevronLeft", "chevronRight", "close", "cloud", "cloudUpload", "code", "colorLens", "contentCopy", "createNewFolder", "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", "invite", "javascript", "json", "keyboardArrowDown", "keyboardArrowUp", "label", "language", "link", "linkOff", "lock", "looks1", "looks2", "looks3", "looks4", "looks5", "looks6", "markdown", "migrationRelease", "moreVert", "multipleStop", "musicNote", "notStarted", "notes", "openInFull", "openInNew", "outbound", "phoneIphone", "photo", "pin", "place", "playCircle", "preview", "prismic", "public", "refresh", "save", "schedule", "search", "sentimentSatisfied", "settings", "settingsEthernet", "smartDisplay", "svelte", "tabletMac", "tag", "terminal", "textFields", "title", "toggleOff", "translate", "typescript", "unfoldMore", "unsplash", "upload", "videocam", "viewDay", "visibility", "vue", "zoomOutMap"];
23
+ options: readonly ["add", "alert", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "attachFile", "autoFixHigh", "biToggle", "block", "calendarToday", "centerFocusWeak", "check", "checkBox", "checkBoxOutlinedBlank", "chevronLeft", "chevronRight", "close", "cloud", "cloudUpload", "code", "colorLens", "contentCopy", "contentPaste", "createNewFolder", "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", "invite", "javascript", "json", "keyboardArrowDown", "keyboardArrowUp", "label", "language", "link", "linkOff", "lock", "looks1", "looks2", "looks3", "looks4", "looks5", "looks6", "migrationRelease", "moreVert", "multipleStop", "musicNote", "notStarted", "notes", "openInFull", "openInNew", "outbound", "phoneIphone", "photo", "pin", "place", "playCircle", "preview", "prismic", "public", "refresh", "save", "schedule", "search", "sentimentSatisfied", "settings", "settingsEthernet", "smartDisplay", "svelte", "tabletMac", "tag", "terminal", "textFields", "title", "toggleOff", "translate", "typescript", "unfoldMore", "unsplash", "upload", "videocam", "viewDay", "visibility", "vue", "zoomOutMap"];
24
24
  };
25
25
  endIcon: {
26
26
  control: {
27
27
  type: string;
28
28
  };
29
- options: readonly ["add", "alert", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "attachFile", "autoFixHigh", "biToggle", "block", "calendarToday", "centerFocusWeak", "check", "checkBox", "checkBoxOutlinedBlank", "chevronLeft", "chevronRight", "close", "cloud", "cloudUpload", "code", "colorLens", "contentCopy", "createNewFolder", "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", "invite", "javascript", "json", "keyboardArrowDown", "keyboardArrowUp", "label", "language", "link", "linkOff", "lock", "looks1", "looks2", "looks3", "looks4", "looks5", "looks6", "markdown", "migrationRelease", "moreVert", "multipleStop", "musicNote", "notStarted", "notes", "openInFull", "openInNew", "outbound", "phoneIphone", "photo", "pin", "place", "playCircle", "preview", "prismic", "public", "refresh", "save", "schedule", "search", "sentimentSatisfied", "settings", "settingsEthernet", "smartDisplay", "svelte", "tabletMac", "tag", "terminal", "textFields", "title", "toggleOff", "translate", "typescript", "unfoldMore", "unsplash", "upload", "videocam", "viewDay", "visibility", "vue", "zoomOutMap"];
29
+ options: readonly ["add", "alert", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "attachFile", "autoFixHigh", "biToggle", "block", "calendarToday", "centerFocusWeak", "check", "checkBox", "checkBoxOutlinedBlank", "chevronLeft", "chevronRight", "close", "cloud", "cloudUpload", "code", "colorLens", "contentCopy", "contentPaste", "createNewFolder", "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", "invite", "javascript", "json", "keyboardArrowDown", "keyboardArrowUp", "label", "language", "link", "linkOff", "lock", "looks1", "looks2", "looks3", "looks4", "looks5", "looks6", "migrationRelease", "moreVert", "multipleStop", "musicNote", "notStarted", "notes", "openInFull", "openInNew", "outbound", "phoneIphone", "photo", "pin", "place", "playCircle", "preview", "prismic", "public", "refresh", "save", "schedule", "search", "sentimentSatisfied", "settings", "settingsEthernet", "smartDisplay", "svelte", "tabletMac", "tag", "terminal", "textFields", "title", "toggleOff", "translate", "typescript", "unfoldMore", "unsplash", "upload", "videocam", "viewDay", "visibility", "vue", "zoomOutMap"];
30
30
  };
31
31
  };
32
32
  };