@sinco/react 1.0.11-rc.0 → 1.0.11-rc.1

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/index.js CHANGED
@@ -17467,6 +17467,31 @@ const PageHeaderComponent = ({
17467
17467
  }, actions)))));
17468
17468
  };
17469
17469
 
17470
+ const UseDynamicColor = url => {
17471
+ const [primary, setPrimary] = useState(SincoTheme.palette.primary);
17472
+ const [secondary, setSecondary] = useState(SincoTheme.palette.secondary);
17473
+ const [background, setBackground] = useState(SincoTheme.palette.background);
17474
+ const [loading, setLoading] = useState(false);
17475
+ useEffect(() => {
17476
+ DynamicColor(url).then(({
17477
+ primaryColor,
17478
+ secondaryColor,
17479
+ backgroundColor
17480
+ }) => {
17481
+ setPrimary(primaryColor);
17482
+ setSecondary(secondaryColor);
17483
+ setBackground(backgroundColor);
17484
+ setLoading(true);
17485
+ });
17486
+ }, [url]);
17487
+ SincoTheme.palette.primary = primary;
17488
+ SincoTheme.palette.secondary = secondary;
17489
+ SincoTheme.palette.background = background;
17490
+ return {
17491
+ loading
17492
+ };
17493
+ };
17494
+
17470
17495
  var classof$2 = classofRaw$2;
17471
17496
 
17472
17497
  var engineIsNode = typeof process != 'undefined' && classof$2(process) == 'process';
@@ -22897,29 +22922,4 @@ const DynamicColor = async src => {
22897
22922
  };
22898
22923
  };
22899
22924
 
22900
- const UseDynamicColor = url => {
22901
- const [primary, setPrimary] = useState(SincoTheme.palette.primary);
22902
- const [secondary, setSecondary] = useState(SincoTheme.palette.secondary);
22903
- const [background, setBackground] = useState(SincoTheme.palette.background);
22904
- const [loading, setLoading] = useState(false);
22905
- useEffect(() => {
22906
- DynamicColor(url).then(({
22907
- primaryColor,
22908
- secondaryColor,
22909
- backgroundColor
22910
- }) => {
22911
- setPrimary(primaryColor);
22912
- setSecondary(secondaryColor);
22913
- setBackground(backgroundColor);
22914
- setLoading(true);
22915
- });
22916
- }, [url]);
22917
- SincoTheme.palette.primary = primary;
22918
- SincoTheme.palette.secondary = secondary;
22919
- SincoTheme.palette.background = background;
22920
- return {
22921
- loading
22922
- };
22923
- };
22924
-
22925
- export { DrawerComponent, EmptyStateComponent, EmptyStateImageUrls, PageHeaderComponent, PageHeaderContent, SincoTheme, ToastNotification, UseDynamicColor };
22925
+ export { DrawerComponent, DynamicColor, EmptyStateComponent, EmptyStateImageUrls, PageHeaderComponent, PageHeaderContent, SincoTheme, ToastNotification, UseDynamicColor };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sinco/react",
3
- "version": "1.0.11-rc.0",
3
+ "version": "1.0.11-rc.1",
4
4
  "description": "package for the configuration of mui react sinco",
5
5
  "private": false,
6
6
  "license": "MIT",
package/src/index.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export * from './lib/Theme';
2
+ export * from './lib/Components';
3
+ export * from './lib/Hooks';
4
+ export * from './lib/Utils';
@@ -0,0 +1 @@
1
+ export * from './useDynamicColor';
@@ -1,7 +1,6 @@
1
1
  import { PaletteColor, TypeBackground } from "@mui/material";
2
- declare const DynamicColor: (src: string) => Promise<{
2
+ export declare const DynamicColor: (src: string) => Promise<{
3
3
  primaryColor: PaletteColor;
4
4
  secondaryColor: PaletteColor;
5
5
  backgroundColor: TypeBackground;
6
6
  }>;
7
- export default DynamicColor;
package/src/Index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export * from './lib/Theme/Index';
2
- export * from './lib/Components/Index';
3
- export * from './lib/Hooks/Index';
4
- export * from './lib/Utils/Index';
@@ -1 +0,0 @@
1
- export * from './UseDynamicColor';
File without changes
File without changes
File without changes