ソースを参照

Feature: Build problems fixed.

lfabl 3 ヶ月 前
コミット
519a009cf0

+ 1 - 0
eslint.config.mjs

@@ -14,6 +14,7 @@ export default tseslint.config(
         ignores: [
             "node_modules",
             "dist",
+            "lib",
             ".history"
         ]
     },

+ 12 - 2
package.json

@@ -40,9 +40,19 @@
         "release": "release-it --only-version"
     },
     "keywords": [
+        "ncore",
+        "nibgat",
+        "ui",
+        "kit",
+        "design",
+        "system",
+        "design-system",
+        "component",
+        "library",
+        "component-library",
         "react-native",
-        "ios",
-        "android"
+        "android",
+        "ios"
     ],
     "repository": {
         "type": "git",

+ 3 - 2
src/components/text/index.tsx

@@ -2,7 +2,8 @@ import {
     type FC
 } from "react";
 import {
-    Text as NativeText
+    Text as NativeText,
+    type TextStyle
 } from "react-native";
 import type ITextProps from "./type";
 import {
@@ -30,7 +31,7 @@ const Text: FC<ITextProps> = ({
                 {
                     ...typography[variant],
                     color: customColor ? customColor : color ? colors.content.text[color] : colors.content.text.mid
-                }
+                } as TextStyle
             ]}
         >
             {children}

+ 1 - 1
src/context/theme.tsx

@@ -110,7 +110,7 @@ class NCoreUIKitTheme<T extends ThemesType> extends NCoreContext<ThemeContextTyp
         const palette = props && props.activePalette ? props.activePalette : this.state.activePalette;
         const theme = props && props.activeTheme ? props.activeTheme : this.state.activeTheme;
 
-        const defaultPalette = defaultPaletteData.palettes.find(p => p.name === palette) ?? defaultPaletteData.palettes[0];
+        const defaultPalette = defaultPaletteData.palettes.find(p => p.name === palette) ?? defaultPaletteData.palettes[0]!;
         const defaultTheme = defaultPalette.themes[theme as keyof typeof defaultPalette.themes] ?? defaultPalette.themes.dark;
 
         const defaultState: ThemeContextStateType = {

+ 3 - 3
src/helpers/theme/palette.ts

@@ -13,7 +13,7 @@ const mergeCurrent = (defaultJSON: RecursiveRecord, projectJSON: RecursiveRecord
         } else {
             if(typeof defaultJSON[pKey] !== "string") {
                 if(defaultJSON[pKey]) {
-                    newJSON[pKey] = mergeCurrent(defaultJSON[pKey], projectJSON[pKey]);
+                    newJSON[pKey] = mergeCurrent(defaultJSON[pKey], projectJSON[pKey]!);
                 } else {
                     newJSON[pKey] = projectJSON[pKey];
                 }
@@ -31,8 +31,8 @@ export const mergeTheme = (
     projectTheme: NCoreUIKit.ThemeTokens
 ): NCoreUIKit.ThemeTokens => {
     return {
-        content: mergeCurrent(defaultTheme.content, projectTheme.content),
-        system: mergeCurrent(defaultTheme.system, projectTheme.system)
+        content: mergeCurrent(defaultTheme.content as unknown as RecursiveRecord, projectTheme.content as unknown as RecursiveRecord),
+        system: mergeCurrent(defaultTheme.system as unknown as RecursiveRecord, projectTheme.system as unknown as RecursiveRecord)
     };
 };
 

+ 1 - 4
src/types/index.ts

@@ -1,9 +1,6 @@
 import {
     type ForwardRefRenderFunction
 } from "react";
-import {
-    type TextStyle
-} from "react-native";
 import {
     type LocalizeType,
     type LocaleType
@@ -123,8 +120,8 @@ declare global {
         interface Typography extends DefaultTypography {}
 
         interface TypographyToken {
-            fontWeight: TextStyle["fontWeight"];
             letterSpacing: number;
+            fontWeight: string;
             fontFamily: string;
             lineHeight: number;
             fontSize: number;

+ 1 - 1
src/types/locale.ts

@@ -2,7 +2,7 @@ import {
     type ReactElement,
     type ReactNode
 } from "react";
-import ITextProps from "../components/text/text.types";
+import type ITextProps from "../components/text/type";
 
 export type LocalizeType = {
     initialSelectedLocale?: NCoreUIKit.LocaleKey;

+ 1 - 1
src/types/modal.ts

@@ -1,6 +1,6 @@
 import {
     type ModalInternalProps
-} from "../components/modal/modal.types";
+} from "../components/modal/type";
 
 export type ModalType = {
     data?: Array<ModalDataType>;