@ultraviolet/icons 2.11.2 → 2.12.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.
|
@@ -3,24 +3,33 @@ import { CATEGORY_ICONS } from './Icons.js';
|
|
|
3
3
|
import { jsx } from '@emotion/react/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
const StyledIcon = component => /*#__PURE__*/_styled(component, {
|
|
6
|
+
shouldForwardProp: prop => !['variant', 'disabled'].includes(prop),
|
|
6
7
|
target: "e1wwql4e0"
|
|
7
8
|
})(".fill{fill:", ({
|
|
8
|
-
theme
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}) => theme.colors.other.icon.category
|
|
9
|
+
theme,
|
|
10
|
+
variant,
|
|
11
|
+
disabled
|
|
12
|
+
}) => theme.colors.other.icon.category[variant][disabled ? 'fillDisabled' : 'fill'], ";}.fillStrong{fill:", ({
|
|
13
|
+
theme,
|
|
14
|
+
variant,
|
|
15
|
+
disabled
|
|
16
|
+
}) => theme.colors.other.icon.category[variant][disabled ? 'fillStrongDisabled' : 'fillStrong'], ";}");
|
|
12
17
|
/**
|
|
13
18
|
* CategoryIcon component is used to render category icons, those icons are more complex than system icons
|
|
14
19
|
* as they involve multiple colors that changes depending on theme.
|
|
15
20
|
*/
|
|
16
21
|
const CategoryIcon = ({
|
|
17
|
-
name
|
|
22
|
+
name,
|
|
23
|
+
variant = 'primary',
|
|
24
|
+
disabled
|
|
18
25
|
}) => {
|
|
19
26
|
const Icon = StyledIcon(CATEGORY_ICONS[name]);
|
|
20
27
|
return jsx(Icon, {
|
|
21
28
|
width: "20",
|
|
22
29
|
height: "20",
|
|
23
|
-
viewBox: "0 0 20 20"
|
|
30
|
+
viewBox: "0 0 20 20",
|
|
31
|
+
variant: variant,
|
|
32
|
+
disabled: disabled
|
|
24
33
|
});
|
|
25
34
|
};
|
|
26
35
|
|
package/dist/index.d.ts
CHANGED
|
@@ -53,12 +53,14 @@ declare const CATEGORY_ICONS: {
|
|
|
53
53
|
|
|
54
54
|
type CategoryIconProps = {
|
|
55
55
|
name: keyof typeof CATEGORY_ICONS;
|
|
56
|
+
variant?: 'primary' | 'neutral';
|
|
57
|
+
disabled?: boolean;
|
|
56
58
|
};
|
|
57
59
|
/**
|
|
58
60
|
* CategoryIcon component is used to render category icons, those icons are more complex than system icons
|
|
59
61
|
* as they involve multiple colors that changes depending on theme.
|
|
60
62
|
*/
|
|
61
|
-
declare const CategoryIcon: ({ name }: CategoryIconProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
63
|
+
declare const CategoryIcon: ({ name, variant, disabled, }: CategoryIconProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
62
64
|
|
|
63
65
|
declare const PRODUCT_ICONS: {
|
|
64
66
|
readonly additionalDisk: react.FunctionComponent<react.SVGProps<SVGSVGElement>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultraviolet/icons",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.1",
|
|
4
4
|
"description": "Ultraviolet Icons",
|
|
5
5
|
"homepage": "https://github.com/scaleway/ultraviolet#readme",
|
|
6
6
|
"repository": {
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@babel/core": "7.24.3",
|
|
42
42
|
"@emotion/babel-plugin": "11.11.0",
|
|
43
|
-
"@types/react": "18.2.
|
|
44
|
-
"@types/react-dom": "18.2.
|
|
43
|
+
"@types/react": "18.2.74",
|
|
44
|
+
"@types/react-dom": "18.2.24"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@ultraviolet/themes": "1.
|
|
47
|
+
"@ultraviolet/themes": "1.10.0"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "rollup -c ../../rollup.config.mjs",
|