@gamecrafters/base-ui 0.0.28 → 0.0.30
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/accordion/Accordion.d.ts +2 -0
- package/build/components/accordion/Accordion.types.d.ts +10 -0
- package/build/components/accordion/index.d.ts +2 -0
- package/build/components/badge/Badge.d.ts +13 -0
- package/build/components/badge/Badge.types.d.ts +13 -0
- package/build/components/badge/index.d.ts +2 -0
- package/build/components/clipboard/Clipboard.d.ts +10 -5
- package/build/components/clipboard/Clipboard.types.d.ts +38 -11
- package/build/components/clipboard/ClipboardContext.d.ts +1 -0
- package/build/components/clipboard/ClipboardCopyText.d.ts +9 -0
- package/build/components/clipboard/ClipboardIndicator.d.ts +4 -3
- package/build/components/clipboard/ClipboardLabel.d.ts +7 -0
- package/build/components/clipboard/ClipboardValueText.d.ts +7 -0
- package/build/components/clipboard/index.d.ts +58 -10
- package/build/components/clipboard/useClipboard.d.ts +3 -0
- package/build/components/collapsible/Collapsible.types.d.ts +8 -2
- package/build/components/collapsible/CollapsiblePanel.d.ts +9 -0
- package/build/components/collapsible/index.d.ts +19 -2
- package/build/components/index.d.ts +4 -1
- package/build/components/json-tree-view/JSONTreeView.d.ts +8 -0
- package/build/components/json-tree-view/JSONTreeView.types.d.ts +47 -0
- package/build/components/json-tree-view/JSONTreeViewContext.d.ts +3 -0
- package/build/components/json-tree-view/JSONTreeViewKey.d.ts +7 -0
- package/build/components/json-tree-view/JSONTreeViewNode.d.ts +7 -0
- package/build/components/json-tree-view/JSONTreeViewValue.d.ts +7 -0
- package/build/components/json-tree-view/index.d.ts +5 -0
- package/build/components/json-tree-view/jsonNodes.d.ts +5 -0
- package/build/components/json-tree-view/jsonTokens.d.ts +4 -0
- package/build/components/marquee/Marquee.d.ts +20 -6
- package/build/components/marquee/Marquee.types.d.ts +52 -19
- package/build/components/marquee/MarqueeContent.d.ts +7 -0
- package/build/components/marquee/MarqueeContext.d.ts +3 -0
- package/build/components/marquee/MarqueeEdge.d.ts +8 -0
- package/build/components/marquee/MarqueeItem.d.ts +7 -0
- package/build/components/marquee/MarqueeViewport.d.ts +7 -0
- package/build/components/marquee/index.d.ts +72 -2
- package/build/components/marquee/useMarquee.d.ts +2 -14
- package/build/components/resizable/Resizable.d.ts +7 -0
- package/build/components/resizable/Resizable.types.d.ts +23 -0
- package/build/components/{splitter → resizable}/index.d.ts +9 -9
- package/build/components/table-of-contents/TableOfContents.d.ts +14 -3
- package/build/components/table-of-contents/TableOfContents.types.d.ts +80 -21
- package/build/components/table-of-contents/TableOfContentsContent.d.ts +7 -0
- package/build/components/table-of-contents/TableOfContentsContext.d.ts +5 -0
- package/build/components/table-of-contents/TableOfContentsIndicator.d.ts +7 -0
- package/build/components/table-of-contents/TableOfContentsItem.d.ts +2 -2
- package/build/components/table-of-contents/TableOfContentsLink.d.ts +7 -0
- package/build/components/table-of-contents/TableOfContentsList.d.ts +3 -1
- package/build/components/table-of-contents/TableOfContentsNav.d.ts +8 -0
- package/build/components/table-of-contents/TableOfContentsTitle.d.ts +1 -1
- package/build/components/table-of-contents/headingScroll.d.ts +12 -0
- package/build/components/table-of-contents/index.d.ts +63 -13
- package/build/components/table-of-contents/useTableOfContents.d.ts +3 -0
- package/build/components/timer/Timer.d.ts +16 -0
- package/build/components/timer/Timer.types.d.ts +64 -0
- package/build/components/timer/TimerActionTrigger.d.ts +9 -0
- package/build/components/timer/TimerArea.d.ts +7 -0
- package/build/components/timer/TimerContext.d.ts +2 -0
- package/build/components/timer/TimerControl.d.ts +7 -0
- package/build/components/timer/TimerItem.d.ts +8 -0
- package/build/components/timer/TimerSeparator.d.ts +7 -0
- package/build/components/timer/index.d.ts +66 -0
- package/build/components/timer/timerDuration.d.ts +5 -0
- package/build/components/timer/useTimer.d.ts +3 -0
- package/build/hooks/useIsomorphicLayoutEffect.d.ts +2 -2
- package/build/lib/hotkey/hotkey.d.ts +48 -0
- package/build/lib/hotkey/index.d.ts +27 -0
- package/build/lib/hotkey/macos-symbol-layer.d.ts +6 -0
- package/build/lib/hotkey/macos-uppercase-layer.d.ts +6 -0
- package/build/lib/hotkey/radix-trie.d.ts +22 -0
- package/build/lib/hotkey/sequence.d.ts +39 -0
- package/build/lib/hotkey/utilities.d.ts +21 -0
- package/build/main.cjs.js +70 -70
- package/build/main.esm.js +68 -68
- package/build/styles/main.css +1 -1
- package/package.json +1 -1
- package/build/components/splitter/Splitter.d.ts +0 -7
- package/build/components/splitter/Splitter.types.d.ts +0 -23
- package/build/components/table-of-contents/TableOfContentsGroup.d.ts +0 -9
- package/build/components/table-of-contents/useTableOfContentsActiveId.d.ts +0 -2
- /package/build/components/{collapsible/CollapsibleContent.d.ts → clipboard/ClipboardControl.d.ts} +0 -0
- /package/build/components/{splitter/SplitterPanel.d.ts → resizable/ResizablePanel.d.ts} +0 -0
- /package/build/components/{splitter/SplitterResizeTrigger.d.ts → resizable/ResizableResizeTrigger.d.ts} +0 -0
- /package/build/components/{splitter/SplitterResizeTriggerIndicator.d.ts → resizable/ResizableResizeTriggerIndicator.d.ts} +0 -0
- /package/build/components/{splitter/SplitterResizeTriggerSeparator.d.ts → resizable/ResizableResizeTriggerSeparator.d.ts} +0 -0
|
@@ -5,6 +5,8 @@ declare const _default: <As extends React.ElementType = "div">(props: Omit<impor
|
|
|
5
5
|
multiple?: boolean;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
headingLevel?: import("./Accordion.types").AccordionHeadingLevel;
|
|
8
|
+
keepMounted?: boolean;
|
|
9
|
+
hiddenUntilFound?: boolean;
|
|
8
10
|
className?: string;
|
|
9
11
|
}>, "onChange"> & {
|
|
10
12
|
onChange?: (value: string[]) => void;
|
|
@@ -7,6 +7,8 @@ export type AccordionProps<As extends React.ElementType = "div"> = Omit<Polymorp
|
|
|
7
7
|
multiple?: boolean;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
headingLevel?: AccordionHeadingLevel;
|
|
10
|
+
keepMounted?: boolean;
|
|
11
|
+
hiddenUntilFound?: boolean;
|
|
10
12
|
className?: string;
|
|
11
13
|
}>, "onChange"> & {
|
|
12
14
|
onChange?: (value: string[]) => void;
|
|
@@ -25,14 +27,22 @@ export type AccordionPanelProps<As extends React.ElementType = "div"> = Polymorp
|
|
|
25
27
|
}>;
|
|
26
28
|
export type AccordionContextValue = {
|
|
27
29
|
open?: string[];
|
|
30
|
+
setOpen?: (value: string, open: boolean) => void;
|
|
28
31
|
toggle?: (value: string) => void;
|
|
29
32
|
disabled?: boolean;
|
|
30
33
|
headingLevel?: AccordionHeadingLevel;
|
|
34
|
+
keepMounted?: boolean;
|
|
35
|
+
hiddenUntilFound?: boolean;
|
|
31
36
|
};
|
|
32
37
|
export type AccordionItemContextValue = {
|
|
33
38
|
headerId?: string;
|
|
34
39
|
panelId?: string;
|
|
35
40
|
isOpen?: boolean;
|
|
36
41
|
disabled?: boolean;
|
|
42
|
+
keepMounted?: boolean;
|
|
43
|
+
hiddenUntilFound?: boolean;
|
|
44
|
+
isPanelPresent?: boolean;
|
|
45
|
+
setPanelPresent?: (isPresent: boolean) => void;
|
|
46
|
+
setOpen?: (open: boolean) => void;
|
|
37
47
|
toggle?: () => void;
|
|
38
48
|
};
|
|
@@ -7,6 +7,8 @@ export declare const Accordion: (<As extends React.ElementType = "div">(props: O
|
|
|
7
7
|
multiple?: boolean;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
headingLevel?: import("./Accordion.types").AccordionHeadingLevel;
|
|
10
|
+
keepMounted?: boolean;
|
|
11
|
+
hiddenUntilFound?: boolean;
|
|
10
12
|
className?: string;
|
|
11
13
|
}>, "onChange"> & {
|
|
12
14
|
onChange?: (value: string[]) => void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { ButtonVisual } from "../button";
|
|
3
|
+
import type { BadgeAppearance, BadgeSize, BadgeVariant } from "./Badge.types";
|
|
4
|
+
declare const _default: <As extends React.ElementType = "span">(props: import("../../utilities/polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "span" : As> & {
|
|
5
|
+
variant?: BadgeVariant;
|
|
6
|
+
appearance?: BadgeAppearance;
|
|
7
|
+
size?: BadgeSize;
|
|
8
|
+
leadingVisual?: ButtonVisual;
|
|
9
|
+
className?: string;
|
|
10
|
+
}, "as"> & {
|
|
11
|
+
as?: As | undefined;
|
|
12
|
+
} & React.RefAttributes<any>) => React.ReactNode;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import type { PolymorphicProps } from "../../utilities/polymorphic";
|
|
3
|
+
import type { ButtonVisual } from "../button";
|
|
4
|
+
export type BadgeVariant = "default" | "primary" | "accent" | "success" | "attention" | "severe" | "danger" | "done" | "sponsors";
|
|
5
|
+
export type BadgeAppearance = "filled" | "dot";
|
|
6
|
+
export type BadgeSize = "small" | "medium" | "large";
|
|
7
|
+
export type BadgeProps<As extends React.ElementType = "span"> = PolymorphicProps<As, "span", {
|
|
8
|
+
variant?: BadgeVariant;
|
|
9
|
+
appearance?: BadgeAppearance;
|
|
10
|
+
size?: BadgeSize;
|
|
11
|
+
leadingVisual?: ButtonVisual;
|
|
12
|
+
className?: string;
|
|
13
|
+
}>;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
declare const _default: <As extends React.ElementType = "div">(props:
|
|
3
|
-
value
|
|
2
|
+
declare const _default: <As extends React.ElementType = "div">(props: import("../../utilities/polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "div" : As> & {
|
|
3
|
+
value?: string;
|
|
4
|
+
defaultValue?: string;
|
|
4
5
|
timeout?: number;
|
|
5
6
|
disabled?: boolean;
|
|
6
|
-
|
|
7
|
+
} & {
|
|
8
|
+
copiedAnnouncement?: string | null;
|
|
7
9
|
className?: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
+
}, "as"> & {
|
|
11
|
+
as?: As | undefined;
|
|
12
|
+
} & {
|
|
13
|
+
onValueChange?: (value: string) => void;
|
|
14
|
+
onStatusChange?: (copied: boolean) => void;
|
|
10
15
|
onCopyError?: (error: unknown) => void;
|
|
11
16
|
} & React.RefAttributes<any>) => React.ReactNode;
|
|
12
17
|
export default _default;
|
|
@@ -2,19 +2,37 @@ import type * as React from "react";
|
|
|
2
2
|
import type { PolymorphicProps } from "../../utilities/polymorphic";
|
|
3
3
|
import type { ButtonSize, ButtonVariant } from "../button";
|
|
4
4
|
import type { TextInputProps } from "../text-input/TextInput.types";
|
|
5
|
-
type
|
|
6
|
-
value
|
|
5
|
+
type ClipboardStoreProps = {
|
|
6
|
+
value?: string;
|
|
7
|
+
defaultValue?: string;
|
|
7
8
|
timeout?: number;
|
|
8
9
|
disabled?: boolean;
|
|
9
|
-
copiedAnnouncement?: string;
|
|
10
|
-
className?: string;
|
|
11
10
|
};
|
|
12
11
|
type ClipboardCallbacks = {
|
|
13
|
-
|
|
12
|
+
onValueChange?: (value: string) => void;
|
|
13
|
+
onStatusChange?: (copied: boolean) => void;
|
|
14
14
|
onCopyError?: (error: unknown) => void;
|
|
15
15
|
};
|
|
16
|
-
export type
|
|
16
|
+
export type UseClipboardProps = ClipboardStoreProps & ClipboardCallbacks;
|
|
17
|
+
export type UseClipboardReturn = {
|
|
18
|
+
value: string;
|
|
19
|
+
copied: boolean;
|
|
20
|
+
disabled: boolean;
|
|
21
|
+
copy: () => void;
|
|
22
|
+
setValue: (value: string) => void;
|
|
23
|
+
};
|
|
24
|
+
type ClipboardOwnProps = ClipboardStoreProps & {
|
|
25
|
+
copiedAnnouncement?: string | null;
|
|
26
|
+
className?: string;
|
|
27
|
+
};
|
|
28
|
+
export type ClipboardProps<As extends React.ElementType = "div"> = PolymorphicProps<As, "div", ClipboardOwnProps> & ClipboardCallbacks;
|
|
17
29
|
export type ClipboardElementProps = ClipboardProps<"div">;
|
|
30
|
+
export type ClipboardControlProps<As extends React.ElementType = "div"> = PolymorphicProps<As, "div", {
|
|
31
|
+
className?: string;
|
|
32
|
+
}>;
|
|
33
|
+
export type ClipboardLabelProps<As extends React.ElementType = "label"> = PolymorphicProps<As, "label", {
|
|
34
|
+
className?: string;
|
|
35
|
+
}>;
|
|
18
36
|
export type ClipboardInputProps = Omit<TextInputProps, "value" | "defaultValue" | "onChange" | "readOnly" | "type">;
|
|
19
37
|
export type ClipboardTriggerProps = Omit<React.ComponentPropsWithoutRef<"button">, "type" | "aria-label" | "aria-labelledby"> & {
|
|
20
38
|
variant?: ButtonVariant;
|
|
@@ -22,16 +40,25 @@ export type ClipboardTriggerProps = Omit<React.ComponentPropsWithoutRef<"button"
|
|
|
22
40
|
label?: string;
|
|
23
41
|
className?: string;
|
|
24
42
|
};
|
|
25
|
-
export type ClipboardIndicatorProps
|
|
26
|
-
|
|
27
|
-
copiedIcon?: React.ElementType;
|
|
43
|
+
export type ClipboardIndicatorProps<As extends React.ElementType = "span"> = PolymorphicProps<As, "span", {
|
|
44
|
+
copied?: React.ReactNode;
|
|
28
45
|
className?: string;
|
|
29
|
-
}
|
|
46
|
+
}>;
|
|
47
|
+
export type ClipboardValueTextProps<As extends React.ElementType = "span"> = PolymorphicProps<As, "span", {
|
|
48
|
+
className?: string;
|
|
49
|
+
}>;
|
|
50
|
+
export type ClipboardCopyTextProps<As extends React.ElementType = "span"> = PolymorphicProps<As, "span", {
|
|
51
|
+
copied?: React.ReactNode;
|
|
52
|
+
visuallyHidden?: boolean;
|
|
53
|
+
className?: string;
|
|
54
|
+
}>;
|
|
30
55
|
export type ClipboardContextValue = {
|
|
31
56
|
value?: string;
|
|
32
57
|
copied?: boolean;
|
|
33
58
|
disabled?: boolean;
|
|
34
|
-
copy?: () => void;
|
|
35
59
|
inputId?: string;
|
|
60
|
+
setInputId?: (id: string | undefined) => void;
|
|
61
|
+
copy?: () => void;
|
|
62
|
+
setValue?: (value: string) => void;
|
|
36
63
|
};
|
|
37
64
|
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
copied?: React.ReactNode;
|
|
4
|
+
visuallyHidden?: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
}, "as"> & {
|
|
7
|
+
as?: As | undefined;
|
|
8
|
+
} & React.RefAttributes<any>) => React.ReactNode;
|
|
9
|
+
export default _default;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
declare const _default: (props: React.
|
|
3
|
-
|
|
4
|
-
copiedIcon?: React.ElementType;
|
|
2
|
+
declare const _default: <As extends React.ElementType = "span">(props: import("../../utilities/polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "span" : As> & {
|
|
3
|
+
copied?: React.ReactNode;
|
|
5
4
|
className?: string;
|
|
5
|
+
}, "as"> & {
|
|
6
|
+
as?: As | undefined;
|
|
6
7
|
} & React.RefAttributes<any>) => React.ReactNode;
|
|
7
8
|
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const _default: <As extends React.ElementType = "label">(props: import("../../utilities/polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "label" : As> & {
|
|
3
|
+
className?: string;
|
|
4
|
+
}, "as"> & {
|
|
5
|
+
as?: As | undefined;
|
|
6
|
+
} & React.RefAttributes<any>) => React.ReactNode;
|
|
7
|
+
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;
|
|
@@ -1,16 +1,50 @@
|
|
|
1
|
+
import ClipboardControl from "./ClipboardControl";
|
|
2
|
+
import ClipboardCopyText from "./ClipboardCopyText";
|
|
1
3
|
import ClipboardIndicator from "./ClipboardIndicator";
|
|
2
4
|
import ClipboardInput from "./ClipboardInput";
|
|
5
|
+
import ClipboardLabel from "./ClipboardLabel";
|
|
3
6
|
import ClipboardTrigger from "./ClipboardTrigger";
|
|
4
|
-
|
|
5
|
-
|
|
7
|
+
import ClipboardValueText from "./ClipboardValueText";
|
|
8
|
+
export declare const Clipboard: (<As extends React.ElementType = "div">(props: import("../../utilities/polymorphic").DistributiveOmit<import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "div" : As> & {
|
|
9
|
+
value?: string;
|
|
10
|
+
defaultValue?: string;
|
|
6
11
|
timeout?: number;
|
|
7
12
|
disabled?: boolean;
|
|
8
|
-
|
|
13
|
+
} & {
|
|
14
|
+
copiedAnnouncement?: string | null;
|
|
9
15
|
className?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
16
|
+
}, "as"> & {
|
|
17
|
+
as?: As | undefined;
|
|
18
|
+
} & {
|
|
19
|
+
onValueChange?: (value: string) => void;
|
|
20
|
+
onStatusChange?: (copied: boolean) => void;
|
|
12
21
|
onCopyError?: (error: unknown) => void;
|
|
13
22
|
} & import("react").RefAttributes<any>) => React.ReactNode) & {
|
|
23
|
+
Root: <As extends React.ElementType = "div">(props: import("../../utilities/polymorphic").DistributiveOmit<import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "div" : As> & {
|
|
24
|
+
value?: string;
|
|
25
|
+
defaultValue?: string;
|
|
26
|
+
timeout?: number;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
} & {
|
|
29
|
+
copiedAnnouncement?: string | null;
|
|
30
|
+
className?: string;
|
|
31
|
+
}, "as"> & {
|
|
32
|
+
as?: As | undefined;
|
|
33
|
+
} & {
|
|
34
|
+
onValueChange?: (value: string) => void;
|
|
35
|
+
onStatusChange?: (copied: boolean) => void;
|
|
36
|
+
onCopyError?: (error: unknown) => void;
|
|
37
|
+
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
38
|
+
Label: <As extends React.ElementType = "label">(props: import("../../utilities/polymorphic").DistributiveOmit<import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "label" : As> & {
|
|
39
|
+
className?: string;
|
|
40
|
+
}, "as"> & {
|
|
41
|
+
as?: As | undefined;
|
|
42
|
+
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
43
|
+
Control: <As extends React.ElementType = "div">(props: import("../../utilities/polymorphic").DistributiveOmit<import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "div" : As> & {
|
|
44
|
+
className?: string;
|
|
45
|
+
}, "as"> & {
|
|
46
|
+
as?: As | undefined;
|
|
47
|
+
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
14
48
|
Input: (props: import("./Clipboard.types").ClipboardInputProps & import("react").RefAttributes<any>) => React.ReactNode;
|
|
15
49
|
Trigger: (props: Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "type" | "aria-label" | "aria-labelledby"> & {
|
|
16
50
|
variant?: import("..").ButtonVariant;
|
|
@@ -18,13 +52,27 @@ export declare const Clipboard: (<As extends React.ElementType = "div">(props: O
|
|
|
18
52
|
label?: string;
|
|
19
53
|
className?: string;
|
|
20
54
|
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
21
|
-
Indicator: (props: import("react").
|
|
22
|
-
|
|
23
|
-
|
|
55
|
+
Indicator: <As extends React.ElementType = "span">(props: import("../../utilities/polymorphic").DistributiveOmit<import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "span" : As> & {
|
|
56
|
+
copied?: React.ReactNode;
|
|
57
|
+
className?: string;
|
|
58
|
+
}, "as"> & {
|
|
59
|
+
as?: As | undefined;
|
|
60
|
+
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
61
|
+
CopyText: <As extends React.ElementType = "span">(props: import("../../utilities/polymorphic").DistributiveOmit<import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "span" : As> & {
|
|
62
|
+
copied?: React.ReactNode;
|
|
63
|
+
visuallyHidden?: boolean;
|
|
64
|
+
className?: string;
|
|
65
|
+
}, "as"> & {
|
|
66
|
+
as?: As | undefined;
|
|
67
|
+
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
68
|
+
ValueText: <As extends React.ElementType = "span">(props: import("../../utilities/polymorphic").DistributiveOmit<import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "span" : As> & {
|
|
24
69
|
className?: string;
|
|
70
|
+
}, "as"> & {
|
|
71
|
+
as?: As | undefined;
|
|
25
72
|
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
26
73
|
};
|
|
27
|
-
export { ClipboardInput, ClipboardTrigger, ClipboardIndicator };
|
|
28
|
-
export { ClipboardContext } from "./ClipboardContext";
|
|
74
|
+
export { ClipboardLabel, ClipboardControl, ClipboardInput, ClipboardTrigger, ClipboardIndicator, ClipboardCopyText, ClipboardValueText, };
|
|
75
|
+
export { ClipboardContext, useClipboardContext } from "./ClipboardContext";
|
|
76
|
+
export { useClipboard } from "./useClipboard";
|
|
29
77
|
export { copyText } from "./copyText";
|
|
30
78
|
export * from "./Clipboard.types";
|
|
@@ -13,13 +13,19 @@ export type CollapsibleTriggerProps = React.ComponentPropsWithoutRef<"button"> &
|
|
|
13
13
|
indicator?: CollapsibleIndicatorPosition;
|
|
14
14
|
className?: string;
|
|
15
15
|
};
|
|
16
|
-
export type
|
|
16
|
+
export type CollapsiblePanelProps<As extends React.ElementType = "div"> = PolymorphicProps<As, "div", {
|
|
17
|
+
keepMounted?: boolean;
|
|
18
|
+
hiddenUntilFound?: boolean;
|
|
17
19
|
className?: string;
|
|
18
20
|
}>;
|
|
21
|
+
export type CollapsibleContentProps<As extends React.ElementType = "div"> = CollapsiblePanelProps<As>;
|
|
19
22
|
export type CollapsibleContextValue = {
|
|
20
23
|
triggerId?: string;
|
|
21
|
-
|
|
24
|
+
panelId?: string;
|
|
22
25
|
isOpen?: boolean;
|
|
23
26
|
disabled?: boolean;
|
|
27
|
+
isPanelPresent?: boolean;
|
|
28
|
+
setPanelPresent?: (isPresent: boolean) => void;
|
|
29
|
+
setOpen?: (open: boolean) => void;
|
|
24
30
|
toggle?: () => void;
|
|
25
31
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const _default: <As extends React.ElementType = "div">(props: import("../../utilities/polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "div" : As> & {
|
|
3
|
+
keepMounted?: boolean;
|
|
4
|
+
hiddenUntilFound?: boolean;
|
|
5
|
+
className?: string;
|
|
6
|
+
}, "as"> & {
|
|
7
|
+
as?: As | undefined;
|
|
8
|
+
} & React.RefAttributes<any>) => React.ReactNode;
|
|
9
|
+
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import CollapsiblePanel from "./CollapsiblePanel";
|
|
2
2
|
import CollapsibleTrigger from "./CollapsibleTrigger";
|
|
3
3
|
export declare const Collapsible: (<As extends React.ElementType = "div">(props: Omit<import("../../utilities/polymorphic").PolymorphicProps<As, "div", {
|
|
4
4
|
open?: boolean;
|
|
@@ -8,16 +8,33 @@ export declare const Collapsible: (<As extends React.ElementType = "div">(props:
|
|
|
8
8
|
}>, "onChange"> & {
|
|
9
9
|
onChange?: (open: boolean) => void;
|
|
10
10
|
} & import("react").RefAttributes<any>) => React.ReactNode) & {
|
|
11
|
+
Root: <As extends React.ElementType = "div">(props: Omit<import("../../utilities/polymorphic").PolymorphicProps<As, "div", {
|
|
12
|
+
open?: boolean;
|
|
13
|
+
defaultOpen?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
className?: string;
|
|
16
|
+
}>, "onChange"> & {
|
|
17
|
+
onChange?: (open: boolean) => void;
|
|
18
|
+
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
11
19
|
Trigger: (props: Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
|
|
12
20
|
indicator?: import("./Collapsible.types").CollapsibleIndicatorPosition;
|
|
13
21
|
className?: string;
|
|
14
22
|
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
23
|
+
Panel: <As extends React.ElementType = "div">(props: import("../../utilities/polymorphic").DistributiveOmit<import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "div" : As> & {
|
|
24
|
+
keepMounted?: boolean;
|
|
25
|
+
hiddenUntilFound?: boolean;
|
|
26
|
+
className?: string;
|
|
27
|
+
}, "as"> & {
|
|
28
|
+
as?: As | undefined;
|
|
29
|
+
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
15
30
|
Content: <As extends React.ElementType = "div">(props: import("../../utilities/polymorphic").DistributiveOmit<import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "div" : As> & {
|
|
31
|
+
keepMounted?: boolean;
|
|
32
|
+
hiddenUntilFound?: boolean;
|
|
16
33
|
className?: string;
|
|
17
34
|
}, "as"> & {
|
|
18
35
|
as?: As | undefined;
|
|
19
36
|
} & import("react").RefAttributes<any>) => React.ReactNode;
|
|
20
37
|
};
|
|
21
|
-
export { CollapsibleTrigger, CollapsibleContent };
|
|
38
|
+
export { CollapsibleTrigger, CollapsiblePanel, CollapsiblePanel as CollapsibleContent };
|
|
22
39
|
export { CollapsibleContext } from "./CollapsibleContext";
|
|
23
40
|
export * from "./Collapsible.types";
|
|
@@ -9,6 +9,7 @@ export * from "./attachment";
|
|
|
9
9
|
export * from "./autocomplete";
|
|
10
10
|
export * from "./avatar";
|
|
11
11
|
export * from "./avatar-stack";
|
|
12
|
+
export * from "./badge";
|
|
12
13
|
export * from "./banner";
|
|
13
14
|
export * from "./blankslate";
|
|
14
15
|
export * from "./blockquote";
|
|
@@ -57,6 +58,7 @@ export * from "./hover-card";
|
|
|
57
58
|
export * from "./icon-button";
|
|
58
59
|
export * from "./image";
|
|
59
60
|
export * from "./inline-message";
|
|
61
|
+
export * from "./json-tree-view";
|
|
60
62
|
export * from "./keybinding-hint";
|
|
61
63
|
export * from "./label";
|
|
62
64
|
export * from "./label-group";
|
|
@@ -89,6 +91,7 @@ export * from "./radio-card";
|
|
|
89
91
|
export * from "./radio-group";
|
|
90
92
|
export * from "./rating";
|
|
91
93
|
export * from "./relative-time";
|
|
94
|
+
export * from "./resizable";
|
|
92
95
|
export * from "./rich-text-editor";
|
|
93
96
|
export * from "./scrollable-region";
|
|
94
97
|
export * from "./segmented-control";
|
|
@@ -100,7 +103,6 @@ export * from "./skeleton-box";
|
|
|
100
103
|
export * from "./skeleton-text";
|
|
101
104
|
export * from "./slider";
|
|
102
105
|
export * from "./spinner";
|
|
103
|
-
export * from "./splitter";
|
|
104
106
|
export * from "./stack";
|
|
105
107
|
export * from "./state-label";
|
|
106
108
|
export * from "./statistic-card";
|
|
@@ -113,6 +115,7 @@ export * from "./text";
|
|
|
113
115
|
export * from "./text-input";
|
|
114
116
|
export * from "./textarea";
|
|
115
117
|
export * from "./timeline";
|
|
118
|
+
export * from "./timer";
|
|
116
119
|
export * from "./toast";
|
|
117
120
|
export * from "./toggle-switch";
|
|
118
121
|
export * from "./token";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare const _default: (props: Omit<import("..").TreeViewProps, "children"> & import("./JSONTreeView.types").JSONTreeViewOptions & {
|
|
3
|
+
data: unknown;
|
|
4
|
+
defaultExpandedDepth?: number;
|
|
5
|
+
renderValue?: import("./JSONTreeView.types").JSONTreeViewRenderValue;
|
|
6
|
+
className?: string;
|
|
7
|
+
} & React.RefAttributes<any>) => React.ReactNode;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import type { TreeViewProps } from "../tree-view";
|
|
3
|
+
export type JSONNodeType = "object" | "array" | "map" | "set" | "class" | "error" | "string" | "number" | "bigint" | "boolean" | "null" | "undefined" | "symbol" | "function" | "date" | "regex" | "circular";
|
|
4
|
+
export type JSONNode = {
|
|
5
|
+
id: string;
|
|
6
|
+
key?: string;
|
|
7
|
+
type: JSONNodeType;
|
|
8
|
+
value: unknown;
|
|
9
|
+
children?: JSONNode[];
|
|
10
|
+
nonEnumerable?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type JSONTokenKind = "bracket" | "constructor" | "separator" | "more";
|
|
13
|
+
export type JSONToken = {
|
|
14
|
+
text: string;
|
|
15
|
+
type?: JSONNodeType;
|
|
16
|
+
kind?: JSONTokenKind;
|
|
17
|
+
};
|
|
18
|
+
export type JSONTreeViewRenderValue = (token: JSONToken, node: JSONNode) => React.ReactNode | undefined;
|
|
19
|
+
export type JSONTreeViewOptions = {
|
|
20
|
+
maxPreviewItems?: number;
|
|
21
|
+
collapseStringsAfterLength?: number;
|
|
22
|
+
quotesOnKeys?: boolean;
|
|
23
|
+
groupArraysAfterLength?: number;
|
|
24
|
+
showNonEnumerable?: boolean;
|
|
25
|
+
};
|
|
26
|
+
type JSONTreeViewOwnProps = JSONTreeViewOptions & {
|
|
27
|
+
data: unknown;
|
|
28
|
+
defaultExpandedDepth?: number;
|
|
29
|
+
renderValue?: JSONTreeViewRenderValue;
|
|
30
|
+
className?: string;
|
|
31
|
+
};
|
|
32
|
+
export type JSONTreeViewProps = Omit<TreeViewProps, "children"> & JSONTreeViewOwnProps;
|
|
33
|
+
export type JSONTreeViewNodeProps = {
|
|
34
|
+
node: JSONNode;
|
|
35
|
+
depth: number;
|
|
36
|
+
};
|
|
37
|
+
export type JSONTreeViewKeyProps = {
|
|
38
|
+
node: JSONNode;
|
|
39
|
+
};
|
|
40
|
+
export type JSONTreeViewValueProps = {
|
|
41
|
+
node: JSONNode;
|
|
42
|
+
};
|
|
43
|
+
export type JSONTreeViewContextValue = JSONTreeViewOptions & {
|
|
44
|
+
defaultExpandedDepth?: number;
|
|
45
|
+
renderValue?: JSONTreeViewRenderValue;
|
|
46
|
+
};
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { JSONTreeViewKeyProps } from "./JSONTreeView.types";
|
|
3
|
+
declare function JSONTreeViewKey(props: JSONTreeViewKeyProps): React.JSX.Element | null;
|
|
4
|
+
declare namespace JSONTreeViewKey {
|
|
5
|
+
var displayName: string;
|
|
6
|
+
}
|
|
7
|
+
export default JSONTreeViewKey;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { JSONTreeViewNodeProps } from "./JSONTreeView.types";
|
|
3
|
+
declare function JSONTreeViewNode(props: JSONTreeViewNodeProps): React.JSX.Element;
|
|
4
|
+
declare namespace JSONTreeViewNode {
|
|
5
|
+
var displayName: string;
|
|
6
|
+
}
|
|
7
|
+
export default JSONTreeViewNode;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { JSONTreeViewValueProps } from "./JSONTreeView.types";
|
|
3
|
+
declare function JSONTreeViewValue(props: JSONTreeViewValueProps): React.JSX.Element;
|
|
4
|
+
declare namespace JSONTreeViewValue {
|
|
5
|
+
var displayName: string;
|
|
6
|
+
}
|
|
7
|
+
export default JSONTreeViewValue;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as JSONTreeView } from "./JSONTreeView";
|
|
2
|
+
export { JSONTreeViewContext, useJSONTreeViewContext } from "./JSONTreeViewContext";
|
|
3
|
+
export { toJSONNodes, DEFAULT_MAX_PREVIEW_ITEMS } from "./jsonNodes";
|
|
4
|
+
export { toValueTokens } from "./jsonTokens";
|
|
5
|
+
export * from "./JSONTreeView.types";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { JSONNode, JSONNodeType, JSONTreeViewOptions } from "./JSONTreeView.types";
|
|
2
|
+
export declare const DEFAULT_MAX_PREVIEW_ITEMS = 5;
|
|
3
|
+
export declare const typeOf: (value: unknown) => JSONNodeType;
|
|
4
|
+
export declare const constructorNameOf: (value: unknown) => string;
|
|
5
|
+
export declare const toJSONNodes: (data: unknown, options?: JSONTreeViewOptions) => JSONNode[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { JSONNode, JSONToken, JSONTreeViewOptions } from "./JSONTreeView.types";
|
|
2
|
+
export declare const toLeafText: (node: JSONNode, options?: JSONTreeViewOptions) => string;
|
|
3
|
+
export declare const toValueTokens: (node: JSONNode, options?: JSONTreeViewOptions, isExpanded?: boolean) => JSONToken[];
|
|
4
|
+
export declare const describeNode: (node: JSONNode, options?: JSONTreeViewOptions) => string;
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import type { MarqueeSide
|
|
3
|
-
declare const
|
|
4
|
-
|
|
5
|
-
speed?: import("./Marquee.types").MarqueeSpeed;
|
|
6
|
-
spacing?: MarqueeSpacing;
|
|
7
|
-
pauseOnHover?: boolean;
|
|
2
|
+
import type { MarqueeSide } from "./Marquee.types";
|
|
3
|
+
export declare const DEFAULT_MARQUEE_SPEED = 50;
|
|
4
|
+
declare const _default: <As extends React.ElementType = "div">(props: import("../../utilities/polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "div" : As> & {
|
|
8
5
|
paused?: boolean;
|
|
6
|
+
defaultPaused?: boolean;
|
|
7
|
+
} & {
|
|
8
|
+
side?: MarqueeSide;
|
|
9
|
+
speed?: number;
|
|
10
|
+
delay?: number;
|
|
11
|
+
loopCount?: number;
|
|
12
|
+
autoFill?: boolean;
|
|
13
|
+
spacing?: string;
|
|
14
|
+
reverse?: boolean;
|
|
15
|
+
pauseOnInteraction?: boolean;
|
|
9
16
|
className?: string;
|
|
17
|
+
}, "as"> & {
|
|
18
|
+
as?: As | undefined;
|
|
19
|
+
} & {
|
|
20
|
+
onPauseChange?: (paused: boolean) => void;
|
|
21
|
+
} & {
|
|
22
|
+
onLoopComplete?: (loops: number) => void;
|
|
23
|
+
onComplete?: () => void;
|
|
10
24
|
} & React.RefAttributes<any>) => React.ReactNode;
|
|
11
25
|
export default _default;
|