|
@@ -2,12 +2,13 @@ import {
|
|
|
type ReactNode
|
|
type ReactNode
|
|
|
} from "react";
|
|
} from "react";
|
|
|
import NCoreUIKitBottomSheet from "./bottomSheet";
|
|
import NCoreUIKitBottomSheet from "./bottomSheet";
|
|
|
-import NCoreUIKitDialog from "./dialog";
|
|
|
|
|
import NCoreUIKitLocalize from "./localize";
|
|
import NCoreUIKitLocalize from "./localize";
|
|
|
-import NCoreUIKitModal from "./modal";
|
|
|
|
|
import NCoreUIKitSnackBar from "./snackBar";
|
|
import NCoreUIKitSnackBar from "./snackBar";
|
|
|
|
|
+import NCoreUIKitDialog from "./dialog";
|
|
|
|
|
+import NCoreUIKitModal from "./modal";
|
|
|
import NCoreUIKitTheme from "./theme";
|
|
import NCoreUIKitTheme from "./theme";
|
|
|
import NCoreUIKitToast from "./toast";
|
|
import NCoreUIKitToast from "./toast";
|
|
|
|
|
+import NCoreUIKitMenu from "./menu";
|
|
|
import {
|
|
import {
|
|
|
type NCoreUIKitConfig
|
|
type NCoreUIKitConfig
|
|
|
} from "../types";
|
|
} from "../types";
|
|
@@ -23,6 +24,7 @@ class CoreContext<T extends NCoreUIKitConfig> {
|
|
|
NCoreUIKitDialog: NCoreUIKitDialog;
|
|
NCoreUIKitDialog: NCoreUIKitDialog;
|
|
|
NCoreUIKitModal: NCoreUIKitModal;
|
|
NCoreUIKitModal: NCoreUIKitModal;
|
|
|
NCoreUIKitToast: NCoreUIKitToast;
|
|
NCoreUIKitToast: NCoreUIKitToast;
|
|
|
|
|
+ NCoreUIKitMenu: NCoreUIKitMenu;
|
|
|
|
|
|
|
|
constructor(initialState: T) {
|
|
constructor(initialState: T) {
|
|
|
this.NCoreUIKitTheme = new NCoreUIKitTheme({
|
|
this.NCoreUIKitTheme = new NCoreUIKitTheme({
|
|
@@ -57,6 +59,10 @@ class CoreContext<T extends NCoreUIKitConfig> {
|
|
|
this.NCoreUIKitBottomSheet = new NCoreUIKitBottomSheet({
|
|
this.NCoreUIKitBottomSheet = new NCoreUIKitBottomSheet({
|
|
|
data: []
|
|
data: []
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ this.NCoreUIKitMenu = new NCoreUIKitMenu({
|
|
|
|
|
+ data: []
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Provider = ({
|
|
Provider = ({
|
|
@@ -71,6 +77,7 @@ class CoreContext<T extends NCoreUIKitConfig> {
|
|
|
const ModalContext = this.NCoreUIKitModal;
|
|
const ModalContext = this.NCoreUIKitModal;
|
|
|
const ToastContext = this.NCoreUIKitToast;
|
|
const ToastContext = this.NCoreUIKitToast;
|
|
|
const ThemeContext = this.NCoreUIKitTheme;
|
|
const ThemeContext = this.NCoreUIKitTheme;
|
|
|
|
|
+ const MenuContext = this.NCoreUIKitMenu;
|
|
|
|
|
|
|
|
return <ThemeContext.Provider>
|
|
return <ThemeContext.Provider>
|
|
|
<LocalizeContext.Provider>
|
|
<LocalizeContext.Provider>
|
|
@@ -88,7 +95,13 @@ class CoreContext<T extends NCoreUIKitConfig> {
|
|
|
<Host name="bottomSheet-system">
|
|
<Host name="bottomSheet-system">
|
|
|
<BottomSheetContext.Provider>
|
|
<BottomSheetContext.Provider>
|
|
|
<BottomSheetContext.Render>
|
|
<BottomSheetContext.Render>
|
|
|
- {children}
|
|
|
|
|
|
|
+ <Host name="menu-system">
|
|
|
|
|
+ <MenuContext.Provider>
|
|
|
|
|
+ <MenuContext.Render>
|
|
|
|
|
+ {children}
|
|
|
|
|
+ </MenuContext.Render>
|
|
|
|
|
+ </MenuContext.Provider>
|
|
|
|
|
+ </Host>
|
|
|
</BottomSheetContext.Render>
|
|
</BottomSheetContext.Render>
|
|
|
</BottomSheetContext.Provider>
|
|
</BottomSheetContext.Provider>
|
|
|
</Host>
|
|
</Host>
|