@sorocraft/ui 1.2.109 → 1.2.111

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.
@@ -7,7 +7,8 @@ interface Props {
7
7
  hasLargeFooter?: boolean;
8
8
  isOpen?: boolean;
9
9
  size?: SIZE;
10
- onClose: () => void;
10
+ noHeader?: boolean;
11
+ onClose?: () => void;
11
12
  onBack?: () => void;
12
13
  }
13
14
  declare const Drawer: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<unknown>>;
@@ -0,0 +1,19 @@
1
+ import { JSXElementConstructor, LazyExoticComponent, ReactElement, RefObject } from "react";
2
+ export type DrawerParams = {
3
+ closeDrawer?: () => void;
4
+ onClose?: () => void;
5
+ isOpen?: boolean;
6
+ drawerRef?: RefObject<HTMLDivElement>;
7
+ [key: string]: unknown;
8
+ };
9
+ export type DrawerType = {
10
+ id: string;
11
+ params?: DrawerParams;
12
+ };
13
+ export interface DrawerComponentProps {
14
+ params: DrawerParams;
15
+ }
16
+ export type DrawerComponent = JSXElementConstructor<DrawerComponentProps> | LazyExoticComponent<({ params }: DrawerComponentProps) => ReactElement>;
17
+ export interface DrawersMap {
18
+ [key: string]: DrawerComponent;
19
+ }
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from "react";
2
+ import { DrawersMap, DrawerType } from "./Drawer.types";
3
+ type DrawerContent = DrawerType & {
4
+ setDrawer: (drawer: DrawerType | null) => void;
5
+ };
6
+ export declare const DrawerProvider: ({ children, drawersMap, }: {
7
+ children: ReactNode | ReactNode[];
8
+ drawersMap: DrawersMap;
9
+ }) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const useDrawerContext: () => DrawerContent;
11
+ export {};
@@ -0,0 +1,9 @@
1
+ import { Dispatch, SetStateAction } from "react";
2
+ import { DrawersMap, DrawerType } from "./Drawer.types";
3
+ interface Props {
4
+ drawer: DrawerType;
5
+ drawersMap: DrawersMap;
6
+ setDrawer: Dispatch<SetStateAction<DrawerType>>;
7
+ }
8
+ declare const DrawerWrapper: ({ drawer, drawersMap, setDrawer }: Props) => import("react/jsx-runtime").JSX.Element;
9
+ export default DrawerWrapper;
@@ -1 +1,3 @@
1
1
  export { default } from "./Drawer";
2
+ export * from "./Store";
3
+ export * from "./Drawer.types";
package/dist/index.d.ts CHANGED
@@ -33,6 +33,7 @@ export { default as Chip } from "./components/Chip";
33
33
  export { default as Modal } from "./components/Modal";
34
34
  export * from "./components/Modal";
35
35
  export { default as Drawer } from "./components/Drawer";
36
+ export * from "./components/Drawer";
36
37
  export { default as Text } from "./components/Text";
37
38
  export { default as Sidebar } from "./components/Sidebar";
38
39
  export { default as PageLoading } from "./components/PageLoading";