@imtf/icons 0.7.4 → 0.8.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/README.md +17 -0
- package/lib/icons/ResetSettingsIcon.d.ts +4 -0
- package/lib/icons/ResetSettingsIcon.js +23 -0
- package/lib/icons/ResetSettingsIcon.mjs +24 -0
- package/lib/icons/index.d.ts +1 -0
- package/lib/index.js +2 -0
- package/lib/index.mjs +2 -0
- package/package.json +1 -1
- package/svg/ResetSettings.svg +1 -0
- package/svg/resetSettings.json +4 -0
package/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Icons
|
|
2
|
+
|
|
3
|
+
## How to add an icon ?
|
|
4
|
+
|
|
5
|
+
1. Add the `svg` file of your icon inside [/packages/icons/src/svg](/packages/icons/src/svg) using a camelCase naming.
|
|
6
|
+
2. Create a `json` file with the same name as your `svg` file (without the .svg extension of course). And use this template:
|
|
7
|
+
|
|
8
|
+
```json
|
|
9
|
+
{
|
|
10
|
+
"aliases": [], // Array of strings to add key search words in addition to the icon name
|
|
11
|
+
"description": "" // Add a good description that defines what your icon can be used for
|
|
12
|
+
}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
3. Increase [/packages/icons/package.json](/packages/icons/package.json) minor version (e.g 1.0.0 to 1.1.0)
|
|
16
|
+
4. Run `npm install` at root level
|
|
17
|
+
5. Run `npm run prepublishOnly` inside [/packages/icons](/packages/icons) to be sure that the new icon can be packaged
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SVGProps } from "react";
|
|
2
|
+
import type { IconProps } from "../types";
|
|
3
|
+
declare const ForwardRef: import("react").ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement> & IconProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
4
|
+
export { ForwardRef as ResetSettingsIcon };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
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 ResetSettingsIcon = ({
|
|
8
|
+
color: defaultColor,
|
|
9
|
+
size,
|
|
10
|
+
...props
|
|
11
|
+
}, ref) => {
|
|
12
|
+
const defaultContextValues = react.useContext(Context.IconContext);
|
|
13
|
+
const defaultValues = {
|
|
14
|
+
...defaultContextValues,
|
|
15
|
+
color: defaultColor ?? defaultContextValues.color,
|
|
16
|
+
fontSize: size ?? defaultContextValues.size ?? "var(--panache-icon-size)",
|
|
17
|
+
...props
|
|
18
|
+
};
|
|
19
|
+
const color = react.useMemo(() => get.default(defaultValues.palette, defaultValues.color) ?? defaultValues.color, [defaultValues.color, defaultValues.palette]);
|
|
20
|
+
return /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 -960 960 960", fontSize: defaultValues.fontSize, fill: color, color, ref, ...props, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M520-330v-60h160v60zm60 210v-50h-60v-60h60v-50h60v160zm100-50v-60h160v60zm40-110v-160h60v50h60v60h-60v50zm111-280h-83q-26-88-99-144t-169-56q-117 0-198.5 81.5T200-480q0 72 32.5 132t87.5 98v-110h80v240H160v-80h94q-62-50-98-122.5T120-480q0-75 28.5-140.5t77-114 114-77T480-840q129 0 226.5 79.5T831-560" }) });
|
|
21
|
+
};
|
|
22
|
+
const ForwardRef = react.forwardRef(ResetSettingsIcon);
|
|
23
|
+
exports.ResetSettingsIcon = ForwardRef;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef, useContext, useMemo } from "react";
|
|
4
|
+
import get from "../utils/get.mjs";
|
|
5
|
+
import { IconContext } from "../providers/IconProvider/Context.mjs";
|
|
6
|
+
const ResetSettingsIcon = ({
|
|
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
|
+
fontSize: size ?? defaultContextValues.size ?? "var(--panache-icon-size)",
|
|
16
|
+
...props
|
|
17
|
+
};
|
|
18
|
+
const color = useMemo(() => get(defaultValues.palette, defaultValues.color) ?? defaultValues.color, [defaultValues.color, defaultValues.palette]);
|
|
19
|
+
return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 -960 960 960", fontSize: defaultValues.fontSize, fill: color, color, ref, ...props, children: /* @__PURE__ */ jsx("path", { d: "M520-330v-60h160v60zm60 210v-50h-60v-60h60v-50h60v160zm100-50v-60h160v60zm40-110v-160h60v50h60v60h-60v50zm111-280h-83q-26-88-99-144t-169-56q-117 0-198.5 81.5T200-480q0 72 32.5 132t87.5 98v-110h80v240H160v-80h94q-62-50-98-122.5T120-480q0-75 28.5-140.5t77-114 114-77T480-840q129 0 226.5 79.5T831-560" }) });
|
|
20
|
+
};
|
|
21
|
+
const ForwardRef = forwardRef(ResetSettingsIcon);
|
|
22
|
+
export {
|
|
23
|
+
ForwardRef as ResetSettingsIcon
|
|
24
|
+
};
|
package/lib/icons/index.d.ts
CHANGED
|
@@ -89,6 +89,7 @@ export { PreviewIcon } from "./PreviewIcon";
|
|
|
89
89
|
export { RefreshIcon } from "./RefreshIcon";
|
|
90
90
|
export { RegulatoryReportingIcon } from "./RegulatoryReportingIcon";
|
|
91
91
|
export { RemoveIcon } from "./RemoveIcon";
|
|
92
|
+
export { ResetSettingsIcon } from "./ResetSettingsIcon";
|
|
92
93
|
export { RiskScoringIcon } from "./RiskScoringIcon";
|
|
93
94
|
export { RotateRightIcon } from "./RotateRightIcon";
|
|
94
95
|
export { ScissorsIcon } from "./ScissorsIcon";
|
package/lib/index.js
CHANGED
|
@@ -93,6 +93,7 @@ const PreviewIcon = require("./icons/PreviewIcon.js");
|
|
|
93
93
|
const RefreshIcon = require("./icons/RefreshIcon.js");
|
|
94
94
|
const RegulatoryReportingIcon = require("./icons/RegulatoryReportingIcon.js");
|
|
95
95
|
const RemoveIcon = require("./icons/RemoveIcon.js");
|
|
96
|
+
const ResetSettingsIcon = require("./icons/ResetSettingsIcon.js");
|
|
96
97
|
const RiskScoringIcon = require("./icons/RiskScoringIcon.js");
|
|
97
98
|
const RotateRightIcon = require("./icons/RotateRightIcon.js");
|
|
98
99
|
const ScissorsIcon = require("./icons/ScissorsIcon.js");
|
|
@@ -213,6 +214,7 @@ exports.PreviewIcon = PreviewIcon.PreviewIcon;
|
|
|
213
214
|
exports.RefreshIcon = RefreshIcon.RefreshIcon;
|
|
214
215
|
exports.RegulatoryReportingIcon = RegulatoryReportingIcon.RegulatoryReportingIcon;
|
|
215
216
|
exports.RemoveIcon = RemoveIcon.RemoveIcon;
|
|
217
|
+
exports.ResetSettingsIcon = ResetSettingsIcon.ResetSettingsIcon;
|
|
216
218
|
exports.RiskScoringIcon = RiskScoringIcon.RiskScoringIcon;
|
|
217
219
|
exports.RotateRightIcon = RotateRightIcon.RotateRightIcon;
|
|
218
220
|
exports.ScissorsIcon = ScissorsIcon.ScissorsIcon;
|
package/lib/index.mjs
CHANGED
|
@@ -92,6 +92,7 @@ import { PreviewIcon } from "./icons/PreviewIcon.mjs";
|
|
|
92
92
|
import { RefreshIcon } from "./icons/RefreshIcon.mjs";
|
|
93
93
|
import { RegulatoryReportingIcon } from "./icons/RegulatoryReportingIcon.mjs";
|
|
94
94
|
import { RemoveIcon } from "./icons/RemoveIcon.mjs";
|
|
95
|
+
import { ResetSettingsIcon } from "./icons/ResetSettingsIcon.mjs";
|
|
95
96
|
import { RiskScoringIcon } from "./icons/RiskScoringIcon.mjs";
|
|
96
97
|
import { RotateRightIcon } from "./icons/RotateRightIcon.mjs";
|
|
97
98
|
import { ScissorsIcon } from "./icons/ScissorsIcon.mjs";
|
|
@@ -212,6 +213,7 @@ export {
|
|
|
212
213
|
RefreshIcon,
|
|
213
214
|
RegulatoryReportingIcon,
|
|
214
215
|
RemoveIcon,
|
|
216
|
+
ResetSettingsIcon,
|
|
215
217
|
RiskScoringIcon,
|
|
216
218
|
RotateRightIcon,
|
|
217
219
|
ScissorsIcon,
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px"><path d="M520-330v-60h160v60H520Zm60 210v-50h-60v-60h60v-50h60v160h-60Zm100-50v-60h160v60H680Zm40-110v-160h60v50h60v60h-60v50h-60Zm111-280h-83q-26-88-99-144t-169-56q-117 0-198.5 81.5T200-480q0 72 32.5 132t87.5 98v-110h80v240H160v-80h94q-62-50-98-122.5T120-480q0-75 28.5-140.5t77-114q48.5-48.5 114-77T480-840q129 0 226.5 79.5T831-560Z"/></svg>
|