@evlop/commons 1.0.201 → 1.0.203
Sign up to get free protection for your applications and to get access to all the features.
@@ -196,7 +196,7 @@ declare type ShadeableColorWithoutGray = Exclude<ShadeableColor, 'gray'>;
|
|
196
196
|
declare type ShadedColorWithoutGray = `${ShadeableColorWithoutGray}-shade-${ColorShade}` | `${ShadeableColorWithoutGray}-${ColorShade}`;
|
197
197
|
declare type ShadedGrayColor = `gray-shade-${GrayColorShade}` | `gray-${GrayColorShade}`;
|
198
198
|
declare type AlphaColor = `${ShadeableColor}-alpha-${ColorAlphaShade}`;
|
199
|
-
export declare type Color = BaseColor | ShadedColorWithoutGray | ShadedGrayColor | AlphaColor;
|
199
|
+
export declare type Color = BaseColor | ShadedColorWithoutGray | ShadedGrayColor | AlphaColor | string;
|
200
200
|
export declare function generateColorLightDarkShades(color: string, colorName: string, dark?: boolean): {};
|
201
201
|
export declare function generateColorAlphaShades(color: any): {};
|
202
202
|
export declare function generateColorShadesWithName(colorName: string, color: string, dark?: boolean): {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"themeHelpers.d.ts","sourceRoot":"","sources":["../../../src/helpers/themeHelpers.tsx"],"names":[],"mappings":"AA+BA,eAAO,MAAM,iBAAiB,aAAa,MAAM;;;;CAI/C,CAAC;AAGH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BrB,CAAA;AAED,aAAK,SAAS,GAAG,OAAO,SAAS,CAAC;AAClC,aAAK,QAAQ,GAAG,MAAM,SAAS,CAAC;AAEhC,QAAA,MAAM,WAAW;;;;;;;;;;CAUhB,CAAC;AAEF,aAAK,WAAW,GAAG,OAAO,WAAW,CAAC;AACtC,aAAK,UAAU,GAAG,MAAM,WAAW,CAAC;AAEpC,eAAO,MAAM,iBAAiB,iBAAkB,MAAM;;CAA+C,CAAC;AAGtG,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAmC,CAAC;AACnE,aAAK,kBAAkB,GAAG,OAAO,kBAA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AA;CAAC,EAAE,IAAI,GAAE,OAAe,MAK5F;AACD,MAAM,WAAW,KAAK;IAClB,KAAK,EAAE;SAAE,GAAG,IAAI,KAAK,GAAG,MAAM;KAAC,CAAC;IAChC,SAAS,EAAE;SAAE,GAAG,IAAI,QAAQ,GAAG,MAAM;KAAC,CAAC;IACvC,WAAW,EAAE;SAAE,GAAG,IAAI,UAAU,GAAG,MAAM;KAAC,CAAC;IAC3C,WAAW,EAAE;SAAE,GAAG,IAAI,UAAU,GAAG,MAAM;KAAC,CAAC;IAC3C,MAAM,EAAE;SAAE,GAAG,IAAI,KAAK,GAAG,MAAM;KAAC,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;CACpB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useTranslation.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTranslation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;
|
1
|
+
{"version":3,"file":"useTranslation.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTranslation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAKpC,eAAO,MAAM,cAAc,iBAO1B,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
@@ -6,10 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.useTranslation = void 0;
|
7
7
|
const react_1 = require("react");
|
8
8
|
const i18ninstance_1 = __importDefault(require("../constants/i18ninstance"));
|
9
|
+
const useScope_1 = require("./useScope");
|
9
10
|
const useTranslation = () => {
|
11
|
+
const i18n = useScope_1.useScope('i18n');
|
10
12
|
const translate = react_1.useCallback((key, options) => {
|
11
13
|
return i18ninstance_1.default.t(key, options);
|
12
|
-
}, []);
|
14
|
+
}, [i18n]);
|
13
15
|
return translate;
|
14
16
|
};
|
15
17
|
exports.useTranslation = useTranslation;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useTranslation.js","sourceRoot":"","sources":["../../../src/hooks/useTranslation.tsx"],"names":[],"mappings":";;;;;;AACA,iCAAoC;AACpC,6EAAqD;
|
1
|
+
{"version":3,"file":"useTranslation.js","sourceRoot":"","sources":["../../../src/hooks/useTranslation.tsx"],"names":[],"mappings":";;;;;;AACA,iCAAoC;AACpC,6EAAqD;AACrD,yCAAsC;AAE/B,MAAM,cAAc,GAAG,GAAE,EAAE;IAC9B,MAAM,IAAI,GAAG,mBAAQ,CAAC,MAAM,CAAC,CAAC;IAC9B,MAAM,SAAS,GAAc,mBAAW,CAAC,CAAC,GAAQ,EAAE,OAAa,EAAC,EAAE;QAChE,OAAO,sBAAY,CAAC,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;IACvC,CAAC,EAAG,CAAC,IAAI,CAAC,CAAC,CAAA;IAEX,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC;AAPW,QAAA,cAAc,kBAOzB;AAEF,kBAAe,sBAAc,CAAC"}
|