@synerise/ds-icon 1.11.1 → 1.13.0
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/CHANGELOG.md +12 -0
- package/README.md +11 -10
- package/dist/DynamicIcon/DynamicIcon.d.ts +15 -5
- package/dist/DynamicIcon/DynamicIcon.js +14 -11
- package/dist/Icon.js +7 -3
- package/dist/Icon.types.d.ts +24 -0
- package/dist/MimeTypeIcon/MimeTypeIcon.js +4 -4
- package/dist/MimeTypeIcon/MimeTypeIcon.utils.d.ts +2 -2
- package/dist/MimeTypeIcon/MimeTypeIcon.utils.js +13 -15
- package/dist/icons/L/index.d.ts +29 -29
- package/dist/icons/L/index.js +29 -29
- package/dist/icons/M/AiColorHubM.d.ts +3 -0
- package/dist/icons/M/AiColorHubM.js +21 -0
- package/dist/icons/M/AiGreyHubM.d.ts +3 -0
- package/dist/icons/M/AiGreyHubM.js +21 -0
- package/dist/icons/M/AutomationColorHubM.d.ts +3 -0
- package/dist/icons/M/AutomationColorHubM.js +18 -0
- package/dist/icons/M/AutomationGreyHubM.d.ts +3 -0
- package/dist/icons/M/AutomationGreyHubM.js +18 -0
- package/dist/icons/M/BehavioralColorHubM.d.ts +3 -0
- package/dist/icons/M/BehavioralColorHubM.js +18 -0
- package/dist/icons/M/BehavioralGreyHubM.d.ts +3 -0
- package/dist/icons/M/BehavioralGreyHubM.js +18 -0
- package/dist/icons/M/DashboardColorHubM.d.ts +3 -0
- package/dist/icons/M/DashboardColorHubM.js +21 -0
- package/dist/icons/M/DashboardGreyHubM.d.ts +3 -0
- package/dist/icons/M/DashboardGreyHubM.js +21 -0
- package/dist/icons/M/DataColorHubM.d.ts +3 -0
- package/dist/icons/M/DataColorHubM.js +30 -0
- package/dist/icons/M/DataGreyHubM.d.ts +3 -0
- package/dist/icons/M/DataGreyHubM.js +30 -0
- package/dist/icons/M/DecisionsColorHubM.d.ts +3 -0
- package/dist/icons/M/DecisionsColorHubM.js +21 -0
- package/dist/icons/M/DecisionsGreyHubM.d.ts +3 -0
- package/dist/icons/M/DecisionsGreyHubM.js +21 -0
- package/dist/icons/M/ExperienceColorHubM.d.ts +3 -0
- package/dist/icons/M/ExperienceColorHubM.js +18 -0
- package/dist/icons/M/ExperienceGreyHubM.d.ts +3 -0
- package/dist/icons/M/ExperienceGreyHubM.js +18 -0
- package/dist/icons/M/index.d.ts +474 -460
- package/dist/icons/M/index.js +475 -461
- package/dist/icons/XL/index.d.ts +49 -49
- package/dist/icons/XL/index.js +50 -50
- package/dist/icons/additional/index.d.ts +51 -51
- package/dist/icons/additional/index.js +51 -51
- package/dist/icons/colorIcons/index.d.ts +6 -6
- package/dist/icons/colorIcons/index.js +6 -6
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -1
- package/dist/useIconComponent.d.ts +7 -0
- package/dist/useIconComponent.js +18 -0
- package/package.json +2 -2
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { default as
|
|
1
|
+
export { default as VisualSimilarityColor } from './VisualSimilarityColor';
|
|
2
2
|
export { default as ShopingBagColor } from './ShopingBagColor';
|
|
3
|
+
export { default as UserColor } from './UserColor';
|
|
3
4
|
export { default as ScoreColor } from './ScoreColor';
|
|
4
5
|
export { default as QueryDetailsColor } from './QueryDetailsColor';
|
|
5
|
-
export { default as ProductsSimilarColor } from './ProductsSimilarColor';
|
|
6
6
|
export { default as ProductLastSeenColor } from './ProductLastSeenColor';
|
|
7
|
-
export { default as ProductBundleColor } from './ProductBundleColor';
|
|
8
7
|
export { default as PredefinedColor } from './PredefinedColor';
|
|
9
|
-
export { default as
|
|
8
|
+
export { default as ProductBundleColor } from './ProductBundleColor';
|
|
9
|
+
export { default as ProductsSimilarColor } from './ProductsSimilarColor';
|
|
10
10
|
export { default as FunnelColor } from './FunnelColor';
|
|
11
|
+
export { default as IntegrationColor } from './IntegrationColor';
|
|
11
12
|
export { default as FormulaColor } from './FormulaColor';
|
|
12
|
-
export { default as ABtestColor } from './ABtestColor';
|
|
13
13
|
export { default as CreatingFromScratchColor } from './CreatingFromScratchColor';
|
|
14
|
-
export { default as
|
|
14
|
+
export { default as ABtestColor } from './ABtestColor';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export { default as
|
|
1
|
+
export { default as VisualSimilarityColor } from './VisualSimilarityColor';
|
|
2
2
|
export { default as ShopingBagColor } from './ShopingBagColor';
|
|
3
|
+
export { default as UserColor } from './UserColor';
|
|
3
4
|
export { default as ScoreColor } from './ScoreColor';
|
|
4
5
|
export { default as QueryDetailsColor } from './QueryDetailsColor';
|
|
5
|
-
export { default as ProductsSimilarColor } from './ProductsSimilarColor';
|
|
6
6
|
export { default as ProductLastSeenColor } from './ProductLastSeenColor';
|
|
7
|
-
export { default as ProductBundleColor } from './ProductBundleColor';
|
|
8
7
|
export { default as PredefinedColor } from './PredefinedColor';
|
|
9
|
-
export { default as
|
|
8
|
+
export { default as ProductBundleColor } from './ProductBundleColor';
|
|
9
|
+
export { default as ProductsSimilarColor } from './ProductsSimilarColor';
|
|
10
10
|
export { default as FunnelColor } from './FunnelColor';
|
|
11
|
+
export { default as IntegrationColor } from './IntegrationColor';
|
|
11
12
|
export { default as FormulaColor } from './FormulaColor';
|
|
12
|
-
export { default as ABtestColor } from './ABtestColor';
|
|
13
13
|
export { default as CreatingFromScratchColor } from './CreatingFromScratchColor';
|
|
14
|
-
export { default as
|
|
14
|
+
export { default as ABtestColor } from './ABtestColor';
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './icons/colorIcons';
|
|
|
7
7
|
export * from './icons/XL';
|
|
8
8
|
export * from './icons/additional';
|
|
9
9
|
export { default as MimeTypeIcon } from './MimeTypeIcon/MimeTypeIcon';
|
|
10
|
-
export { DynamicIcon, type DynamicIconProps } from './DynamicIcon/DynamicIcon';
|
|
10
|
+
export { DynamicIcon, type DynamicIconProps, type DynamicIconName, } from './DynamicIcon/DynamicIcon';
|
|
11
|
+
export { useIconComponent, getIconComponent } from './useIconComponent';
|
|
11
12
|
export type { MimeTypeIconsProps } from './MimeTypeIcon/MimeTypeIcon.types';
|
|
12
|
-
export type { IconProps } from './Icon.types';
|
|
13
|
+
export type { IconProps, IconName } from './Icon.types';
|
package/dist/index.js
CHANGED
|
@@ -8,4 +8,5 @@ export * from './icons/XL';
|
|
|
8
8
|
// Some of this icons are duplicated in XL folder, consider removing it before uploading new version
|
|
9
9
|
export * from './icons/additional';
|
|
10
10
|
export { default as MimeTypeIcon } from './MimeTypeIcon/MimeTypeIcon';
|
|
11
|
-
export { DynamicIcon } from './DynamicIcon/DynamicIcon';
|
|
11
|
+
export { DynamicIcon } from './DynamicIcon/DynamicIcon';
|
|
12
|
+
export { useIconComponent, getIconComponent } from './useIconComponent';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type ComponentType, type SVGProps } from 'react';
|
|
2
|
+
import { iconManifest } from './DynamicIcon/iconManifest';
|
|
3
|
+
export type IconName = keyof typeof iconManifest;
|
|
4
|
+
type IconComponent = ComponentType<SVGProps<SVGSVGElement>>;
|
|
5
|
+
export declare const getIconComponent: (name: string) => IconComponent | null;
|
|
6
|
+
export declare const useIconComponent: (name?: string) => IconComponent | null;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
import { iconManifest } from './DynamicIcon/iconManifest';
|
|
3
|
+
export var getIconComponent = function getIconComponent(name) {
|
|
4
|
+
var iconModule = iconManifest[name];
|
|
5
|
+
if (!iconModule) {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
var component = iconModule[name];
|
|
9
|
+
return component && typeof component === 'function' ? component : null;
|
|
10
|
+
};
|
|
11
|
+
export var useIconComponent = function useIconComponent(name) {
|
|
12
|
+
return useMemo(function () {
|
|
13
|
+
if (!name) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
return getIconComponent(name);
|
|
17
|
+
}, [name]);
|
|
18
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-icon",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "Icon UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "Synerise/synerise-design",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"glob": "^11.0.2",
|
|
52
52
|
"string-hash": "^1.1.3"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "7bafcc06bcb6d6496eaa685d5531927e91f3c336"
|
|
55
55
|
}
|