@prismicio/editor-ui 0.4.25 → 0.4.27
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.d.ts +23 -4
- package/dist/components/Alert/Alert.stories.d.ts +25 -20
- package/dist/components/AnimatedElement/AnimatedElement.d.ts +4 -4
- package/dist/components/AnimatedElement/AnimatedElement.stories.d.ts +3 -13
- package/dist/components/AnimatedList/AnimatedList.d.ts +12 -7
- package/dist/components/AnimatedList/AnimatedList.stories.d.ts +41 -5
- package/dist/components/Avatar/Avatar.d.ts +1 -0
- package/dist/components/Badge/Badge.d.ts +7 -3
- package/dist/components/Badge/Badge.stories.d.ts +1 -0
- package/dist/components/BaseInput/BaseInput.d.ts +24 -9
- package/dist/components/BaseInput/BaseInput.stories.d.ts +1 -0
- package/dist/components/Box/Box.d.ts +31 -32
- package/dist/components/Box/Box.stories.d.ts +147 -4
- package/dist/components/Button/Button.d.ts +11 -1
- package/dist/components/Button/Button.stories.d.ts +12 -5
- package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts +3 -2
- package/dist/components/Calendar/Calendar.d.ts +1 -1
- package/dist/components/Card/Card.d.ts +15 -3
- package/dist/components/Card/Card.stories.d.ts +45 -5
- package/dist/components/Card/PreviewCard.d.ts +23 -0
- package/dist/components/Card/PreviewCard.stories.d.ts +27 -0
- package/dist/components/Card/index.d.ts +2 -1
- package/dist/components/Carousel/Carousel.d.ts +7 -0
- package/dist/components/Carousel/CarouselItem.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.stories.d.ts +1 -0
- package/dist/components/ComboBox/ComboBox.d.ts +41 -0
- package/dist/components/ComboBox/ComboBox.stories.d.ts +17 -0
- package/dist/components/ComboBox/ComboBoxConstants.d.ts +4 -0
- package/dist/components/ComboBox/index.d.ts +1 -0
- package/dist/components/ComboBox/useComboBox.d.ts +21 -0
- package/dist/components/ConjoinedIcons/ConjoinedIcons.d.ts +1 -1
- package/dist/components/ContentEditable/ContentEditable.d.ts +25 -5
- package/dist/components/ContentEditable/ContentEditable.stories.d.ts +5 -6
- package/dist/components/ContentEditable/index.d.ts +4 -0
- package/dist/components/ContentEditable/useEditor.d.ts +12 -0
- package/dist/components/DateInput/DateInput.d.ts +1 -1
- package/dist/components/DateInput/DateInput.stories.d.ts +3 -12
- package/dist/components/Dialog/Dialog.d.ts +8 -4
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +30 -0
- package/dist/components/EditableText/EditableText.d.ts +4 -4
- package/dist/components/Field/Field.stories.d.ts +1 -0
- package/dist/components/FieldSet/FieldSet.d.ts +2 -5
- package/dist/components/FieldSet/FieldSet.stories.d.ts +1 -0
- package/dist/components/FieldSet/index.d.ts +1 -2
- package/dist/components/FileUpload/{FileDropZone/FileDropZone.d.ts → FileDropZone.d.ts} +1 -2
- package/dist/components/FileUpload/FileDropZone.stories.d.ts +14 -0
- package/dist/components/FileUpload/FileUpload.utils.d.ts +1 -1
- package/dist/components/FileUpload/index.d.ts +2 -2
- package/dist/components/Form/Form.stories.d.ts +3 -6
- package/dist/components/Form/FormDateInput.d.ts +1 -1
- package/dist/components/Form/FormField.d.ts +1 -0
- package/dist/components/Form/FormInput.d.ts +6 -2
- package/dist/components/Form/FormSearchInput.d.ts +6 -1
- package/dist/components/HairlineButton/HairlineButton.stories.d.ts +1 -0
- package/dist/components/Icon/Icon.d.ts +2 -2
- package/dist/components/Icon/Icon.stories.d.ts +1 -0
- package/dist/components/Icon/PrismicLogo.d.ts +1 -0
- package/dist/components/Icon/iconNames.d.ts +1 -1
- package/dist/components/IconButton/IconButton.d.ts +7 -7
- package/dist/components/IconButton/IconButton.stories.d.ts +1 -1
- package/dist/components/Image/Image.d.ts +2 -1
- package/dist/components/LazyRender/LazyRender.d.ts +9 -2
- package/dist/components/LinkDescriptionCard/LinkDescriptionCard.d.ts +1 -1
- package/dist/components/List/UnorderedList.stories.d.ts +1 -0
- package/dist/components/MediaCard/MediaCard.d.ts +12 -3
- package/dist/components/MediaCard/MediaCard.stories.d.ts +11 -25
- package/dist/components/OverflowContainer/OverflowContainer.d.ts +23 -0
- package/dist/components/OverflowContainer/OverflowContainer.stories.d.ts +23 -0
- package/dist/components/OverflowContainer/index.d.ts +1 -0
- package/dist/components/ProgressCircle/ProgressCircle.d.ts +2 -2
- package/dist/components/ScrollArea/ScrollArea.d.ts +2 -2
- package/dist/components/ScrollArea/ScrollArea.stories.d.ts +1 -0
- package/dist/components/SearchInput/SearchInput.d.ts +12 -2
- package/dist/components/SearchInput/SearchInput.stories.d.ts +3 -2
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Separator/Separator.d.ts +1 -0
- package/dist/components/Separator/Separator.stories.d.ts +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +16 -10
- package/dist/components/Skeleton/Skeleton.stories.d.ts +47 -4
- package/dist/components/Slice/SliceSelectCard.d.ts +1 -0
- package/dist/components/Suspense/AnimatedSuspense.d.ts +2 -2
- package/dist/components/Table/Table.d.ts +2 -0
- package/dist/components/Text/Text.d.ts +23 -3
- package/dist/components/Text/Text.stories.d.ts +1 -0
- package/dist/components/TextInput/TextInput.d.ts +2 -0
- package/dist/components/TextInput/TextInput.stories.d.ts +1 -0
- package/dist/components/TextOverflow/TextOverflow.d.ts +10 -0
- package/dist/components/TextOverflow/index.d.ts +1 -0
- package/dist/components/Toast/Toast.stories.d.ts +2 -2
- package/dist/components/ToggleButton/ToggleButton.d.ts +1 -0
- package/dist/components/ToggleButton/ToggleButton.stories.d.ts +3 -2
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.stories.d.ts +5 -4
- package/dist/components/Tooltip/Tooltip.d.ts +7 -2
- package/dist/components/Video/Video.d.ts +1 -1
- package/dist/components/Window/Window.d.ts +32 -0
- package/dist/components/Window/Window.stories.d.ts +53 -0
- package/dist/components/Window/index.d.ts +1 -0
- package/dist/index.cjs.js +234 -138
- package/dist/index.d.ts +9 -12
- package/dist/index.es.js +29391 -18658
- package/dist/style.css +1 -1
- package/dist/theme/colors.d.ts +8 -0
- package/dist/theme/new/sx.d.ts +1 -0
- package/dist/theme/new/theme.d.ts +12 -1
- package/dist/theme/new/useMediaQuery.d.ts +17 -0
- package/dist/theme/selectors.d.ts +20 -20
- package/dist/theme/sprinkles.css.d.ts +935 -192
- package/dist/theme/vars.css.d.ts +6 -0
- package/package.json +21 -7
- package/dist/components/Avatar/Avatar.css.d.ts +0 -3
- package/dist/components/Card/Card.css.d.ts +0 -17
- package/dist/components/Carousel/Carousel.css.d.ts +0 -4
- package/dist/components/Carousel/CarouselItem.css.d.ts +0 -4
- package/dist/components/CheckerBoard/CheckerBoard.css.d.ts +0 -1
- package/dist/components/CircledIcon/CircledIcon.d.ts +0 -9
- package/dist/components/CircledIcon/CircledIcon.stories.d.ts +0 -11
- package/dist/components/CircledIcon/CircledIconStyles.css.d.ts +0 -11
- package/dist/components/CircledIcon/index.d.ts +0 -1
- package/dist/components/ConjoinedIcons/ConjoinedIcons.css.d.ts +0 -2
- package/dist/components/ContentEditable/ContentEditable.css.d.ts +0 -1
- package/dist/components/Cropper/Cropper.css.d.ts +0 -4
- package/dist/components/DateInput/DateInput.css.d.ts +0 -2
- package/dist/components/DateInput/DateSegments.css.d.ts +0 -7
- package/dist/components/Dialog/FullscreenDialog.css.d.ts +0 -1
- package/dist/components/DocumentCard/DocumentCard.css.d.ts +0 -14
- package/dist/components/DocumentCard/DocumentCard.d.ts +0 -14
- package/dist/components/DocumentCard/DocumentCard.stories.d.ts +0 -40
- package/dist/components/DocumentCard/index.d.ts +0 -1
- package/dist/components/DragCard/DragCard.css.d.ts +0 -3
- package/dist/components/Embed/EmbedPreview.css.d.ts +0 -5
- package/dist/components/Embed/EmbedPreview.d.ts +0 -13
- package/dist/components/Embed/EmbedPreview.stories.d.ts +0 -25
- package/dist/components/Embed/EmptyEmbed.css.d.ts +0 -1
- package/dist/components/Embed/EmptyEmbed.d.ts +0 -5
- package/dist/components/Embed/EmptyEmbed.stories.d.ts +0 -10
- package/dist/components/Embed/Icon.d.ts +0 -5
- package/dist/components/Embed/index.d.ts +0 -2
- package/dist/components/FieldSet/FieldSet.css.d.ts +0 -6
- package/dist/components/FieldSet/FieldSet.utils.d.ts +0 -4
- package/dist/components/FileUpload/FileUpload.stories.d.ts +0 -31
- package/dist/components/FileUpload/UploadProgress/UploadProgress.css.d.ts +0 -8
- package/dist/components/FileUpload/UploadProgress/UploadProgress.d.ts +0 -7
- package/dist/components/FileUpload/UploadProgress/UploadProgress.utils.d.ts +0 -1
- package/dist/components/FileUploadButton/index.d.ts +0 -1
- package/dist/components/FilterField/FilterField.css.d.ts +0 -12
- package/dist/components/HairlineButton/HairlineButton.css.d.ts +0 -17
- package/dist/components/Icon/Icon.css.d.ts +0 -7
- package/dist/components/IconButton/IconButton.css.d.ts +0 -30
- package/dist/components/InvisibleButton/InvisibleButton.css.d.ts +0 -13
- package/dist/components/InvisibleButton/InvisibleButton.d.ts +0 -15
- package/dist/components/InvisibleButton/InvisibleButton.stories.d.ts +0 -12
- package/dist/components/InvisibleButton/index.d.ts +0 -1
- package/dist/components/LinkDescriptionCard/LinkDescriptionCard.css.d.ts +0 -2
- package/dist/components/Masonry/Masonry.css.d.ts +0 -2
- package/dist/components/Masonry/Masonry.d.ts +0 -12
- package/dist/components/Masonry/Masonry.stories.d.ts +0 -11
- package/dist/components/Masonry/MasonryFile.css.d.ts +0 -2
- package/dist/components/Masonry/MasonryFile.d.ts +0 -7
- package/dist/components/Masonry/MasonryMedia.css.d.ts +0 -1
- package/dist/components/Masonry/MasonryMedia.d.ts +0 -6
- package/dist/components/Masonry/MasonrySkeleton.d.ts +0 -2
- package/dist/components/Masonry/index.d.ts +0 -4
- package/dist/components/ProgressCircle/ProgressCircle.css.d.ts +0 -2
- package/dist/components/ScrollArea/ScrollArea.css.d.ts +0 -6
- package/dist/components/SelectButton/SelectButton.css.d.ts +0 -2
- package/dist/components/SelectCard/SelectCard.css.d.ts +0 -1
- package/dist/components/Slice/SliceCard.css.d.ts +0 -10
- package/dist/components/Slice/SliceSelectCard.css.d.ts +0 -7
- package/dist/components/Suspense/AnimatedSuspense.css.d.ts +0 -1
- package/dist/components/TagField/TagField.css.d.ts +0 -18
- package/dist/components/TagField/TagFieldHeader.css.d.ts +0 -6
- package/dist/components/TextLink/TextLink.css.d.ts +0 -8
- package/dist/components/TextLink/TextLink.d.ts +0 -12
- package/dist/components/TextLink/TextLink.stories.d.ts +0 -9
- package/dist/components/TextLink/index.d.ts +0 -1
- package/dist/components/Toolbar/Toolbar.css.d.ts +0 -1
- package/dist/theme/mediaQueries.d.ts +0 -5
- package/dist/theme/util.d.ts +0 -15
- /package/dist/components/{FileUploadButton → FileUpload}/FileUploadButton.d.ts +0 -0
- /package/dist/components/SelectCard/{SelectButton.stories.d.ts → SelectCard.stories.d.ts} +0 -0
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import { type MediaAssetType } from "
|
|
2
|
+
import { type MediaAssetType } from "./FileUpload.utils";
|
|
3
3
|
export interface FileDropZoneProps {
|
|
4
4
|
onFilesSelected: (files: File[]) => void;
|
|
5
5
|
overlay: ReactNode;
|
|
6
|
-
overlayVariant?: "default" | "simple";
|
|
7
6
|
assetType?: MediaAssetType;
|
|
8
7
|
children?: ReactNode;
|
|
9
8
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FileDropZone } from "./FileDropZone";
|
|
2
|
+
import { FileUploadButton } from "./FileUploadButton";
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
subcomponents: {
|
|
6
|
+
FileDropZone: typeof FileDropZone;
|
|
7
|
+
FileUploadButton: typeof FileUploadButton;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
11
|
+
export declare const Default: {
|
|
12
|
+
render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./FileDropZone").FileDropZoneProps>;
|
|
13
|
+
name: string;
|
|
14
|
+
};
|
|
@@ -4,7 +4,7 @@ export declare const validExtensions: {
|
|
|
4
4
|
readonly videoAll: "video/*";
|
|
5
5
|
readonly audioAll: "audio/*";
|
|
6
6
|
readonly csv: "text/csv";
|
|
7
|
+
readonly txt: "text/plain";
|
|
7
8
|
};
|
|
8
9
|
export type MediaAssetType = "image" | "all";
|
|
9
10
|
export declare function isValidFileExtension(type: string, assetType: "image" | "all"): boolean;
|
|
10
|
-
export declare function getNonSpecificExtension(inputString: string): string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { FileDropZone } from "./FileDropZone
|
|
2
|
-
export {
|
|
1
|
+
export { FileDropZone } from "./FileDropZone";
|
|
2
|
+
export { FileUploadButton } from "./FileUploadButton";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { Form } from "./";
|
|
2
3
|
declare const meta: {
|
|
3
4
|
title: string;
|
|
@@ -12,15 +13,11 @@ declare const meta: {
|
|
|
12
13
|
};
|
|
13
14
|
export default meta;
|
|
14
15
|
export declare const Default: {
|
|
15
|
-
|
|
16
|
+
render: (args: {
|
|
16
17
|
children?: import("react").ReactNode;
|
|
17
18
|
sx?: import("../../theme/new").SX | undefined;
|
|
18
19
|
onSubmit: () => void;
|
|
19
|
-
}
|
|
20
|
-
children?: import("react").ReactNode;
|
|
21
|
-
sx?: import("../../theme/new").SX | undefined;
|
|
22
|
-
onSubmit: () => void;
|
|
23
|
-
}>) => JSX.Element)[];
|
|
20
|
+
}) => JSX.Element;
|
|
24
21
|
args: {};
|
|
25
22
|
name: string;
|
|
26
23
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { type ClipboardEventHandler, type KeyboardEvent } from "react";
|
|
1
|
+
import { type ClipboardEventHandler, type KeyboardEvent, type ReactNode } from "react";
|
|
2
2
|
import type { SX } from "../../theme/new";
|
|
3
3
|
import { type IconName } from "../Icon";
|
|
4
4
|
export interface FormInputProps {
|
|
5
|
-
type?: "text" | "email" | "password";
|
|
5
|
+
type?: "text" | "email" | "password" | "number";
|
|
6
|
+
size?: "small" | "medium" | "large";
|
|
6
7
|
disabled?: boolean;
|
|
7
8
|
label?: string;
|
|
8
9
|
placeholder?: string;
|
|
@@ -15,6 +16,9 @@ export interface FormInputProps {
|
|
|
15
16
|
onValueChange?: (value: string) => void;
|
|
16
17
|
onPaste?: ClipboardEventHandler<HTMLInputElement>;
|
|
17
18
|
onBlur?: () => void;
|
|
19
|
+
prefix?: ReactNode;
|
|
20
|
+
prefixTooltip?: string;
|
|
21
|
+
suffix?: ReactNode;
|
|
18
22
|
}
|
|
19
23
|
export declare function FormInput(props: FormInputProps): JSX.Element;
|
|
20
24
|
type AutoCompleteValue = "username" | "current-password";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type AriaRole, type FocusEvent } from "react";
|
|
1
2
|
import type { SX } from "../../theme/new";
|
|
2
3
|
export interface FormSearchInputProps {
|
|
3
4
|
label?: string;
|
|
@@ -8,5 +9,9 @@ export interface FormSearchInputProps {
|
|
|
8
9
|
value: string;
|
|
9
10
|
onValueChange: (value: string) => void;
|
|
10
11
|
sx?: SX;
|
|
12
|
+
role?: AriaRole;
|
|
13
|
+
onFocus?: (event: FocusEvent<HTMLInputElement, Element>) => void;
|
|
14
|
+
onBlur?: (event: FocusEvent<HTMLInputElement, Element>) => void;
|
|
15
|
+
endAdornment?: boolean;
|
|
11
16
|
}
|
|
12
|
-
export declare
|
|
17
|
+
export declare const FormSearchInput: import("react").ForwardRefExoticComponent<FormSearchInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./HairlineButton").HairlineButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
2
3
|
export default _default;
|
|
3
4
|
export declare const Default: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { type SX, type ThemeKeys } from "../../theme/new";
|
|
2
|
-
import * as styles from "./Icon.css";
|
|
3
3
|
import type { IconName } from "./iconNames";
|
|
4
4
|
export interface IconProps {
|
|
5
5
|
className?: string;
|
|
6
6
|
color?: ThemeKeys<"color">;
|
|
7
7
|
name: IconName;
|
|
8
|
-
size?:
|
|
8
|
+
size?: "extraSmall" | "small" | "medium" | "large";
|
|
9
9
|
sx?: SX;
|
|
10
10
|
}
|
|
11
11
|
export declare const Icon: import("react").ForwardRefExoticComponent<IconProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./Icon").IconProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
2
3
|
export default _default;
|
|
3
4
|
export declare const Default: {
|
|
@@ -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", "upload", "viewDay", "visibility", "zoomOutMap"];
|
|
1
|
+
export declare const iconNames: readonly ["add", "alert", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "autoFixHigh", "biToggle", "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", "migrationRelease", "moreVert", "multipleStop", "musicNote", "notes", "openInFull", "openInNew", "phoneIphone", "photo", "pin", "place", "playCircle", "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,19 +1,19 @@
|
|
|
1
1
|
import { type MouseEvent } from "react";
|
|
2
2
|
import type { IconName } from "../Icon/iconNames";
|
|
3
|
-
import * as styles from "./IconButton.css";
|
|
4
3
|
export interface IconButtonProps {
|
|
5
|
-
color?:
|
|
6
|
-
cursor?: keyof typeof styles.cursor;
|
|
4
|
+
color?: Color;
|
|
7
5
|
hasPadding?: boolean;
|
|
8
6
|
hiddenLabel?: string;
|
|
9
7
|
icon: IconName | JSX.Element;
|
|
10
8
|
loading?: boolean;
|
|
11
|
-
onClick?: () => void;
|
|
9
|
+
onClick?: (event: MouseEvent) => void;
|
|
12
10
|
onMouseDown?: (event: MouseEvent) => void;
|
|
13
11
|
onMouseUp?: (event: MouseEvent) => void;
|
|
14
|
-
radius?:
|
|
15
|
-
size?:
|
|
16
|
-
variant?:
|
|
12
|
+
radius?: "full" | "medium";
|
|
13
|
+
size?: "small" | "medium" | "large";
|
|
14
|
+
variant?: "solid" | "ghost";
|
|
17
15
|
disabled?: boolean;
|
|
18
16
|
}
|
|
19
17
|
export declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
18
|
+
type Color = "grey" | "green" | "amber" | "purple" | "tomato";
|
|
19
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./IconButton").IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
2
3
|
export default _default;
|
|
3
4
|
export declare const Default: {
|
|
4
5
|
render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./IconButton").IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
6
|
args: {
|
|
6
7
|
icon: string;
|
|
7
|
-
cursor: string;
|
|
8
8
|
};
|
|
9
9
|
name: string;
|
|
10
10
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import { type
|
|
2
|
+
import { type ThemeKeys } from "../../theme/new";
|
|
3
3
|
/**
|
|
4
4
|
* Lazily renders a child the first time it intersects with the viewport.
|
|
5
5
|
* Works with any vertical scrolling ancestor (direct or not).
|
|
@@ -14,8 +14,15 @@ export interface LazyRenderProps {
|
|
|
14
14
|
* Getting this right is not critical.
|
|
15
15
|
* A heightEstimate of 0 means nothing will lazily render as everything is immediately visible.
|
|
16
16
|
* On the other hand, a huge heightEstimate means it will be hard to see and load the content after the first item.
|
|
17
|
+
* @default 200
|
|
17
18
|
*/
|
|
18
19
|
heightEstimate?: number;
|
|
19
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Whether to keep the children loaded forever after they were shown the first time.
|
|
22
|
+
* Otherwise, will keep mounting/unmounting the children as they appear on screen.
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
keepLoaded?: boolean;
|
|
26
|
+
gap?: ThemeKeys<"space">;
|
|
20
27
|
}
|
|
21
28
|
export declare function LazyRender(props: LazyRenderProps): JSX.Element;
|
|
@@ -1,13 +1,22 @@
|
|
|
1
1
|
import { type Status } from "../MediaProgress/MediaProgress";
|
|
2
|
+
interface Tag {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
2
6
|
interface MediaCardProps {
|
|
7
|
+
"aria-label"?: string;
|
|
3
8
|
url: string;
|
|
4
9
|
filename: string;
|
|
10
|
+
filenameHighlight?: string;
|
|
11
|
+
alt?: string;
|
|
5
12
|
/**
|
|
6
13
|
* The file extension of the media
|
|
7
14
|
* @example "png"
|
|
8
15
|
*/
|
|
9
|
-
extension
|
|
16
|
+
extension?: string;
|
|
10
17
|
kind?: string;
|
|
18
|
+
tags?: Tag[];
|
|
19
|
+
onAddTag?: () => void;
|
|
11
20
|
width?: number;
|
|
12
21
|
height?: number;
|
|
13
22
|
selected?: boolean;
|
|
@@ -35,8 +44,8 @@ interface MediaCardProps {
|
|
|
35
44
|
}
|
|
36
45
|
export declare function MediaCard(props: MediaCardProps): JSX.Element;
|
|
37
46
|
interface MediaCardPlaceholderProps {
|
|
38
|
-
|
|
39
|
-
|
|
47
|
+
filename: string;
|
|
48
|
+
extension?: string;
|
|
40
49
|
}
|
|
41
50
|
export declare function MediaCardPlaceholder(props: MediaCardPlaceholderProps): JSX.Element;
|
|
42
51
|
export {};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
1
2
|
import { MediaCard } from "./MediaCard";
|
|
2
3
|
declare const meta: {
|
|
3
4
|
title: string;
|
|
4
5
|
component: typeof MediaCard;
|
|
6
|
+
tags: string[];
|
|
5
7
|
argTypes: {
|
|
6
8
|
selected: {
|
|
7
9
|
defaultValue: boolean;
|
|
@@ -26,31 +28,15 @@ declare const meta: {
|
|
|
26
28
|
action: string;
|
|
27
29
|
};
|
|
28
30
|
};
|
|
31
|
+
onAddTag: {
|
|
32
|
+
handleClick: {
|
|
33
|
+
action: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
29
36
|
};
|
|
30
37
|
};
|
|
31
38
|
export default meta;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
extension: string;
|
|
37
|
-
width: number;
|
|
38
|
-
height: number;
|
|
39
|
-
size: number;
|
|
40
|
-
};
|
|
41
|
-
name: string;
|
|
42
|
-
render: (args: {
|
|
43
|
-
url: string;
|
|
44
|
-
filename: string;
|
|
45
|
-
extension: string;
|
|
46
|
-
kind?: string | undefined;
|
|
47
|
-
width?: number | undefined;
|
|
48
|
-
height?: number | undefined;
|
|
49
|
-
selected?: boolean | undefined;
|
|
50
|
-
loading?: boolean | undefined;
|
|
51
|
-
status?: import("../MediaProgress").Status | undefined;
|
|
52
|
-
size?: number | undefined;
|
|
53
|
-
onCardClick?: (() => void) | undefined;
|
|
54
|
-
onCheckedChange?: ((checked: boolean) => void) | undefined;
|
|
55
|
-
}) => JSX.Element;
|
|
56
|
-
};
|
|
39
|
+
type Story = StoryObj<typeof meta>;
|
|
40
|
+
export declare const StaticMediaCard: Story;
|
|
41
|
+
export declare const DynamicMediaCard: Story;
|
|
42
|
+
export declare const TaglessMediaCard: Story;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type ThemeKeys } from "../../theme/new";
|
|
3
|
+
type Gap = Extract<ThemeKeys<"space">, number>;
|
|
4
|
+
interface OverflowContainerProps {
|
|
5
|
+
children: ReactNode[];
|
|
6
|
+
/**
|
|
7
|
+
* simulates a gap by adding a right margin to each item,
|
|
8
|
+
* required so that gap is included within width calculations
|
|
9
|
+
*/
|
|
10
|
+
gap?: Gap;
|
|
11
|
+
}
|
|
12
|
+
export declare function OverflowContainer(props: OverflowContainerProps): JSX.Element;
|
|
13
|
+
interface OverflowItemProps {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export declare function OverflowItem(props: OverflowItemProps): JSX.Element;
|
|
17
|
+
interface OverflowAdornmentProps {
|
|
18
|
+
adornment: ({ numberOfVisibleItems }: {
|
|
19
|
+
numberOfVisibleItems: number;
|
|
20
|
+
}) => ReactNode;
|
|
21
|
+
}
|
|
22
|
+
export declare function OverflowEndAdornment(props: OverflowAdornmentProps): JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { StoryObj } from "@storybook/react";
|
|
3
|
+
import { OverflowContainer } from "./OverflowContainer";
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: typeof OverflowContainer;
|
|
7
|
+
tags: string[];
|
|
8
|
+
argTypes: {
|
|
9
|
+
gap: {
|
|
10
|
+
control: string;
|
|
11
|
+
options: number[];
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
decorators: ((Story: import("@storybook/types").PartialStoryFn<import("@storybook/react/dist/types-0a347bb9").R, {
|
|
15
|
+
children: import("react").ReactNode[];
|
|
16
|
+
gap?: (0 | 2 | 1 | 4 | 6 | 8 | 10 | 12 | 16 | 18 | 20 | 24 | 28 | 32 | 40 | 48 | 72 | 80 | 100) | undefined;
|
|
17
|
+
}>) => JSX.Element)[];
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<typeof meta>;
|
|
21
|
+
export declare const Default: Story;
|
|
22
|
+
export declare const WithoutAdornment: Story;
|
|
23
|
+
export declare const WithString: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { OverflowContainer, OverflowEndAdornment, OverflowItem } from "./OverflowContainer";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type CSSProperties, type ReactNode } from "react";
|
|
2
|
-
import * as styles from "./ScrollArea.css";
|
|
3
2
|
export interface ScrollAreaProps {
|
|
3
|
+
"aria-label"?: string;
|
|
4
4
|
children?: ReactNode;
|
|
5
5
|
className?: string;
|
|
6
|
-
direction?:
|
|
6
|
+
direction?: "horizontal" | "vertical";
|
|
7
7
|
style?: CSSProperties;
|
|
8
8
|
onScrollToBottom?: () => void;
|
|
9
9
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./ScrollArea").ScrollAreaProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
2
3
|
export default _default;
|
|
3
4
|
export declare const Default: {
|
|
@@ -1,10 +1,20 @@
|
|
|
1
|
+
import { type AriaRole, type FocusEvent } from "react";
|
|
1
2
|
import type { SX } from "../../theme/new";
|
|
2
3
|
export interface SearchInputProps {
|
|
3
4
|
value: string;
|
|
5
|
+
onValueChange: (value: string) => void;
|
|
4
6
|
placeholder?: string;
|
|
5
7
|
maxLength?: number;
|
|
6
8
|
isLoading?: boolean;
|
|
7
9
|
sx?: SX;
|
|
8
|
-
|
|
10
|
+
role?: AriaRole;
|
|
11
|
+
onFocus?: (event: FocusEvent<HTMLInputElement, Element>) => void;
|
|
12
|
+
onBlur?: (event: FocusEvent<HTMLInputElement, Element>) => void;
|
|
13
|
+
endAdornment?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* AutoFocus can cause assesibilty issues when used, especially in forms.
|
|
16
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus#accessibility_concerns
|
|
17
|
+
*/
|
|
18
|
+
autoFocus?: boolean;
|
|
9
19
|
}
|
|
10
|
-
export declare
|
|
20
|
+
export declare const SearchInput: import("react").ForwardRefExoticComponent<SearchInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./SearchInput").SearchInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
2
3
|
export default _default;
|
|
3
4
|
export declare const Default: {
|
|
4
|
-
render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./SearchInput").SearchInputProps
|
|
5
|
+
render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./SearchInput").SearchInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
5
6
|
args: {
|
|
6
7
|
value: string;
|
|
7
8
|
placeholder: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
1
2
|
import type { SX, ThemeKeys } from "../../theme/new";
|
|
2
3
|
export interface Props {
|
|
3
4
|
component?: "span";
|
|
@@ -5,6 +6,10 @@ export interface Props {
|
|
|
5
6
|
color?: ThemeKeys<"color", "grey1" | "grey5">;
|
|
6
7
|
width?: number | string;
|
|
7
8
|
height?: number | string;
|
|
9
|
+
/**
|
|
10
|
+
* Alternatively to setting an explicit width and/or height, a Skeleton can take children and be implicitely sized to match it, which can improve the fidelity of the Skeleton's size.
|
|
11
|
+
*/
|
|
12
|
+
children?: ReactNode;
|
|
8
13
|
sx?: SX;
|
|
9
14
|
}
|
|
10
15
|
export declare function Skeleton(props: Props): import("react").DetailedReactHTMLElement<{
|
|
@@ -20,15 +25,16 @@ export declare function Skeleton(props: Props): import("react").DetailedReactHTM
|
|
|
20
25
|
justifySelf?: "center" | "stretch" | undefined;
|
|
21
26
|
visibility?: "hidden" | "visible" | undefined;
|
|
22
27
|
position?: "fixed" | "absolute" | "relative" | "sticky" | undefined;
|
|
23
|
-
marginLeft?: 0 | 2 | 1 | "auto" | 4 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 72 | 80 | 100 | undefined;
|
|
24
|
-
marginRight?: 0 | 2 | 1 | "auto" | 4 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 72 | 80 | 100 | undefined;
|
|
25
|
-
marginTop?: 0 | 2 | 1 | "auto" | 4 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 72 | 80 | 100 | undefined;
|
|
26
|
-
marginBottom?: 0 | 2 | 1 | "auto" | 4 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 72 | 80 | 100 | undefined;
|
|
27
|
-
marginInline?: 0 | 2 | 1 | "auto" | 4 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 72 | 80 | 100 | undefined;
|
|
28
|
-
marginBlock?: 0 | 2 | 1 | "auto" | 4 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 72 | 80 | 100 | undefined;
|
|
29
|
-
top?: 0 | 2 | 1 | "auto" | 4 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 72 | 80 | 100 | undefined;
|
|
30
|
-
left?: 0 | 2 | 1 | "auto" | 4 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 72 | 80 | 100 | undefined;
|
|
31
|
-
right?: 0 | 2 | 1 | "auto" | 4 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 72 | 80 | 100 | undefined;
|
|
32
|
-
bottom?: 0 | 2 | 1 | "auto" | 4 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 72 | 80 | 100 | undefined;
|
|
28
|
+
marginLeft?: 0 | 2 | 1 | "auto" | "fieldSetGap" | 4 | 6 | 8 | 10 | 12 | 16 | 18 | 20 | 24 | 28 | 32 | 40 | 48 | 72 | 80 | 100 | undefined;
|
|
29
|
+
marginRight?: 0 | 2 | 1 | "auto" | "fieldSetGap" | 4 | 6 | 8 | 10 | 12 | 16 | 18 | 20 | 24 | 28 | 32 | 40 | 48 | 72 | 80 | 100 | undefined;
|
|
30
|
+
marginTop?: 0 | 2 | 1 | "auto" | "fieldSetGap" | 4 | 6 | 8 | 10 | 12 | 16 | 18 | 20 | 24 | 28 | 32 | 40 | 48 | 72 | 80 | 100 | undefined;
|
|
31
|
+
marginBottom?: 0 | 2 | 1 | "auto" | "fieldSetGap" | 4 | 6 | 8 | 10 | 12 | 16 | 18 | 20 | 24 | 28 | 32 | 40 | 48 | 72 | 80 | 100 | undefined;
|
|
32
|
+
marginInline?: 0 | 2 | 1 | "auto" | "fieldSetGap" | 4 | 6 | 8 | 10 | 12 | 16 | 18 | 20 | 24 | 28 | 32 | 40 | 48 | 72 | 80 | 100 | undefined;
|
|
33
|
+
marginBlock?: 0 | 2 | 1 | "auto" | "fieldSetGap" | 4 | 6 | 8 | 10 | 12 | 16 | 18 | 20 | 24 | 28 | 32 | 40 | 48 | 72 | 80 | 100 | undefined;
|
|
34
|
+
top?: 0 | 2 | 1 | "auto" | "fieldSetGap" | 4 | 6 | 8 | 10 | 12 | 16 | 18 | 20 | 24 | 28 | 32 | 40 | 48 | 72 | 80 | 100 | undefined;
|
|
35
|
+
left?: 0 | 2 | 1 | "auto" | "fieldSetGap" | 4 | 6 | 8 | 10 | 12 | 16 | 18 | 20 | 24 | 28 | 32 | 40 | 48 | 72 | 80 | 100 | undefined;
|
|
36
|
+
right?: 0 | 2 | 1 | "auto" | "fieldSetGap" | 4 | 6 | 8 | 10 | 12 | 16 | 18 | 20 | 24 | 28 | 32 | 40 | 48 | 72 | 80 | 100 | undefined;
|
|
37
|
+
bottom?: 0 | 2 | 1 | "auto" | "fieldSetGap" | 4 | 6 | 8 | 10 | 12 | 16 | 18 | 20 | 24 | 28 | 32 | 40 | 48 | 72 | 80 | 100 | undefined;
|
|
38
|
+
borderRadius?: 0 | 2 | 1 | "50%" | "100%" | "inherit" | 4 | 6 | 8 | 10 | 12 | undefined;
|
|
33
39
|
};
|
|
34
40
|
}, HTMLElement>;
|
|
@@ -1,11 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Skeleton } from "./Skeleton";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Skeleton;
|
|
6
|
+
argTypes: {
|
|
7
|
+
width: {
|
|
8
|
+
control: {
|
|
9
|
+
type: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
height: {
|
|
13
|
+
control: {
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
color: {
|
|
18
|
+
control: {
|
|
19
|
+
type: string;
|
|
20
|
+
};
|
|
21
|
+
options: string[];
|
|
22
|
+
};
|
|
23
|
+
borderRadius: {
|
|
24
|
+
control: {
|
|
25
|
+
type: string;
|
|
26
|
+
};
|
|
27
|
+
options: number[];
|
|
28
|
+
};
|
|
29
|
+
children: {
|
|
30
|
+
control: {
|
|
31
|
+
disable: boolean;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export default meta;
|
|
3
37
|
export declare const Default: {
|
|
38
|
+
render: (args: {
|
|
39
|
+
component?: "span" | undefined;
|
|
40
|
+
borderRadius?: 0 | "100%" | 4 | 6 | 12 | undefined;
|
|
41
|
+
color?: "grey1" | "grey5" | undefined;
|
|
42
|
+
width?: string | number | undefined;
|
|
43
|
+
height?: string | number | undefined;
|
|
44
|
+
children?: import("react").ReactNode;
|
|
45
|
+
sx?: import("../../theme/new").SX | undefined;
|
|
46
|
+
}) => JSX.Element;
|
|
4
47
|
args: {
|
|
5
48
|
width: number;
|
|
6
49
|
height: number;
|
|
7
|
-
color:
|
|
8
|
-
borderRadius:
|
|
50
|
+
color: "grey5";
|
|
51
|
+
borderRadius: 6;
|
|
9
52
|
};
|
|
10
53
|
name: string;
|
|
11
54
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import type { ThemeKeys } from "../../theme/new";
|
|
3
3
|
interface AnimatedSuspenseProps {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
fallback?: ReactNode;
|
|
6
|
-
animationDuration?:
|
|
6
|
+
animationDuration?: ThemeKeys<"transitionDuration">;
|
|
7
7
|
}
|
|
8
8
|
export declare function AnimatedSuspense(props: AnimatedSuspenseProps): JSX.Element;
|
|
9
9
|
export {};
|