ソースを参照

Bugfix: ThemeKey problems fixed.

lfabl 1 ヶ月 前
コミット
c679680dfb

+ 1 - 1
example/src/index.tsx

@@ -8,7 +8,7 @@ import {
 
 const NCoreUIKitBase = setupNCoreUIKit({
     initialSelectedGapPropagation: "spacious",
-    initialSelectedTheme: "dark"
+    initialSelectedTheme: "light"
 });
 
 const App = () => {

+ 3 - 1
example/src/pages/home/index.tsx

@@ -244,6 +244,7 @@ const Home = () => {
                     isVisible={isDialogActive}
                     content="etgweı09gı9w0eg"
                     title="Merhaba Dünya!"
+                    contentJustify="centered"
                     modalProps={{
                         isWorkWithPortal: false
                     }}
@@ -252,7 +253,7 @@ const Home = () => {
                     }) => {
                         closeAnimation(() => setIsDialogActive(false));
                     }}
-                    variant="info"
+                    variant="yes-no"
                     secondaryButtonProps={{
                         title: "sdfgsdg",
                         onPress: () => {
@@ -478,6 +479,7 @@ iyisindir **umarım.**
                 navigation.navigate("TestSubPage");
             }}
             title="Open Test Sub Page"
+            isDisabled={true}
             variant="filled"
             spreadBehaviour="stretch"
         />

+ 1 - 3
src/assets/svg/loadingIcon/index.tsx

@@ -23,9 +23,7 @@ const SvgLoadingIcon = ({
     customColor,
     size = 22,
     ...props
-}: INCoreUIKitIconProps & {
-    className?: string;
-}) => {
+}: INCoreUIKitIconProps) => {
     const {
         colors
     } = NCoreUIKitTheme.useContext();

+ 4 - 4
src/components/bottomSheet/type.ts

@@ -54,10 +54,10 @@ interface IBottomSheetProps {
     customKey?: string;
     style?: ViewStyle;
     customTheme?: {
-        gapPropagation?: NCoreUIKit.GapPropagationKey;
-        sharpness?: NCoreUIKit.SharpnessKey;
-        paletteKey?: NCoreUIKit.PaletteKey;
-        themeKey?: NCoreUIKit.ThemeKey;
+        gapPropagation?: keyof NCoreUIKit.GapPropagationKey;
+        sharpness?: keyof NCoreUIKit.SharpnessKey;
+        paletteKey?: keyof NCoreUIKit.PaletteKey;
+        themeKey?: keyof NCoreUIKit.ThemeKey;
     };
     id?: string;
 }

+ 2 - 2
src/components/button/stylesheet.ts

@@ -195,7 +195,7 @@ export const useStyles = ({
             paddingBottom: currentSize.paddingVertical,
             paddingLeft: currentSize.paddingHorizontal,
             paddingTop: currentSize.paddingVertical,
-            borderRadius: radiuses.md,
+            borderRadius: radiuses.actions,
             borderWidth: borders.line
         } as Mutable<ViewStyle>,
         title: {
@@ -203,7 +203,7 @@ export const useStyles = ({
         loading: {
         } as Mutable<ViewStyle>,
         overlay: {
-            borderRadius: radiuses.md - 2
+            borderRadius: radiuses.actions - 2
         } as Mutable<ViewStyle>
     };
 

+ 4 - 4
src/components/button/type.ts

@@ -85,10 +85,10 @@ interface IButtonProps extends Omit<ButtonProps, "title"> {
     titleStyle?: StyleProp<TextStyle>[] | StyleProp<TextStyle>;
     style?: StyleProp<ViewStyle>[] | StyleProp<ViewStyle>;
     customTheme?: {
-        gapPropagation?: NCoreUIKit.GapPropagationKey;
-        sharpness?: NCoreUIKit.SharpnessKey;
-        paletteKey?: NCoreUIKit.PaletteKey;
-        themeKey?: NCoreUIKit.ThemeKey;
+        gapPropagation?: keyof NCoreUIKit.GapPropagationKey;
+        sharpness?: keyof NCoreUIKit.SharpnessKey;
+        paletteKey?: keyof NCoreUIKit.PaletteKey;
+        themeKey?: keyof NCoreUIKit.ThemeKey;
     };
     spreadBehaviour?: ButtonSpreadBehaviour;
     iconDirection?: "left" | "right";

+ 5 - 5
src/components/checkBox/type.ts

@@ -44,13 +44,13 @@ interface ICheckBoxProps {
     titleStyle?: StyleProp<TextStyle>[] | StyleProp<TextStyle>;
     style?: StyleProp<ViewStyle>[] | StyleProp<ViewStyle>;
     customTheme?: {
-        gapPropagation?: NCoreUIKit.GapPropagationKey;
-        sharpness?: NCoreUIKit.SharpnessKey;
-        paletteKey?: NCoreUIKit.PaletteKey;
-        themeKey?: NCoreUIKit.ThemeKey;
+        gapPropagation?: keyof NCoreUIKit.GapPropagationKey;
+        sharpness?: keyof NCoreUIKit.SharpnessKey;
+        paletteKey?: keyof NCoreUIKit.PaletteKey;
+        themeKey?: keyof NCoreUIKit.ThemeKey;
     };
     customLocalize?: {
-        activeLocale?: NCoreUIKit.LocaleKey;
+        activeLocale?: keyof NCoreUIKit.LocaleKey;
     };
     isChecked?: "checked" | "partially" | null;
     spreadBehaviour?: CheckBoxSpreadBehaviour;

+ 3 - 0
src/components/dialog/stylesheet.ts

@@ -104,6 +104,9 @@ export const useStyles = ({
     }
 
     if(contentJustify === "centered") {
+        styles.container.justifyContent = "center";
+        styles.container.alignItems = "center";
+
         styles.content.justifyContent = "center";
         styles.content.alignItems = "center";
         styles.content.display = "flex";

+ 1 - 1
src/components/dialog/type.ts

@@ -76,7 +76,7 @@ interface IDialogProps {
         id: string;
     }) => void;
     content?: string;
-    title: string;
+    title?: string;
     id?: string;
 };
 

+ 1 - 1
src/components/markdownViewer/index.tsx

@@ -2,8 +2,8 @@ import type {
     FC
 } from "react";
 import {
-    Image,
     Text as NativeText,
+    Image,
     View
 } from "react-native";
 import type IMarkdownViewerProps from "./type";

+ 4 - 4
src/components/modal/type.ts

@@ -20,10 +20,10 @@ export type ModalInternalProps = {
     style?: StyleProp<ViewStyle>[] | StyleProp<ViewStyle>;
     onContainerLayout?: (e: LayoutChangeEvent) => void;
     customTheme?: {
-        gapPropagation?: NCoreUIKit.GapPropagationKey;
-        sharpness?: NCoreUIKit.SharpnessKey;
-        paletteKey?: NCoreUIKit.PaletteKey;
-        themeKey?: NCoreUIKit.ThemeKey;
+        gapPropagation?: keyof NCoreUIKit.GapPropagationKey;
+        sharpness?: keyof NCoreUIKit.SharpnessKey;
+        paletteKey?: keyof NCoreUIKit.PaletteKey;
+        themeKey?: keyof NCoreUIKit.ThemeKey;
     };
     onOverlayPress?: (props: {
         closeAnimation: (onClosed?: (props: {

+ 4 - 4
src/components/notificationIndicator/type.ts

@@ -39,10 +39,10 @@ interface INotificationIndicatorProps {
     titleStyle?: StyleProp<TextStyle>[] | StyleProp<TextStyle>;
     style?: StyleProp<ViewStyle>[] | StyleProp<ViewStyle>;
     customTheme?: {
-        gapPropagation?: NCoreUIKit.GapPropagationKey;
-        sharpness?: NCoreUIKit.SharpnessKey;
-        paletteKey?: NCoreUIKit.PaletteKey;
-        themeKey?: NCoreUIKit.ThemeKey;
+        gapPropagation?: keyof NCoreUIKit.GapPropagationKey;
+        sharpness?: keyof NCoreUIKit.SharpnessKey;
+        paletteKey?: keyof NCoreUIKit.PaletteKey;
+        themeKey?: keyof NCoreUIKit.ThemeKey;
     };
     titleVariant?: keyof NCoreUIKit.Typography;
     spreadBehaviour?: SwitchSpreadBehaviour;

+ 4 - 4
src/components/pageContainer/type.ts

@@ -19,10 +19,10 @@ interface IPageContainerProps {
     isScrollable?: boolean;
     children?: ReactNode;
     customTheme?: {
-        gapPropagation?: NCoreUIKit.GapPropagationKey;
-        sharpness?: NCoreUIKit.SharpnessKey;
-        paletteKey?: NCoreUIKit.PaletteKey;
-        themeKey?: NCoreUIKit.ThemeKey;
+        gapPropagation?: keyof NCoreUIKit.GapPropagationKey;
+        sharpness?: keyof NCoreUIKit.SharpnessKey;
+        paletteKey?: keyof NCoreUIKit.PaletteKey;
+        themeKey?: keyof NCoreUIKit.ThemeKey;
     };
 }
 export type {

+ 5 - 5
src/components/radioButton/type.ts

@@ -45,14 +45,14 @@ interface IRadioButtonProps {
     titleStyle?: StyleProp<TextStyle>[] | StyleProp<TextStyle>;
     style?: StyleProp<ViewStyle>[] | StyleProp<ViewStyle>;
     customTheme?: {
-        gapPropagation?: NCoreUIKit.GapPropagationKey;
-        sharpness?: NCoreUIKit.SharpnessKey;
-        paletteKey?: NCoreUIKit.PaletteKey;
-        themeKey?: NCoreUIKit.ThemeKey;
+        gapPropagation?: keyof NCoreUIKit.GapPropagationKey;
+        sharpness?: keyof NCoreUIKit.SharpnessKey;
+        paletteKey?: keyof NCoreUIKit.PaletteKey;
+        themeKey?: keyof NCoreUIKit.ThemeKey;
     };
     spreadBehaviour?: RadioButtonSpreadBehaviour;
     customLocalize?: {
-        activeLocale?: NCoreUIKit.LocaleKey;
+        activeLocale?: keyof NCoreUIKit.LocaleKey;
     };
     type?: RadioButtonType;
     optionalText?: string;

+ 4 - 4
src/components/rowCard/type.ts

@@ -47,10 +47,10 @@ type IRowCardProps = {
     subTitle?: string;
     title: string;
     customTheme?: {
-        gapPropagation?: NCoreUIKit.GapPropagationKey;
-        sharpness?: NCoreUIKit.SharpnessKey;
-        paletteKey?: NCoreUIKit.PaletteKey;
-        themeKey?: NCoreUIKit.ThemeKey;
+        gapPropagation?: keyof NCoreUIKit.GapPropagationKey;
+        sharpness?: keyof NCoreUIKit.SharpnessKey;
+        paletteKey?: keyof NCoreUIKit.PaletteKey;
+        themeKey?: keyof NCoreUIKit.ThemeKey;
     };
 };
 

+ 10 - 10
src/components/selectBox/type.ts

@@ -119,22 +119,22 @@ interface ISelectBoxProps<T> {
         key: string;
     }) => ReactElement;
     customSelectSheetTheme?: {
-        gapPropagation?: NCoreUIKit.GapPropagationKey;
-        sharpness?: NCoreUIKit.SharpnessKey;
-        paletteKey?: NCoreUIKit.PaletteKey;
-        themeKey?: NCoreUIKit.ThemeKey;
+        gapPropagation?: keyof NCoreUIKit.GapPropagationKey;
+        sharpness?: keyof NCoreUIKit.SharpnessKey;
+        paletteKey?: keyof NCoreUIKit.PaletteKey;
+        themeKey?: keyof NCoreUIKit.ThemeKey;
     };
     customTheme?: {
-        gapPropagation?: NCoreUIKit.GapPropagationKey;
-        sharpness?: NCoreUIKit.SharpnessKey;
-        paletteKey?: NCoreUIKit.PaletteKey;
-        themeKey?: NCoreUIKit.ThemeKey;
+        gapPropagation?: keyof NCoreUIKit.GapPropagationKey;
+        sharpness?: keyof NCoreUIKit.SharpnessKey;
+        paletteKey?: keyof NCoreUIKit.PaletteKey;
+        themeKey?: keyof NCoreUIKit.ThemeKey;
     };
     customSelectSheetLocalize?: {
-        activeLocale?: NCoreUIKit.LocaleKey;
+        activeLocale?: keyof NCoreUIKit.LocaleKey;
     };
     customLocalize?: {
-        activeLocale?: NCoreUIKit.LocaleKey;
+        activeLocale?: keyof NCoreUIKit.LocaleKey;
     };
     selectSheetProps?: Omit<
         IBottomSheetProps,

+ 5 - 5
src/components/selectSheet/type.ts

@@ -41,13 +41,13 @@ interface ISelectSheetProps<T> {
         key: string;
     }) => ReactElement;
     customTheme?: {
-        gapPropagation?: NCoreUIKit.GapPropagationKey;
-        sharpness?: NCoreUIKit.SharpnessKey;
-        paletteKey?: NCoreUIKit.PaletteKey;
-        themeKey?: NCoreUIKit.ThemeKey;
+        gapPropagation?: keyof NCoreUIKit.GapPropagationKey;
+        sharpness?: keyof NCoreUIKit.SharpnessKey;
+        paletteKey?: keyof NCoreUIKit.PaletteKey;
+        themeKey?: keyof NCoreUIKit.ThemeKey;
     };
     customLocalize?: {
-        activeLocale?: NCoreUIKit.LocaleKey;
+        activeLocale?: keyof NCoreUIKit.LocaleKey;
     };
     onMoreLoad?: (props: {
         data: Array<T & SelectedItem | SelectedItem>;

+ 4 - 4
src/components/snackBar/type.ts

@@ -70,10 +70,10 @@ export type SnackBarInternalProps = {
         id: string;
     }) => void;
     customTheme?: {
-        gapPropagation?: NCoreUIKit.GapPropagationKey;
-        sharpness?: NCoreUIKit.SharpnessKey;
-        paletteKey?: NCoreUIKit.PaletteKey;
-        themeKey?: NCoreUIKit.ThemeKey;
+        gapPropagation?: keyof NCoreUIKit.GapPropagationKey;
+        sharpness?: keyof NCoreUIKit.SharpnessKey;
+        paletteKey?: keyof NCoreUIKit.PaletteKey;
+        themeKey?: keyof NCoreUIKit.ThemeKey;
     };
 };
 

+ 5 - 5
src/components/switch/type.ts

@@ -42,14 +42,14 @@ interface ISwitchProps {
     titleStyle?: StyleProp<TextStyle>[] | StyleProp<TextStyle>;
     style?: StyleProp<ViewStyle>[] | StyleProp<ViewStyle>;
     customTheme?: {
-        gapPropagation?: NCoreUIKit.GapPropagationKey;
-        sharpness?: NCoreUIKit.SharpnessKey;
-        paletteKey?: NCoreUIKit.PaletteKey;
-        themeKey?: NCoreUIKit.ThemeKey;
+        gapPropagation?: keyof NCoreUIKit.GapPropagationKey;
+        sharpness?: keyof NCoreUIKit.SharpnessKey;
+        paletteKey?: keyof NCoreUIKit.PaletteKey;
+        themeKey?: keyof NCoreUIKit.ThemeKey;
     };
     spreadBehaviour?: SwitchSpreadBehaviour;
     customLocalize?: {
-        activeLocale?: NCoreUIKit.LocaleKey;
+        activeLocale?: keyof NCoreUIKit.LocaleKey;
     };
     animationDuration?: number;
     optionalText?: string;

+ 4 - 4
src/components/text/type.ts

@@ -14,10 +14,10 @@ interface ITextProps extends TextProps {
     customColor?: string;
     children?: ReactNode;
     customTheme?: {
-        gapPropagation?: NCoreUIKit.GapPropagationKey;
-        sharpness?: NCoreUIKit.SharpnessKey;
-        paletteKey?: NCoreUIKit.PaletteKey;
-        themeKey?: NCoreUIKit.ThemeKey;
+        gapPropagation?: keyof NCoreUIKit.GapPropagationKey;
+        sharpness?: keyof NCoreUIKit.SharpnessKey;
+        paletteKey?: keyof NCoreUIKit.PaletteKey;
+        themeKey?: keyof NCoreUIKit.ThemeKey;
     };
 }
 export type {

+ 2 - 2
src/components/textAreaInput/stylesheet.ts

@@ -209,9 +209,9 @@ export const useStyles = ({
             borderColor: colors.content.container[currentType.containerColor],
             paddingBottom: spaces.spacingMd,
             paddingRight: spaces.spacingMd,
-            borderRadius: radiuses.actions,
             paddingLeft: spaces.spacingMd,
             paddingTop: spaces.spacingMd,
+            borderRadius: radiuses.form,
             borderWidth: borders.line
         } as Mutable<ViewStyle>,
         input: {
@@ -247,7 +247,7 @@ export const useStyles = ({
             marginLeft: inlineSpaces.subTitle
         } as Mutable<TextStyle>,
         overlay: {
-            borderRadius: radiuses.actions - 1
+            borderRadius: radiuses.form - 1
         } as Mutable<ViewStyle>,
         rightIcon: {
             marginLeft: spaces.spacingSm

+ 5 - 5
src/components/textAreaInput/type.ts

@@ -56,13 +56,13 @@ export type TextAreaInputSpreadBehaviour = "baseline" | "stretch" | "free";
 
 interface ITextAreaInputProps extends TextInputProps {
     customTheme?: {
-        gapPropagation?: NCoreUIKit.GapPropagationKey;
-        sharpness?: NCoreUIKit.SharpnessKey;
-        paletteKey?: NCoreUIKit.PaletteKey;
-        themeKey?: NCoreUIKit.ThemeKey;
+        gapPropagation?: keyof NCoreUIKit.GapPropagationKey;
+        sharpness?: keyof NCoreUIKit.SharpnessKey;
+        paletteKey?: keyof NCoreUIKit.PaletteKey;
+        themeKey?: keyof NCoreUIKit.ThemeKey;
     };
     customLocalize?: {
-        activeLocale?: NCoreUIKit.LocaleKey;
+        activeLocale?: keyof NCoreUIKit.LocaleKey;
     };
     spreadBehaviour?: TextAreaInputSpreadBehaviour;
     onChangeText?: (value: string) => void;

+ 5 - 5
src/components/textInput/type.ts

@@ -57,13 +57,13 @@ export type TextInputVariant = "text" | "hidden";
 
 interface ITextInputProps extends TextInputProps {
     customTheme?: {
-        gapPropagation?: NCoreUIKit.GapPropagationKey;
-        sharpness?: NCoreUIKit.SharpnessKey;
-        paletteKey?: NCoreUIKit.PaletteKey;
-        themeKey?: NCoreUIKit.ThemeKey;
+        gapPropagation?: keyof NCoreUIKit.GapPropagationKey;
+        sharpness?: keyof NCoreUIKit.SharpnessKey;
+        paletteKey?: keyof NCoreUIKit.PaletteKey;
+        themeKey?: keyof NCoreUIKit.ThemeKey;
     };
     customLocalize?: {
-        activeLocale?: NCoreUIKit.LocaleKey;
+        activeLocale?: keyof NCoreUIKit.LocaleKey;
     };
     spreadBehaviour?: TextInputSpreadBehaviour;
     onChangeText?: (value: string) => void;

+ 4 - 4
src/components/toast/type.ts

@@ -64,10 +64,10 @@ export type ToastInternalProps = {
         id: string;
     }) => void;
     customTheme?: {
-        gapPropagation?: NCoreUIKit.GapPropagationKey;
-        sharpness?: NCoreUIKit.SharpnessKey;
-        paletteKey?: NCoreUIKit.PaletteKey;
-        themeKey?: NCoreUIKit.ThemeKey;
+        gapPropagation?: keyof NCoreUIKit.GapPropagationKey;
+        sharpness?: keyof NCoreUIKit.SharpnessKey;
+        paletteKey?: keyof NCoreUIKit.PaletteKey;
+        themeKey?: keyof NCoreUIKit.ThemeKey;
     };
 };
 

+ 6 - 6
src/context/localize.tsx

@@ -24,7 +24,7 @@ class NCoreUIKitLocalize<T extends LocalizeType> extends NCoreContext<LocalizeCo
     useContext = ({
         activeLocale
     }: {
-        activeLocale?: NCoreUIKit.LocaleKey
+        activeLocale?: keyof NCoreUIKit.LocaleKey
     } = {}): LocalizeContextType => {
         const currentState = useContext(this.stateContext);
 
@@ -80,14 +80,14 @@ class NCoreUIKitLocalize<T extends LocalizeType> extends NCoreContext<LocalizeCo
     }
 
     prepare = (props?: {
-        activeLocale?: NCoreUIKit.LocaleKey
+        activeLocale?: keyof NCoreUIKit.LocaleKey
     }): LocalizeContextStateType => {
         const locale = props && props.activeLocale ? props.activeLocale : this.state.activeLocale;
 
         const defaultLocale = defaultLocalesData.find(l => l.locale === locale) ?? defaultLocalesData[0]!;
 
         const defaultState: LocalizeContextStateType = {
-            activeLocale: defaultLocale.locale as NCoreUIKit.LocaleKey,
+            activeLocale: defaultLocale.locale as keyof NCoreUIKit.LocaleKey,
             // localizeWithObject: this.localizeWithObject,
             translations: defaultLocale.translations,
             isRTL: defaultLocale.isRTL
@@ -105,7 +105,7 @@ class NCoreUIKitLocalize<T extends LocalizeType> extends NCoreContext<LocalizeCo
         }
 
         const newState: LocalizeContextStateType = {
-            activeLocale: currentProjectLocale.locale as NCoreUIKit.LocaleKey,
+            activeLocale: currentProjectLocale.locale as keyof NCoreUIKit.LocaleKey,
             // localizeWithObject: this.localizeWithObject,
             isRTL: currentProjectLocale.isRTL,
             // localize: this.localize,
@@ -178,7 +178,7 @@ class NCoreUIKitLocalize<T extends LocalizeType> extends NCoreContext<LocalizeCo
     switch = ({
         localeKey
     }: {
-        localeKey: NCoreUIKit.LocaleKey
+        localeKey: keyof NCoreUIKit.LocaleKey
     }) => {
         const activeState = this.prepare({
             activeLocale: localeKey
@@ -188,7 +188,7 @@ class NCoreUIKitLocalize<T extends LocalizeType> extends NCoreContext<LocalizeCo
     };
 
     updateProjectLocales = (newProjectLocales: NCoreUIKit.Locales, newState?: {
-        activeLocale?: NCoreUIKit.LocaleKey
+        activeLocale?: keyof NCoreUIKit.LocaleKey
     }) => {
         this.projectLocales = newProjectLocales;
         const activeState = this.prepare(newState);

+ 8 - 8
src/context/theme.tsx

@@ -32,9 +32,9 @@ class NCoreUIKitTheme<T extends ThemesType> extends NCoreContext<ThemeContextTyp
         sharpness,
         themeKey
     }: {
+        paletteKey?: keyof NCoreUIKit.PaletteKey;
+        themeKey?: keyof NCoreUIKit.ThemeKey;
         gapPropagation?: GapPropagationType;
-        paletteKey?: NCoreUIKit.PaletteKey;
-        themeKey?: NCoreUIKit.ThemeKey;
         sharpness?: SharpnessType;
     } = {}): ThemeContextType => {
         const currentState = useContext(this.stateContext);
@@ -106,9 +106,9 @@ class NCoreUIKitTheme<T extends ThemesType> extends NCoreContext<ThemeContextTyp
     }
 
     prepare = (props?: {
+        activePalette?: keyof NCoreUIKit.PaletteKey;
         activeGapPropagation?: GapPropagationType;
-        activePalette?: NCoreUIKit.PaletteKey;
-        activeTheme?: NCoreUIKit.ThemeKey;
+        activeTheme?: keyof NCoreUIKit.ThemeKey;
         activeSharpness?: SharpnessType;
     }): ThemeContextStateType => {
         const gapPropagation = props && props.activeGapPropagation ? props.activeGapPropagation : this.state.activeGapPropagation;
@@ -187,9 +187,9 @@ class NCoreUIKitTheme<T extends ThemesType> extends NCoreContext<ThemeContextTyp
         sharpness,
         themeKey
     }: {
+        paletteKey?: keyof NCoreUIKit.PaletteKey;
+        themeKey?: keyof NCoreUIKit.ThemeKey;
         gapPropagation?: GapPropagationType;
-        paletteKey?: NCoreUIKit.PaletteKey;
-        themeKey?: NCoreUIKit.ThemeKey;
         sharpness?: SharpnessType;
     }) => {
         const activeState = this.prepare({
@@ -203,9 +203,9 @@ class NCoreUIKitTheme<T extends ThemesType> extends NCoreContext<ThemeContextTyp
     };
 
     updateProjectTheme = (newProjectThemes: NCoreUIKit.Palette, newState?: {
+        activePalette?: keyof NCoreUIKit.PaletteKey;
         activeGapPropagation?: GapPropagationType;
-        activePalette?: NCoreUIKit.PaletteKey;
-        activeTheme?: NCoreUIKit.ThemeKey;
+        activeTheme?: keyof NCoreUIKit.ThemeKey;
         activeSharpness?: SharpnessType;
     }) => {
         this.projectThemes = newProjectThemes;

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

@@ -39,8 +39,8 @@ export const mergeTheme = (
 export const mergePalettes = (
     defaultPalettes: NCoreUIKit.ThemePalettes,
     projectPalettes: NCoreUIKit.ThemePalettes,
-    activePalette: NCoreUIKit.PaletteKey,
-    activeTheme: NCoreUIKit.ThemeKey
+    activePalette: keyof NCoreUIKit.PaletteKey,
+    activeTheme: keyof NCoreUIKit.ThemeKey
 ): NCoreUIKit.ThemeTokens => {
     const defaultPalette = defaultPalettes.find(p => p.name === activePalette);
 

+ 6 - 6
src/types/index.ts

@@ -69,11 +69,11 @@ type NCoreUIKitConfig = ThemesType & LocalizeType & ModalType;
 
 declare global {
     namespace NCoreUIKit {
-        type GapPropagationKey = GapPropagationType;
-        type SharpnessKey = SharpnessType;
-        type PaletteKey = PaletteType;
-        type LocaleKey = LocaleType;
-        type ThemeKey = ThemeType;
+        interface GapPropagationKey extends Record<GapPropagationType, unknown> {}
+        interface SharpnessKey extends Record<SharpnessType, unknown> {}
+        interface PaletteKey extends Record<PaletteType, unknown> {}
+        interface LocaleKey extends Record<LocaleType, unknown> {}
+        interface ThemeKey extends Record<ThemeType, unknown> {}
 
         type IconCallbackProps = INCoreUIKitIconCallbackProps;
 
@@ -143,7 +143,7 @@ declare global {
             name: string;
         }
 
-        type Theme = Record<ThemeKey, ThemeTokens>;
+        type Theme = Record<keyof ThemeKey, ThemeTokens>;
 
         type ColorsMerged = DefaultSystemColors & DefaultContentColors;
 

+ 2 - 2
src/types/locale.ts

@@ -5,7 +5,7 @@ import {
 import type ITextProps from "../components/text/type";
 
 export type LocalizeType = {
-    initialSelectedLocale?: NCoreUIKit.LocaleKey;
+    initialSelectedLocale?: keyof NCoreUIKit.LocaleKey;
     projectLocales?: NCoreUIKit.Locales;
 };
 
@@ -20,7 +20,7 @@ export type LocalizeContextType = {
         parameters?: Array<string | ReactNode | ReactElement>,
         props?: Array<ITextProps>
     ) => string;
-    activeLocale: NCoreUIKit.LocaleKey;
+    activeLocale: keyof NCoreUIKit.LocaleKey;
     localize: (
         translation: keyof NCoreUIKit.Translation,
         parameters?: Array<string | number>

+ 4 - 4
src/types/theme.ts

@@ -1,8 +1,8 @@
 export type ThemesType = {
+    initialSelectedPalette?: keyof NCoreUIKit.PaletteKey;
     initialSelectedGapPropagation?: GapPropagationType;
+    initialSelectedTheme?: keyof NCoreUIKit.ThemeKey;
     initialSelectedActiveSharpness?: SharpnessType;
-    initialSelectedPalette?: NCoreUIKit.PaletteKey;
-    initialSelectedTheme?: NCoreUIKit.ThemeKey;
     projectThemes?: NCoreUIKit.Palette;
 };
 
@@ -17,11 +17,11 @@ export type ThemeType = "light" | "dark";
 export type ThemeContextStateType = Partial<ThemeContextType>;
 
 export type ThemeContextType = {
+    activePalette: keyof NCoreUIKit.PaletteKey;
     activeGapPropagation: GapPropagationType;
+    activeTheme: keyof NCoreUIKit.ThemeKey;
     inlineSpaces: NCoreUIKit.InlineSpaces;
-    activePalette: NCoreUIKit.PaletteKey;
     typography: NCoreUIKit.Typography;
-    activeTheme: NCoreUIKit.ThemeKey;
     activeSharpness: SharpnessType;
     colors: NCoreUIKit.ThemeTokens;
     radiuses: NCoreUIKit.Radiuses;

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

@@ -582,7 +582,7 @@
                             },
                             "content": {
                                 "disabled": {
-                                    "primary": "rgba(0,107,92,0.32)",
+                                    "primary": "rgba(101,250,222,0.32)",
                                     "error": "rgba(186,16,16,0.32)",
                                     "warning": "rgba(176,108,0,0.32)",
                                     "success": "rgba(74,128,82,0.32)",