@talxis/base-controls 1.2501.5 → 1.2501.6
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/dist/index.d.ts +2 -2
- package/dist/utils/index.js +2 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/theme/hooks/index.d.ts +2 -0
- package/dist/utils/theme/hooks/index.js +3 -0
- package/dist/utils/theme/hooks/index.js.map +1 -0
- package/dist/utils/theme/hooks/useControlThemeGenerator.js +11 -0
- package/dist/utils/theme/hooks/useControlThemeGenerator.js.map +1 -0
- package/dist/utils/theme/index.d.ts +1 -0
- package/dist/utils/theme/index.js +2 -0
- package/dist/utils/theme/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -78,6 +78,8 @@ interface IFluentDesignState extends ComponentFramework.FluentDesignState {
|
|
|
78
78
|
applicationTheme?: ITheme;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
declare const useControlTheme: (fluentDesignLanguage?: IFluentDesignState) => ITheme$1;
|
|
82
|
+
|
|
81
83
|
interface IOutputs$1 {
|
|
82
84
|
[key: string]: any;
|
|
83
85
|
}
|
|
@@ -199,8 +201,6 @@ declare const useInputBasedControl: <TValue, TParameters extends IInputParameter
|
|
|
199
201
|
|
|
200
202
|
declare const useMouseOver: (ref: React.RefObject<HTMLElement>) => boolean;
|
|
201
203
|
|
|
202
|
-
declare const useControlTheme: (fluentDesignLanguage?: IFluentDesignState) => ITheme$1;
|
|
203
|
-
|
|
204
204
|
declare const getDefaultDateTimeTranslations: (dateFormattingInfo: ComponentFramework.UserSettingApi.DateFormattingInfo) => {
|
|
205
205
|
time: {
|
|
206
206
|
1029: string;
|
package/dist/utils/index.js
CHANGED
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { ControlTheme } from '../ControlTheme.js';
|
|
3
|
+
|
|
4
|
+
const useControlThemeGenerator = (primaryColor, backgroundColor, textColor, options) => {
|
|
5
|
+
return useMemo(() => {
|
|
6
|
+
return ControlTheme.GenerateFluentDesignLanguage(primaryColor, backgroundColor, textColor, options);
|
|
7
|
+
}, [primaryColor, backgroundColor, textColor]);
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export { useControlThemeGenerator };
|
|
11
|
+
//# sourceMappingURL=useControlThemeGenerator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useControlThemeGenerator.js","sources":["../../../../src/utils/theme/hooks/useControlThemeGenerator.ts"],"sourcesContent":["import { useMemo } from \"react\"\nimport { ControlTheme, IFluentDesignState } from \"../ControlTheme\"\nimport { DeepPartial } from \"@talxis/client-libraries\"\nimport { ITheme } from \"@fluentui/react\"\n\nexport const useControlThemeGenerator = (primaryColor: string, backgroundColor: string, textColor: string, options?: {\n /**\n * Optional overrides that will get applied when v8 theme is generated from fluentDesignLanguage\n */\n v8FluentOverrides?: DeepPartial<ITheme>;\n /**\n * The application's theme may differ from the control's theme. This is often the case when rendering a PCF as a cell customizer with conditional formatting.\n * This object allows you to set application theme so PCF's can use it to render surfaces accurately.\n */\n applicationTheme?: ITheme;\n}): IFluentDesignState => {\n return useMemo(() => {\n return ControlTheme.GenerateFluentDesignLanguage(primaryColor, backgroundColor, textColor, options)\n }, [primaryColor, backgroundColor, textColor])\n}"],"names":[],"mappings":";;;AAKO,MAAM,wBAAwB,GAAG,CAAC,YAAoB,EAAE,eAAuB,EAAE,SAAiB,EAAE,OAU1G,KAAwB;IACrB,OAAO,OAAO,CAAC,MAAK;AAChB,QAAA,OAAO,YAAY,CAAC,4BAA4B,CAAC,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,CAAC,CAAA;KACtG,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,SAAS,CAAC,CAAC,CAAA;AAClD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/package.json
CHANGED