@ultraviolet/icons 5.0.3 → 5.0.4
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/components/CategoryIcon/__generated__/ProfileCategoryIcon.js +1 -1
- package/dist/components/CategoryIcon/style.css.d.ts +1 -1
- package/dist/components/CategoryIcon/style.css.js +4 -4
- package/dist/components/Flags/Icon.d.ts.map +1 -1
- package/dist/components/Flags/style.css.js +3 -3
- package/dist/components/Icon/Icon.d.ts.map +1 -1
- package/dist/components/Icon/styles.css.d.ts +7 -7
- package/dist/components/Icon/styles.css.d.ts.map +1 -1
- package/dist/components/Icon/styles.css.js +37 -37
- package/dist/components/Logo/style.css.js +3 -3
- package/dist/components/ProductIcon/styles.css.js +3 -3
- package/package.json +3 -3
|
@@ -19,7 +19,7 @@ const ProfileCategoryIcon = ({
|
|
|
19
19
|
/* @__PURE__ */ jsx(
|
|
20
20
|
"path",
|
|
21
21
|
{
|
|
22
|
-
className: "fill
|
|
22
|
+
className: "fill",
|
|
23
23
|
clipRule: "evenodd",
|
|
24
24
|
d: "M10 2C5.58215 2 2 5.58215 2 10C2 14.4189 5.58215 18 10 18C14.4189 18 18 14.4189 18 10C18 5.58215 14.4189 2 10 2ZM10 4.01131C13.3026 4.01131 15.9887 6.69742 15.9887 10C15.9887 13.3016 13.3026 15.9887 10 15.9887C6.69742 15.9887 4.01131 13.3016 4.01131 10C4.01131 6.69742 6.69742 4.01131 10 4.01131Z",
|
|
25
25
|
fill: "#521094",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const VARIANTS: readonly ["primary", "neutral"];
|
|
2
|
-
export declare const categoryIcon: Record<"primary" | "neutral" | "
|
|
2
|
+
export declare const categoryIcon: Record<"primary" | "neutral" | "neutralDisabled" | "primaryDisabled", string>;
|
|
3
3
|
//# sourceMappingURL=style.css.d.ts.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
-
import { styleVariants, globalStyle } from "@vanilla-extract/css";
|
|
3
2
|
import { theme } from "@ultraviolet/themes";
|
|
3
|
+
import { styleVariants, globalStyle } from "@vanilla-extract/css";
|
|
4
4
|
setFileScope("src/components/CategoryIcon/style.css.ts", "@ultraviolet/icons");
|
|
5
5
|
const VARIANTS = ["primary", "neutral"];
|
|
6
6
|
const FILL_CLASSES = ["fill", "fillStrong"];
|
|
7
7
|
const categoryIcon = styleVariants({
|
|
8
|
-
|
|
9
|
-
primary: {},
|
|
8
|
+
neutral: {},
|
|
10
9
|
neutralDisabled: {},
|
|
11
|
-
|
|
10
|
+
primary: {},
|
|
11
|
+
primaryDisabled: {}
|
|
12
12
|
});
|
|
13
13
|
const color = theme.colors.other.icon.category;
|
|
14
14
|
VARIANTS.forEach((variant) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/Flags/Icon.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/Flags/Icon.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAGvC,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,CAAC,EAAE,MAAM,OAAO,KAAK,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,SAAS,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,IAAI,GAAI,+BAA0C,SAAS,4CAIvE,CAAA"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { theme } from "@ultraviolet/themes";
|
|
2
3
|
import { styleVariants } from "@vanilla-extract/css";
|
|
3
4
|
import { SIZES } from "./constant.js";
|
|
4
|
-
import { theme } from "@ultraviolet/themes";
|
|
5
5
|
setFileScope("src/components/Flags/style.css.ts", "@ultraviolet/icons");
|
|
6
6
|
const flag = styleVariants(
|
|
7
7
|
Object.fromEntries(
|
|
8
8
|
Object.keys(SIZES).map((size) => [
|
|
9
9
|
size,
|
|
10
10
|
{
|
|
11
|
-
|
|
11
|
+
height: theme.sizing[SIZES[size]],
|
|
12
12
|
minWidth: theme.sizing[SIZES[size]],
|
|
13
|
-
|
|
13
|
+
width: theme.sizing[SIZES[size]]
|
|
14
14
|
}
|
|
15
15
|
])
|
|
16
16
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhD,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAGjE,KAAK,UAAU,GAAG,MAAM,OAAO,KAAK,CAAA;AAEpC,KAAK,KAAK,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA;AAExC,KAAK,eAAe,GAAG,MAAM,OAAO,WAAW,CAAA;AAE/C,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,UAAU,CAAC,EAAE,eAAe,CAAA;IAC5B,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,EAAE,SAAS,CAAA;CACpB,GAAG,IAAI,CACN,QAAQ,CAAC,aAAa,CAAC,EACvB,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,aAAa,GAAG,YAAY,GAAG,OAAO,CAC3E,CAAA;AAED;;GAEG;AAEH,eAAO,MAAM,IAAI;WAfR,UAAU;iBACJ,eAAe;gBAChB,KAAK;oBACD,MAAM;eACX,OAAO;cACR,SAAS;6JA8CpB,CAAA"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { PROMINENCES, SENTIMENTS } from './constants';
|
|
2
2
|
export declare const icon: import("@vanilla-extract/recipes").RuntimeFn<{
|
|
3
|
+
disabled: {
|
|
4
|
+
false: {};
|
|
5
|
+
true: {};
|
|
6
|
+
};
|
|
7
|
+
prominence: Record<keyof typeof PROMINENCES, object>;
|
|
3
8
|
sentiment: Record<(typeof SENTIMENTS)[number], object>;
|
|
4
9
|
size: {
|
|
5
10
|
[k: string]: {
|
|
6
11
|
height: `var(--${string})`;
|
|
7
|
-
width: `var(--${string})`;
|
|
8
|
-
minWidth: `var(--${string})`;
|
|
9
12
|
minHeight: `var(--${string})`;
|
|
13
|
+
minWidth: `var(--${string})`;
|
|
14
|
+
width: `var(--${string})`;
|
|
10
15
|
};
|
|
11
16
|
};
|
|
12
|
-
disabled: {
|
|
13
|
-
true: {};
|
|
14
|
-
false: {};
|
|
15
|
-
};
|
|
16
|
-
prominence: Record<keyof typeof PROMINENCES, object>;
|
|
17
17
|
}>;
|
|
18
18
|
//# sourceMappingURL=styles.css.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/styles.css.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.css.d.ts","sourceRoot":"","sources":["../../../src/components/Icon/styles.css.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAS,MAAM,aAAa,CAAA;AA+B5D,eAAO,MAAM,IAAI;;;;;gBAmCR,MAAM,CAAC,MAAM,OAAO,WAAW,EAAE,MAAM,CAAC;eAGxC,MAAM,CAAC,CAAC,OAAO,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC;;;;;;;;;EAQlD,CAAA"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { theme } from "@ultraviolet/themes";
|
|
3
|
-
import { recipe } from "@vanilla-extract/recipes";
|
|
4
|
-
import { PROMINENCES, SENTIMENTS, SIZES } from "./constants.js";
|
|
5
3
|
import { capitalize } from "@ultraviolet/utils";
|
|
6
4
|
import { globalStyle } from "@vanilla-extract/css";
|
|
5
|
+
import { recipe } from "@vanilla-extract/recipes";
|
|
6
|
+
import { SIZES, SENTIMENTS, PROMINENCES } from "./constants.js";
|
|
7
7
|
setFileScope("src/components/Icon/styles.css.ts", "@ultraviolet/icons");
|
|
8
8
|
function generateSizeStyle(size) {
|
|
9
9
|
return {
|
|
10
10
|
height: theme.sizing[SIZES[size]],
|
|
11
|
-
|
|
11
|
+
minHeight: theme.sizing[SIZES[size]],
|
|
12
12
|
minWidth: theme.sizing[SIZES[size]],
|
|
13
|
-
|
|
13
|
+
width: theme.sizing[SIZES[size]]
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
function getIconColor(prominence, sentiment, disabled) {
|
|
@@ -24,62 +24,62 @@ function getIconColor(prominence, sentiment, disabled) {
|
|
|
24
24
|
}
|
|
25
25
|
const icon = recipe({
|
|
26
26
|
base: {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
},
|
|
30
|
-
variants: {
|
|
31
|
-
sentiment: Object.fromEntries(
|
|
32
|
-
SENTIMENTS.map((sentiment) => [sentiment, {}])
|
|
33
|
-
),
|
|
34
|
-
size: Object.fromEntries(
|
|
35
|
-
Object.keys(SIZES).map((size) => [
|
|
36
|
-
size,
|
|
37
|
-
generateSizeStyle(size)
|
|
38
|
-
])
|
|
39
|
-
),
|
|
40
|
-
disabled: {
|
|
41
|
-
true: {},
|
|
42
|
-
false: {}
|
|
43
|
-
},
|
|
44
|
-
prominence: Object.fromEntries(
|
|
45
|
-
Object.keys(PROMINENCES).map((prominence) => [prominence, {}])
|
|
46
|
-
)
|
|
27
|
+
fill: "currentcolor",
|
|
28
|
+
verticalAlign: "middle"
|
|
47
29
|
},
|
|
48
30
|
compoundVariants: [true, false].flatMap(
|
|
49
31
|
(disabled) => Object.keys(PROMINENCES).flatMap(
|
|
50
32
|
(prominence) => [...SENTIMENTS, void 0].map((sentiment) => ({
|
|
51
|
-
// We need to add undefined to have the variant where sentiment is undefined
|
|
52
|
-
variants: {
|
|
53
|
-
sentiment,
|
|
54
|
-
prominence,
|
|
55
|
-
disabled
|
|
56
|
-
},
|
|
57
33
|
style: {
|
|
58
34
|
fill: getIconColor(
|
|
59
35
|
prominence,
|
|
60
36
|
sentiment,
|
|
61
37
|
disabled
|
|
62
38
|
)
|
|
39
|
+
},
|
|
40
|
+
// We need to add undefined to have the variant where sentiment is undefined
|
|
41
|
+
variants: {
|
|
42
|
+
disabled,
|
|
43
|
+
prominence,
|
|
44
|
+
sentiment
|
|
63
45
|
}
|
|
64
46
|
}))
|
|
65
47
|
)
|
|
66
48
|
),
|
|
67
49
|
defaultVariants: {
|
|
68
|
-
|
|
69
|
-
|
|
50
|
+
disabled: false,
|
|
51
|
+
prominence: "default"
|
|
52
|
+
},
|
|
53
|
+
variants: {
|
|
54
|
+
disabled: {
|
|
55
|
+
false: {},
|
|
56
|
+
true: {}
|
|
57
|
+
},
|
|
58
|
+
prominence: Object.fromEntries(
|
|
59
|
+
Object.keys(PROMINENCES).map((prominence) => [prominence, {}])
|
|
60
|
+
),
|
|
61
|
+
sentiment: Object.fromEntries(
|
|
62
|
+
SENTIMENTS.map((sentiment) => [sentiment, {}])
|
|
63
|
+
),
|
|
64
|
+
size: Object.fromEntries(
|
|
65
|
+
Object.keys(SIZES).map((size) => [
|
|
66
|
+
size,
|
|
67
|
+
generateSizeStyle(size)
|
|
68
|
+
])
|
|
69
|
+
)
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
|
-
Object.keys(PROMINENCES).forEach(
|
|
73
|
-
|
|
72
|
+
Object.keys(PROMINENCES).forEach((prominence) => {
|
|
73
|
+
SENTIMENTS.forEach((sentiment) => {
|
|
74
74
|
globalStyle(
|
|
75
|
-
`${icon({
|
|
75
|
+
`${icon({ prominence, sentiment })} .fillStroke`,
|
|
76
76
|
{
|
|
77
77
|
fill: "none",
|
|
78
78
|
stroke: getIconColor(prominence, sentiment)
|
|
79
79
|
}
|
|
80
80
|
);
|
|
81
|
-
})
|
|
82
|
-
);
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
83
|
endFileScope();
|
|
84
84
|
export {
|
|
85
85
|
icon
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
|
+
import { theme } from "@ultraviolet/themes";
|
|
2
3
|
import { styleVariants } from "@vanilla-extract/css";
|
|
3
4
|
import { SIZES } from "./constant.js";
|
|
4
|
-
import { theme } from "@ultraviolet/themes";
|
|
5
5
|
setFileScope("src/components/Logo/style.css.ts", "@ultraviolet/icons");
|
|
6
6
|
const logo = styleVariants(
|
|
7
7
|
Object.fromEntries(
|
|
8
8
|
Object.keys(SIZES).map((size) => [
|
|
9
9
|
size,
|
|
10
10
|
{
|
|
11
|
-
|
|
11
|
+
height: theme.sizing[SIZES[size]],
|
|
12
12
|
minWidth: theme.sizing[SIZES[size]],
|
|
13
|
-
|
|
13
|
+
width: theme.sizing[SIZES[size]]
|
|
14
14
|
}
|
|
15
15
|
])
|
|
16
16
|
)
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { setFileScope, endFileScope } from "@vanilla-extract/css/fileScope";
|
|
2
2
|
import { theme } from "@ultraviolet/themes";
|
|
3
|
-
import { SIZES, VARIANTS } from "./constants.js";
|
|
4
3
|
import { styleVariants, globalStyle } from "@vanilla-extract/css";
|
|
4
|
+
import { SIZES, VARIANTS } from "./constants.js";
|
|
5
5
|
setFileScope("src/components/ProductIcon/styles.css.ts", "@ultraviolet/icons");
|
|
6
6
|
const PROMINENCES = ["Weak", "Strong", ""];
|
|
7
7
|
function generateSizeStyle(size) {
|
|
8
8
|
return {
|
|
9
9
|
height: theme.sizing[SIZES[size]],
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
minWidth: theme.sizing[SIZES[size]],
|
|
11
|
+
width: theme.sizing[SIZES[size]]
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
function generateVariantStyle(variant, disabled, prominence) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultraviolet/icons",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.4",
|
|
4
4
|
"description": "Ultraviolet Icons",
|
|
5
5
|
"homepage": "https://github.com/scaleway/ultraviolet#readme",
|
|
6
6
|
"repository": {
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"react-dom": "18.x || 19.x"
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
115
|
-
"@babel/core": "7.28.
|
|
115
|
+
"@babel/core": "7.28.6",
|
|
116
116
|
"@types/react": "19.2.7",
|
|
117
117
|
"@types/react-dom": "19.2.3",
|
|
118
118
|
"react": "19.2.3",
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"@vanilla-extract/css": "1.17.4",
|
|
125
125
|
"@vanilla-extract/dynamic": "2.1.5",
|
|
126
126
|
"@vanilla-extract/recipes": "0.5.7",
|
|
127
|
-
"@ultraviolet/themes": "3.0.
|
|
127
|
+
"@ultraviolet/themes": "3.0.3",
|
|
128
128
|
"@ultraviolet/utils": "1.0.0"
|
|
129
129
|
},
|
|
130
130
|
"scripts": {
|