@gamecrafters/base-ui 0.0.40 → 0.0.42
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/build/components/index.d.ts +3 -0
- package/build/components/inline-edit/InlineEdit.d.ts +8 -0
- package/build/components/inline-edit/InlineEdit.types.d.ts +116 -0
- package/build/components/inline-edit/InlineEditArea.d.ts +5 -0
- package/build/components/inline-edit/InlineEditCancelTrigger.d.ts +9 -0
- package/build/components/inline-edit/InlineEditContext.d.ts +10 -0
- package/build/components/inline-edit/InlineEditControl.d.ts +5 -0
- package/build/components/inline-edit/InlineEditEditTrigger.d.ts +9 -0
- package/build/components/inline-edit/InlineEditInput.d.ts +4 -0
- package/build/components/inline-edit/InlineEditLabel.d.ts +6 -0
- package/build/components/inline-edit/InlineEditPreview.d.ts +7 -0
- package/build/components/inline-edit/InlineEditRootProvider.d.ts +10 -0
- package/build/components/inline-edit/InlineEditSubmitTrigger.d.ts +9 -0
- package/build/components/inline-edit/index.d.ts +71 -0
- package/build/components/inline-edit/useInlineEdit.d.ts +2 -0
- package/build/components/layer-dialog/LayerDialog.d.ts +7 -0
- package/build/components/layer-dialog/LayerDialog.types.d.ts +65 -0
- package/build/components/layer-dialog/LayerDialogAction.d.ts +8 -0
- package/build/components/layer-dialog/LayerDialogActions.d.ts +4 -0
- package/build/components/layer-dialog/LayerDialogAlert.d.ts +7 -0
- package/build/components/layer-dialog/LayerDialogBody.d.ts +4 -0
- package/build/components/layer-dialog/LayerDialogContent.d.ts +4 -0
- package/build/components/layer-dialog/LayerDialogContext.d.ts +12 -0
- package/build/components/layer-dialog/LayerDialogDescription.d.ts +5 -0
- package/build/components/layer-dialog/LayerDialogPopup.d.ts +9 -0
- package/build/components/layer-dialog/LayerDialogTitle.d.ts +5 -0
- package/build/components/layer-dialog/LayerDialogTrigger.d.ts +5 -0
- package/build/components/layer-dialog/index.d.ts +34 -0
- package/build/components/layer-dialog/useLayerDialog.d.ts +6 -0
- package/build/components/tag-input/TagInput.d.ts +8 -0
- package/build/components/tag-input/TagInput.types.d.ts +175 -0
- package/build/components/tag-input/TagInputClearTrigger.d.ts +7 -0
- package/build/components/tag-input/TagInputConsumer.d.ts +7 -0
- package/build/components/tag-input/TagInputContext.d.ts +17 -0
- package/build/components/tag-input/TagInputControl.d.ts +5 -0
- package/build/components/tag-input/TagInputHiddenInput.d.ts +4 -0
- package/build/components/tag-input/TagInputInput.d.ts +5 -0
- package/build/components/tag-input/TagInputItem.d.ts +6 -0
- package/build/components/tag-input/TagInputItemConsumer.d.ts +7 -0
- package/build/components/tag-input/TagInputItemDeleteTrigger.d.ts +6 -0
- package/build/components/tag-input/TagInputItemInput.d.ts +5 -0
- package/build/components/tag-input/TagInputItemPreview.d.ts +5 -0
- package/build/components/tag-input/TagInputItemText.d.ts +5 -0
- package/build/components/tag-input/TagInputLabel.d.ts +6 -0
- package/build/components/tag-input/TagInputRootProvider.d.ts +10 -0
- package/build/components/tag-input/index.d.ts +73 -0
- package/build/components/tag-input/useTagInput.d.ts +2 -0
- package/build/main.cjs.js +73 -73
- package/build/main.esm.js +71 -71
- package/build/styles/main.css +1 -1
- package/package.json +1 -1
|
@@ -59,12 +59,14 @@ export * from "./highlight";
|
|
|
59
59
|
export * from "./hover-card";
|
|
60
60
|
export * from "./icon-button";
|
|
61
61
|
export * from "./image";
|
|
62
|
+
export * from "./inline-edit";
|
|
62
63
|
export * from "./inline-message";
|
|
63
64
|
export * from "./json-tree-view";
|
|
64
65
|
export * from "./keybinding-hint";
|
|
65
66
|
export * from "./label";
|
|
66
67
|
export * from "./label-group";
|
|
67
68
|
export * from "./layer-card";
|
|
69
|
+
export * from "./layer-dialog";
|
|
68
70
|
export * from "./link";
|
|
69
71
|
export * from "./list";
|
|
70
72
|
export * from "./map";
|
|
@@ -115,6 +117,7 @@ export * from "./swap";
|
|
|
115
117
|
export * from "./switch";
|
|
116
118
|
export * from "./table-of-contents";
|
|
117
119
|
export * from "./tabs";
|
|
120
|
+
export * from "./tag-input";
|
|
118
121
|
export * from "./text";
|
|
119
122
|
export * from "./text-input";
|
|
120
123
|
export * from "./textarea";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const _default: (props: Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof import("./InlineEdit.types").UseInlineEditProps> & import("./InlineEdit.types").UseInlineEditProps & {
|
|
3
|
+
size?: import("..").TextInputSize;
|
|
4
|
+
block?: boolean;
|
|
5
|
+
contrast?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
} & React.RefAttributes<any>) => React.ReactNode;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import type { PolymorphicProps } from "../../utilities/polymorphic";
|
|
3
|
+
import type { ButtonSize, ButtonVariant, ButtonVisual } from "../button";
|
|
4
|
+
import type { TextInputSize } from "../text-input/TextInput.types";
|
|
5
|
+
export type InlineEditActivationMode = "focus" | "click" | "dblclick" | "none";
|
|
6
|
+
export type InlineEditSubmitMode = "enter" | "blur" | "both" | "none";
|
|
7
|
+
export type InlineEditPlaceholder = string | {
|
|
8
|
+
edit: string;
|
|
9
|
+
preview: string;
|
|
10
|
+
};
|
|
11
|
+
export type InlineEditInputElement = "input" | "textarea";
|
|
12
|
+
export type InlineEditIds = {
|
|
13
|
+
root?: string;
|
|
14
|
+
label?: string;
|
|
15
|
+
area?: string;
|
|
16
|
+
input?: string;
|
|
17
|
+
preview?: string;
|
|
18
|
+
control?: string;
|
|
19
|
+
editTrigger?: string;
|
|
20
|
+
submitTrigger?: string;
|
|
21
|
+
cancelTrigger?: string;
|
|
22
|
+
};
|
|
23
|
+
export type UseInlineEditProps = {
|
|
24
|
+
value?: string;
|
|
25
|
+
defaultValue?: string;
|
|
26
|
+
edit?: boolean;
|
|
27
|
+
defaultEdit?: boolean;
|
|
28
|
+
activationMode?: InlineEditActivationMode;
|
|
29
|
+
submitMode?: InlineEditSubmitMode;
|
|
30
|
+
selectOnFocus?: boolean;
|
|
31
|
+
placeholder?: InlineEditPlaceholder;
|
|
32
|
+
maxLength?: number;
|
|
33
|
+
autoResize?: boolean;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
readOnly?: boolean;
|
|
36
|
+
required?: boolean;
|
|
37
|
+
invalid?: boolean;
|
|
38
|
+
name?: string;
|
|
39
|
+
form?: string;
|
|
40
|
+
id?: string;
|
|
41
|
+
ids?: InlineEditIds;
|
|
42
|
+
returnFocusRef?: React.RefObject<HTMLElement | null>;
|
|
43
|
+
onValueChange?: (value: string) => void;
|
|
44
|
+
onValueCommit?: (value: string) => void;
|
|
45
|
+
onValueRevert?: (value: string) => void;
|
|
46
|
+
onEditChange?: (edit: boolean) => void;
|
|
47
|
+
};
|
|
48
|
+
export type UseInlineEditReturn = {
|
|
49
|
+
editing: boolean;
|
|
50
|
+
empty: boolean;
|
|
51
|
+
value: string;
|
|
52
|
+
valueText: string;
|
|
53
|
+
placeholder?: string;
|
|
54
|
+
activationMode: InlineEditActivationMode;
|
|
55
|
+
autoResize: boolean;
|
|
56
|
+
maxLength?: number;
|
|
57
|
+
disabled: boolean;
|
|
58
|
+
readOnly: boolean;
|
|
59
|
+
required: boolean;
|
|
60
|
+
invalid: boolean;
|
|
61
|
+
name?: string;
|
|
62
|
+
form?: string;
|
|
63
|
+
ids: Required<InlineEditIds>;
|
|
64
|
+
describedBy?: string;
|
|
65
|
+
setValue: (value: string) => void;
|
|
66
|
+
clearValue: () => void;
|
|
67
|
+
edit: () => void;
|
|
68
|
+
submit: () => void;
|
|
69
|
+
cancel: () => void;
|
|
70
|
+
focus: () => void;
|
|
71
|
+
rootRef: React.RefObject<HTMLDivElement | null>;
|
|
72
|
+
handleInputChange: (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
73
|
+
handleInputKeyDown: (event: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
74
|
+
handlePreviewFocus: () => void;
|
|
75
|
+
handlePreviewClick: () => void;
|
|
76
|
+
handlePreviewDoubleClick: () => void;
|
|
77
|
+
handlePreviewKeyDown: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
78
|
+
};
|
|
79
|
+
type InlineEditFieldProps = {
|
|
80
|
+
size?: TextInputSize;
|
|
81
|
+
block?: boolean;
|
|
82
|
+
contrast?: boolean;
|
|
83
|
+
className?: string;
|
|
84
|
+
};
|
|
85
|
+
export type InlineEditProps = Omit<React.ComponentPropsWithoutRef<"div">, keyof UseInlineEditProps> & UseInlineEditProps & InlineEditFieldProps;
|
|
86
|
+
export type InlineEditRootProviderProps = Omit<React.ComponentPropsWithoutRef<"div">, "defaultValue"> & InlineEditFieldProps & {
|
|
87
|
+
value: UseInlineEditReturn;
|
|
88
|
+
};
|
|
89
|
+
export type InlineEditLabelProps = React.ComponentPropsWithoutRef<"label"> & {
|
|
90
|
+
visuallyHidden?: boolean;
|
|
91
|
+
className?: string;
|
|
92
|
+
};
|
|
93
|
+
export type InlineEditAreaProps = React.ComponentPropsWithoutRef<"div"> & {
|
|
94
|
+
className?: string;
|
|
95
|
+
};
|
|
96
|
+
export type InlineEditInputProps<As extends InlineEditInputElement = "input"> = Omit<PolymorphicProps<As, "input", {
|
|
97
|
+
className?: string;
|
|
98
|
+
}>, "value" | "defaultValue">;
|
|
99
|
+
export type InlineEditPreviewProps<As extends React.ElementType = "span"> = PolymorphicProps<As, "span", {
|
|
100
|
+
className?: string;
|
|
101
|
+
}>;
|
|
102
|
+
export type InlineEditControlProps = React.ComponentPropsWithoutRef<"div"> & {
|
|
103
|
+
className?: string;
|
|
104
|
+
};
|
|
105
|
+
type InlineEditTriggerProps = Omit<React.ComponentPropsWithoutRef<"button">, "type" | "aria-label" | "aria-labelledby"> & {
|
|
106
|
+
variant?: ButtonVariant;
|
|
107
|
+
size?: ButtonSize;
|
|
108
|
+
icon?: ButtonVisual;
|
|
109
|
+
label?: string;
|
|
110
|
+
className?: string;
|
|
111
|
+
};
|
|
112
|
+
export type InlineEditEditTriggerProps = InlineEditTriggerProps;
|
|
113
|
+
export type InlineEditSubmitTriggerProps = InlineEditTriggerProps;
|
|
114
|
+
export type InlineEditCancelTriggerProps = InlineEditTriggerProps;
|
|
115
|
+
export type InlineEditContextValue = Partial<UseInlineEditReturn> & Omit<InlineEditFieldProps, "className">;
|
|
116
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const _default: (props: Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "type" | "aria-label" | "aria-labelledby"> & {
|
|
3
|
+
variant?: import("..").ButtonVariant;
|
|
4
|
+
size?: import("..").ButtonSize;
|
|
5
|
+
icon?: import("..").ButtonVisual;
|
|
6
|
+
label?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
} & React.RefAttributes<any>) => React.ReactNode;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { InlineEditContextValue } from "./InlineEdit.types";
|
|
2
|
+
export declare const InlineEditContext: import("react").Context<InlineEditContextValue>;
|
|
3
|
+
export declare const useInlineEditContext: () => InlineEditContextValue;
|
|
4
|
+
export declare const getStateAttributes: ({ editing, disabled, readOnly, required, invalid, }: InlineEditContextValue) => {
|
|
5
|
+
"data-editing": true | undefined;
|
|
6
|
+
"data-disabled": true | undefined;
|
|
7
|
+
"data-readonly": true | undefined;
|
|
8
|
+
"data-required": true | undefined;
|
|
9
|
+
"data-invalid": true | undefined;
|
|
10
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const _default: (props: Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "type" | "aria-label" | "aria-labelledby"> & {
|
|
3
|
+
variant?: import("..").ButtonVariant;
|
|
4
|
+
size?: import("..").ButtonSize;
|
|
5
|
+
icon?: import("..").ButtonVisual;
|
|
6
|
+
label?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
} & React.RefAttributes<any>) => React.ReactNode;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { InlineEditInputElement, InlineEditInputProps } from "./InlineEdit.types";
|
|
3
|
+
declare const _default: <As extends InlineEditInputElement = "input">(props: InlineEditInputProps<As> & React.RefAttributes<any>) => React.ReactNode;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const _default: (props: Omit<React.DetailedHTMLProps<React.LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & {
|
|
3
|
+
visuallyHidden?: boolean;
|
|
4
|
+
className?: string;
|
|
5
|
+
} & React.RefAttributes<any>) => React.ReactNode;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const _default: <As extends React.ElementType = "span">(props: import("../../utilities/polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "span" : As> & {
|
|
3
|
+
className?: string;
|
|
4
|
+
}, "as"> & {
|
|
5
|
+
as?: As | undefined;
|
|
6
|
+
} & React.RefAttributes<any>) => React.ReactNode;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const _default: (props: Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "defaultValue"> & {
|
|
3
|
+
size?: import("..").TextInputSize;
|
|
4
|
+
block?: boolean;
|
|
5
|
+
contrast?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
} & {
|
|
8
|
+
value: import("./InlineEdit.types").UseInlineEditReturn;
|
|
9
|
+
} & React.RefAttributes<any>) => React.ReactNode;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const _default: (props: Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "type" | "aria-label" | "aria-labelledby"> & {
|
|
3
|
+
variant?: import("..").ButtonVariant;
|
|
4
|
+
size?: import("..").ButtonSize;
|
|
5
|
+
icon?: import("..").ButtonVisual;
|
|
6
|
+
label?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
} & React.RefAttributes<any>) => React.ReactNode;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import InlineEditArea from "./InlineEditArea";
|
|
2
|
+
import InlineEditCancelTrigger from "./InlineEditCancelTrigger";
|
|
3
|
+
import InlineEditControl from "./InlineEditControl";
|
|
4
|
+
import InlineEditEditTrigger from "./InlineEditEditTrigger";
|
|
5
|
+
import InlineEditInput from "./InlineEditInput";
|
|
6
|
+
import InlineEditLabel from "./InlineEditLabel";
|
|
7
|
+
import InlineEditPreview from "./InlineEditPreview";
|
|
8
|
+
import InlineEditRootProvider from "./InlineEditRootProvider";
|
|
9
|
+
import InlineEditSubmitTrigger from "./InlineEditSubmitTrigger";
|
|
10
|
+
export declare const InlineEdit: ((props: Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof import("./InlineEdit.types").UseInlineEditProps> & import("./InlineEdit.types").UseInlineEditProps & {
|
|
11
|
+
size?: import("..").TextInputSize;
|
|
12
|
+
block?: boolean;
|
|
13
|
+
contrast?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
} & import("react").RefAttributes<any>) => React.ReactNode) & {
|
|
16
|
+
Root: (props: Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof import("./InlineEdit.types").UseInlineEditProps> & import("./InlineEdit.types").UseInlineEditProps & {
|
|
17
|
+
size?: import("..").TextInputSize;
|
|
18
|
+
block?: boolean;
|
|
19
|
+
contrast?: boolean;
|
|
20
|
+
className?: string;
|
|
21
|
+
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
22
|
+
RootProvider: (props: Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "defaultValue"> & {
|
|
23
|
+
size?: import("..").TextInputSize;
|
|
24
|
+
block?: boolean;
|
|
25
|
+
contrast?: boolean;
|
|
26
|
+
className?: string;
|
|
27
|
+
} & {
|
|
28
|
+
value: import("./InlineEdit.types").UseInlineEditReturn;
|
|
29
|
+
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
30
|
+
Label: (props: Omit<import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, "ref"> & {
|
|
31
|
+
visuallyHidden?: boolean;
|
|
32
|
+
className?: string;
|
|
33
|
+
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
34
|
+
Area: (props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
35
|
+
className?: string;
|
|
36
|
+
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
37
|
+
Input: <As extends import("./InlineEdit.types").InlineEditInputElement = "input">(props: import("./InlineEdit.types").InlineEditInputProps<As> & import("react").RefAttributes<any>) => React.ReactNode;
|
|
38
|
+
Preview: <As extends React.ElementType = "span">(props: import("../../utilities/polymorphic").DistributiveOmit<import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "span" : As> & {
|
|
39
|
+
className?: string;
|
|
40
|
+
}, "as"> & {
|
|
41
|
+
as?: As | undefined;
|
|
42
|
+
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
43
|
+
Control: (props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
44
|
+
className?: string;
|
|
45
|
+
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
46
|
+
EditTrigger: (props: Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "type" | "aria-label" | "aria-labelledby"> & {
|
|
47
|
+
variant?: import("..").ButtonVariant;
|
|
48
|
+
size?: import("..").ButtonSize;
|
|
49
|
+
icon?: import("..").ButtonVisual;
|
|
50
|
+
label?: string;
|
|
51
|
+
className?: string;
|
|
52
|
+
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
53
|
+
SubmitTrigger: (props: Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "type" | "aria-label" | "aria-labelledby"> & {
|
|
54
|
+
variant?: import("..").ButtonVariant;
|
|
55
|
+
size?: import("..").ButtonSize;
|
|
56
|
+
icon?: import("..").ButtonVisual;
|
|
57
|
+
label?: string;
|
|
58
|
+
className?: string;
|
|
59
|
+
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
60
|
+
CancelTrigger: (props: Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "type" | "aria-label" | "aria-labelledby"> & {
|
|
61
|
+
variant?: import("..").ButtonVariant;
|
|
62
|
+
size?: import("..").ButtonSize;
|
|
63
|
+
icon?: import("..").ButtonVisual;
|
|
64
|
+
label?: string;
|
|
65
|
+
className?: string;
|
|
66
|
+
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
67
|
+
};
|
|
68
|
+
export { InlineEditRootProvider, InlineEditLabel, InlineEditArea, InlineEditInput, InlineEditPreview, InlineEditControl, InlineEditEditTrigger, InlineEditSubmitTrigger, InlineEditCancelTrigger, };
|
|
69
|
+
export { InlineEditContext, useInlineEditContext } from "./InlineEditContext";
|
|
70
|
+
export { useInlineEdit } from "./useInlineEdit";
|
|
71
|
+
export * from "./InlineEdit.types";
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import type { ButtonProps } from "../button";
|
|
3
|
+
export type LayerDialogOpenChangeGesture = "trigger-press" | "close-button" | "dismiss-button" | "escape" | "click-outside" | "swipe" | "imperative";
|
|
4
|
+
export type LayerDialogSize = "small" | "medium" | "large" | "xlarge";
|
|
5
|
+
export type LayerDialogVerticalAlign = "top" | "center";
|
|
6
|
+
export type LayerDialogActionVariant = "primary" | "danger";
|
|
7
|
+
export type LayerDialogInstance = {
|
|
8
|
+
close: () => void;
|
|
9
|
+
};
|
|
10
|
+
export type LayerDialogProps = {
|
|
11
|
+
open?: boolean;
|
|
12
|
+
defaultOpen?: boolean;
|
|
13
|
+
onOpenChange?: (open: boolean, gesture: LayerDialogOpenChangeGesture) => void;
|
|
14
|
+
dismissDisabled?: boolean;
|
|
15
|
+
modal?: boolean;
|
|
16
|
+
disablePointerDismissal?: boolean;
|
|
17
|
+
actionsRef?: React.Ref<LayerDialogInstance | null>;
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
};
|
|
20
|
+
export type LayerDialogAlertProps = LayerDialogProps;
|
|
21
|
+
export type LayerDialogTriggerProps<As extends React.ElementType = "button"> = ButtonProps<As>;
|
|
22
|
+
export type LayerDialogContentProps = {
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
size?: LayerDialogSize;
|
|
25
|
+
verticalAlign?: LayerDialogVerticalAlign;
|
|
26
|
+
closeLabel?: string;
|
|
27
|
+
portalContainerName?: string;
|
|
28
|
+
initialFocusRef?: React.RefObject<HTMLElement | null>;
|
|
29
|
+
returnFocusRef?: React.RefObject<HTMLElement | null>;
|
|
30
|
+
className?: string;
|
|
31
|
+
};
|
|
32
|
+
export type LayerDialogTitleProps = Omit<React.ComponentPropsWithoutRef<"h2">, "id"> & {
|
|
33
|
+
className?: string;
|
|
34
|
+
};
|
|
35
|
+
export type LayerDialogDescriptionProps = Omit<React.ComponentPropsWithoutRef<"p">, "id"> & {
|
|
36
|
+
className?: string;
|
|
37
|
+
};
|
|
38
|
+
export type LayerDialogBodyProps = {
|
|
39
|
+
children?: React.ReactNode;
|
|
40
|
+
className?: string;
|
|
41
|
+
};
|
|
42
|
+
export type LayerDialogActionsProps = {
|
|
43
|
+
children: React.ReactNode;
|
|
44
|
+
dismissLabel?: string;
|
|
45
|
+
className?: string;
|
|
46
|
+
};
|
|
47
|
+
export type LayerDialogActionProps = Omit<ButtonProps, "as" | "variant" | "size" | "block" | "children"> & {
|
|
48
|
+
children: React.ReactNode;
|
|
49
|
+
variant?: LayerDialogActionVariant;
|
|
50
|
+
menu?: React.ReactNode[];
|
|
51
|
+
menuLabel?: string;
|
|
52
|
+
};
|
|
53
|
+
export type LayerDialogContextValue = {
|
|
54
|
+
open: boolean;
|
|
55
|
+
setOpen: (open: boolean, gesture: LayerDialogOpenChangeGesture) => void;
|
|
56
|
+
dismiss: (gesture: LayerDialogOpenChangeGesture) => void;
|
|
57
|
+
alert: boolean;
|
|
58
|
+
modal: boolean;
|
|
59
|
+
dismissDisabled: boolean;
|
|
60
|
+
pointerDismissal: boolean;
|
|
61
|
+
narrow: boolean;
|
|
62
|
+
popupId: string;
|
|
63
|
+
titleId: string;
|
|
64
|
+
descriptionId: string;
|
|
65
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const _default: (props: Omit<import("..").ButtonProps, "size" | "as" | "children" | "variant" | "block"> & {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
variant?: import("./LayerDialog.types").LayerDialogActionVariant;
|
|
5
|
+
menu?: React.ReactNode[];
|
|
6
|
+
menuLabel?: string;
|
|
7
|
+
} & React.RefAttributes<any>) => React.ReactNode;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { LayerDialogAlertProps } from "./LayerDialog.types";
|
|
3
|
+
declare function LayerDialogAlert(props: LayerDialogAlertProps): React.JSX.Element;
|
|
4
|
+
declare namespace LayerDialogAlert {
|
|
5
|
+
var displayName: string;
|
|
6
|
+
}
|
|
7
|
+
export default LayerDialogAlert;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import type { LayerDialogContextValue } from "./LayerDialog.types";
|
|
3
|
+
export declare const LayerDialogContext: React.Context<LayerDialogContextValue>;
|
|
4
|
+
export declare const useLayerDialogContext: () => LayerDialogContextValue;
|
|
5
|
+
export type LayerDialogBodySlots = {
|
|
6
|
+
title: React.ReactNode;
|
|
7
|
+
description: React.ReactNode;
|
|
8
|
+
actions: React.ReactNode;
|
|
9
|
+
showCloseButton: boolean;
|
|
10
|
+
closeLabel: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const LayerDialogBodySlotsContext: React.Context<LayerDialogBodySlots>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const _default: (props: Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, "id"> & {
|
|
3
|
+
className?: string;
|
|
4
|
+
} & React.RefAttributes<any>) => React.ReactNode;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { UsePresenceReturn } from "../presence";
|
|
3
|
+
import type { LayerDialogContentProps } from "./LayerDialog.types";
|
|
4
|
+
declare const _default: (props: Omit<LayerDialogContentProps, "children" | "closeLabel"> & {
|
|
5
|
+
presence: UsePresenceReturn;
|
|
6
|
+
actions?: React.ReactNode;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
} & React.RefAttributes<any>) => React.ReactNode;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const _default: (props: Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref">, "id"> & {
|
|
3
|
+
className?: string;
|
|
4
|
+
} & React.RefAttributes<any>) => React.ReactNode;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const _default: <As extends React.ElementType = "button">(props: import("../../utilities/polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "button" : As> & import("..").ButtonBaseProps & import("..").ButtonContentProps, "as"> & {
|
|
3
|
+
as?: As | undefined;
|
|
4
|
+
} & React.RefAttributes<any>) => React.ReactNode;
|
|
5
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import LayerDialogBase from "./LayerDialog";
|
|
2
|
+
import LayerDialogAction from "./LayerDialogAction";
|
|
3
|
+
import LayerDialogActions from "./LayerDialogActions";
|
|
4
|
+
import LayerDialogAlert from "./LayerDialogAlert";
|
|
5
|
+
import LayerDialogBody from "./LayerDialogBody";
|
|
6
|
+
import LayerDialogContent from "./LayerDialogContent";
|
|
7
|
+
import LayerDialogDescription from "./LayerDialogDescription";
|
|
8
|
+
import LayerDialogTitle from "./LayerDialogTitle";
|
|
9
|
+
import LayerDialogTrigger from "./LayerDialogTrigger";
|
|
10
|
+
export declare const LayerDialog: typeof LayerDialogBase & {
|
|
11
|
+
Root: typeof LayerDialogBase;
|
|
12
|
+
Alert: typeof LayerDialogAlert;
|
|
13
|
+
Trigger: <As extends React.ElementType = "button">(props: import("../../utilities/polymorphic").DistributiveOmit<import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "button" : As> & import("..").ButtonBaseProps & import("..").ButtonContentProps, "as"> & {
|
|
14
|
+
as?: As | undefined;
|
|
15
|
+
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
16
|
+
Content: (props: import("./LayerDialog.types").LayerDialogContentProps & import("react").RefAttributes<any>) => React.ReactNode;
|
|
17
|
+
Title: (props: Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref">, "id"> & {
|
|
18
|
+
className?: string;
|
|
19
|
+
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
20
|
+
Description: (props: Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref">, "id"> & {
|
|
21
|
+
className?: string;
|
|
22
|
+
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
23
|
+
Body: (props: import("./LayerDialog.types").LayerDialogBodyProps & import("react").RefAttributes<any>) => React.ReactNode;
|
|
24
|
+
Actions: (props: import("./LayerDialog.types").LayerDialogActionsProps & import("react").RefAttributes<any>) => React.ReactNode;
|
|
25
|
+
Action: (props: Omit<import("..").ButtonProps, "size" | "as" | "children" | "variant" | "block"> & {
|
|
26
|
+
children: React.ReactNode;
|
|
27
|
+
variant?: import("./LayerDialog.types").LayerDialogActionVariant;
|
|
28
|
+
menu?: React.ReactNode[];
|
|
29
|
+
menuLabel?: string;
|
|
30
|
+
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
31
|
+
};
|
|
32
|
+
export { LayerDialogAlert, LayerDialogTrigger, LayerDialogContent, LayerDialogTitle, LayerDialogDescription, LayerDialogBody, LayerDialogActions, LayerDialogAction, };
|
|
33
|
+
export { LayerDialogContext, useLayerDialogContext } from "./LayerDialogContext";
|
|
34
|
+
export * from "./LayerDialog.types";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { LayerDialogContextValue, LayerDialogProps } from "./LayerDialog.types";
|
|
2
|
+
type UseLayerDialogProps = Omit<LayerDialogProps, "children"> & {
|
|
3
|
+
alert: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare const useLayerDialog: (props: UseLayerDialogProps) => LayerDialogContextValue;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const _default: (props: Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, keyof import("./TagInput.types").UseTagInputProps> & import("./TagInput.types").UseTagInputProps & {
|
|
3
|
+
size?: import("..").TextInputSize;
|
|
4
|
+
block?: boolean;
|
|
5
|
+
contrast?: boolean;
|
|
6
|
+
className?: string;
|
|
7
|
+
} & React.RefAttributes<any>) => React.ReactNode;
|
|
8
|
+
export default _default;
|