Ver código fonte

Merge branch 'release/1.1.0-alpha.2'

lfabl 3 semanas atrás
pai
commit
7bba723bc2

+ 18 - 0
example/web/public/.htaccess

@@ -0,0 +1,18 @@
+<IfModule mod_rewrite.c>
+
+  RewriteEngine On
+  RewriteBase /
+  RewriteRule ^index\.html$ - [L]
+  RewriteCond %{REQUEST_FILENAME} !-f
+  RewriteCond %{REQUEST_FILENAME} !-d
+  RewriteCond %{REQUEST_FILENAME} !-l
+  RewriteRule . /index.html [L]
+
+</IfModule>
+
+# php -- BEGIN cPanel-generated handler, do not edit
+# Set the “ea-php56” package as the default “PHP” programming language.
+<IfModule mime_module>
+  AddHandler application/x-httpd-ea-php56___lsphp .php .php5 .phtml
+</IfModule>
+# php -- END cPanel-generated handler, do not edit

+ 1 - 0
example/web/webpack.config.js

@@ -151,6 +151,7 @@ module.exports = {
             patterns: [
                 {
                     globOptions: {
+                        dot: true,
                         ignore: [
                             "**/index.html"
                         ]

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
     "name": "ncore-ui-kit",
-    "version": "1.1.0-alpha.1",
+    "version": "1.1.0-alpha.2",
     "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/localeSwitcher/index.tsx

@@ -51,15 +51,17 @@ const LocaleSwitcher: FC<ILocaleSwitcherProps> = ({
         activeLocale
     ]);
 
-    const variantsPre: LocaleSwitchVariants = variantsProps;
+    const variantsPre: Array<Omit<LocaleSwitchVariants[0], "backgroundColor"> & {
+        backgroundColor?: LocaleSwitchVariants[0]["backgroundColor"]
+    }> = variantsProps;
 
     const isHaveNCTRTR = variantsProps.findIndex(iV => iV.localeKey === "tr-TR") !== -1;
     const isHaveNCENUS = variantsProps.findIndex(iV => iV.localeKey === "en-US") !== -1;
 
     if(!isHaveNCTRTR) {
         variantsPre.unshift({
+            backgroundColor: isWorkWithHighlightButton ? undefined : "subtle",
             borderColor: "transparent",
-            backgroundColor: "subtle",
             iconColor: "turkish",
             localeKey: "tr-TR",
             icon: ({
@@ -74,8 +76,8 @@ const LocaleSwitcher: FC<ILocaleSwitcherProps> = ({
 
     if(!isHaveNCENUS) {
         variantsPre.unshift({
+            backgroundColor: isWorkWithHighlightButton ? undefined : "subtle",
             borderColor: "transparent",
-            backgroundColor: "subtle",
             iconColor: "english",
             localeKey: "en-US",
             icon: ({

+ 6 - 4
src/components/paletteSwitcher/index.tsx

@@ -52,7 +52,9 @@ const PaletteSwitcher: FC<IPaletteSwitcherProps> = ({
         activePalette
     ]);
 
-    const variantsPre: ThemeSwitchVariants = variantsProps;
+    const variantsPre: Array<Omit<ThemeSwitchVariants[0], "backgroundColor"> & {
+        backgroundColor?: ThemeSwitchVariants[0]["backgroundColor"]
+    }> = variantsProps;
 
     const isHaveNC = variantsProps.findIndex(iV => iV.paletteKey === "nibgat-community") !== -1;
     const isHaveCC = variantsProps.findIndex(iV => iV.paletteKey === "caycore") !== -1;
@@ -60,8 +62,8 @@ const PaletteSwitcher: FC<IPaletteSwitcherProps> = ({
 
     if(!isHaveN) {
         variantsPre.unshift({
+            backgroundColor: isWorkWithHighlightButton ? undefined : "subtle",
             borderColor: "transparent",
-            backgroundColor: "subtle",
             paletteKey: "nibgat",
             iconColor: "moon",
             icon: ({
@@ -76,9 +78,9 @@ const PaletteSwitcher: FC<IPaletteSwitcherProps> = ({
 
     if(!isHaveNC) {
         variantsPre.unshift({
+            backgroundColor: isWorkWithHighlightButton ? undefined : "subtle",
             paletteKey: "nibgat-community",
             borderColor: "transparent",
-            backgroundColor: "subtle",
             iconColor: "moon",
             icon: ({
                 size
@@ -92,8 +94,8 @@ const PaletteSwitcher: FC<IPaletteSwitcherProps> = ({
 
     if(!isHaveCC) {
         variantsPre.unshift({
+            backgroundColor: isWorkWithHighlightButton ? undefined : "subtle",
             borderColor: "transparent",
-            backgroundColor: "subtle",
             paletteKey: "caycore",
             iconColor: "moon",
             icon: ({

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

@@ -52,15 +52,17 @@ const ThemeSwitcher: FC<IThemeSwitcherProps> = ({
         activeTheme
     ]);
 
-    const variantsPre: ThemeSwitchVariants = variantsProps;
+    const variantsPre: Array<Omit<ThemeSwitchVariants[0], "backgroundColor"> & {
+        backgroundColor?: ThemeSwitchVariants[0]["backgroundColor"]
+    }> = variantsProps;
 
     const isHaveLight = variantsProps.findIndex(iV => iV.themeKey === "light") !== -1;
     const isHaveDark = variantsProps.findIndex(iV => iV.themeKey === "dark") !== -1;
 
     if(!isHaveDark) {
         variantsPre.unshift({
+            backgroundColor: isWorkWithHighlightButton ? undefined : "subtle",
             borderColor: "transparent",
-            backgroundColor: "subtle",
             iconColor: "moon",
             themeKey: "dark",
             icon: ({
@@ -80,8 +82,8 @@ const ThemeSwitcher: FC<IThemeSwitcherProps> = ({
 
     if(!isHaveLight) {
         variantsPre.unshift({
+            backgroundColor: isWorkWithHighlightButton ? undefined : "subtle",
             borderColor: "transparent",
-            backgroundColor: "subtle",
             themeKey: "light",
             iconColor: "sun",
             icon: ({