elementa-icons 1.3.0 → 1.4.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/dist/icons/nav/ArrowDown.js +5 -17
- package/dist/icons/nav/ArrowLeft.js +20 -0
- package/dist/icons/nav/ArrowUp.js +9 -16
- package/dist/index.esm.js +1 -1
- package/dist/index.js +15 -6
- package/dist/lib/icon-template.js +54 -0
- package/dist/lib/types.js +1 -0
- package/dist/types/icons/nav/ArrowDown.d.ts +5 -4
- package/dist/types/icons/nav/ArrowLeft.d.ts +13 -0
- package/dist/types/icons/nav/ArrowUp.d.ts +5 -4
- package/dist/types/index.d.ts +7 -5
- package/dist/types/lib/icon-template.d.ts +13 -0
- package/dist/types/lib/types.d.ts +53 -0
- package/package.json +83 -71
- package/src/index.ts +16 -8
|
@@ -1,27 +1,15 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// Import global from third party libraries.
|
|
3
|
-
// Import custom components.
|
|
4
|
-
// Import custom utilities.
|
|
5
|
-
// Import custom types.
|
|
6
|
-
// Import styles.
|
|
7
2
|
/**
|
|
8
3
|
* This function renders an SVG icon of an arrow pointing downwards.
|
|
9
4
|
*
|
|
10
|
-
* @version 1.
|
|
5
|
+
* @version 1.2.0
|
|
11
6
|
* @author Aayush Goyal
|
|
12
7
|
* @created 2025-06-22
|
|
13
|
-
* @modifier
|
|
14
|
-
* @modified
|
|
8
|
+
* @modifier Aayush Goyal
|
|
9
|
+
* @modified 2025-07-13
|
|
15
10
|
* @since 1.1.0
|
|
16
11
|
*/
|
|
17
|
-
const ArrowDown = (
|
|
18
|
-
return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", xmlSpace: "preserve",
|
|
19
|
-
fillRule: "evenodd",
|
|
20
|
-
clipRule: "evenodd",
|
|
21
|
-
strokeLinejoin: "round",
|
|
22
|
-
strokeMiterlimit: 2,
|
|
23
|
-
}, viewBox: "0 0 25 29", ...props, children: [_jsx("path", { d: "M278.127 405.694h24.487v28.348h-24.487z", style: {
|
|
24
|
-
fill: "none",
|
|
25
|
-
}, transform: "matrix(1.0005 0 0 1.00049 -278.151 -405.516)" }), _jsx("path", { d: "M24.185 14.28s-3.77 3.822-7.172 7.4c-.826.867-1.623 1.725-2.34 2.508-.948 1.03-1.749 1.934-2.3 2.545l-.004-.002-.005.003c-.983-1.064-2.746-3.022-4.654-5.042A552.286 552.286 0 0 0 .552 14.28a.244.244 0 0 0-.367.32s3.258 4.267 6.337 8.123c1.734 2.173 3.424 4.192 4.341 5.315a1.988 1.988 0 0 0 3.012 0c.528-.631 1.311-1.551 2.2-2.632.673-.821 1.411-1.73 2.155-2.67 3.066-3.868 6.322-8.136 6.322-8.136a.244.244 0 0 0-.367-.32Z" }), _jsx("path", { d: "M12.612 23.65s.113-1.067.26-2.763c.1-1.15.225-2.572.325-4.144.057-.887.103-1.815.135-2.763.021-.61.038-1.225.036-1.842a51.027 51.027 0 0 0-.042-1.842 164.88 164.88 0 0 0-.349-5.526C12.78 2.3 12.612.625 12.612.625a.243.243 0 0 0-.487 0S11.96 2.3 11.761 4.77c-.068.844-.137 1.773-.2 2.763-.056.887-.113 1.814-.149 2.763a48.819 48.819 0 0 0-.043 1.842c0 .617.015 1.233.036 1.842.033.948.078 1.876.135 2.763.1 1.572.226 2.994.326 4.144.146 1.696.26 2.763.26 2.763a.243.243 0 0 0 .486 0Z" })] }));
|
|
12
|
+
const ArrowDown = ({ color = '#000000', height = '1em', strokeWidth = 1, width = '1em' }) => {
|
|
13
|
+
return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", xmlSpace: "preserve", viewBox: "0 0 25 29", stroke: color, strokeWidth: strokeWidth, width: width, height: height, fill: color, children: [_jsx("path", { d: "M24.185 14.28s-3.77 3.822-7.172 7.4c-.826.867-1.623 1.725-2.34 2.508-.948 1.03-1.749 1.934-2.3 2.545l-.004-.002-.005.003c-.983-1.064-2.746-3.022-4.654-5.042A552.286 552.286 0 0 0 .552 14.28a.244.244 0 0 0-.367.32s3.258 4.267 6.337 8.123c1.734 2.173 3.424 4.192 4.341 5.315a1.988 1.988 0 0 0 3.012 0c.528-.631 1.311-1.551 2.2-2.632.673-.821 1.411-1.73 2.155-2.67 3.066-3.868 6.322-8.136 6.322-8.136a.244.244 0 0 0-.367-.32Z" }), _jsx("path", { d: "M12.612 23.65s.113-1.067.26-2.763c.1-1.15.225-2.572.325-4.144.057-.887.103-1.815.135-2.763.021-.61.038-1.225.036-1.842a51.027 51.027 0 0 0-.042-1.842 164.88 164.88 0 0 0-.349-5.526C12.78 2.3 12.612.625 12.612.625a.243.243 0 0 0-.487 0S11.96 2.3 11.761 4.77c-.068.844-.137 1.773-.2 2.763-.056.887-.113 1.814-.149 2.763a48.819 48.819 0 0 0-.043 1.842c0 .617.015 1.233.036 1.842.033.948.078 1.876.135 2.763.1 1.572.226 2.994.326 4.144.146 1.696.26 2.763.26 2.763a.243.243 0 0 0 .486 0Z" })] }));
|
|
26
14
|
};
|
|
27
15
|
export default ArrowDown;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* This function renders an SVG icon of a left arrow.
|
|
4
|
+
*
|
|
5
|
+
* @version 1.0.0
|
|
6
|
+
* @author Aayush Goyal
|
|
7
|
+
* @created 2025-07-13
|
|
8
|
+
* @modifier
|
|
9
|
+
* @modified
|
|
10
|
+
* @since 1.3.0
|
|
11
|
+
*/
|
|
12
|
+
const ArrowLeft = ({ color = '#000000', height = '1em', strokeWidth = 1, width = '1em' }) => {
|
|
13
|
+
return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", xmlSpace: "preserve", style: {
|
|
14
|
+
fillRule: 'evenodd',
|
|
15
|
+
clipRule: 'evenodd',
|
|
16
|
+
strokeLinejoin: 'round',
|
|
17
|
+
strokeMiterlimit: 2
|
|
18
|
+
}, viewBox: "0 0 29 25", height: height, stroke: color, strokeWidth: strokeWidth, width: width, fill: color, children: [_jsx("path", { d: "M14.898 24.549s-3.822-3.77-7.4-7.172a188 188 0 0 0-2.508-2.341c-1.03-.947-1.934-1.748-2.545-2.3l.002-.003-.003-.005c1.065-.983 3.022-2.746 5.042-4.654C11.075 4.686 14.898.916 14.898.916a.244.244 0 0 0-.32-.367s-4.267 3.258-8.123 6.337C4.282 8.62 2.263 10.31 1.14 11.226a1.988 1.988 0 0 0 0 3.013c.631.528 1.551 1.31 2.632 2.199.821.674 1.73 1.412 2.67 2.156a648 648 0 0 0 8.136 6.322.244.244 0 0 0 .32-.367" }), _jsx("path", { d: "M5.528 12.976s1.067.113 2.763.26c1.15.099 2.572.225 4.145.325a91 91 0 0 0 2.763.135c.609.02 1.225.038 1.842.036a51 51 0 0 0 1.842-.042 164.882 164.882 0 0 0 5.526-.349c2.47-.198 4.144-.365 4.144-.365a.243.243 0 0 0 0-.487s-1.674-.166-4.144-.364c-.844-.068-1.773-.137-2.763-.2-.888-.056-1.815-.113-2.763-.15a49 49 0 0 0-1.842-.042 51 51 0 0 0-1.842.036c-.95.033-1.877.078-2.763.135-1.573.1-2.995.226-4.145.326-1.696.146-2.763.259-2.763.259a.243.243 0 0 0 0 .487" })] }));
|
|
19
|
+
};
|
|
20
|
+
export default ArrowLeft;
|
|
@@ -1,27 +1,20 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// Import global from third party libraries.
|
|
3
|
-
// Import custom components.
|
|
4
|
-
// Import custom utilities.
|
|
5
|
-
// Import custom types.
|
|
6
|
-
// Import styles.
|
|
7
2
|
/**
|
|
8
3
|
* This function renders an SVG icon of an arrow pointing downwards.
|
|
9
4
|
*
|
|
10
|
-
* @version 1.
|
|
5
|
+
* @version 1.1.0
|
|
11
6
|
* @author Aayush Goyal
|
|
12
7
|
* @created 2025-06-22
|
|
13
|
-
* @modifier
|
|
14
|
-
* @modified
|
|
8
|
+
* @modifier Aayush Goyal
|
|
9
|
+
* @modified 2025-07-13
|
|
15
10
|
* @since 1.1.0
|
|
16
11
|
*/
|
|
17
|
-
const ArrowDown = (
|
|
12
|
+
const ArrowDown = ({ color = '#000000', height = '1em', strokeWidth = 1, width = '1em' }) => {
|
|
18
13
|
return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", xmlSpace: "preserve", style: {
|
|
19
|
-
fillRule:
|
|
20
|
-
clipRule:
|
|
21
|
-
strokeLinejoin:
|
|
22
|
-
strokeMiterlimit: 2
|
|
23
|
-
}, viewBox: "0 0 26 29",
|
|
24
|
-
fill: "none",
|
|
25
|
-
}, transform: "matrix(1.00017 0 0 1.00024 -245.579 -405.18)" }), _jsx("path", { d: "M1.02 14.836s3.77-3.823 7.173-7.4c.826-.868 1.623-1.725 2.34-2.508.948-1.03 1.749-1.934 2.3-2.546l.004.003.005-.004c.983 1.065 2.746 3.022 4.654 5.043 3.388 3.588 7.158 7.412 7.158 7.412a.244.244 0 0 0 .367-.32s-3.258-4.267-6.337-8.124C16.95 4.22 15.26 2.201 14.343 1.078a1.988 1.988 0 0 0-3.012-.001c-.528.632-1.311 1.552-2.2 2.633-.673.82-1.411 1.729-2.155 2.67a648.25 648.25 0 0 0-6.322 8.136.244.244 0 0 0 .367.32Z" }), _jsx("path", { d: "M12.594 5.466s-.113 1.067-.26 2.763c-.1 1.15-.225 2.571-.325 4.144a91.07 91.07 0 0 0-.135 2.763 48.872 48.872 0 0 0-.036 1.842c0 .617.019 1.233.042 1.842a164.882 164.882 0 0 0 .349 5.526c.198 2.47.365 4.145.365 4.145a.243.243 0 0 0 .487 0s.166-1.674.364-4.145c.068-.844.137-1.773.2-2.763.056-.887.113-1.814.149-2.763a48.82 48.82 0 0 0 .043-1.842 51.077 51.077 0 0 0-.036-1.842 94.437 94.437 0 0 0-.135-2.763c-.1-1.573-.226-2.994-.326-4.144-.146-1.696-.26-2.763-.26-2.763a.243.243 0 0 0-.486 0Z" })] }));
|
|
14
|
+
fillRule: 'evenodd',
|
|
15
|
+
clipRule: 'evenodd',
|
|
16
|
+
strokeLinejoin: 'round',
|
|
17
|
+
strokeMiterlimit: 2
|
|
18
|
+
}, viewBox: "0 0 26 29", height: height, stroke: color, strokeWidth: strokeWidth, width: width, fill: color, children: [_jsx("path", { d: "M1.02 14.836s3.77-3.823 7.173-7.4c.826-.868 1.623-1.725 2.34-2.508.948-1.03 1.749-1.934 2.3-2.546l.004.003.005-.004c.983 1.065 2.746 3.022 4.654 5.043 3.388 3.588 7.158 7.412 7.158 7.412a.244.244 0 0 0 .367-.32s-3.258-4.267-6.337-8.124C16.95 4.22 15.26 2.201 14.343 1.078a1.988 1.988 0 0 0-3.012-.001c-.528.632-1.311 1.552-2.2 2.633-.673.82-1.411 1.729-2.155 2.67a648.25 648.25 0 0 0-6.322 8.136.244.244 0 0 0 .367.32Z" }), _jsx("path", { d: "M12.594 5.466s-.113 1.067-.26 2.763c-.1 1.15-.225 2.571-.325 4.144a91.07 91.07 0 0 0-.135 2.763 48.872 48.872 0 0 0-.036 1.842c0 .617.019 1.233.042 1.842a164.882 164.882 0 0 0 .349 5.526c.198 2.47.365 4.145.365 4.145a.243.243 0 0 0 .487 0s.166-1.674.364-4.145c.068-.844.137-1.773.2-2.763.056-.887.113-1.814.149-2.763a48.82 48.82 0 0 0 .043-1.842 51.077 51.077 0 0 0-.036-1.842 94.437 94.437 0 0 0-.135-2.763c-.1-1.573-.226-2.994-.326-4.144-.146-1.696-.26-2.763-.26-2.763a.243.243 0 0 0-.486 0Z" })] }));
|
|
26
19
|
};
|
|
27
20
|
export default ArrowDown;
|
package/dist/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";const r=
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";const i=({color:i="#000000",height:s="1em",strokeWidth:r=1,width:o="1em"})=>e("svg",{xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",viewBox:"0 0 25 29",stroke:i,strokeWidth:r,width:o,height:s,fill:i,children:[t("path",{d:"M24.185 14.28s-3.77 3.822-7.172 7.4c-.826.867-1.623 1.725-2.34 2.508-.948 1.03-1.749 1.934-2.3 2.545l-.004-.002-.005.003c-.983-1.064-2.746-3.022-4.654-5.042A552.286 552.286 0 0 0 .552 14.28a.244.244 0 0 0-.367.32s3.258 4.267 6.337 8.123c1.734 2.173 3.424 4.192 4.341 5.315a1.988 1.988 0 0 0 3.012 0c.528-.631 1.311-1.551 2.2-2.632.673-.821 1.411-1.73 2.155-2.67 3.066-3.868 6.322-8.136 6.322-8.136a.244.244 0 0 0-.367-.32Z"}),t("path",{d:"M12.612 23.65s.113-1.067.26-2.763c.1-1.15.225-2.572.325-4.144.057-.887.103-1.815.135-2.763.021-.61.038-1.225.036-1.842a51.027 51.027 0 0 0-.042-1.842 164.88 164.88 0 0 0-.349-5.526C12.78 2.3 12.612.625 12.612.625a.243.243 0 0 0-.487 0S11.96 2.3 11.761 4.77c-.068.844-.137 1.773-.2 2.763-.056.887-.113 1.814-.149 2.763a48.819 48.819 0 0 0-.043 1.842c0 .617.015 1.233.036 1.842.033.948.078 1.876.135 2.763.1 1.572.226 2.994.326 4.144.146 1.696.26 2.763.26 2.763a.243.243 0 0 0 .486 0Z"})]}),s=({color:i="#000000",height:s="1em",strokeWidth:r=1,width:o="1em"})=>e("svg",{xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",style:{fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:2},viewBox:"0 0 29 25",height:s,stroke:i,strokeWidth:r,width:o,fill:i,children:[t("path",{d:"M14.898 24.549s-3.822-3.77-7.4-7.172a188 188 0 0 0-2.508-2.341c-1.03-.947-1.934-1.748-2.545-2.3l.002-.003-.003-.005c1.065-.983 3.022-2.746 5.042-4.654C11.075 4.686 14.898.916 14.898.916a.244.244 0 0 0-.32-.367s-4.267 3.258-8.123 6.337C4.282 8.62 2.263 10.31 1.14 11.226a1.988 1.988 0 0 0 0 3.013c.631.528 1.551 1.31 2.632 2.199.821.674 1.73 1.412 2.67 2.156a648 648 0 0 0 8.136 6.322.244.244 0 0 0 .32-.367"}),t("path",{d:"M5.528 12.976s1.067.113 2.763.26c1.15.099 2.572.225 4.145.325a91 91 0 0 0 2.763.135c.609.02 1.225.038 1.842.036a51 51 0 0 0 1.842-.042 164.882 164.882 0 0 0 5.526-.349c2.47-.198 4.144-.365 4.144-.365a.243.243 0 0 0 0-.487s-1.674-.166-4.144-.364c-.844-.068-1.773-.137-2.763-.2-.888-.056-1.815-.113-2.763-.15a49 49 0 0 0-1.842-.042 51 51 0 0 0-1.842.036c-.95.033-1.877.078-2.763.135-1.573.1-2.995.226-4.145.326-1.696.146-2.763.259-2.763.259a.243.243 0 0 0 0 .487"})]}),r=({color:i="#000000",height:s="1em",strokeWidth:r=1,width:o="1em"})=>e("svg",{xmlns:"http://www.w3.org/2000/svg",xmlSpace:"preserve",style:{fillRule:"evenodd",clipRule:"evenodd",strokeLinejoin:"round",strokeMiterlimit:2},viewBox:"0 0 26 29",height:s,stroke:i,strokeWidth:r,width:o,fill:i,children:[t("path",{d:"M1.02 14.836s3.77-3.823 7.173-7.4c.826-.868 1.623-1.725 2.34-2.508.948-1.03 1.749-1.934 2.3-2.546l.004.003.005-.004c.983 1.065 2.746 3.022 4.654 5.043 3.388 3.588 7.158 7.412 7.158 7.412a.244.244 0 0 0 .367-.32s-3.258-4.267-6.337-8.124C16.95 4.22 15.26 2.201 14.343 1.078a1.988 1.988 0 0 0-3.012-.001c-.528.632-1.311 1.552-2.2 2.633-.673.82-1.411 1.729-2.155 2.67a648.25 648.25 0 0 0-6.322 8.136.244.244 0 0 0 .367.32Z"}),t("path",{d:"M12.594 5.466s-.113 1.067-.26 2.763c-.1 1.15-.225 2.571-.325 4.144a91.07 91.07 0 0 0-.135 2.763 48.872 48.872 0 0 0-.036 1.842c0 .617.019 1.233.042 1.842a164.882 164.882 0 0 0 .349 5.526c.198 2.47.365 4.145.365 4.145a.243.243 0 0 0 .487 0s.166-1.674.364-4.145c.068-.844.137-1.773.2-2.763.056-.887.113-1.814.149-2.763a48.82 48.82 0 0 0 .043-1.842 51.077 51.077 0 0 0-.036-1.842 94.437 94.437 0 0 0-.135-2.763c-.1-1.573-.226-2.994-.326-4.144-.146-1.696-.26-2.763-.26-2.763a.243.243 0 0 0-.486 0Z"})]});export{i as ArrowDown,s as ArrowLeft,r as ArrowUp};
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
|
-
'use client';
|
|
2
1
|
/**
|
|
3
2
|
* This file exports all the icons for the library.
|
|
4
3
|
*
|
|
5
|
-
* @version 1.
|
|
4
|
+
* @version 1.1.0
|
|
6
5
|
* @author Aayush Goyal
|
|
7
6
|
* @created 2025-06-22
|
|
8
|
-
* @modifier
|
|
9
|
-
* @modified
|
|
7
|
+
* @modifier Aayush Goyal
|
|
8
|
+
* @modified 2025-07-13
|
|
10
9
|
* @since 1.1.0
|
|
11
10
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
// SECTION: Imports
|
|
12
|
+
// SECTION: Navigation
|
|
13
|
+
import ArrowDown from '@/src/icons/nav/ArrowDown';
|
|
14
|
+
import ArrowLeft from '@/src/icons/nav/ArrowLeft';
|
|
15
|
+
import ArrowUp from '@/src/icons/nav/ArrowUp';
|
|
16
|
+
// !SECTION: Navigation
|
|
17
|
+
// !SECTION: Imports
|
|
18
|
+
// SECTION: Exports
|
|
19
|
+
// SECTION: Navigation
|
|
20
|
+
export { ArrowDown, ArrowLeft, ArrowUp };
|
|
21
|
+
// !SECTION: Navigation
|
|
22
|
+
// !SECTION: Exports
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Import global from third party libraries.
|
|
2
|
+
// Import styles.
|
|
3
|
+
/**
|
|
4
|
+
* This function is a custom template for converting SVG icons to React components.
|
|
5
|
+
*
|
|
6
|
+
* @version 1.0.0
|
|
7
|
+
* @author Aayush Goyal
|
|
8
|
+
* @created 2023-10-05
|
|
9
|
+
* @modifier
|
|
10
|
+
* @modified
|
|
11
|
+
* @since 1.1.0
|
|
12
|
+
*/
|
|
13
|
+
const iconTemplate = ({ imports, interfaces, componentName, props, jsx, exports }, { tpl }) => {
|
|
14
|
+
console.log(props);
|
|
15
|
+
// Remove 'Svg' from the export name if present
|
|
16
|
+
const exportName = componentName.replace(/^Svg/, '');
|
|
17
|
+
const todaysDate = new Date().toISOString().split('T')[0];
|
|
18
|
+
return tpl `
|
|
19
|
+
${imports};
|
|
20
|
+
|
|
21
|
+
// Import custom components.
|
|
22
|
+
|
|
23
|
+
// Import custom utilities.
|
|
24
|
+
|
|
25
|
+
// Import custom types.
|
|
26
|
+
import { IconComponentProps } from "@/src/lib/types";
|
|
27
|
+
|
|
28
|
+
// Import styles.
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* This function renders an SVG icon of an {auto-generated}.
|
|
32
|
+
*
|
|
33
|
+
* @version 1.0.0
|
|
34
|
+
* @author Aayush Goyal
|
|
35
|
+
* @created Auto-generated
|
|
36
|
+
* @modifier
|
|
37
|
+
* @modified
|
|
38
|
+
* @since Auto-generated
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
${interfaces};
|
|
42
|
+
|
|
43
|
+
const ${componentName.substring(3)} = ({
|
|
44
|
+
color = '#000000',
|
|
45
|
+
strokeWidth = 1,
|
|
46
|
+
}: IconComponentProps) => {
|
|
47
|
+
return (
|
|
48
|
+
${jsx}
|
|
49
|
+
)
|
|
50
|
+
};
|
|
51
|
+
export default ${exportName};
|
|
52
|
+
`;
|
|
53
|
+
};
|
|
54
|
+
export default iconTemplate;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { IconComponentProps } from '@/src/lib/types';
|
|
1
2
|
/**
|
|
2
3
|
* This function renders an SVG icon of an arrow pointing downwards.
|
|
3
4
|
*
|
|
4
|
-
* @version 1.
|
|
5
|
+
* @version 1.2.0
|
|
5
6
|
* @author Aayush Goyal
|
|
6
7
|
* @created 2025-06-22
|
|
7
|
-
* @modifier
|
|
8
|
-
* @modified
|
|
8
|
+
* @modifier Aayush Goyal
|
|
9
|
+
* @modified 2025-07-13
|
|
9
10
|
* @since 1.1.0
|
|
10
11
|
*/
|
|
11
|
-
declare const ArrowDown: (
|
|
12
|
+
declare const ArrowDown: ({ color, height, strokeWidth, width }: IconComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export default ArrowDown;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IconComponentProps } from '@/src/lib/types';
|
|
2
|
+
/**
|
|
3
|
+
* This function renders an SVG icon of a left arrow.
|
|
4
|
+
*
|
|
5
|
+
* @version 1.0.0
|
|
6
|
+
* @author Aayush Goyal
|
|
7
|
+
* @created 2025-07-13
|
|
8
|
+
* @modifier
|
|
9
|
+
* @modified
|
|
10
|
+
* @since 1.3.0
|
|
11
|
+
*/
|
|
12
|
+
declare const ArrowLeft: ({ color, height, strokeWidth, width }: IconComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export default ArrowLeft;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
import { IconComponentProps } from '@/src/lib/types';
|
|
1
2
|
/**
|
|
2
3
|
* This function renders an SVG icon of an arrow pointing downwards.
|
|
3
4
|
*
|
|
4
|
-
* @version 1.
|
|
5
|
+
* @version 1.1.0
|
|
5
6
|
* @author Aayush Goyal
|
|
6
7
|
* @created 2025-06-22
|
|
7
|
-
* @modifier
|
|
8
|
-
* @modified
|
|
8
|
+
* @modifier Aayush Goyal
|
|
9
|
+
* @modified 2025-07-13
|
|
9
10
|
* @since 1.1.0
|
|
10
11
|
*/
|
|
11
|
-
declare const ArrowDown: (
|
|
12
|
+
declare const ArrowDown: ({ color, height, strokeWidth, width }: IconComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export default ArrowDown;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file exports all the icons for the library.
|
|
3
3
|
*
|
|
4
|
-
* @version 1.
|
|
4
|
+
* @version 1.1.0
|
|
5
5
|
* @author Aayush Goyal
|
|
6
6
|
* @created 2025-06-22
|
|
7
|
-
* @modifier
|
|
8
|
-
* @modified
|
|
7
|
+
* @modifier Aayush Goyal
|
|
8
|
+
* @modified 2025-07-13
|
|
9
9
|
* @since 1.1.0
|
|
10
10
|
*/
|
|
11
|
-
import ArrowDown from
|
|
12
|
-
|
|
11
|
+
import ArrowDown from '@/src/icons/nav/ArrowDown';
|
|
12
|
+
import ArrowLeft from '@/src/icons/nav/ArrowLeft';
|
|
13
|
+
import ArrowUp from '@/src/icons/nav/ArrowUp';
|
|
14
|
+
export { ArrowDown, ArrowLeft, ArrowUp };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Template } from '@/src/lib/types';
|
|
2
|
+
/**
|
|
3
|
+
* This function is a custom template for converting SVG icons to React components.
|
|
4
|
+
*
|
|
5
|
+
* @version 1.0.0
|
|
6
|
+
* @author Aayush Goyal
|
|
7
|
+
* @created 2023-10-05
|
|
8
|
+
* @modifier
|
|
9
|
+
* @modified
|
|
10
|
+
* @since 1.1.0
|
|
11
|
+
*/
|
|
12
|
+
declare const iconTemplate: Template;
|
|
13
|
+
export default iconTemplate;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { types as t } from '@babel/core';
|
|
2
|
+
import type { TemplateBuilder } from '@babel/template';
|
|
3
|
+
interface IconComponentProps extends React.SVGProps<SVGSVGElement> {
|
|
4
|
+
color?: string;
|
|
5
|
+
height?: string;
|
|
6
|
+
strokeWidth?: number;
|
|
7
|
+
width?: string;
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
interface TemplateVariables {
|
|
11
|
+
componentName: string;
|
|
12
|
+
interfaces: t.TSInterfaceDeclaration[];
|
|
13
|
+
props: (t.ObjectPattern | t.Identifier)[];
|
|
14
|
+
imports: t.ImportDeclaration[];
|
|
15
|
+
exports: (t.VariableDeclaration | t.ExportDeclaration | t.Statement)[];
|
|
16
|
+
jsx: t.JSXElement;
|
|
17
|
+
}
|
|
18
|
+
interface TemplateContext {
|
|
19
|
+
options: Options;
|
|
20
|
+
tpl: TemplateBuilder<t.Statement | t.Statement[]>['ast'];
|
|
21
|
+
}
|
|
22
|
+
interface Template {
|
|
23
|
+
(variables: TemplateVariables, context: TemplateContext): t.Statement | t.Statement[];
|
|
24
|
+
}
|
|
25
|
+
interface State {
|
|
26
|
+
componentName: string;
|
|
27
|
+
caller?: {
|
|
28
|
+
previousExport?: string | null;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
interface JSXRuntimeImport {
|
|
32
|
+
source: string;
|
|
33
|
+
namespace?: string;
|
|
34
|
+
defaultSpecifier?: string;
|
|
35
|
+
specifiers?: string[];
|
|
36
|
+
}
|
|
37
|
+
interface Options {
|
|
38
|
+
typescript?: boolean;
|
|
39
|
+
titleProp?: boolean;
|
|
40
|
+
descProp?: boolean;
|
|
41
|
+
expandProps?: boolean | 'start' | 'end';
|
|
42
|
+
ref?: boolean;
|
|
43
|
+
template?: Template;
|
|
44
|
+
state: State;
|
|
45
|
+
native?: boolean;
|
|
46
|
+
memo?: boolean;
|
|
47
|
+
exportType?: 'named' | 'default';
|
|
48
|
+
namedExport?: string;
|
|
49
|
+
jsxRuntime?: 'automatic' | 'classic';
|
|
50
|
+
jsxRuntimeImport?: JSXRuntimeImport;
|
|
51
|
+
importSource?: string;
|
|
52
|
+
}
|
|
53
|
+
export type { IconComponentProps, JSXRuntimeImport, Options, Template, TemplateVariables };
|
package/package.json
CHANGED
|
@@ -1,73 +1,85 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
2
|
+
"name": "elementa-icons",
|
|
3
|
+
"version": "1.4.1",
|
|
4
|
+
"description": "Elementa icons library.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.esm.js",
|
|
7
|
+
"types": "dist/types/index.d.ts",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/deriva-inc/elementa-icons.git"
|
|
11
|
+
},
|
|
12
|
+
"author": "Aayush Goyal <aayushgoyal.mps@gmail.com>",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"private": false,
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"access": "public"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist/**/*",
|
|
20
|
+
"src/index.ts",
|
|
21
|
+
"README.md",
|
|
22
|
+
"LICENSE"
|
|
23
|
+
],
|
|
24
|
+
"keywords": [
|
|
25
|
+
"react",
|
|
26
|
+
"icons",
|
|
27
|
+
"svg",
|
|
28
|
+
"library",
|
|
29
|
+
"nodejs",
|
|
30
|
+
"javascript",
|
|
31
|
+
"typescript",
|
|
32
|
+
"elementa"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "rollup -c && tsc",
|
|
36
|
+
"build:watch": "rollup -c -w",
|
|
37
|
+
"prepublishOnly": "npm run build",
|
|
38
|
+
"publish:npm": "npm publish --access public",
|
|
39
|
+
"svgr": "svgr src/icons/*.svg --template src/lib/icon-template.ts --expand-props none"
|
|
40
|
+
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"react": "^19.1.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@babel/core": "^7.27.4",
|
|
46
|
+
"@babel/preset-react": "^7.27.1",
|
|
47
|
+
"@babel/preset-typescript": "^7.27.1",
|
|
48
|
+
"@babel/template": "^7.27.2",
|
|
49
|
+
"@rollup/plugin-babel": "^6.0.4",
|
|
50
|
+
"@rollup/plugin-commonjs": "^28.0.6",
|
|
51
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
52
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
53
|
+
"@rollup/plugin-typescript": "^12.1.3",
|
|
54
|
+
"@svgr/cli": "^8.1.0",
|
|
55
|
+
"@types/babel__core": "^7.20.5",
|
|
56
|
+
"@types/babel__template": "^7.4.4",
|
|
57
|
+
"@types/node": "^20.12.2",
|
|
58
|
+
"@types/react": "^19.1.8",
|
|
59
|
+
"@typescript-eslint/eslint-plugin": "^7.5.0",
|
|
60
|
+
"@typescript-eslint/parser": "^7.5.0",
|
|
61
|
+
"autoprefixer": "^10.4.19",
|
|
62
|
+
"eslint": "^8.57.0",
|
|
63
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
64
|
+
"eslint-config-prettier": "^9.1.0",
|
|
65
|
+
"eslint-plugin-import": "^2.29.1",
|
|
66
|
+
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
67
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
68
|
+
"eslint-plugin-react": "^7.34.1",
|
|
69
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
70
|
+
"husky": "^9.0.11",
|
|
71
|
+
"prettier": "^3.2.4",
|
|
72
|
+
"prettier-plugin-tailwind": "^2.2.12",
|
|
73
|
+
"prettier-plugin-tailwindcss": "^0.6.14",
|
|
74
|
+
"rollup": "^4.44.0",
|
|
75
|
+
"rollup-plugin-dts": "^6.2.1",
|
|
76
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
77
|
+
"tslib": "^2.8.1",
|
|
78
|
+
"typescript": "^5.8.3"
|
|
79
|
+
},
|
|
80
|
+
"dependencies": {
|
|
81
|
+
"@svgr/core": "^8.1.0",
|
|
82
|
+
"svgo": "^4.0.0",
|
|
83
|
+
"ts-node": "^10.9.2"
|
|
84
|
+
}
|
|
73
85
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* This file exports all the icons for the library.
|
|
5
|
-
*
|
|
6
|
-
* @version 1.
|
|
3
|
+
*
|
|
4
|
+
* @version 1.1.0
|
|
7
5
|
* @author Aayush Goyal
|
|
8
6
|
* @created 2025-06-22
|
|
9
|
-
* @modifier
|
|
10
|
-
* @modified
|
|
7
|
+
* @modifier Aayush Goyal
|
|
8
|
+
* @modified 2025-07-13
|
|
11
9
|
* @since 1.1.0
|
|
12
10
|
*/
|
|
13
|
-
|
|
11
|
+
// SECTION: Imports
|
|
12
|
+
// SECTION: Navigation
|
|
13
|
+
import ArrowDown from '@/src/icons/nav/ArrowDown';
|
|
14
|
+
import ArrowLeft from '@/src/icons/nav/ArrowLeft';
|
|
15
|
+
import ArrowUp from '@/src/icons/nav/ArrowUp';
|
|
16
|
+
// !SECTION: Navigation
|
|
17
|
+
// !SECTION: Imports
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
// SECTION: Exports
|
|
20
|
+
// SECTION: Navigation
|
|
21
|
+
export { ArrowDown, ArrowLeft, ArrowUp };
|
|
22
|
+
// !SECTION: Navigation
|
|
23
|
+
// !SECTION: Exports
|