@gusarov-studio/rubik-ui 20.2.1 → 20.4.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.
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import "./Checkbox.scss";
3
+ type CheckboxSize = 16 | 20;
4
+ interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> {
5
+ size?: CheckboxSize | `${CheckboxSize}`;
6
+ indeterminate?: boolean;
7
+ onCheckedChange?: (event?: React.ChangeEvent<HTMLInputElement>) => void;
8
+ }
9
+ declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
10
+ export { Checkbox, type CheckboxProps };
@@ -0,0 +1 @@
1
+ export * from "./Checkbox";
@@ -0,0 +1,3 @@
1
+ export * from "react-dnd";
2
+ export { MultiBackend, getBackendOptions } from "@minoru/react-dnd-treeview";
3
+ export * from "./utils/getEmptyImage";
@@ -0,0 +1,2 @@
1
+ declare function getEmptyImage(): HTMLImageElement;
2
+ export { getEmptyImage };
@@ -1,4 +1,4 @@
1
- import { type ConnectDragSource } from "react-dnd";
1
+ import { type ConnectDragSource } from "../../DnD";
2
2
  import type { FileTab } from "../types";
3
3
  declare const useDragFileTab: (tab: FileTab, draggable?: boolean) => [{
4
4
  isDragging: boolean;
@@ -1,5 +1,5 @@
1
1
  import { type RefObject } from "react";
2
- import { type DragElementWrapper } from "react-dnd";
2
+ import { type DragElementWrapper } from "../../DnD";
3
3
  import type { FileTab, DropSideType } from "../types";
4
4
  interface UseDropFileTabParams {
5
5
  tab: FileTab;
@@ -1,2 +1,2 @@
1
- import type { DropTargetMonitor } from "react-dnd";
1
+ import type { DropTargetMonitor } from "../../DnD";
2
2
  export declare const getDropSide: (monitor: DropTargetMonitor, element: HTMLElement) => "left" | "right" | null;
@@ -1,4 +1,4 @@
1
- import type { XYCoord } from "react-dnd";
1
+ import type { XYCoord } from "../../DnD";
2
2
  import type React from "react";
3
3
  declare const getItemStyles: (currentOffset: XYCoord) => React.CSSProperties;
4
4
  export { getItemStyles };
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { Tree, useDragOver, type TreeProps, type NodeModel, type RenderParams, type TreeMethods, type DragOverProps, type DragLayerMonitorProps, type DropOptions, type CanDropHandler, type CanDragHandler } from "@minoru/react-dnd-treeview";
3
+ interface TreeViewProps<T> extends Omit<TreeProps<T>, "tree" | "onDrop" | "render" | "onChangeOpen"> {
4
+ items: TreeProps<T>["tree"];
5
+ onChange: TreeProps<T>["onDrop"];
6
+ itemRender: TreeProps<T>["render"];
7
+ onOpenChange?: TreeProps<T>["onChangeOpen"];
8
+ }
9
+ type TTree<T> = typeof Tree<T>;
10
+ declare const MemorizedTreeView: <T>(props: TreeViewProps<T> & {
11
+ ref?: React.Ref<React.ComponentRef<TTree<T>>> | null;
12
+ }) => ReturnType<TTree<T>>;
13
+ export { MemorizedTreeView as TreeView, useDragOver, type NodeModel, type RenderParams, type TreeViewProps, type TreeMethods, type DragOverProps, type DragLayerMonitorProps, type DropOptions, type CanDropHandler, type CanDragHandler, };
@@ -0,0 +1,16 @@
1
+ import React from "react";
2
+ interface TreeViewItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "prefix"> {
3
+ prefix?: React.ReactNode;
4
+ suffix?: React.ReactNode;
5
+ variant?: "primary" | "secondary";
6
+ width?: React.CSSProperties["width"];
7
+ height?: React.CSSProperties["height"];
8
+ className?: string;
9
+ withShadow?: boolean;
10
+ withBorder?: boolean;
11
+ isDropTarget?: boolean;
12
+ as?: React.ElementType;
13
+ children: React.ReactNode;
14
+ }
15
+ declare const MemorizedTreeViewItem: React.MemoExoticComponent<React.ForwardRefExoticComponent<TreeViewItemProps & React.RefAttributes<HTMLDivElement>>>;
16
+ export { MemorizedTreeViewItem as TreeViewItem, type TreeViewItemProps };
@@ -0,0 +1,3 @@
1
+ import "./TreeView.scss";
2
+ export * from "./TreeView";
3
+ export * from "./TreeViewItem";
package/dist/index.d.ts CHANGED
@@ -28,4 +28,6 @@ export * from "./ThemesProvider";
28
28
  export * from "./Tooltip";
29
29
  export * from "./Dialog";
30
30
  export * from "./VisuallyHidden";
31
+ export * from "./TreeView";
32
+ export * from "./DnD";
31
33
  export * from "./utils";