@prismicio/editor-ui 0.4.63 → 0.4.65
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 +16 -0
- package/dist/components/BlankSlate/BlankSlate.d.ts +4 -0
- package/dist/components/Box/Box.d.ts +7 -1
- package/dist/components/ContentEditable/index.d.ts +6 -1
- package/dist/components/ErrorBoundary/DefaultErrorMessage.d.ts +1 -0
- package/dist/components/Field/Field.d.ts +1 -0
- package/dist/components/Radio/RadioBigCard.d.ts +3 -1
- package/dist/components/Radio/RadioButton.d.ts +10 -3
- package/dist/components/Radio/RadioCard.d.ts +2 -0
- package/dist/components/Radio/RadioGroup.d.ts +10 -12
- package/dist/components/Radio/RadioItem.d.ts +2 -0
- package/dist/components/SearchInput/SearchInput.d.ts +2 -1
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +1 -27
- package/dist/components/Switch/Switch.d.ts +1 -1
- package/dist/components/Table/Table.d.ts +1 -1
- package/dist/index.cjs.js +85 -85
- package/dist/index.d.ts +4 -2
- package/dist/index.es.js +5047 -5004
- package/dist/style.css +1 -1
- package/dist/theme/sx.d.ts +1 -0
- package/dist/theme/theme.d.ts +1 -0
- package/package.json +2 -2
|
@@ -41,7 +41,23 @@ export type ActionListItemProps = {
|
|
|
41
41
|
/**
|
|
42
42
|
* If true, the item title and description will be rendered on a single line.
|
|
43
43
|
*/
|
|
44
|
+
oneLine?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* If true, title won't be wrapped
|
|
47
|
+
*/
|
|
48
|
+
noWrapTitle?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* If true, description won't be wrapped
|
|
51
|
+
*/
|
|
52
|
+
noWrapDescription?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* If true, the item title and description won't be wrapped
|
|
55
|
+
*/
|
|
44
56
|
noWrap?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* The variant of the selected item.
|
|
59
|
+
*/
|
|
60
|
+
selectedVariant?: "default" | "shadow";
|
|
45
61
|
} & ActionListItemEndProps;
|
|
46
62
|
export type ActionListItemEndProps = {
|
|
47
63
|
endAdornment?: ReactNode;
|
|
@@ -4,7 +4,9 @@ import { type IconName } from "../Icon";
|
|
|
4
4
|
export interface BlankSlateProps {
|
|
5
5
|
sx?: SX;
|
|
6
6
|
variant?: "vertical" | "horizontal";
|
|
7
|
+
gap?: 0 | 8;
|
|
7
8
|
children?: ReactNode;
|
|
9
|
+
inlinePadding?: boolean;
|
|
8
10
|
}
|
|
9
11
|
export declare function BlankSlate(props: BlankSlateProps): JSX.Element;
|
|
10
12
|
interface BlankSlateIconProps {
|
|
@@ -19,10 +21,12 @@ export declare function BlankSlateIcon(props: BlankSlateIconProps): JSX.Element;
|
|
|
19
21
|
declare const titleSizeVariant: {
|
|
20
22
|
readonly regular: "normal";
|
|
21
23
|
readonly big: "h2";
|
|
24
|
+
readonly h4: "h4";
|
|
22
25
|
};
|
|
23
26
|
export interface BlankSlateTitleProps {
|
|
24
27
|
size?: keyof typeof titleSizeVariant;
|
|
25
28
|
children?: ReactNode;
|
|
29
|
+
sx?: SX;
|
|
26
30
|
}
|
|
27
31
|
export declare function BlankSlateTitle(props: BlankSlateTitleProps): JSX.Element;
|
|
28
32
|
interface BlankSlateDescriptionProps {
|
|
@@ -37,7 +37,13 @@ type DisplayProps = {
|
|
|
37
37
|
gap?: ThemeKeys<"space">;
|
|
38
38
|
alignItems?: "flex-start" | "center" | "flex-end";
|
|
39
39
|
justifyContent?: "center" | "space-between" | "end";
|
|
40
|
-
} & (BoxGridDisplayProps | BoxFlexDisplayProps);
|
|
40
|
+
} & (BoxBlockDisplayProps | BoxGridDisplayProps | BoxFlexDisplayProps);
|
|
41
|
+
type BoxBlockDisplayProps = {
|
|
42
|
+
display: "block";
|
|
43
|
+
flexDirection?: never;
|
|
44
|
+
gridTemplateColumns?: never;
|
|
45
|
+
gridTemplateRows?: never;
|
|
46
|
+
};
|
|
41
47
|
type BoxGridDisplayProps = {
|
|
42
48
|
display: "grid";
|
|
43
49
|
gridTemplateColumns?: string;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
export { ContentEditable } from "./ContentEditable";
|
|
2
2
|
export { handleEditorFlushSyncError, useEditor } from "./useEditor";
|
|
3
3
|
export declare const contentEditableClass: string;
|
|
4
|
+
export declare const contentEditableNoPaddingClass: string;
|
|
4
5
|
export declare const tableFieldStyles: {
|
|
5
6
|
tableWithControls: string;
|
|
6
|
-
|
|
7
|
+
tableOuterWrapper: string;
|
|
7
8
|
addTableRowButton: string;
|
|
8
9
|
addTableColumnButton: string;
|
|
10
|
+
tableHandle: string;
|
|
11
|
+
tableRowHandle: string;
|
|
12
|
+
tableColumnHandle: string;
|
|
13
|
+
tableHandleVisible: string;
|
|
9
14
|
};
|
|
10
15
|
export declare const contentEditablePlaceholderClass: string;
|
|
11
16
|
export declare const contentEditableMultilinePlaceholderClass: string;
|
|
@@ -7,6 +7,7 @@ export interface FieldProps {
|
|
|
7
7
|
selected?: boolean;
|
|
8
8
|
variant?: "normal" | "compact";
|
|
9
9
|
color?: "transparent" | "grey1";
|
|
10
|
+
display?: "flex" | "grid";
|
|
10
11
|
}
|
|
11
12
|
export declare const Field: (props: FieldProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
|
|
12
13
|
interface FieldIconProps {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { type IconName } from "../Icon";
|
|
2
2
|
export interface RadioBigCardProps {
|
|
3
|
+
value: string;
|
|
3
4
|
icon: IconName;
|
|
4
5
|
title: string;
|
|
6
|
+
description: string;
|
|
5
7
|
badge?: {
|
|
6
8
|
icon: IconName;
|
|
7
9
|
title: string;
|
|
8
10
|
};
|
|
9
|
-
description: string;
|
|
10
11
|
disabled?: boolean;
|
|
12
|
+
grow?: boolean;
|
|
11
13
|
}
|
|
12
14
|
export declare function RadioBigCard(props: RadioBigCardProps): JSX.Element;
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type RadioButtonProps = {
|
|
2
2
|
label?: string;
|
|
3
3
|
disabled?: boolean;
|
|
4
|
+
} & DecorativeRadioButtonProps;
|
|
5
|
+
type DecorativeRadioButtonProps = {
|
|
4
6
|
/**
|
|
5
7
|
* Whether this RadioButton is only included for decoration purposes
|
|
6
8
|
* or is the actual Radio Group Item.
|
|
7
9
|
*/
|
|
8
|
-
decorative
|
|
9
|
-
|
|
10
|
+
decorative: true;
|
|
11
|
+
value?: never;
|
|
12
|
+
} | {
|
|
13
|
+
decorative?: false;
|
|
14
|
+
value: string;
|
|
15
|
+
};
|
|
10
16
|
export declare function RadioButton(props: RadioButtonProps): JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import type { SX } from "../../theme";
|
|
3
|
-
export interface RadioGroupProps<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
evenItemSize?: boolean;
|
|
3
|
+
export interface RadioGroupProps<V extends string> {
|
|
4
|
+
value: V;
|
|
5
|
+
children: ReactNode;
|
|
7
6
|
disabled?: boolean;
|
|
8
7
|
sx?: SX;
|
|
9
|
-
|
|
10
|
-
onChange: (value:
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
onChange: (value: V) => void;
|
|
11
10
|
}
|
|
12
|
-
export declare function RadioGroup<
|
|
13
|
-
interface
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
evenItemSize: boolean;
|
|
11
|
+
export declare function RadioGroup<V extends string>(props: RadioGroupProps<V>): JSX.Element;
|
|
12
|
+
interface RadioGroupContextValue {
|
|
13
|
+
selectedValue: string;
|
|
14
|
+
disabled: boolean;
|
|
17
15
|
}
|
|
18
|
-
export declare function
|
|
16
|
+
export declare function useRadioGroup(): RadioGroupContextValue;
|
|
19
17
|
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
2
|
/** Private component */
|
|
3
3
|
interface RadioItemProps {
|
|
4
|
+
value: string;
|
|
4
5
|
disabled: boolean;
|
|
5
6
|
children: ReactNode;
|
|
7
|
+
grow?: boolean;
|
|
6
8
|
}
|
|
7
9
|
export declare function RadioItem(props: RadioItemProps): JSX.Element;
|
|
8
10
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AriaRole, type FocusEvent } from "react";
|
|
2
|
-
import type { SX } from "../../theme";
|
|
2
|
+
import type { SX, ThemeKeys } from "../../theme";
|
|
3
3
|
export interface SearchInputProps {
|
|
4
4
|
value: string;
|
|
5
5
|
onValueChange: (value: string) => void;
|
|
@@ -19,5 +19,6 @@ export interface SearchInputProps {
|
|
|
19
19
|
*/
|
|
20
20
|
autoFocus?: boolean;
|
|
21
21
|
disabled?: boolean;
|
|
22
|
+
inlineAdornmentPadding?: ThemeKeys<"space">;
|
|
22
23
|
}
|
|
23
24
|
export declare const SearchInput: (props: SearchInputProps & import("react").RefAttributes<HTMLInputElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Select, SelectFooterAction, SelectItem } from "./Select";
|
|
1
|
+
export { Select, SelectFooterAction, SelectItem, type SelectProps, } from "./Select";
|
|
2
2
|
export { SelectGhostTrigger } from "./SelectGhostTrigger";
|
|
@@ -21,30 +21,4 @@ export interface Props {
|
|
|
21
21
|
*/
|
|
22
22
|
zIndex?: -1;
|
|
23
23
|
}
|
|
24
|
-
export declare function Skeleton(props: Props):
|
|
25
|
-
className: string;
|
|
26
|
-
style: {
|
|
27
|
-
width: string | number | undefined;
|
|
28
|
-
height: string | number | undefined;
|
|
29
|
-
zIndex: -1 | undefined;
|
|
30
|
-
flexGrow?: 0 | 1 | undefined;
|
|
31
|
-
flexShrink?: 0 | undefined;
|
|
32
|
-
flexBasis?: 0 | undefined;
|
|
33
|
-
flexWrap?: "wrap" | undefined;
|
|
34
|
-
order?: 0 | 2 | 1 | 3 | undefined;
|
|
35
|
-
alignSelf?: "center" | "stretch" | "start" | "end" | undefined;
|
|
36
|
-
justifySelf?: "center" | "stretch" | "start" | "end" | undefined;
|
|
37
|
-
visibility?: "hidden" | "visible" | undefined;
|
|
38
|
-
position?: "fixed" | "absolute" | "relative" | "sticky" | undefined;
|
|
39
|
-
marginLeft?: 0 | 2 | 1 | "auto" | "fieldSetGap" | 4 | 6 | 8 | 10 | 12 | 16 | 18 | 20 | 24 | 28 | 32 | 40 | 48 | 60 | 72 | 80 | 100 | 120 | undefined;
|
|
40
|
-
marginRight?: 0 | 2 | 1 | "auto" | "fieldSetGap" | 4 | 6 | 8 | 10 | 12 | 16 | 18 | 20 | 24 | 28 | 32 | 40 | 48 | 60 | 72 | 80 | 100 | 120 | undefined;
|
|
41
|
-
marginTop?: 0 | 2 | 1 | "auto" | "fieldSetGap" | 4 | 6 | 8 | 10 | 12 | 16 | 18 | 20 | 24 | 28 | 32 | 40 | 48 | 60 | 72 | 80 | 100 | 120 | undefined;
|
|
42
|
-
marginBottom?: 0 | 2 | 1 | "auto" | "fieldSetGap" | 4 | 6 | 8 | 10 | 12 | 16 | 18 | 20 | 24 | 28 | 32 | 40 | 48 | 60 | 72 | 80 | 100 | 120 | undefined;
|
|
43
|
-
marginInline?: 0 | 2 | 1 | "auto" | "fieldSetGap" | 4 | 6 | 8 | 10 | 12 | 16 | 18 | 20 | 24 | 28 | 32 | 40 | 48 | 60 | 72 | 80 | 100 | 120 | undefined;
|
|
44
|
-
marginBlock?: 0 | 2 | 1 | "auto" | "fieldSetGap" | 4 | 6 | 8 | 10 | 12 | 16 | 18 | 20 | 24 | 28 | 32 | 40 | 48 | 60 | 72 | 80 | 100 | 120 | undefined;
|
|
45
|
-
top?: 0 | 2 | 1 | "auto" | "fieldSetGap" | 4 | 6 | 8 | 10 | 12 | 16 | 18 | 20 | 24 | 28 | 32 | 40 | 48 | 60 | 72 | 80 | 100 | 120 | undefined;
|
|
46
|
-
left?: 0 | 2 | 1 | "auto" | "fieldSetGap" | 4 | 6 | 8 | 10 | 12 | 16 | 18 | 20 | 24 | 28 | 32 | 40 | 48 | 60 | 72 | 80 | 100 | 120 | undefined;
|
|
47
|
-
right?: 0 | 2 | 1 | "auto" | "fieldSetGap" | 4 | 6 | 8 | 10 | 12 | 16 | 18 | 20 | 24 | 28 | 32 | 40 | 48 | 60 | 72 | 80 | 100 | 120 | undefined;
|
|
48
|
-
bottom?: 0 | 2 | 1 | "auto" | "fieldSetGap" | 4 | 6 | 8 | 10 | 12 | 16 | 18 | 20 | 24 | 28 | 32 | 40 | 48 | 60 | 72 | 80 | 100 | 120 | undefined;
|
|
49
|
-
};
|
|
50
|
-
}, HTMLElement>;
|
|
24
|
+
export declare function Skeleton(props: Props): JSX.Element;
|
|
@@ -54,7 +54,7 @@ type TableRowProps = ClickableTableRowProps | LinkTableRowProps;
|
|
|
54
54
|
* - Given an onClick prop: fires the onClick callback when the row is clicked
|
|
55
55
|
* - Given a renderLink: wraps the **entire** row in the given component. E.g. wrapping it in `react-router-dom` `<Link>`
|
|
56
56
|
*/
|
|
57
|
-
export declare
|
|
57
|
+
export declare const TableRow: (props: TableRowProps & import("react").RefAttributes<HTMLDivElement>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | null;
|
|
58
58
|
export interface TableCellProps {
|
|
59
59
|
children?: ReactNode;
|
|
60
60
|
/** How to align the content in the cell. Note that undefined defaults to start */
|