소스 검색

Merge branch 'release/1.0.0-pre-alpha.67'

lfabl 3 주 전
부모
커밋
71df04857d

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
     "name": "ncore-ui-kit",
-    "version": "1.0.0-pre-alpha.66",
+    "version": "1.0.0-pre-alpha.67",
     "description": "NİBGAT® | NCore - UI Kit for React-Native Mobile Apps.",
     "main": "./lib/module/index.js",
     "types": "./lib/typescript/src/index.d.ts",

+ 5 - 3
src/components/embeddedMenu/index.tsx

@@ -48,8 +48,10 @@ const Menu: RefForwardingComponent<IEmbeddedMenuRef, IEmbeddedMenuProps> = ({
     isWorkWithAnimation = true,
     renderHeader: RenderHeader,
     renderFooter: RenderFooter,
+    renderHeaderSeperator,
     isShowSiteLogo = true,
     close: closeAction,
+    renderSiteLogo,
     customLocalize,
     maxWidth = 300,
     minWidth = 75,
@@ -323,7 +325,7 @@ const Menu: RefForwardingComponent<IEmbeddedMenuRef, IEmbeddedMenuProps> = ({
                     headerContentContainerDynamicStyle
                 ]}
             >
-                {isShowSiteLogo ? <SiteLogo
+                {isShowSiteLogo ? renderSiteLogo ? renderSiteLogo() : <SiteLogo
                     customLocalize={customLocalize}
                     customTheme={customTheme}
                     {...siteLogoProps}
@@ -340,12 +342,12 @@ const Menu: RefForwardingComponent<IEmbeddedMenuRef, IEmbeddedMenuProps> = ({
                 />}
                 {renderToggleCollapseForExpended()}
             </View>
-            <Seperator
+            {renderHeaderSeperator ? renderHeaderSeperator() : <Seperator
                 style={[
                     stylesheet.seperator,
                     seperatorDynamicStyle
                 ]}
-            />
+            />}
         </View>;
     };
 

+ 2 - 0
src/components/embeddedMenu/type.ts

@@ -54,9 +54,11 @@ interface IEmbeddedMenuProps {
     customLocalize?: {
         activeLocale?: keyof NCoreUIKit.LocaleKey;
     };
+    renderHeaderSeperator?: () => ReactNode;
     buttons: Array<EmbeddedMenuButton>;
     navigation: NCoreUIKit.Navigation;
     isWorkWithSafeAreaView?: boolean;
+    renderSiteLogo?: () => ReactNode;
     isWorkWithHeaderSpace?: boolean;
     isAutoClosedOnClosed?: boolean;
     siteLogoProps?: ISiteLogoProps;

+ 7 - 4
src/components/menu/index.tsx

@@ -50,10 +50,12 @@ const Menu: RefForwardingComponent<IMenuRef, IMenuProps> = ({
     isWorkWithPortal = true,
     isWorkWithModal = true,
     customBackgroundColor,
+    renderHeaderSeperator,
     close: closeAction,
     glassEffect = 0,
     customLocalize,
     seperatorProps,
+    renderSiteLogo,
     siteLogoProps,
     customTheme,
     navigation,
@@ -281,19 +283,20 @@ const Menu: RefForwardingComponent<IMenuRef, IMenuProps> = ({
                 headerContainerDynamicStyle
             ]}
         >
-            <SiteLogo
+            {renderSiteLogo ? renderSiteLogo() : <SiteLogo
                 customLocalize={customLocalize}
                 customTheme={customTheme}
                 {...siteLogoProps}
-            />
-            <Seperator
+            />}
+            {renderHeaderSeperator ? renderHeaderSeperator() : <Seperator
                 {...seperatorProps}
+                length="100%"
                 style={[
                     seperatorProps?.style,
                     stylesheet.seperator,
                     seperatorDynamicStyle
                 ]}
-            />
+            />}
         </View>;
     };
 

+ 2 - 0
src/components/menu/type.ts

@@ -57,9 +57,11 @@ interface IMenuProps {
     customLocalize?: {
         activeLocale?: keyof NCoreUIKit.LocaleKey;
     };
+    renderHeaderSeperator?: () => ReactNode;
     navigation: NCoreUIKit.Navigation;
     isWorkWithSafeAreaView?: boolean;
     seperatorProps?: ISeperatorProps;
+    renderSiteLogo?: () => ReactNode;
     customBackgroundColor?: string;
     isAutoClosedOnClosed?: boolean;
     siteLogoProps?: ISiteLogoProps;

+ 10 - 10
src/components/seperator/stylesheet.ts

@@ -43,28 +43,28 @@ export const useStyles = ({
         } as Mutable<TextStyle>
     };
 
-    if(length !== undefined) {
-        if(direction === "horizontal") {
-            styles.container.width = length;
-        } else {
-            styles.container.height = length;
-        }
-    }
-
     if(direction === "horizontal") {
         styles.container.flexDirection = "row";
         styles.container.width = "90%";
 
-        styles.indicator.height = borders.line;
+        styles.indicator.height = borders.seperator;
         styles.indicator.width = "100%";
     } else {
         styles.container.flexDirection = "column";
         styles.container.height = "90%";
 
-        styles.indicator.width = borders.line;
+        styles.indicator.width = borders.seperator;
         styles.indicator.height = "100%";
     }
 
+    if(length !== undefined) {
+        if(direction === "horizontal") {
+            styles.container.width = length;
+        } else {
+            styles.container.height = length;
+        }
+    }
+
     return styles;
 };
 export default stylesheet;

+ 2 - 2
src/components/seperator/type.ts

@@ -8,8 +8,8 @@ export type SeperatorDynamicStyle = {
     colors: NCoreUIKit.ActivePalette["colors"];
     spaces: NCoreUIKit.ActivePalette["spaces"];
     direction?: SeperatorDirectionType;
+    length?: number | string;
     customColor?: string;
-    length?: number;
 };
 
 export type SeperatorDirectionType = "horizontal" | "vertical";
@@ -18,9 +18,9 @@ interface ISeperatorProps {
     color?: keyof NCoreUIKit.BorderContentColors;
     direction?: SeperatorDirectionType;
     style?: SvgProps["style"];
+    length?: number | string;
     isShowTitle?: boolean;
     customColor?: string;
-    length?: number;
     title?: string;
 }
 export type {

+ 2 - 0
src/components/siteLogo/stylesheet.ts

@@ -172,6 +172,8 @@ export const useStyles = ({
 
         styles.contentContainer.justifyContent = "center";
         styles.contentContainer.alignItems = "center";
+
+        styles.titlesContainer.marginLeft = 0;
     }
 
     if(isDisabled) {

+ 1 - 0
src/variants/themes/default.json

@@ -47,6 +47,7 @@
             "required": 4
         },
         "borders": {
+            "seperator": 1,
             "subtract": 3,
             "line": 2
         },