@prismicio/editor-ui 0.4.17 → 0.4.19
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/ActionList/ActionList.d.ts +1 -1
- package/dist/components/AnimatedElement/AnimatedElement.d.ts +1 -2
- package/dist/components/Badge/Badge.css.d.ts +4 -1
- package/dist/components/Badge/Badge.d.ts +2 -2
- package/dist/components/Badge/Badge.stories.d.ts +2 -2
- package/dist/components/BaseInput/BaseInput.d.ts +16 -9
- package/dist/components/BlankSlate/BlankSlate.d.ts +31 -16
- package/dist/components/Button/Button.d.ts +17 -7
- package/dist/components/Button/Button.stories.d.ts +35 -7
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +3 -4
- package/dist/components/ButtonGroup/ButtonGroup.stories.d.ts +44 -7
- package/dist/components/Card/Card.d.ts +11 -5
- package/dist/components/Checkbox/Checkbox.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts +2 -0
- package/dist/components/ColorInput/ColorInput.d.ts +5 -6
- package/dist/components/ColorInput/ColorInput.stories.d.ts +2 -12
- package/dist/components/DateInput/DateInput.d.ts +2 -2
- package/dist/components/Dialog/Dialog.d.ts +2 -0
- package/dist/components/Dialog/Options/DialogOptions.d.ts +1 -1
- package/dist/components/DocumentCard/DocumentCard.d.ts +6 -21
- package/dist/components/DocumentCard/DocumentCard.stories.d.ts +29 -5
- package/dist/components/Dot/Dot.d.ts +6 -0
- package/dist/components/Dot/Dot.stories.d.ts +20 -0
- package/dist/components/Dot/index.d.ts +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.css.d.ts +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +3 -2
- package/dist/components/EditableText/EditableText.d.ts +1 -0
- package/dist/components/ErrorBoundary/DefaultErrorMessage.d.ts +2 -0
- package/dist/components/Field/Field.d.ts +6 -7
- package/dist/components/Field/Field.stories.d.ts +1 -1
- package/dist/components/FileUpload/FileDropZone/FileDropZone.d.ts +3 -0
- package/dist/components/FileUpload/FileUpload.stories.d.ts +2 -2
- package/dist/components/FileUpload/FileUpload.utils.d.ts +8 -2
- package/dist/components/FileUpload/index.d.ts +0 -1
- package/dist/components/FileUploadButton/FileUploadButton.d.ts +19 -0
- package/dist/components/FileUploadButton/index.d.ts +1 -0
- package/dist/components/Form/Form.d.ts +1 -1
- package/dist/components/Form/FormDateInput.d.ts +2 -1
- package/dist/components/Form/FormField.d.ts +1 -1
- package/dist/components/Form/FormInput.d.ts +7 -1
- package/dist/components/Form/FormSearchInput.d.ts +11 -0
- package/dist/components/Form/index.d.ts +1 -0
- package/dist/components/Gradient/Gradient.d.ts +1 -1
- package/dist/components/Group/Group.d.ts +3 -2
- package/dist/components/Group/Group.stories.d.ts +6 -10
- package/dist/components/Group/GroupItem.css.d.ts +0 -1
- package/dist/components/HairlineButton/HairlineButton.d.ts +1 -1
- package/dist/components/HiddenLabel/HiddenLabel.d.ts +11 -0
- package/dist/components/HiddenLabel/index.d.ts +1 -0
- package/dist/components/Icon/Icon.d.ts +2 -3
- package/dist/components/Icon/iconNames.d.ts +1 -1
- package/dist/components/IconButton/IconButton.d.ts +2 -0
- package/dist/components/Image/Image.d.ts +3 -0
- package/dist/components/InvisibleButton/InvisibleButton.css.d.ts +1 -0
- package/dist/components/InvisibleButton/InvisibleButton.d.ts +1 -0
- package/dist/components/Line/Line.d.ts +6 -0
- package/dist/components/Line/Line.stories.d.ts +20 -0
- package/dist/components/Line/index.d.ts +1 -0
- package/dist/components/List/UnorderedList.d.ts +11 -0
- package/dist/components/List/UnorderedList.stories.d.ts +23 -0
- package/dist/components/List/index.d.ts +1 -0
- package/dist/components/Masonry/MasonryFile.d.ts +2 -3
- package/dist/components/MediaCard/MediaCard.d.ts +35 -0
- package/dist/components/MediaCard/MediaCard.stories.d.ts +54 -0
- package/dist/components/MediaCard/index.d.ts +1 -0
- package/dist/components/MediaProgress/MediaProgress.d.ts +6 -0
- package/dist/components/MediaProgress/MediaProgress.stories.d.ts +24 -0
- package/dist/components/MediaProgress/index.d.ts +1 -0
- package/dist/components/NumberInput/NumberInput.d.ts +4 -2
- package/dist/components/Portal/Portal.d.ts +9 -0
- package/dist/components/Portal/index.d.ts +1 -0
- package/dist/components/Radio/RadioGroup.d.ts +1 -1
- package/dist/components/ScrollArea/ScrollArea.d.ts +2 -2
- package/dist/components/ScrollArea/ScrollArea.stories.d.ts +3 -3
- package/dist/components/SearchInput/SearchInput.d.ts +1 -1
- package/dist/components/Select/Select.css.d.ts +2 -6
- package/dist/components/Select/Select.d.ts +9 -10
- package/dist/components/Select/SelectGhostTrigger.d.ts +11 -0
- package/dist/components/Select/index.d.ts +1 -0
- package/dist/components/Separator/Separator.d.ts +7 -2
- package/dist/components/Separator/Separator.stories.d.ts +31 -6
- package/dist/components/Skeleton/Skeleton.d.ts +11 -13
- package/dist/components/Switch/Switch.d.ts +3 -1
- package/dist/components/Table/Table.d.ts +1 -0
- package/dist/components/TagField/useTagFieldHeader.d.ts +1 -0
- package/dist/components/Text/Text.css.d.ts +2 -1
- package/dist/components/Text/Text.d.ts +3 -2
- package/dist/components/TextArea/TextArea.d.ts +3 -1
- package/dist/components/TextInput/TextInput.d.ts +6 -6
- package/dist/components/TextInput/index.d.ts +1 -1
- package/dist/components/Toast/Toast.d.ts +4 -0
- package/dist/components/Toast/Toast.stories.d.ts +2 -2
- package/dist/components/ToggleButton/ToggleButton.d.ts +2 -3
- package/dist/components/ToggleButton/ToggleButton.stories.d.ts +37 -7
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +25 -15
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.stories.d.ts +64 -16
- package/dist/components/Toolbar/Toolbar.d.ts +3 -4
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Video/Video.d.ts +6 -1
- package/dist/components/Video/Video.stories.d.ts +34 -7
- package/dist/index.d.ts +11 -6
- package/dist/index.es.js +12953 -12473
- package/dist/style.css +1 -1
- package/dist/theme/new/index.d.ts +3 -0
- package/dist/theme/new/sx.d.ts +12 -13
- package/dist/theme/new/theme.d.ts +21 -13
- package/dist/theme/new/utils.d.ts +1 -1
- package/dist/theme/selectors.d.ts +20 -20
- package/dist/theme/sprinkles.css.d.ts +932 -932
- package/package.json +4 -2
- package/dist/components/BaseInput/BaseInput.css.d.ts +0 -15
- package/dist/components/BlankSlate/BlankSlate.css.d.ts +0 -12
- package/dist/components/Button/Button.css.d.ts +0 -13
- package/dist/components/ButtonGroup/ButtonGroup.css.d.ts +0 -5
- package/dist/components/DocumentStatusBar/DocumentStatusBar.css.d.ts +0 -1
- package/dist/components/DocumentStatusBar/DocumentStatusBar.d.ts +0 -5
- package/dist/components/DocumentStatusBar/DocumentStatusBar.stories.d.ts +0 -10
- package/dist/components/DocumentStatusBar/index.d.ts +0 -1
- package/dist/components/DocumentStatusDot/DocumentStatusDot.css.d.ts +0 -1
- package/dist/components/DocumentStatusDot/DocumentStatusDot.d.ts +0 -5
- package/dist/components/DocumentStatusDot/DocumentStatusDot.stories.d.ts +0 -10
- package/dist/components/DocumentStatusDot/index.d.ts +0 -1
- package/dist/components/EditableText/EditableText.css.d.ts +0 -2
- package/dist/components/Field/Field.css.d.ts +0 -9
- package/dist/components/FileUpload/FileDropZone/FileDropZone.css.d.ts +0 -4
- package/dist/components/FileUpload/FileUploadTrigger/FileUploadTrigger.css.d.ts +0 -3
- package/dist/components/FileUpload/FileUploadTrigger/FileUploadTrigger.d.ts +0 -8
- package/dist/components/Image/Image.css.d.ts +0 -8
- package/dist/components/SearchInput/SearchInput.css.d.ts +0 -2
- package/dist/components/Separator/Separator.css.d.ts +0 -1
- package/dist/components/TextArea/TextArea.css.d.ts +0 -4
- package/dist/components/Tooltip/Tooltip.css.d.ts +0 -6
|
@@ -1,29 +1,28 @@
|
|
|
1
1
|
import { type PropsWithChildren, type ReactNode } from "react";
|
|
2
2
|
import { type IconName } from "../Icon";
|
|
3
|
-
import * as styles from "./Field.css";
|
|
4
3
|
export interface FieldProps {
|
|
5
4
|
children?: ReactNode;
|
|
6
5
|
footer?: ReactNode;
|
|
7
|
-
labelPosition?:
|
|
8
|
-
onMouseOverChange?: (isMouseOver: boolean) => void;
|
|
6
|
+
labelPosition?: "top" | "side";
|
|
9
7
|
selected?: boolean;
|
|
8
|
+
onMouseOverChange?: (isMouseOver: boolean) => void;
|
|
10
9
|
}
|
|
11
10
|
export declare const Field: import("react").ForwardRefExoticComponent<FieldProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
11
|
interface FieldIconProps {
|
|
13
12
|
name: IconName;
|
|
14
13
|
disabled?: boolean;
|
|
15
14
|
}
|
|
16
|
-
export declare function FieldIcon(
|
|
15
|
+
export declare function FieldIcon(props: FieldIconProps): JSX.Element;
|
|
17
16
|
interface FieldLabelProps {
|
|
18
17
|
children: string;
|
|
19
18
|
htmlFor?: string;
|
|
20
19
|
id?: string;
|
|
21
20
|
}
|
|
22
|
-
export declare function FieldLabel(
|
|
21
|
+
export declare function FieldLabel(props: FieldLabelProps): JSX.Element;
|
|
23
22
|
interface FieldControlProps {
|
|
24
23
|
children?: ReactNode;
|
|
25
24
|
disabled?: boolean;
|
|
26
25
|
}
|
|
27
|
-
export declare function FieldControl(
|
|
28
|
-
export declare function FieldFooter(
|
|
26
|
+
export declare function FieldControl(props: FieldControlProps): JSX.Element;
|
|
27
|
+
export declare function FieldFooter(props: PropsWithChildren): JSX.Element;
|
|
29
28
|
export {};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
|
+
import { type MediaAssetType } from "../FileUpload.utils";
|
|
2
3
|
export interface FileDropZoneProps {
|
|
3
4
|
onFilesSelected: (files: File[]) => void;
|
|
4
5
|
overlay: ReactNode;
|
|
6
|
+
overlayVariant?: "default" | "simple";
|
|
7
|
+
assetType?: MediaAssetType;
|
|
5
8
|
children?: ReactNode;
|
|
6
9
|
}
|
|
7
10
|
export declare function FileDropZone(props: FileDropZoneProps): JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { FileUploadButton } from "../FileUploadButton";
|
|
1
2
|
import { FileDropZone } from "./FileDropZone/FileDropZone";
|
|
2
|
-
import { FileUploadTrigger } from "./FileUploadTrigger/FileUploadTrigger";
|
|
3
3
|
import { UploadProgress } from "./UploadProgress/UploadProgress";
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
6
|
subcomponents: {
|
|
7
7
|
FileDropZone: typeof FileDropZone;
|
|
8
|
-
|
|
8
|
+
FileUploadButton: typeof FileUploadButton;
|
|
9
9
|
UploadProgress: typeof UploadProgress;
|
|
10
10
|
};
|
|
11
11
|
};
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
import type { FileDropItem } from "@react-aria/dnd";
|
|
1
2
|
export declare const validExtensions: {
|
|
2
|
-
readonly
|
|
3
|
+
readonly applicationAll: "application/*";
|
|
4
|
+
readonly textAll: "text/*";
|
|
3
5
|
readonly imageAll: "image/*";
|
|
4
|
-
readonly
|
|
6
|
+
readonly videoAll: "video/*";
|
|
7
|
+
readonly audioAll: "audio/*";
|
|
5
8
|
};
|
|
9
|
+
export type MediaAssetType = "image" | "all";
|
|
10
|
+
export declare function isValidFileExtension(item: FileDropItem, assetType: "image" | "all"): boolean;
|
|
11
|
+
export declare function getNonSpecificExtension(inputString: string): string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ReactElement } from "react";
|
|
2
|
+
import { type ButtonProps } from "../Button/Button";
|
|
3
|
+
import { type MediaAssetType } from "../FileUpload/FileUpload.utils";
|
|
4
|
+
interface FileUploadButtonProps extends ButtonProps {
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* A callback that is called when the user selects files.
|
|
8
|
+
* @returns An array of files that were selected by the user.
|
|
9
|
+
*/
|
|
10
|
+
onFilesSelected: (files: File[]) => void;
|
|
11
|
+
assetType?: MediaAssetType;
|
|
12
|
+
/**
|
|
13
|
+
* A custom element to use as the button for triggering the upload. This is useful if you want to use a
|
|
14
|
+
* different component than the predefined Button component.
|
|
15
|
+
*/
|
|
16
|
+
renderButton?: (onClick: ButtonProps["onClick"]) => ReactElement;
|
|
17
|
+
}
|
|
18
|
+
export declare function FileUploadButton(props: FileUploadButtonProps): JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FileUploadButton } from "./FileUploadButton";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Time } from "@internationalized/date";
|
|
2
|
-
import type { SX } from "../../theme/new
|
|
2
|
+
import type { SX } from "../../theme/new";
|
|
3
3
|
import type { DateInputProps } from "../DateInput/DateInput";
|
|
4
4
|
export interface FormDateInputProps {
|
|
5
5
|
label: string;
|
|
@@ -12,5 +12,6 @@ export interface FormDateInputProps {
|
|
|
12
12
|
minValue?: "tomorrow";
|
|
13
13
|
sx?: SX;
|
|
14
14
|
onValueChange: (value?: Date) => void;
|
|
15
|
+
disabled?: boolean;
|
|
15
16
|
}
|
|
16
17
|
export declare function FormDateInput(props: FormDateInputProps): JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type KeyboardEventHandler } from "react";
|
|
1
|
+
import { type ClipboardEventHandler, type KeyboardEventHandler } from "react";
|
|
2
|
+
import type { SX } from "../../theme/new";
|
|
2
3
|
import { type IconName } from "../Icon";
|
|
3
4
|
import * as styles from "./FormInput.css";
|
|
4
5
|
export interface FormInputProps {
|
|
@@ -10,7 +11,12 @@ export interface FormInputProps {
|
|
|
10
11
|
error?: boolean;
|
|
11
12
|
size?: keyof typeof styles.input;
|
|
12
13
|
icon?: IconName;
|
|
14
|
+
autoComplete?: AutoCompleteValue;
|
|
15
|
+
sx?: SX;
|
|
13
16
|
onKeyDown?: KeyboardEventHandler<HTMLInputElement>;
|
|
14
17
|
onValueChange?: (value: string) => void;
|
|
18
|
+
onPaste?: ClipboardEventHandler<HTMLInputElement>;
|
|
15
19
|
}
|
|
16
20
|
export declare function FormInput(props: FormInputProps): JSX.Element;
|
|
21
|
+
type AutoCompleteValue = "username" | "current-password";
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { SX } from "../../theme/new";
|
|
2
|
+
export interface FormSearchInputProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
maxLength?: number;
|
|
6
|
+
isLoading?: boolean;
|
|
7
|
+
value: string;
|
|
8
|
+
sx?: SX;
|
|
9
|
+
onValueChange: (value: string) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function FormSearchInput(props: FormSearchInputProps): JSX.Element;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
export interface GroupProps<ITEM> {
|
|
3
|
+
items: ITEM[];
|
|
3
4
|
title?: string;
|
|
4
5
|
addItemButtonTitle?: string;
|
|
5
|
-
|
|
6
|
+
maxItems?: number;
|
|
6
7
|
getItemKey: (item: ITEM) => string;
|
|
7
8
|
children: (item: ITEM, index: number) => ReactNode;
|
|
8
9
|
onAddItem?: () => void;
|
|
9
10
|
}
|
|
10
|
-
export declare function Group<ITEM>(
|
|
11
|
+
export declare function Group<ITEM>(props: GroupProps<ITEM>): JSX.Element;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
addItemButtonTitle: string;
|
|
8
|
-
};
|
|
9
|
-
name: string;
|
|
10
|
-
};
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Group } from "./Group";
|
|
3
|
+
type Story = StoryObj<typeof meta>;
|
|
4
|
+
declare const meta: Meta<typeof Group>;
|
|
5
|
+
export default meta;
|
|
6
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as VisuallyHidden from "@radix-ui/react-visually-hidden";
|
|
2
|
+
/**
|
|
3
|
+
* A label that is hidden visually but still accessible to screen readers
|
|
4
|
+
* and automated translation services.
|
|
5
|
+
*
|
|
6
|
+
* "aria-label" is not translated by automated translation services and should
|
|
7
|
+
* be avoided in favor of "HiddenLabel" component.
|
|
8
|
+
*
|
|
9
|
+
* @see https://adrianroselli.com/2019/11/aria-label-does-not-translate.html
|
|
10
|
+
*/
|
|
11
|
+
export declare function HiddenLabel(props: VisuallyHidden.VisuallyHiddenProps): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { HiddenLabel } from "./HiddenLabel";
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import type { SX } from "../../theme/new/sx";
|
|
1
|
+
import { type SX, type ThemeKeys } from "../../theme/new";
|
|
3
2
|
import * as styles from "./Icon.css";
|
|
4
3
|
import type { IconName } from "./iconNames";
|
|
5
4
|
export interface IconProps {
|
|
6
5
|
className?: string;
|
|
7
|
-
color?:
|
|
6
|
+
color?: ThemeKeys<"color">;
|
|
8
7
|
name: IconName;
|
|
9
8
|
size?: keyof typeof styles.size;
|
|
10
9
|
sx?: SX;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const iconNames: readonly ["add", "alert", "arrowBack", "arrowDownward", "arrowDropDown", "arrowDropDownCircle", "arrowForward", "arrowUpward", "calendarToday", "centerFocusWeak", "check", "checkBox", "checkBoxOutlinedBlank", "chevronLeft", "chevronRight", "close", "cloud", "cloudUpload", "code", "colorLens", "contentCopy", "crop", "cropLandscape", "cropPortrait", "dataObject", "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", "notes", "openInNew", "phoneIphone", "photo", "pin", "place", "preview", "prismic", "public", "refresh", "save", "schedule", "search", "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", "openInNew", "phoneIphone", "photo", "pin", "place", "preview", "prismic", "public", "refresh", "save", "schedule", "search", "smartDisplay", "tabletMac", "tag", "textFields", "toggleOff", "unfoldMore", "unsplash", "viewDay", "visibility", "zoomOutMap"];
|
|
2
2
|
export type IconName = typeof iconNames[number];
|
|
@@ -5,6 +5,7 @@ export interface IconButtonProps {
|
|
|
5
5
|
color?: keyof typeof styles.color;
|
|
6
6
|
cursor?: keyof typeof styles.cursor;
|
|
7
7
|
hasPadding?: boolean;
|
|
8
|
+
hiddenLabel?: string;
|
|
8
9
|
icon: IconName | JSX.Element;
|
|
9
10
|
loading?: boolean;
|
|
10
11
|
onClick?: () => void;
|
|
@@ -13,5 +14,6 @@ export interface IconButtonProps {
|
|
|
13
14
|
radius?: keyof typeof styles.radius;
|
|
14
15
|
size?: keyof typeof styles.size;
|
|
15
16
|
variant?: keyof typeof styles.variant;
|
|
17
|
+
disabled?: boolean;
|
|
16
18
|
}
|
|
17
19
|
export declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SX } from "../../theme/new";
|
|
1
2
|
export interface ImageProps {
|
|
2
3
|
src: string;
|
|
3
4
|
alt?: string;
|
|
@@ -7,7 +8,9 @@ export interface ImageProps {
|
|
|
7
8
|
borderRadius?: 0 | 4;
|
|
8
9
|
boxShadow?: "3";
|
|
9
10
|
animateOnLoad?: boolean;
|
|
11
|
+
sx?: SX;
|
|
10
12
|
onLoad?: () => void;
|
|
13
|
+
background?: "transparent";
|
|
11
14
|
}
|
|
12
15
|
export declare function ImageComponent(props: ImageProps): JSX.Element;
|
|
13
16
|
export declare function SuspenseImage(props: ImageProps): JSX.Element;
|
|
@@ -10,5 +10,6 @@ export interface InvisibleButtonProps {
|
|
|
10
10
|
onClick?: (event: MouseEvent) => void;
|
|
11
11
|
startIcon?: IconName;
|
|
12
12
|
textVariant?: keyof typeof variant;
|
|
13
|
+
inline?: boolean;
|
|
13
14
|
}
|
|
14
15
|
export declare const InvisibleButton: import("react").ForwardRefExoticComponent<InvisibleButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Line } from "./Line";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: typeof Line;
|
|
5
|
+
argTypes: {
|
|
6
|
+
color: {
|
|
7
|
+
control: {
|
|
8
|
+
type: string;
|
|
9
|
+
};
|
|
10
|
+
options: string[];
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export default meta;
|
|
15
|
+
export declare const Default: {
|
|
16
|
+
name: string;
|
|
17
|
+
args: {
|
|
18
|
+
color: "green";
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Line } from "./Line";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { SX } from "../../theme/new";
|
|
3
|
+
export interface UnorderedListProps {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
sx?: SX;
|
|
6
|
+
}
|
|
7
|
+
export declare function UnorderedList(props: UnorderedListProps): JSX.Element;
|
|
8
|
+
export interface ListItemProps {
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare function ListItem(props: ListItemProps): JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { UnorderedList } from "./UnorderedList";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: typeof UnorderedList;
|
|
5
|
+
argTypes: {
|
|
6
|
+
children: {
|
|
7
|
+
control: {
|
|
8
|
+
disable: boolean;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default meta;
|
|
14
|
+
export declare const Default: {
|
|
15
|
+
name: string;
|
|
16
|
+
render: (args: {
|
|
17
|
+
children?: import("react").ReactNode;
|
|
18
|
+
sx?: import("../../theme/new").SX | undefined;
|
|
19
|
+
}) => JSX.Element;
|
|
20
|
+
args: {
|
|
21
|
+
children: JSX.Element;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ListItem, UnorderedList } from "./UnorderedList";
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
interface MasonryFile {
|
|
1
|
+
interface MasonryFileProps {
|
|
3
2
|
extension: string;
|
|
4
3
|
filename: string;
|
|
5
4
|
onClick?: () => void;
|
|
6
5
|
}
|
|
7
|
-
export declare
|
|
6
|
+
export declare function MasonryFile(props: MasonryFileProps): JSX.Element;
|
|
8
7
|
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type Status } from "../MediaProgress/MediaProgress";
|
|
2
|
+
interface MediaCardProps {
|
|
3
|
+
url: string;
|
|
4
|
+
filename: string;
|
|
5
|
+
/**
|
|
6
|
+
* The file extension of the media
|
|
7
|
+
* @example "png"
|
|
8
|
+
*/
|
|
9
|
+
extension: string;
|
|
10
|
+
width?: number;
|
|
11
|
+
height?: number;
|
|
12
|
+
selected?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The upload status of the media
|
|
15
|
+
* @default idle
|
|
16
|
+
*/
|
|
17
|
+
status?: Status;
|
|
18
|
+
/**
|
|
19
|
+
* The size of the media in bytes
|
|
20
|
+
*/
|
|
21
|
+
size?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Function called when the card is clicked
|
|
24
|
+
* @description This only affects the card, not the checkbox
|
|
25
|
+
*/
|
|
26
|
+
onCardClick?: () => void;
|
|
27
|
+
/**
|
|
28
|
+
* Function called when the checkbox is clicked
|
|
29
|
+
* @description This only affects the checkbox, not the card
|
|
30
|
+
* @param checked - The new checked state of the checkbox
|
|
31
|
+
*/
|
|
32
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
33
|
+
}
|
|
34
|
+
export declare function MediaCard(props: MediaCardProps): JSX.Element;
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { MediaCard } from "./MediaCard";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: typeof MediaCard;
|
|
5
|
+
argTypes: {
|
|
6
|
+
selected: {
|
|
7
|
+
defaultValue: boolean;
|
|
8
|
+
control: {
|
|
9
|
+
type: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
status: {
|
|
13
|
+
defaultValue: string;
|
|
14
|
+
options: string[];
|
|
15
|
+
control: {
|
|
16
|
+
type: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
onCardClick: {
|
|
20
|
+
handleClick: {
|
|
21
|
+
action: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
onCheckedChange: {
|
|
25
|
+
handleClick: {
|
|
26
|
+
action: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export default meta;
|
|
32
|
+
export declare const Default: {
|
|
33
|
+
args: {
|
|
34
|
+
filename: string;
|
|
35
|
+
url: string;
|
|
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
|
+
width?: number | undefined;
|
|
47
|
+
height?: number | undefined;
|
|
48
|
+
selected?: boolean | undefined;
|
|
49
|
+
status?: import("../MediaProgress/MediaProgress").Status | undefined;
|
|
50
|
+
size?: number | undefined;
|
|
51
|
+
onCardClick?: (() => void) | undefined;
|
|
52
|
+
onCheckedChange?: ((checked: boolean) => void) | undefined;
|
|
53
|
+
}) => JSX.Element;
|
|
54
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MediaCard } from "./MediaCard";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { MediaProgress } from "./MediaProgress";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: typeof MediaProgress;
|
|
5
|
+
argTypes: {
|
|
6
|
+
status: {
|
|
7
|
+
defaultValue: string;
|
|
8
|
+
options: string[];
|
|
9
|
+
control: {
|
|
10
|
+
type: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
export declare const Default: {
|
|
17
|
+
args: {
|
|
18
|
+
status: "idle";
|
|
19
|
+
};
|
|
20
|
+
name: string;
|
|
21
|
+
render: (args: {
|
|
22
|
+
status: import("./MediaProgress").Status;
|
|
23
|
+
}) => JSX.Element;
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MediaProgress } from "./MediaProgress";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { SX } from "../../theme/new
|
|
1
|
+
import type { SX } from "../../theme/new";
|
|
2
|
+
import type { BaseInputProps } from "../BaseInput/BaseInput";
|
|
2
3
|
export interface NumberInputProps {
|
|
3
4
|
autoComplete?: string;
|
|
4
5
|
id?: string;
|
|
@@ -6,10 +7,11 @@ export interface NumberInputProps {
|
|
|
6
7
|
min?: number;
|
|
7
8
|
name?: string;
|
|
8
9
|
placeholder?: string;
|
|
10
|
+
padding: BaseInputProps["padding"];
|
|
9
11
|
readOnly?: boolean;
|
|
10
12
|
value?: number;
|
|
11
|
-
onValueChange?: (value: number | undefined) => void;
|
|
12
13
|
sx?: SX;
|
|
14
|
+
onValueChange?: (value: number | undefined) => void;
|
|
13
15
|
}
|
|
14
16
|
export declare function NumberInput(props: NumberInputProps): JSX.Element;
|
|
15
17
|
export declare function isValidDraftValue(value: string): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as PortalPrimitive from "@radix-ui/react-portal";
|
|
2
|
+
interface PortalProps extends PortalPrimitive.PortalProps {
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* Portal component
|
|
6
|
+
* @description A component that renders its children in a portal. We use this instead of the native React portal component to avoid having to add the portal container to the DOM. This component will automatically add the portal container to the DOM when it is rendered and will keep track of different portals.
|
|
7
|
+
*/
|
|
8
|
+
export declare function Portal(props: PortalProps): JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Portal } from "./Portal";
|
|
@@ -15,6 +15,6 @@ export interface ScrollAreaProps {
|
|
|
15
15
|
* The threshold for triggering the onScrollToBottom function.
|
|
16
16
|
* @default 50
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
threshold?: number;
|
|
19
19
|
}
|
|
20
|
-
export declare
|
|
20
|
+
export declare const ScrollArea: import("react").ForwardRefExoticComponent<ScrollAreaProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./ScrollArea").ScrollAreaProps
|
|
1
|
+
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, import("./ScrollArea").ScrollAreaProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
2
2
|
export default _default;
|
|
3
3
|
export declare const Default: {
|
|
4
|
-
render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./ScrollArea").ScrollAreaProps
|
|
4
|
+
render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./ScrollArea").ScrollAreaProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
5
|
args: {
|
|
6
6
|
children: JSX.Element[];
|
|
7
7
|
direction: string;
|
|
@@ -9,7 +9,7 @@ export declare const Default: {
|
|
|
9
9
|
name: string;
|
|
10
10
|
};
|
|
11
11
|
export declare const ScrollAreaWithControls: {
|
|
12
|
-
render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./ScrollArea").ScrollAreaProps
|
|
12
|
+
render: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./ScrollArea").ScrollAreaProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
13
|
args: {
|
|
14
14
|
children: JSX.Element[];
|
|
15
15
|
direction: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export interface SearchInputProps {
|
|
2
2
|
value: string;
|
|
3
|
-
onValueChange: (value: string) => void;
|
|
4
3
|
placeholder?: string;
|
|
5
4
|
maxLength?: number;
|
|
6
5
|
isLoading?: boolean;
|
|
6
|
+
onValueChange: (value: string) => void;
|
|
7
7
|
}
|
|
8
8
|
export declare function SearchInput(props: SearchInputProps): JSX.Element;
|