@prismicio/editor-ui 0.4.75 → 0.4.76-alpha.tree-view-component.0
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/BarChart-36OdBsqu.mjs +9414 -0
- package/dist/BarChart-vkZa81B0.js +28 -0
- package/dist/components/Alert/Alert.stories.d.ts +1 -1
- package/dist/components/BackgroundIcon/BackgroundIcon.stories.d.ts +3 -3
- package/dist/components/Badge/Badge.stories.d.ts +1 -1
- package/dist/components/Banner/Banner.stories.d.ts +1 -1
- package/dist/components/BarChart/BarChart.d.ts +19 -0
- package/dist/components/BarChart/BarChart.stories.d.ts +11 -0
- package/dist/components/BarChart/BarChartLegend.d.ts +6 -0
- package/dist/components/BarChart/LazyBarChart.d.ts +2 -0
- package/dist/components/BarChart/defaultColors.d.ts +1 -0
- package/dist/components/BarChart/index.d.ts +2 -0
- package/dist/components/Button/Button.stories.d.ts +5 -5
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/Card/Card.stories.d.ts +4 -4
- package/dist/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/ConjoinedIcons/ConjoinedIcons.stories.d.ts +2 -2
- package/dist/components/Form/FormField.d.ts +3 -16
- package/dist/components/Form/FormInput.d.ts +1 -0
- package/dist/components/Form/FormRadioGroup.d.ts +9 -0
- package/dist/components/Form/FormTextArea.d.ts +10 -0
- package/dist/components/Form/index.d.ts +2 -0
- package/dist/components/HairlineButton/HairlineButton.stories.d.ts +1 -1
- package/dist/components/Icon/iconNames.d.ts +1 -1
- package/dist/components/IconButton/IconButton.stories.d.ts +1 -1
- package/dist/components/Radio/RadioBigCard.d.ts +3 -2
- package/dist/components/Radio/RadioGroup.d.ts +2 -0
- package/dist/components/Radio/RadioItem.d.ts +2 -2
- package/dist/components/Radio/index.d.ts +2 -1
- package/dist/components/Separator/Separator.stories.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.stories.d.ts +1 -1
- package/dist/components/Slider/Slider.stories.d.ts +1 -1
- package/dist/components/TextArea/TextArea.d.ts +2 -1
- package/dist/components/ToggleButton/ToggleButton.stories.d.ts +2 -2
- package/dist/components/TreeView/TreeView.d.ts +39 -0
- package/dist/components/TreeView/TreeView.stories.d.ts +6 -0
- package/dist/components/TreeView/index.d.ts +1 -0
- package/dist/index-75Y24WDd.js +616 -0
- package/dist/index-LsqoEBQ6.mjs +56471 -0
- package/dist/index.cjs.js +1 -614
- package/dist/index.d.ts +4 -2
- package/dist/index.es.js +195 -56169
- package/dist/style.css +1 -1
- package/package.json +5 -2
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { CheckboxProps } from "../Checkbox/Checkbox";
|
|
3
|
+
interface TreeViewItemSection {
|
|
4
|
+
type: "section";
|
|
5
|
+
name: string;
|
|
6
|
+
items: TreeViewItem[];
|
|
7
|
+
}
|
|
8
|
+
interface TreeViewItemCheckbox {
|
|
9
|
+
type: "checkbox";
|
|
10
|
+
name: string;
|
|
11
|
+
value: boolean;
|
|
12
|
+
}
|
|
13
|
+
export type TreeViewItem = TreeViewItemSection | TreeViewItemCheckbox;
|
|
14
|
+
export interface TreeViewProps {
|
|
15
|
+
title?: string;
|
|
16
|
+
subtitle?: string;
|
|
17
|
+
onChange: (data: TreeViewItem[]) => void;
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}
|
|
20
|
+
export declare function TreeView(props: TreeViewProps): JSX.Element;
|
|
21
|
+
interface TreeViewSectionProps {
|
|
22
|
+
/** Name that will be used to identify the section in the tree data. */
|
|
23
|
+
name: string;
|
|
24
|
+
title: string;
|
|
25
|
+
children: ReactNode;
|
|
26
|
+
badge?: string;
|
|
27
|
+
subtitle?: string;
|
|
28
|
+
open?: boolean;
|
|
29
|
+
defaultOpen?: boolean;
|
|
30
|
+
onOpenChange?: (open: boolean) => void;
|
|
31
|
+
}
|
|
32
|
+
export declare function TreeViewSection(props: TreeViewSectionProps): JSX.Element;
|
|
33
|
+
interface TreeViewCheckboxProps extends CheckboxProps {
|
|
34
|
+
/** Name that will be used to identify the checkbox in the tree data. */
|
|
35
|
+
name: string;
|
|
36
|
+
title: string;
|
|
37
|
+
}
|
|
38
|
+
export declare function TreeViewCheckbox(props: TreeViewCheckboxProps): JSX.Element;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./TreeView";
|