@imtf/icons 0.5.1 → 0.6.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/lib/components/IconSVG.d.ts +1 -1
- package/lib/components/IconSVG.js +25 -20
- package/lib/components/IconSVG.mjs +26 -21
- package/lib/components/IconSVG.spec.d.ts +1 -0
- package/lib/icons/AccountIcon.js +5 -2
- package/lib/icons/AccountIcon.mjs +6 -3
- package/lib/icons/GroupIcon.js +6 -2
- package/lib/icons/GroupIcon.mjs +7 -3
- package/lib/icons/HouseholdEntityIcon.d.ts +4 -0
- package/lib/icons/HouseholdEntityIcon.js +39 -0
- package/lib/icons/HouseholdEntityIcon.mjs +39 -0
- package/lib/icons/LegalEntityIcon.js +6 -2
- package/lib/icons/LegalEntityIcon.mjs +7 -3
- package/lib/icons/NaturalPersonIcon.js +6 -2
- package/lib/icons/NaturalPersonIcon.mjs +7 -3
- package/lib/icons/NotFoundIcon.js +1 -0
- package/lib/icons/NotFoundIcon.mjs +1 -0
- package/lib/icons/index.d.ts +1 -0
- package/lib/index.js +2 -0
- package/lib/index.mjs +2 -0
- package/lib/tests/setup.d.ts +6 -0
- package/package.json +7 -1
- package/svg/Account.svg +1 -3
- package/svg/Group.svg +1 -1
- package/svg/HouseholdEntity.svg +1 -0
- package/svg/LegalEntity.svg +1 -1
- package/svg/NaturalPerson.svg +1 -1
- package/svg/NotFound.svg +2 -2
- package/svg/householdEntity.json +4 -0
|
@@ -5,5 +5,5 @@ type IconSVGProps = {
|
|
|
5
5
|
src?: string;
|
|
6
6
|
children?: ReactElement;
|
|
7
7
|
};
|
|
8
|
-
export declare const IconSVG: import("react").ForwardRefExoticComponent<IconSVGProps & import("react").RefAttributes<
|
|
8
|
+
export declare const IconSVG: import("react").ForwardRefExoticComponent<IconSVGProps & import("react").RefAttributes<HTMLDivElement | SVGSVGElement>>;
|
|
9
9
|
export {};
|
|
@@ -4,7 +4,9 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const react = require("react");
|
|
5
5
|
const Context = require("../providers/IconProvider/Context.js");
|
|
6
6
|
const get = require("../utils/get.js");
|
|
7
|
-
const IconComponent = ({ color: defaultColor, size, src, children, ...props },
|
|
7
|
+
const IconComponent = ({ color: defaultColor, size, src, children, ...props }, outerRef) => {
|
|
8
|
+
const innerRef = react.useRef(null);
|
|
9
|
+
react.useImperativeHandle(outerRef, () => innerRef.current, []);
|
|
8
10
|
const defaultContextValues = react.useContext(Context.IconContext);
|
|
9
11
|
const defaultValues = {
|
|
10
12
|
...defaultContextValues,
|
|
@@ -16,23 +18,26 @@ const IconComponent = ({ color: defaultColor, size, src, children, ...props }, r
|
|
|
16
18
|
return typeof color2 === "string" ? color2 : defaultValues.color;
|
|
17
19
|
}, [defaultValues.color, defaultValues.palette]);
|
|
18
20
|
react.useEffect(() => {
|
|
19
|
-
if (src && !children) {
|
|
20
|
-
const wrapper =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
21
|
+
if (innerRef.current && src && !children) {
|
|
22
|
+
const { current: wrapper } = innerRef;
|
|
23
|
+
try {
|
|
24
|
+
wrapper.innerHTML = atob(
|
|
25
|
+
src.startsWith("data") ? src.split(",")[1] : src
|
|
26
|
+
);
|
|
27
|
+
const svg = wrapper.children;
|
|
28
|
+
const path = svg[0].firstElementChild;
|
|
29
|
+
svg == null ? void 0 : svg[0].setAttribute(
|
|
30
|
+
"width",
|
|
31
|
+
typeof defaultValues.size === "number" ? defaultValues.size + "px" : defaultValues.size
|
|
32
|
+
);
|
|
33
|
+
svg == null ? void 0 : svg[0].setAttribute(
|
|
34
|
+
"height",
|
|
35
|
+
typeof defaultValues.size === "number" ? defaultValues.size + "px" : defaultValues.size
|
|
36
|
+
);
|
|
37
|
+
path == null ? void 0 : path.setAttribute("fill", color);
|
|
38
|
+
path == null ? void 0 : path.setAttribute("color", color);
|
|
39
|
+
} catch {
|
|
40
|
+
}
|
|
36
41
|
}
|
|
37
42
|
}, [color, src, children, size, defaultValues.size]);
|
|
38
43
|
if (children) {
|
|
@@ -41,12 +46,12 @@ const IconComponent = ({ color: defaultColor, size, src, children, ...props }, r
|
|
|
41
46
|
color,
|
|
42
47
|
width: defaultValues.size,
|
|
43
48
|
height: defaultValues.size,
|
|
44
|
-
ref,
|
|
49
|
+
ref: innerRef,
|
|
45
50
|
...props
|
|
46
51
|
});
|
|
47
52
|
}
|
|
48
53
|
if (src) {
|
|
49
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
54
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: innerRef });
|
|
50
55
|
}
|
|
51
56
|
return null;
|
|
52
57
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, useContext, useMemo, useEffect, cloneElement } from "react";
|
|
2
|
+
import { forwardRef, useRef, useImperativeHandle, useContext, useMemo, useEffect, cloneElement } from "react";
|
|
3
3
|
import { IconContext } from "../providers/IconProvider/Context.mjs";
|
|
4
4
|
import get from "../utils/get.mjs";
|
|
5
|
-
const IconComponent = ({ color: defaultColor, size, src, children, ...props },
|
|
5
|
+
const IconComponent = ({ color: defaultColor, size, src, children, ...props }, outerRef) => {
|
|
6
|
+
const innerRef = useRef(null);
|
|
7
|
+
useImperativeHandle(outerRef, () => innerRef.current, []);
|
|
6
8
|
const defaultContextValues = useContext(IconContext);
|
|
7
9
|
const defaultValues = {
|
|
8
10
|
...defaultContextValues,
|
|
@@ -14,23 +16,26 @@ const IconComponent = ({ color: defaultColor, size, src, children, ...props }, r
|
|
|
14
16
|
return typeof color2 === "string" ? color2 : defaultValues.color;
|
|
15
17
|
}, [defaultValues.color, defaultValues.palette]);
|
|
16
18
|
useEffect(() => {
|
|
17
|
-
if (src && !children) {
|
|
18
|
-
const wrapper =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
19
|
+
if (innerRef.current && src && !children) {
|
|
20
|
+
const { current: wrapper } = innerRef;
|
|
21
|
+
try {
|
|
22
|
+
wrapper.innerHTML = atob(
|
|
23
|
+
src.startsWith("data") ? src.split(",")[1] : src
|
|
24
|
+
);
|
|
25
|
+
const svg = wrapper.children;
|
|
26
|
+
const path = svg[0].firstElementChild;
|
|
27
|
+
svg == null ? void 0 : svg[0].setAttribute(
|
|
28
|
+
"width",
|
|
29
|
+
typeof defaultValues.size === "number" ? defaultValues.size + "px" : defaultValues.size
|
|
30
|
+
);
|
|
31
|
+
svg == null ? void 0 : svg[0].setAttribute(
|
|
32
|
+
"height",
|
|
33
|
+
typeof defaultValues.size === "number" ? defaultValues.size + "px" : defaultValues.size
|
|
34
|
+
);
|
|
35
|
+
path == null ? void 0 : path.setAttribute("fill", color);
|
|
36
|
+
path == null ? void 0 : path.setAttribute("color", color);
|
|
37
|
+
} catch {
|
|
38
|
+
}
|
|
34
39
|
}
|
|
35
40
|
}, [color, src, children, size, defaultValues.size]);
|
|
36
41
|
if (children) {
|
|
@@ -39,12 +44,12 @@ const IconComponent = ({ color: defaultColor, size, src, children, ...props }, r
|
|
|
39
44
|
color,
|
|
40
45
|
width: defaultValues.size,
|
|
41
46
|
height: defaultValues.size,
|
|
42
|
-
ref,
|
|
47
|
+
ref: innerRef,
|
|
43
48
|
...props
|
|
44
49
|
});
|
|
45
50
|
}
|
|
46
51
|
if (src) {
|
|
47
|
-
return /* @__PURE__ */ jsx("div", {
|
|
52
|
+
return /* @__PURE__ */ jsx("div", { ref: innerRef });
|
|
48
53
|
}
|
|
49
54
|
return null;
|
|
50
55
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/icons/AccountIcon.js
CHANGED
|
@@ -21,7 +21,7 @@ const AccountIcon = react.forwardRef(
|
|
|
21
21
|
() => get.default(defaultValues.palette, defaultValues.color) ?? defaultValues.color,
|
|
22
22
|
[defaultValues.color, defaultValues.palette]
|
|
23
23
|
);
|
|
24
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
24
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
25
25
|
"svg",
|
|
26
26
|
{
|
|
27
27
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -31,7 +31,10 @@ const AccountIcon = react.forwardRef(
|
|
|
31
31
|
fill: color,
|
|
32
32
|
color,
|
|
33
33
|
...props,
|
|
34
|
-
children:
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "none", d: "M0 0h24v24H0z" }),
|
|
36
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6m0 14c-2.03 0-4.43-.82-6.14-2.88a9.95 9.95 0 0 1 12.28 0C16.43 19.18 14.03 20 12 20" })
|
|
37
|
+
]
|
|
35
38
|
}
|
|
36
39
|
);
|
|
37
40
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useContext, useMemo } from "react";
|
|
3
3
|
import get from "../utils/get.mjs";
|
|
4
4
|
import { IconContext } from "../providers/IconProvider/Context.mjs";
|
|
@@ -19,7 +19,7 @@ const AccountIcon = forwardRef(
|
|
|
19
19
|
() => get(defaultValues.palette, defaultValues.color) ?? defaultValues.color,
|
|
20
20
|
[defaultValues.color, defaultValues.palette]
|
|
21
21
|
);
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ jsxs(
|
|
23
23
|
"svg",
|
|
24
24
|
{
|
|
25
25
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -29,7 +29,10 @@ const AccountIcon = forwardRef(
|
|
|
29
29
|
fill: color,
|
|
30
30
|
color,
|
|
31
31
|
...props,
|
|
32
|
-
children:
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ jsx("path", { fill: "none", d: "M0 0h24v24H0z" }),
|
|
34
|
+
/* @__PURE__ */ jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6m0 14c-2.03 0-4.43-.82-6.14-2.88a9.95 9.95 0 0 1 12.28 0C16.43 19.18 14.03 20 12 20" })
|
|
35
|
+
]
|
|
33
36
|
}
|
|
34
37
|
);
|
|
35
38
|
}
|
package/lib/icons/GroupIcon.js
CHANGED
|
@@ -21,16 +21,20 @@ const GroupIcon = react.forwardRef(
|
|
|
21
21
|
() => get.default(defaultValues.palette, defaultValues.color) ?? defaultValues.color,
|
|
22
22
|
[defaultValues.color, defaultValues.palette]
|
|
23
23
|
);
|
|
24
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
24
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
25
25
|
"svg",
|
|
26
26
|
{
|
|
27
27
|
xmlns: "http://www.w3.org/2000/svg",
|
|
28
28
|
width: defaultValues.size,
|
|
29
29
|
height: defaultValues.size,
|
|
30
|
+
viewBox: "0 0 24 24",
|
|
30
31
|
fill: color,
|
|
31
32
|
color,
|
|
32
33
|
...props,
|
|
33
|
-
children:
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "none", d: "M0 0h24v24H0z" }),
|
|
36
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 13.75c-2.34 0-7 1.17-7 3.5V19h14v-1.75c0-2.33-4.66-3.5-7-3.5M4.34 17c.84-.58 2.87-1.25 4.66-1.25s3.82.67 4.66 1.25zM9 12c1.93 0 3.5-1.57 3.5-3.5S10.93 5 9 5 5.5 6.57 5.5 8.5 7.07 12 9 12m0-5c.83 0 1.5.67 1.5 1.5S9.83 10 9 10s-1.5-.67-1.5-1.5S8.17 7 9 7m7.04 6.81c1.16.84 1.96 1.96 1.96 3.44V19h4v-1.75c0-2.02-3.5-3.17-5.96-3.44M15 12c1.93 0 3.5-1.57 3.5-3.5S16.93 5 15 5c-.54 0-1.04.13-1.5.35.63.89 1 1.98 1 3.15s-.37 2.26-1 3.15c.46.22.96.35 1.5.35" })
|
|
37
|
+
]
|
|
34
38
|
}
|
|
35
39
|
);
|
|
36
40
|
}
|
package/lib/icons/GroupIcon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useContext, useMemo } from "react";
|
|
3
3
|
import get from "../utils/get.mjs";
|
|
4
4
|
import { IconContext } from "../providers/IconProvider/Context.mjs";
|
|
@@ -19,16 +19,20 @@ const GroupIcon = forwardRef(
|
|
|
19
19
|
() => get(defaultValues.palette, defaultValues.color) ?? defaultValues.color,
|
|
20
20
|
[defaultValues.color, defaultValues.palette]
|
|
21
21
|
);
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ jsxs(
|
|
23
23
|
"svg",
|
|
24
24
|
{
|
|
25
25
|
xmlns: "http://www.w3.org/2000/svg",
|
|
26
26
|
width: defaultValues.size,
|
|
27
27
|
height: defaultValues.size,
|
|
28
|
+
viewBox: "0 0 24 24",
|
|
28
29
|
fill: color,
|
|
29
30
|
color,
|
|
30
31
|
...props,
|
|
31
|
-
children:
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ jsx("path", { fill: "none", d: "M0 0h24v24H0z" }),
|
|
34
|
+
/* @__PURE__ */ jsx("path", { d: "M9 13.75c-2.34 0-7 1.17-7 3.5V19h14v-1.75c0-2.33-4.66-3.5-7-3.5M4.34 17c.84-.58 2.87-1.25 4.66-1.25s3.82.67 4.66 1.25zM9 12c1.93 0 3.5-1.57 3.5-3.5S10.93 5 9 5 5.5 6.57 5.5 8.5 7.07 12 9 12m0-5c.83 0 1.5.67 1.5 1.5S9.83 10 9 10s-1.5-.67-1.5-1.5S8.17 7 9 7m7.04 6.81c1.16.84 1.96 1.96 1.96 3.44V19h4v-1.75c0-2.02-3.5-3.17-5.96-3.44M15 12c1.93 0 3.5-1.57 3.5-3.5S16.93 5 15 5c-.54 0-1.04.13-1.5.35.63.89 1 1.98 1 3.15s-.37 2.26-1 3.15c.46.22.96.35 1.5.35" })
|
|
35
|
+
]
|
|
32
36
|
}
|
|
33
37
|
);
|
|
34
38
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SVGProps } from "react";
|
|
2
|
+
import type { IconProps } from "../types";
|
|
3
|
+
declare const HouseholdEntityIcon: import("react").ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement> & IconProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
4
|
+
export { HouseholdEntityIcon };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const react = require("react");
|
|
5
|
+
const get = require("../utils/get.js");
|
|
6
|
+
const Context = require("../providers/IconProvider/Context.js");
|
|
7
|
+
const HouseholdEntityIcon = react.forwardRef(
|
|
8
|
+
({
|
|
9
|
+
color: defaultColor,
|
|
10
|
+
size,
|
|
11
|
+
...props
|
|
12
|
+
}, ref) => {
|
|
13
|
+
const defaultContextValues = react.useContext(Context.IconContext);
|
|
14
|
+
const defaultValues = {
|
|
15
|
+
...defaultContextValues,
|
|
16
|
+
color: defaultColor || defaultContextValues.color,
|
|
17
|
+
size: size || defaultContextValues.size,
|
|
18
|
+
...props
|
|
19
|
+
};
|
|
20
|
+
const color = react.useMemo(
|
|
21
|
+
() => get.default(defaultValues.palette, defaultValues.color) ?? defaultValues.color,
|
|
22
|
+
[defaultValues.color, defaultValues.palette]
|
|
23
|
+
);
|
|
24
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
25
|
+
"svg",
|
|
26
|
+
{
|
|
27
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
28
|
+
width: defaultValues.size,
|
|
29
|
+
height: defaultValues.size,
|
|
30
|
+
viewBox: "0 -960 960 960",
|
|
31
|
+
fill: color,
|
|
32
|
+
color,
|
|
33
|
+
...props,
|
|
34
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M160-120v-375l-72 55-48-64 440-336 440 336-48 63-72-54v375zm80-80h480v-356L480-739 240-556zm0 0h480zm80-160q-17 0-28.5-11.5T280-400t11.5-28.5T320-440t28.5 11.5T360-400t-11.5 28.5T320-360m160 0q-17 0-28.5-11.5T440-400t11.5-28.5T480-440t28.5 11.5T520-400t-11.5 28.5T480-360m160 0q-17 0-28.5-11.5T600-400t11.5-28.5T640-440t28.5 11.5T680-400t-11.5 28.5T640-360" })
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
exports.HouseholdEntityIcon = HouseholdEntityIcon;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useContext, useMemo } from "react";
|
|
3
|
+
import get from "../utils/get.mjs";
|
|
4
|
+
import { IconContext } from "../providers/IconProvider/Context.mjs";
|
|
5
|
+
const HouseholdEntityIcon = forwardRef(
|
|
6
|
+
({
|
|
7
|
+
color: defaultColor,
|
|
8
|
+
size,
|
|
9
|
+
...props
|
|
10
|
+
}, ref) => {
|
|
11
|
+
const defaultContextValues = useContext(IconContext);
|
|
12
|
+
const defaultValues = {
|
|
13
|
+
...defaultContextValues,
|
|
14
|
+
color: defaultColor || defaultContextValues.color,
|
|
15
|
+
size: size || defaultContextValues.size,
|
|
16
|
+
...props
|
|
17
|
+
};
|
|
18
|
+
const color = useMemo(
|
|
19
|
+
() => get(defaultValues.palette, defaultValues.color) ?? defaultValues.color,
|
|
20
|
+
[defaultValues.color, defaultValues.palette]
|
|
21
|
+
);
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
23
|
+
"svg",
|
|
24
|
+
{
|
|
25
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
26
|
+
width: defaultValues.size,
|
|
27
|
+
height: defaultValues.size,
|
|
28
|
+
viewBox: "0 -960 960 960",
|
|
29
|
+
fill: color,
|
|
30
|
+
color,
|
|
31
|
+
...props,
|
|
32
|
+
children: /* @__PURE__ */ jsx("path", { d: "M160-120v-375l-72 55-48-64 440-336 440 336-48 63-72-54v375zm80-80h480v-356L480-739 240-556zm0 0h480zm80-160q-17 0-28.5-11.5T280-400t11.5-28.5T320-440t28.5 11.5T360-400t-11.5 28.5T320-360m160 0q-17 0-28.5-11.5T440-400t11.5-28.5T480-440t28.5 11.5T520-400t-11.5 28.5T480-360m160 0q-17 0-28.5-11.5T600-400t11.5-28.5T640-440t28.5 11.5T680-400t-11.5 28.5T640-360" })
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
export {
|
|
38
|
+
HouseholdEntityIcon
|
|
39
|
+
};
|
|
@@ -21,16 +21,20 @@ const LegalEntityIcon = react.forwardRef(
|
|
|
21
21
|
() => get.default(defaultValues.palette, defaultValues.color) ?? defaultValues.color,
|
|
22
22
|
[defaultValues.color, defaultValues.palette]
|
|
23
23
|
);
|
|
24
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
24
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
25
25
|
"svg",
|
|
26
26
|
{
|
|
27
27
|
xmlns: "http://www.w3.org/2000/svg",
|
|
28
28
|
width: defaultValues.size,
|
|
29
29
|
height: defaultValues.size,
|
|
30
|
+
viewBox: "0 0 24 24",
|
|
30
31
|
fill: color,
|
|
31
32
|
color,
|
|
32
33
|
...props,
|
|
33
|
-
children:
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "none", d: "M0 0h24v24H0z" }),
|
|
36
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 7V3H2v18h20V7zM6 19H4v-2h2zm0-4H4v-2h2zm0-4H4V9h2zm0-4H4V5h2zm4 12H8v-2h2zm0-4H8v-2h2zm0-4H8V9h2zm0-4H8V5h2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8zm-2-8h-2v2h2zm0 4h-2v2h2z" })
|
|
37
|
+
]
|
|
34
38
|
}
|
|
35
39
|
);
|
|
36
40
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useContext, useMemo } from "react";
|
|
3
3
|
import get from "../utils/get.mjs";
|
|
4
4
|
import { IconContext } from "../providers/IconProvider/Context.mjs";
|
|
@@ -19,16 +19,20 @@ const LegalEntityIcon = forwardRef(
|
|
|
19
19
|
() => get(defaultValues.palette, defaultValues.color) ?? defaultValues.color,
|
|
20
20
|
[defaultValues.color, defaultValues.palette]
|
|
21
21
|
);
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ jsxs(
|
|
23
23
|
"svg",
|
|
24
24
|
{
|
|
25
25
|
xmlns: "http://www.w3.org/2000/svg",
|
|
26
26
|
width: defaultValues.size,
|
|
27
27
|
height: defaultValues.size,
|
|
28
|
+
viewBox: "0 0 24 24",
|
|
28
29
|
fill: color,
|
|
29
30
|
color,
|
|
30
31
|
...props,
|
|
31
|
-
children:
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ jsx("path", { fill: "none", d: "M0 0h24v24H0z" }),
|
|
34
|
+
/* @__PURE__ */ jsx("path", { d: "M12 7V3H2v18h20V7zM6 19H4v-2h2zm0-4H4v-2h2zm0-4H4V9h2zm0-4H4V5h2zm4 12H8v-2h2zm0-4H8v-2h2zm0-4H8V9h2zm0-4H8V5h2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8zm-2-8h-2v2h2zm0 4h-2v2h2z" })
|
|
35
|
+
]
|
|
32
36
|
}
|
|
33
37
|
);
|
|
34
38
|
}
|
|
@@ -21,16 +21,20 @@ const NaturalPersonIcon = react.forwardRef(
|
|
|
21
21
|
() => get.default(defaultValues.palette, defaultValues.color) ?? defaultValues.color,
|
|
22
22
|
[defaultValues.color, defaultValues.palette]
|
|
23
23
|
);
|
|
24
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
24
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
25
25
|
"svg",
|
|
26
26
|
{
|
|
27
27
|
xmlns: "http://www.w3.org/2000/svg",
|
|
28
28
|
width: defaultValues.size,
|
|
29
29
|
height: defaultValues.size,
|
|
30
|
+
viewBox: "0 0 24 24",
|
|
30
31
|
fill: color,
|
|
31
32
|
color,
|
|
32
33
|
...props,
|
|
33
|
-
children:
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "none", d: "M0 0h24v24H0z" }),
|
|
36
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 10c2.7 0 5.8 1.29 6 2H6c.23-.72 3.31-2 6-2m0-12C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 10c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4" })
|
|
37
|
+
]
|
|
34
38
|
}
|
|
35
39
|
);
|
|
36
40
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useContext, useMemo } from "react";
|
|
3
3
|
import get from "../utils/get.mjs";
|
|
4
4
|
import { IconContext } from "../providers/IconProvider/Context.mjs";
|
|
@@ -19,16 +19,20 @@ const NaturalPersonIcon = forwardRef(
|
|
|
19
19
|
() => get(defaultValues.palette, defaultValues.color) ?? defaultValues.color,
|
|
20
20
|
[defaultValues.color, defaultValues.palette]
|
|
21
21
|
);
|
|
22
|
-
return /* @__PURE__ */
|
|
22
|
+
return /* @__PURE__ */ jsxs(
|
|
23
23
|
"svg",
|
|
24
24
|
{
|
|
25
25
|
xmlns: "http://www.w3.org/2000/svg",
|
|
26
26
|
width: defaultValues.size,
|
|
27
27
|
height: defaultValues.size,
|
|
28
|
+
viewBox: "0 0 24 24",
|
|
28
29
|
fill: color,
|
|
29
30
|
color,
|
|
30
31
|
...props,
|
|
31
|
-
children:
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ jsx("path", { fill: "none", d: "M0 0h24v24H0z" }),
|
|
34
|
+
/* @__PURE__ */ jsx("path", { d: "M12 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 10c2.7 0 5.8 1.29 6 2H6c.23-.72 3.31-2 6-2m0-12C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 10c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4" })
|
|
35
|
+
]
|
|
32
36
|
}
|
|
33
37
|
);
|
|
34
38
|
}
|
package/lib/icons/index.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ export { GroupIcon } from "./GroupIcon";
|
|
|
58
58
|
export { HistoryIcon } from "./HistoryIcon";
|
|
59
59
|
export { HomeIcon } from "./HomeIcon";
|
|
60
60
|
export { HorseIcon } from "./HorseIcon";
|
|
61
|
+
export { HouseholdEntityIcon } from "./HouseholdEntityIcon";
|
|
61
62
|
export { InboxIcon } from "./InboxIcon";
|
|
62
63
|
export { IncomingIcon } from "./IncomingIcon";
|
|
63
64
|
export { InfoIcon } from "./InfoIcon";
|
package/lib/index.js
CHANGED
|
@@ -63,6 +63,7 @@ const GroupIcon = require("./icons/GroupIcon.js");
|
|
|
63
63
|
const HistoryIcon = require("./icons/HistoryIcon.js");
|
|
64
64
|
const HomeIcon = require("./icons/HomeIcon.js");
|
|
65
65
|
const HorseIcon = require("./icons/HorseIcon.js");
|
|
66
|
+
const HouseholdEntityIcon = require("./icons/HouseholdEntityIcon.js");
|
|
66
67
|
const InboxIcon = require("./icons/InboxIcon.js");
|
|
67
68
|
const IncomingIcon = require("./icons/IncomingIcon.js");
|
|
68
69
|
const InfoIcon = require("./icons/InfoIcon.js");
|
|
@@ -174,6 +175,7 @@ exports.GroupIcon = GroupIcon.GroupIcon;
|
|
|
174
175
|
exports.HistoryIcon = HistoryIcon.HistoryIcon;
|
|
175
176
|
exports.HomeIcon = HomeIcon.HomeIcon;
|
|
176
177
|
exports.HorseIcon = HorseIcon.HorseIcon;
|
|
178
|
+
exports.HouseholdEntityIcon = HouseholdEntityIcon.HouseholdEntityIcon;
|
|
177
179
|
exports.InboxIcon = InboxIcon.InboxIcon;
|
|
178
180
|
exports.IncomingIcon = IncomingIcon.IncomingIcon;
|
|
179
181
|
exports.InfoIcon = InfoIcon.InfoIcon;
|
package/lib/index.mjs
CHANGED
|
@@ -61,6 +61,7 @@ import { GroupIcon } from "./icons/GroupIcon.mjs";
|
|
|
61
61
|
import { HistoryIcon } from "./icons/HistoryIcon.mjs";
|
|
62
62
|
import { HomeIcon } from "./icons/HomeIcon.mjs";
|
|
63
63
|
import { HorseIcon } from "./icons/HorseIcon.mjs";
|
|
64
|
+
import { HouseholdEntityIcon } from "./icons/HouseholdEntityIcon.mjs";
|
|
64
65
|
import { InboxIcon } from "./icons/InboxIcon.mjs";
|
|
65
66
|
import { IncomingIcon } from "./icons/IncomingIcon.mjs";
|
|
66
67
|
import { InfoIcon } from "./icons/InfoIcon.mjs";
|
|
@@ -169,6 +170,7 @@ export {
|
|
|
169
170
|
HistoryIcon,
|
|
170
171
|
HomeIcon,
|
|
171
172
|
HorseIcon,
|
|
173
|
+
HouseholdEntityIcon,
|
|
172
174
|
IconContext,
|
|
173
175
|
IconProvider,
|
|
174
176
|
IconSVG,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@imtf/icons",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.6.1",
|
|
5
5
|
"description": "Library of icons (React components, font and svg)",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./lib/index.js",
|
|
@@ -32,6 +32,12 @@
|
|
|
32
32
|
],
|
|
33
33
|
"scripts": {
|
|
34
34
|
"clean": "rimraf ./lib ./svg ./src/icons/*.{ts,tsx}",
|
|
35
|
+
"test": "vitest",
|
|
36
|
+
"test:ui": "vitest --ui --coverage",
|
|
37
|
+
"test:coverage": "vitest run --coverage",
|
|
38
|
+
"typecheck": "tsc --noEmit",
|
|
39
|
+
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
40
|
+
"checks": "concurrently --kill-others-on-fail npm:lint npm:typecheck 'vitest --bail=1 --run'",
|
|
35
41
|
"build:svg": "node --loader ts-node/esm scripts/index.mts",
|
|
36
42
|
"build:js": "vite build",
|
|
37
43
|
"build:types": "tsc --project ./tsconfig.build.json",
|
package/svg/Account.svg
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg"
|
|
2
|
-
<path d="M12,0 C18.627417,0 24,5.372583 24,12 C24,18.627417 18.627417,24 12,24 C5.372583,24 0,18.627417 0,12 C0,5.372583 5.372583,0 12,0 Z M12,1.5 C6.20101013,1.5 1.5,6.20101013 1.5,12 C1.5,17.7989899 6.20101013,22.5 12,22.5 C17.7989899,22.5 22.5,17.7989899 22.5,12 C22.5,6.20101013 17.7989899,1.5 12,1.5 Z M11.7368421,5.25 C13.6773715,5.25 15.25,6.82262854 15.25,8.76315789 C15.25,10.0853215 14.5199441,11.2366958 13.4408839,11.8362291 C15.636455,12.552074 17.2236842,14.6172079 17.2236842,17.0526316 C17.2236842,17.4668451 16.8878978,17.8026316 16.4736842,17.8026316 C16.0594706,17.8026316 15.7236842,17.4668451 15.7236842,17.0526316 C15.7236842,14.8510557 13.938418,13.0657895 11.7368421,13.0657895 C9.53526619,13.0657895 7.75,14.8510557 7.75,17.0526316 C7.75,17.4668451 7.41421356,17.8026316 7,17.8026316 C6.58578644,17.8026316 6.25,17.4668451 6.25,17.0526316 C6.25,14.6172079 7.83722921,12.552074 10.033549,11.8353686 C8.95374011,11.2366958 8.22368421,10.0853215 8.22368421,8.76315789 C8.22368421,6.82262854 9.79631275,5.25 11.7368421,5.25 Z M11.7368421,6.75 C10.6247399,6.75 9.72368421,7.65105567 9.72368421,8.76315789 C9.72368421,9.87526012 10.6247399,10.7763158 11.7368421,10.7763158 C12.8489443,10.7763158 13.75,9.87526012 13.75,8.76315789 C13.75,7.65105567 12.8489443,6.75 11.7368421,6.75 Z"/>
|
|
3
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/></g><g><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6zm0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20z"/></g></svg>
|
package/svg/Group.svg
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M9 13.75c-2.34 0-7 1.17-7 3.5V19h14v-1.75c0-2.33-4.66-3.5-7-3.5zM4.34 17c.84-.58 2.87-1.25 4.66-1.25s3.82.67 4.66 1.25H4.34zM9 12c1.93 0 3.5-1.57 3.5-3.5S10.93 5 9 5 5.5 6.57 5.5 8.5 7.07 12 9 12zm0-5c.83 0 1.5.67 1.5 1.5S9.83 10 9 10s-1.5-.67-1.5-1.5S8.17 7 9 7zm7.04 6.81c1.16.84 1.96 1.96 1.96 3.44V19h4v-1.75c0-2.02-3.5-3.17-5.96-3.44zM15 12c1.93 0 3.5-1.57 3.5-3.5S16.93 5 15 5c-.54 0-1.04.13-1.5.35.63.89 1 1.98 1 3.15s-.37 2.26-1 3.15c.46.22.96.35 1.5.35z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path d="M160-120v-375l-72 55-48-64 440-336 440 336-48 63-72-54v375H160Zm80-80h480v-356L480-739 240-556v356Zm0 0h480-480Zm80-160q-17 0-28.5-11.5T280-400q0-17 11.5-28.5T320-440q17 0 28.5 11.5T360-400q0 17-11.5 28.5T320-360Zm160 0q-17 0-28.5-11.5T440-400q0-17 11.5-28.5T480-440q17 0 28.5 11.5T520-400q0 17-11.5 28.5T480-360Zm160 0q-17 0-28.5-11.5T600-400q0-17 11.5-28.5T640-440q17 0 28.5 11.5T680-400q0 17-11.5 28.5T640-360Z"/></svg>
|
package/svg/LegalEntity.svg
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z"/></svg>
|
package/svg/NaturalPerson.svg
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" height="
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 10c2.7 0 5.8 1.29 6 2H6c.23-.72 3.31-2 6-2m0-12C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 10c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></svg>
|
package/svg/NotFound.svg
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="314" height="138">
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="314" height="138" viewBox="0 0 314 138">
|
|
2
2
|
<g fill="#9E9E9E">
|
|
3
3
|
<path d="M156.15 52.7a25.02 25.02 0 110 50.04 25.02 25.02 0 010-50.04zm0 6.9a18.12 18.12 0 100 36.24 18.12 18.12 0 000-36.23z"/>
|
|
4
4
|
<path d="M156.15 68.23a9.49 9.49 0 110 18.98 9.49 9.49 0 010-18.98z"/>
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
<path d="M293.35 129.51a1.81 1.81 0 01-3.11.38l-8.18-10.85a6.34 6.34 0 01-1.03-5.58l2.52-8.7c.22-.78.93-1.3 1.73-1.31l9.06-.02c2 0 3.88.93 5.08 2.52l8.18 10.85a1.81 1.81 0 01-1.22 2.9l-9.33 1.17-3.7 8.64zm3.18-21.38a2.72 2.72 0 00-2.18-1.08l-7.7.02-2.14 7.4c-.24.82-.07 1.7.44 2.39l6.3 8.35 2.88-6.72c.25-.6.8-1 1.44-1.09l7.25-.91-6.3-8.36zm-18.46-24.69a1.81 1.81 0 10.5-3.59l-14.35-2.02-2.02 14.35a1.81 1.81 0 103.59.5l1.51-10.76 10.77 1.52z"/>
|
|
8
8
|
</g>
|
|
9
9
|
<path fill="#BDBDBD" d="M158 27.91a61.3 61.3 0 01-.22-3.92 1 1 0 10-2 .04c.03 1.3.1 2.65.22 4.06a1 1 0 102-.18zm-.14-7.84c.08-1.37.23-2.66.45-3.86a1 1 0 00-1.97-.36c-.23 1.29-.39 2.65-.48 4.09a1 1 0 002 .13zm1.41-7.6c.45-1.26.98-2.4 1.62-3.42a1 1 0 00-1.7-1.05 19.22 19.22 0 00-1.8 3.81 1 1 0 001.88.66zm4-6.29c.9-.83 1.93-1.52 3.08-2.07a1 1 0 10-.88-1.8c-1.31.64-2.5 1.44-3.55 2.4a1 1 0 101.35 1.47zM170 2.87c1.18-.26 2.44-.42 3.8-.47a1 1 0 00-.09-2c-1.46.06-2.84.23-4.13.51a1 1 0 10.42 1.96zm7.58-.4c1.23.1 2.53.26 3.88.49a1 1 0 00.33-1.97c-1.4-.24-2.76-.41-4.06-.51a1 1 0 10-.15 2zm7.76 1.29c1.23.3 2.5.64 3.8 1.03a1 1 0 00.58-1.92c-1.34-.4-2.65-.75-3.91-1.06a1 1 0 00-.47 1.95zm7.57 2.27c1.22.45 2.44.93 3.66 1.46a1 1 0 00.8-1.83 68.49 68.49 0 00-3.78-1.5 1 1 0 10-.68 1.87zm7.24 3.14c1.16.58 2.32 1.2 3.48 1.86a1 1 0 10.99-1.74 79.73 79.73 0 00-3.57-1.9 1 1 0 10-.9 1.78zm6.87 3.9c1.1.69 2.2 1.41 3.3 2.17a1 1 0 101.14-1.64 94.08 94.08 0 00-3.37-2.23 1 1 0 00-1.07 1.7zm6.53 4.5c1.04.8 2.08 1.6 3.12 2.45a1 1 0 101.26-1.55c-1.06-.86-2.12-1.7-3.18-2.49a1 1 0 10-1.2 1.6zm6.15 4.99c.98.85 1.97 1.74 2.95 2.65a1 1 0 101.36-1.47c-1-.93-2-1.82-3-2.7a1 1 0 00-1.31 1.52zm5.84 5.39c.94.91 1.87 1.85 2.8 2.81a1 1 0 101.44-1.39c-.95-.98-1.9-1.93-2.84-2.85a1 1 0 00-1.4 1.43zm5.55 5.7c.89.96 1.78 1.95 2.67 2.95a1 1 0 001.5-1.32c-.9-1.02-1.8-2.01-2.7-2.99a1 1 0 00-1.47 1.36zm5.28 5.97c.85 1 1.7 2.02 2.55 3.06a1 1 0 001.55-1.27c-.86-1.05-1.72-2.08-2.57-3.09a1 1 0 00-1.53 1.3zm5.04 6.18c.82 1.03 1.63 2.08 2.44 3.15a1 1 0 001.6-1.2c-.83-1.09-1.64-2.15-2.46-3.19a1 1 0 00-1.58 1.24zm4.83 6.36a267.7 267.7 0 012.34 3.23 1 1 0 101.63-1.16c-.79-1.1-1.57-2.19-2.36-3.26a1 1 0 10-1.6 1.19zm4.59 6.44c.75 1.08 1.5 2.18 2.24 3.3a1 1 0 101.66-1.12l-2.25-3.31a1 1 0 10-1.65 1.13zm4.45 6.63l2.16 3.35a1 1 0 001.69-1.08c-.72-1.13-1.45-2.26-2.18-3.37a1 1 0 00-1.67 1.1zm4.3 6.73l1.57 2.56a1 1 0 101.7-1.04c-.52-.87-1.05-1.72-1.58-2.57a1 1 0 10-1.7 1.05z"/>
|
|
10
|
-
</svg>
|
|
10
|
+
</svg>
|