ncore-ui-kit 1.1.0-alpha.3 → 1.1.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/module/components/localeSwitcher/index.js +5 -3
- package/lib/module/components/localeSwitcher/index.js.map +1 -1
- package/lib/module/components/paletteSwitcher/index.js +5 -3
- package/lib/module/components/paletteSwitcher/index.js.map +1 -1
- package/lib/module/components/themeSwitcher/index.js +5 -3
- package/lib/module/components/themeSwitcher/index.js.map +1 -1
- package/lib/module/package.json +1 -1
- package/lib/package.json +1 -1
- package/lib/src/components/localeSwitcher/index.js +5 -5
- package/lib/src/components/paletteSwitcher/index.js +5 -5
- package/lib/src/components/themeSwitcher/index.js +5 -5
- package/lib/tsconfig.build.tsbuildinfo +1 -1
- package/lib/typescript/package.json +1 -1
- package/lib/typescript/src/components/localeSwitcher/index.d.ts.map +1 -1
- package/lib/typescript/src/components/paletteSwitcher/index.d.ts.map +1 -1
- package/lib/typescript/src/components/themeSwitcher/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/localeSwitcher/index.tsx +7 -5
- package/src/components/paletteSwitcher/index.tsx +7 -5
- package/src/components/themeSwitcher/index.tsx +7 -5
|
@@ -10,9 +10,11 @@ const LocaleSwitcher = ({
|
|
|
10
10
|
variants: variantsProps = [],
|
|
11
11
|
isWorkWithHighlightButton,
|
|
12
12
|
isWorkWithNextShowSystem,
|
|
13
|
+
customBorderColor,
|
|
13
14
|
customLocalize,
|
|
14
|
-
|
|
15
|
+
customColor,
|
|
15
16
|
style,
|
|
17
|
+
color,
|
|
16
18
|
...props
|
|
17
19
|
}) => {
|
|
18
20
|
const {
|
|
@@ -79,8 +81,8 @@ const LocaleSwitcher = ({
|
|
|
79
81
|
const currentVariant = variants[isWorkWithNextShowSystem ? viewVariantIndex : currentVariantIndex];
|
|
80
82
|
const allProps = {
|
|
81
83
|
...props,
|
|
82
|
-
customBorderColor: currentVariant && currentVariant.borderColor ? currentVariant.borderColor : color,
|
|
83
|
-
customColor: currentVariant && currentVariant.backgroundColor ? currentVariant.backgroundColor : color,
|
|
84
|
+
customBorderColor: customBorderColor || (currentVariant && currentVariant.borderColor ? currentVariant.borderColor : color),
|
|
85
|
+
customColor: customColor || (currentVariant && currentVariant.backgroundColor ? currentVariant.backgroundColor : color),
|
|
84
86
|
icon: ({
|
|
85
87
|
color,
|
|
86
88
|
size
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useState","NCoreUIKitLocalize","Button","EnUsIcon","TRTRIcon","HighlightButton","jsx","_jsx","LocaleSwitcher","variants","variantsProps","isWorkWithHighlightButton","isWorkWithNextShowSystem","customLocalize","
|
|
1
|
+
{"version":3,"names":["useEffect","useState","NCoreUIKitLocalize","Button","EnUsIcon","TRTRIcon","HighlightButton","jsx","_jsx","LocaleSwitcher","variants","variantsProps","isWorkWithHighlightButton","isWorkWithNextShowSystem","customBorderColor","customLocalize","customColor","style","color","props","activeLocale","localeKeys","useContext","currentIndex","setCurrentIndex","findIndex","t","cI","tI","nextCI","length","variantsPre","isHaveNCTRTR","iV","localeKey","isHaveNCENUS","unshift","backgroundColor","undefined","borderColor","iconColor","icon","size","sort","a","b","indexA","indexOf","indexB","localeCompare","currentVariantIndex","e","nextVariantIndex","viewVariantIndex","currentVariant","allProps","Icon","onPress","switch"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/localeSwitcher/index.tsx"],"mappings":";;AAAA,SACIA,SAAS,EACTC,QAAQ,QAEL,OAAO;AAKd,SACIC,kBAAkB,QACf,qBAAkB;AAIzB,OAAOC,MAAM,MAAM,oBAAW;AAC9B,SACIC,QAAQ,EACRC,QAAQ,QACL,2BAAkB;AACzB,OAAOC,eAAe,MAAM,6BAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEjD,MAAMC,cAAwC,GAAGA,CAAC;EAC9CC,QAAQ,EAAEC,aAAa,GAAG,EAAE;EAC5BC,yBAAyB;EACzBC,wB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GACNoD;EAAQ,CACf,CAAC;AACN,CAAC;AACD,eAAe9C,cAAc","ignoreList":[]}
|
|
@@ -10,9 +10,11 @@ const PaletteSwitcher = ({
|
|
|
10
10
|
variants: variantsProps = [],
|
|
11
11
|
isWorkWithHighlightButton,
|
|
12
12
|
isWorkWithNextShowSystem,
|
|
13
|
+
customBorderColor,
|
|
13
14
|
customTheme,
|
|
14
|
-
|
|
15
|
+
customColor,
|
|
15
16
|
style,
|
|
17
|
+
color,
|
|
16
18
|
...props
|
|
17
19
|
}) => {
|
|
18
20
|
const {
|
|
@@ -95,8 +97,8 @@ const PaletteSwitcher = ({
|
|
|
95
97
|
const currentVariant = variants[isWorkWithNextShowSystem ? viewVariantIndex : currentVariantIndex];
|
|
96
98
|
const allProps = {
|
|
97
99
|
...props,
|
|
98
|
-
customBorderColor: currentVariant && currentVariant.borderColor ? currentVariant.borderColor : color,
|
|
99
|
-
customColor: currentVariant && currentVariant.backgroundColor ? currentVariant.backgroundColor : color,
|
|
100
|
+
customBorderColor: customBorderColor || (currentVariant && currentVariant.borderColor ? currentVariant.borderColor : color),
|
|
101
|
+
customColor: customColor || (currentVariant && currentVariant.backgroundColor ? currentVariant.backgroundColor : color),
|
|
100
102
|
icon: ({
|
|
101
103
|
color,
|
|
102
104
|
size
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useState","NCoreUIKitTheme","Button","NIBGATCommunityIcon","CayCoreIcon","NIBGATIcon","HighlightButton","jsx","_jsx","PaletteSwitcher","variants","variantsProps","isWorkWithHighlightButton","isWorkWithNextShowSystem","customTheme","
|
|
1
|
+
{"version":3,"names":["useEffect","useState","NCoreUIKitTheme","Button","NIBGATCommunityIcon","CayCoreIcon","NIBGATIcon","HighlightButton","jsx","_jsx","PaletteSwitcher","variants","variantsProps","isWorkWithHighlightButton","isWorkWithNextShowSystem","customBorderColor","customTheme","customColor","style","color","props","activePalette","paletteKeys","useContext","currentIndex","setCurrentIndex","findIndex","t","cI","tI","nextCI","length","variantsPre","isHaveNC","iV","paletteKey","isHaveCC","isHaveN","unshift","backgroundColor","undefined","borderColor","iconColor","icon","size","sort","a","b","indexA","indexOf","indexB","localeCompare","currentVariantIndex","e","nextVariantIndex","viewVariantIndex","currentVariant","allProps","Icon","onPress","switch"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/paletteSwitcher/index.tsx"],"mappings":";;AAAA,SACIA,SAAS,EACTC,QAAQ,QAEL,OAAO;AAKd,SACIC,eAAe,QACZ,qBAAkB;AAIzB,OAAOC,MAAM,MAAM,oBAAW;AAC9B,SACIC,mBAAmB,EACnBC,WAAW,EACXC,UAAU,QACP,2BAAkB;AACzB,OAAOC,eAAe,MAAM,6BAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEjD,MAAMC,eAA0C,GAAGA,CAAC;EAChDC,QAAQ,EAAEC,aAAa,GAAG,EAAE;EAC5BC,yBAAyB;EACzBC,wBAAwB;EACxBC,iBAAiB;EACjBC,WAAW;EACXC,WAAW;EACXC,KAAK;EACLC,KAAK;EACL,GAAGC;AACP,CAAC,KAAK;EACF,MAAM;IACFC,aAAa;IACbC;EACJ,CAAC,GAAGpB,eAAe,CAACqB,UAAU,CAACP,WAAW,CAAC;EAE3C,MAAM,CACFQ,YAAY,EACZC,eAAe,CAClB,GAAGxB,QAAQ,CAACqB,WAAW,CAACI,SAAS,CAACC,CAAC,IAAIA,CAAC,KAAKN,aAAa,CAAC,CAAC;EAE7DrB,SAAS,CAAC,MAAM;IACZ,MAAM4B,EAAE,GAAGN,WAAW,CAACI,SAAS,CAACG,EAAE,IAAIA,EAAE,KAAKR,aAAa,CAAC;IAE5D,MAAMS,MAAM,GAAGhB,wBAAwB,GAAGc,EAAE,GAAG,CAAC,GAAGN,WAAW,CAACS,MAAM,GAAG,CAAC,GAAG,CAAC,GAAGH,EAAE,GAAG,CAAC,GAAGA,EAAE;IAE3F,IAAGJ,YAAY,KAAKM,MAAM,EAAE;MACxBL,eAAe,CAACK,MA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ton,
|
|
12
12
|
isWorkWithNextShowSystem,
|
|
13
|
+
customBorderColor,
|
|
13
14
|
customTheme,
|
|
14
|
-
|
|
15
|
+
customColor,
|
|
15
16
|
style,
|
|
17
|
+
color,
|
|
16
18
|
...props
|
|
17
19
|
}) => {
|
|
18
20
|
const {
|
|
@@ -88,8 +90,8 @@ const ThemeSwitcher = ({
|
|
|
88
90
|
const currentVariant = variants[isWorkWithNextShowSystem ? viewVariantIndex : currentVariantIndex];
|
|
89
91
|
const allProps = {
|
|
90
92
|
...props,
|
|
91
|
-
customBorderColor: currentVariant && currentVariant.borderColor ? currentVariant.borderColor : color,
|
|
92
|
-
customColor: currentVariant && currentVariant.backgroundColor ? currentVariant.backgroundColor : color,
|
|
93
|
+
customBorderColor: customBorderColor || (currentVariant && currentVariant.borderColor ? currentVariant.borderColor : color),
|
|
94
|
+
customColor: customColor || (currentVariant && currentVariant.backgroundColor ? currentVariant.backgroundColor : color),
|
|
93
95
|
icon: ({
|
|
94
96
|
color,
|
|
95
97
|
size
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useState","NCoreUIKitTheme","Moon","MoonIcon","Sun","SunIcon","Button","HighlightButton","jsx","_jsx","ThemeSwitcher","variants","variantsProps","isWorkWithHighlightButton","isWorkWithNextShowSystem","customTheme","
|
|
1
|
+
{"version":3,"names":["useEffect","useState","NCoreUIKitTheme","Moon","MoonIcon","Sun","SunIcon","Button","HighlightButton","jsx","_jsx","ThemeSwitcher","variants","variantsProps","isWorkWithHighlightButton","isWorkWithNextShowSystem","customBorderColor","customTheme","customColor","style","color","props","activeTheme","themeKeys","colors","useContext","currentIndex","setCurrentIndex","findIndex","t","cI","tI","nextCI","length","variantsPre","isHaveLight","iV","themeKey","isHaveDark","unshift","backgroundColor","undefined","borderColor","iconColor","icon","size","_customColor","project","content","sort","a","b","indexA","indexOf","indexB","localeCompare","currentVariantIndex","e","nextVariantIndex","viewVariantIndex","currentVariant","allProps","Icon","onPress","switch"],"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B,GAAGH,mBAAmB,CAAC;EAElG,MAAMK,QAAQ,GAAG;IACb,GAAGxC,KAAK;IACRL,iBAAiB,EAAEA,iBAAiB,KAAK4C,cAAc,IAAIA,cAAc,CAAClB,WAAW,GACjFkB,cAAc,CAAClB,WAAW,GAE1BtB,KAAK,CAAC;IACVF,WAAW,EAAEA,WAAW,KAAK0C,cAAc,IAAIA,cAAc,CAACpB,eAAe,GACzEoB,cAAc,CAACpB,eAAe,GAE9BpB,KAAK,CAAC;IACVwB,IAAI,EAAEA,CAAC;MACHxB,KAAK;MACLyB;IAIJ,CAAC,KAAK;MACF,MAAMiB,IAAI,GAAGF,cAAc,EAAEhB,IAAsB;MAEnD,oBAAOlC,IAAA,CAACoD,IAAI;QACR5C,WAAW,EAAE0C,cAAc,IAAIA,cAAc,CAACjB,SAAS,GAAGiB,cAAc,CAACjB,SAAS,GAAGF,SAAU;QAC/FrB,KAAK,EAAEA,KAAM;QACbyB,IAAI,EAAEA;MAAK,CACd,CAAC;IACN,CAAC;IACDkB,OAAO,EAAEA,CAAA,KAAM;MACX7D,eAAe,CAAC8D,MAAM,CAAC;QACnB3B,QAAQ,EAAEd,SAAS,CAACoC,gBAAgB;MACxC,CAAC,CAAC;IACN,CAAC;IACDxC,KAAK,EAAE,CACHA,KAAK;EAEb,CAAC;EAED,IAAGL,yBAAyB,EAAE;IAC1B,oBAAOJ,IAAA,CAACF,eAAe;MAAA,GACfqD;IAAQ,CACf,CAAC;EACN;EAEA,oBAAOnD,IAAA,CAACH,MAAM;IAAA,GACNsD;EAAQ,CACf,CAAC;AACN,CAAC;AACD,eAAelD,aAAa","ignoreList":[]}
|
package/lib/module/package.json
CHANGED
package/lib/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import { NCoreUIKitLocalize } from "../../core/hooks";
|
|
|
4
4
|
import Button from "../button";
|
|
5
5
|
import { EnUsIcon, TRTRIcon } from "../../assets/svg";
|
|
6
6
|
import HighlightButton from "../highlightButton";
|
|
7
|
-
const LocaleSwitcher = ({ variants: variantsProps = [], isWorkWithHighlightButton, isWorkWithNextShowSystem, customLocalize,
|
|
7
|
+
const LocaleSwitcher = ({ variants: variantsProps = [], isWorkWithHighlightButton, isWorkWithNextShowSystem, customBorderColor, customLocalize, customColor, style, color, ...props }) => {
|
|
8
8
|
const { activeLocale, localeKeys } = NCoreUIKitLocalize.useContext(customLocalize);
|
|
9
9
|
const [currentIndex, setCurrentIndex] = useState(localeKeys.findIndex(t => t === activeLocale));
|
|
10
10
|
useEffect(() => {
|
|
@@ -64,14 +64,14 @@ const LocaleSwitcher = ({ variants: variantsProps = [], isWorkWithHighlightButto
|
|
|
64
64
|
const currentVariant = variants[isWorkWithNextShowSystem ? viewVariantIndex : currentVariantIndex];
|
|
65
65
|
const allProps = {
|
|
66
66
|
...props,
|
|
67
|
-
customBorderColor: currentVariant && currentVariant.borderColor ?
|
|
67
|
+
customBorderColor: customBorderColor || (currentVariant && currentVariant.borderColor ?
|
|
68
68
|
currentVariant.borderColor
|
|
69
69
|
:
|
|
70
|
-
color,
|
|
71
|
-
customColor: currentVariant && currentVariant.backgroundColor ?
|
|
70
|
+
color),
|
|
71
|
+
customColor: customColor || (currentVariant && currentVariant.backgroundColor ?
|
|
72
72
|
currentVariant.backgroundColor
|
|
73
73
|
:
|
|
74
|
-
color,
|
|
74
|
+
color),
|
|
75
75
|
icon: ({ color, size }) => {
|
|
76
76
|
const Icon = currentVariant?.icon;
|
|
77
77
|
return _jsx(Icon, { customColor: currentVariant && currentVariant.iconColor ? currentVariant.iconColor : undefined, color: color, size: size });
|
|
@@ -4,7 +4,7 @@ import { NCoreUIKitTheme } from "../../core/hooks";
|
|
|
4
4
|
import Button from "../button";
|
|
5
5
|
import { NIBGATCommunityIcon, CayCoreIcon, NIBGATIcon } from "../../assets/svg";
|
|
6
6
|
import HighlightButton from "../highlightButton";
|
|
7
|
-
const PaletteSwitcher = ({ variants: variantsProps = [], isWorkWithHighlightButton, isWorkWithNextShowSystem, customTheme,
|
|
7
|
+
const PaletteSwitcher = ({ variants: variantsProps = [], isWorkWithHighlightButton, isWorkWithNextShowSystem, customBorderColor, customTheme, customColor, style, color, ...props }) => {
|
|
8
8
|
const { activePalette, paletteKeys } = NCoreUIKitTheme.useContext(customTheme);
|
|
9
9
|
const [currentIndex, setCurrentIndex] = useState(paletteKeys.findIndex(t => t === activePalette));
|
|
10
10
|
useEffect(() => {
|
|
@@ -76,14 +76,14 @@ const PaletteSwitcher = ({ variants: variantsProps = [], isWorkWithHighlightButt
|
|
|
76
76
|
const currentVariant = variants[isWorkWithNextShowSystem ? viewVariantIndex : currentVariantIndex];
|
|
77
77
|
const allProps = {
|
|
78
78
|
...props,
|
|
79
|
-
customBorderColor: currentVariant && currentVariant.borderColor ?
|
|
79
|
+
customBorderColor: customBorderColor || (currentVariant && currentVariant.borderColor ?
|
|
80
80
|
currentVariant.borderColor
|
|
81
81
|
:
|
|
82
|
-
color,
|
|
83
|
-
customColor: currentVariant && currentVariant.backgroundColor ?
|
|
82
|
+
color),
|
|
83
|
+
customColor: customColor || (currentVariant && currentVariant.backgroundColor ?
|
|
84
84
|
currentVariant.backgroundColor
|
|
85
85
|
:
|
|
86
|
-
color,
|
|
86
|
+
color),
|
|
87
87
|
icon: ({ color, size }) => {
|
|
88
88
|
const Icon = currentVariant?.icon;
|
|
89
89
|
return _jsx(Icon, { customColor: currentVariant && currentVariant.iconColor ? currentVariant.iconColor : undefined, color: color, size: size });
|
|
@@ -4,7 +4,7 @@ import { NCoreUIKitTheme } from "../../core/hooks";
|
|
|
4
4
|
import { Moon as MoonIcon, Sun as SunIcon } from "lucide-react-native";
|
|
5
5
|
import Button from "../button";
|
|
6
6
|
import HighlightButton from "../highlightButton";
|
|
7
|
-
const ThemeSwitcher = ({ variants: variantsProps = [], isWorkWithHighlightButton, isWorkWithNextShowSystem, customTheme,
|
|
7
|
+
const ThemeSwitcher = ({ variants: variantsProps = [], isWorkWithHighlightButton, isWorkWithNextShowSystem, customBorderColor, customTheme, customColor, style, color, ...props }) => {
|
|
8
8
|
const { activeTheme, themeKeys, colors } = NCoreUIKitTheme.useContext(customTheme);
|
|
9
9
|
const [currentIndex, setCurrentIndex] = useState(themeKeys.findIndex(t => t === activeTheme));
|
|
10
10
|
useEffect(() => {
|
|
@@ -66,14 +66,14 @@ const ThemeSwitcher = ({ variants: variantsProps = [], isWorkWithHighlightButton
|
|
|
66
66
|
const currentVariant = variants[isWorkWithNextShowSystem ? viewVariantIndex : currentVariantIndex];
|
|
67
67
|
const allProps = {
|
|
68
68
|
...props,
|
|
69
|
-
customBorderColor: currentVariant && currentVariant.borderColor ?
|
|
69
|
+
customBorderColor: customBorderColor || (currentVariant && currentVariant.borderColor ?
|
|
70
70
|
currentVariant.borderColor
|
|
71
71
|
:
|
|
72
|
-
color,
|
|
73
|
-
customColor: currentVariant && currentVariant.backgroundColor ?
|
|
72
|
+
color),
|
|
73
|
+
customColor: customColor || (currentVariant && currentVariant.backgroundColor ?
|
|
74
74
|
currentVariant.backgroundColor
|
|
75
75
|
:
|
|
76
|
-
color,
|
|
76
|
+
color),
|
|
77
77
|
icon: ({ color, size }) => {
|
|
78
78
|
const Icon = currentVariant?.icon;
|
|
79
79
|
return _jsx(Icon, { customColor: currentVariant && currentVariant.iconColor ? currentVariant.iconColor : undefined, color: color, size: size });
|