@jedd-icons/react 0.0.2

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.
Files changed (42) hide show
  1. package/LICENSE +21 -0
  2. package/dist/Icon.cjs +33 -0
  3. package/dist/Icon.d.cts +12 -0
  4. package/dist/Icon.d.mts +12 -0
  5. package/dist/Icon.mjs +33 -0
  6. package/dist/createJeddIcon.cjs +22 -0
  7. package/dist/createJeddIcon.d.cts +8 -0
  8. package/dist/createJeddIcon.d.mts +8 -0
  9. package/dist/createJeddIcon.mjs +22 -0
  10. package/dist/defaultAttributes.cjs +4 -0
  11. package/dist/defaultAttributes.mjs +5 -0
  12. package/dist/fill.cjs +4 -0
  13. package/dist/fill.d.cts +2 -0
  14. package/dist/fill.d.mts +2 -0
  15. package/dist/fill.mjs +3 -0
  16. package/dist/icons/arrow-down-left.cjs +3 -0
  17. package/dist/icons/arrow-down-left.d.cts +5 -0
  18. package/dist/icons/arrow-down-left.d.mts +5 -0
  19. package/dist/icons/arrow-down-left.mjs +4 -0
  20. package/dist/icons/index.d.cts +1 -0
  21. package/dist/icons/index.d.mts +1 -0
  22. package/dist/icons-fill/arrow-down-left.cjs +3 -0
  23. package/dist/icons-fill/arrow-down-left.d.cts +5 -0
  24. package/dist/icons-fill/arrow-down-left.d.mts +5 -0
  25. package/dist/icons-fill/arrow-down-left.mjs +4 -0
  26. package/dist/icons-fill/index.d.cts +1 -0
  27. package/dist/icons-fill/index.d.mts +1 -0
  28. package/dist/index.cjs +10 -0
  29. package/dist/index.d.cts +7 -0
  30. package/dist/index.d.mts +7 -0
  31. package/dist/index.mjs +6 -0
  32. package/dist/shared/dist/defaultAttributes.cjs +31 -0
  33. package/dist/shared/dist/defaultAttributes.d.cts +16 -0
  34. package/dist/shared/dist/defaultAttributes.d.mts +16 -0
  35. package/dist/shared/dist/defaultAttributes.mjs +30 -0
  36. package/dist/shared/dist/resolveStrokeWidth.cjs +6 -0
  37. package/dist/shared/dist/resolveStrokeWidth.mjs +6 -0
  38. package/dist/shared/dist/types.d.cts +6 -0
  39. package/dist/shared/dist/types.d.mts +6 -0
  40. package/dist/types.d.cts +14 -0
  41. package/dist/types.d.mts +14 -0
  42. package/package.json +80 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 jedd-labs
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/Icon.cjs ADDED
@@ -0,0 +1,33 @@
1
+ "use client";
2
+ const require_defaultAttributes = require("./shared/dist/defaultAttributes.cjs");
3
+ const require_resolveStrokeWidth = require("./shared/dist/resolveStrokeWidth.cjs");
4
+ let react = require("react");
5
+ //#region src/Icon.tsx
6
+ const Icon = (0, react.forwardRef)(({ iconNode, variant = "stroke", size = 24, color = "currentColor", strokeWidth = 2, absoluteStrokeWidth = false, className, children, ...rest }, ref) => {
7
+ const defaults = require_defaultAttributes.variantDefaultsCamel[variant];
8
+ const hasA11y = "aria-label" in rest || "aria-labelledby" in rest || "role" in rest;
9
+ const svgProps = {
10
+ ref,
11
+ ...defaults,
12
+ width: size,
13
+ height: size,
14
+ className,
15
+ ...children || hasA11y ? {} : { "aria-hidden": true }
16
+ };
17
+ if (variant === "stroke") {
18
+ svgProps.stroke = color;
19
+ svgProps.strokeWidth = require_resolveStrokeWidth.resolveStrokeWidth(strokeWidth, size, absoluteStrokeWidth);
20
+ } else svgProps.fill = color;
21
+ return (0, react.createElement)("svg", {
22
+ ...svgProps,
23
+ ...rest
24
+ }, [...iconNode.map(function renderNode([tag, attrs, nested], i) {
25
+ return (0, react.createElement)(tag, {
26
+ key: `c-${i}`,
27
+ ...attrs
28
+ }, ...nested?.map(renderNode) ?? []);
29
+ }), ...(Array.isArray(children) ? children : [children]).filter(Boolean)]);
30
+ });
31
+ Icon.displayName = "Icon";
32
+ //#endregion
33
+ exports.default = Icon;
@@ -0,0 +1,12 @@
1
+ import { Variant } from "./shared/dist/defaultAttributes.cjs";
2
+ import { IconNode } from "./shared/dist/types.cjs";
3
+ import { IconProps } from "./types.cjs";
4
+
5
+ //#region src/Icon.d.ts
6
+ interface InternalProps extends IconProps {
7
+ iconNode: IconNode;
8
+ variant?: Variant;
9
+ }
10
+ declare const Icon: import("react").ForwardRefExoticComponent<InternalProps & import("react").RefAttributes<SVGSVGElement>>;
11
+ //#endregion
12
+ export { Icon };
@@ -0,0 +1,12 @@
1
+ import { Variant } from "./shared/dist/defaultAttributes.mjs";
2
+ import { IconNode } from "./shared/dist/types.mjs";
3
+ import { IconProps } from "./types.mjs";
4
+
5
+ //#region src/Icon.d.ts
6
+ interface InternalProps extends IconProps {
7
+ iconNode: IconNode;
8
+ variant?: Variant;
9
+ }
10
+ declare const Icon: import("react").ForwardRefExoticComponent<InternalProps & import("react").RefAttributes<SVGSVGElement>>;
11
+ //#endregion
12
+ export { Icon };
package/dist/Icon.mjs ADDED
@@ -0,0 +1,33 @@
1
+ "use client";
2
+ import { variantDefaultsCamel } from "./shared/dist/defaultAttributes.mjs";
3
+ import { resolveStrokeWidth } from "./shared/dist/resolveStrokeWidth.mjs";
4
+ import { createElement, forwardRef } from "react";
5
+ //#region src/Icon.tsx
6
+ const Icon = forwardRef(({ iconNode, variant = "stroke", size = 24, color = "currentColor", strokeWidth = 2, absoluteStrokeWidth = false, className, children, ...rest }, ref) => {
7
+ const defaults = variantDefaultsCamel[variant];
8
+ const hasA11y = "aria-label" in rest || "aria-labelledby" in rest || "role" in rest;
9
+ const svgProps = {
10
+ ref,
11
+ ...defaults,
12
+ width: size,
13
+ height: size,
14
+ className,
15
+ ...children || hasA11y ? {} : { "aria-hidden": true }
16
+ };
17
+ if (variant === "stroke") {
18
+ svgProps.stroke = color;
19
+ svgProps.strokeWidth = resolveStrokeWidth(strokeWidth, size, absoluteStrokeWidth);
20
+ } else svgProps.fill = color;
21
+ return createElement("svg", {
22
+ ...svgProps,
23
+ ...rest
24
+ }, [...iconNode.map(function renderNode([tag, attrs, nested], i) {
25
+ return createElement(tag, {
26
+ key: `c-${i}`,
27
+ ...attrs
28
+ }, ...nested?.map(renderNode) ?? []);
29
+ }), ...(Array.isArray(children) ? children : [children]).filter(Boolean)]);
30
+ });
31
+ Icon.displayName = "Icon";
32
+ //#endregion
33
+ export { Icon as default };
@@ -0,0 +1,22 @@
1
+ "use client";
2
+ const require_Icon = require("./Icon.cjs");
3
+ let react = require("react");
4
+ //#region src/createJeddIcon.tsx
5
+ const toPascalCase = (s) => s.replace(/(^|-)([a-z0-9])/g, (_, __, c) => c.toUpperCase());
6
+ function createJeddIcon(iconName, iconNode, variant = "stroke") {
7
+ const Component = (0, react.forwardRef)(({ className, ...props }, ref) => (0, react.createElement)(require_Icon.default, {
8
+ ref,
9
+ iconNode,
10
+ variant,
11
+ className: [
12
+ "jedd",
13
+ `jedd-${iconName}`,
14
+ className
15
+ ].filter(Boolean).join(" "),
16
+ ...props
17
+ }));
18
+ Component.displayName = toPascalCase(iconName);
19
+ return Component;
20
+ }
21
+ //#endregion
22
+ exports.default = createJeddIcon;
@@ -0,0 +1,8 @@
1
+ import { Variant } from "./shared/dist/defaultAttributes.cjs";
2
+ import { IconNode } from "./shared/dist/types.cjs";
3
+ import { JeddIcon } from "./types.cjs";
4
+
5
+ //#region src/createJeddIcon.d.ts
6
+ declare function createJeddIcon(iconName: string, iconNode: IconNode, variant?: Variant): JeddIcon;
7
+ //#endregion
8
+ export { createJeddIcon };
@@ -0,0 +1,8 @@
1
+ import { Variant } from "./shared/dist/defaultAttributes.mjs";
2
+ import { IconNode } from "./shared/dist/types.mjs";
3
+ import { JeddIcon } from "./types.mjs";
4
+
5
+ //#region src/createJeddIcon.d.ts
6
+ declare function createJeddIcon(iconName: string, iconNode: IconNode, variant?: Variant): JeddIcon;
7
+ //#endregion
8
+ export { createJeddIcon };
@@ -0,0 +1,22 @@
1
+ "use client";
2
+ import Icon from "./Icon.mjs";
3
+ import { createElement, forwardRef } from "react";
4
+ //#region src/createJeddIcon.tsx
5
+ const toPascalCase = (s) => s.replace(/(^|-)([a-z0-9])/g, (_, __, c) => c.toUpperCase());
6
+ function createJeddIcon(iconName, iconNode, variant = "stroke") {
7
+ const Component = forwardRef(({ className, ...props }, ref) => createElement(Icon, {
8
+ ref,
9
+ iconNode,
10
+ variant,
11
+ className: [
12
+ "jedd",
13
+ `jedd-${iconName}`,
14
+ className
15
+ ].filter(Boolean).join(" "),
16
+ ...props
17
+ }));
18
+ Component.displayName = toPascalCase(iconName);
19
+ return Component;
20
+ }
21
+ //#endregion
22
+ export { createJeddIcon as default };
@@ -0,0 +1,4 @@
1
+ //#region src/defaultAttributes.ts
2
+ var defaultAttributes_default = require("./shared/dist/defaultAttributes.cjs").defaultAttributesCamel;
3
+ //#endregion
4
+ exports.default = defaultAttributes_default;
@@ -0,0 +1,5 @@
1
+ import { defaultAttributesCamel } from "./shared/dist/defaultAttributes.mjs";
2
+ //#region src/defaultAttributes.ts
3
+ var defaultAttributes_default = defaultAttributesCamel;
4
+ //#endregion
5
+ export { defaultAttributes_default as default };
package/dist/fill.cjs ADDED
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const require_arrow_down_left = require("./icons-fill/arrow-down-left.cjs");
4
+ exports.ArrowDownLeft = require_arrow_down_left.default;
@@ -0,0 +1,2 @@
1
+ import { ArrowDownLeft } from "./icons-fill/arrow-down-left.cjs";
2
+ export { ArrowDownLeft };
@@ -0,0 +1,2 @@
1
+ import { ArrowDownLeft } from "./icons-fill/arrow-down-left.mjs";
2
+ export { ArrowDownLeft };
package/dist/fill.mjs ADDED
@@ -0,0 +1,3 @@
1
+ "use client";
2
+ import ArrowDownLeft from "./icons-fill/arrow-down-left.mjs";
3
+ export { ArrowDownLeft };
@@ -0,0 +1,3 @@
1
+ const ArrowDownLeft = require("../createJeddIcon.cjs").default("arrow-down-left", [["path", { "d": "M17 7L7 17M17 17H7V7" }]]);
2
+ //#endregion
3
+ exports.default = ArrowDownLeft;
@@ -0,0 +1,5 @@
1
+ import { JeddIcon } from "../types.cjs";
2
+ //#region src/icons/arrow-down-left.d.ts
3
+ declare const ArrowDownLeft: JeddIcon;
4
+ //#endregion
5
+ export { ArrowDownLeft };
@@ -0,0 +1,5 @@
1
+ import { JeddIcon } from "../types.mjs";
2
+ //#region src/icons/arrow-down-left.d.ts
3
+ declare const ArrowDownLeft: JeddIcon;
4
+ //#endregion
5
+ export { ArrowDownLeft };
@@ -0,0 +1,4 @@
1
+ import createJeddIcon from "../createJeddIcon.mjs";
2
+ const ArrowDownLeft = createJeddIcon("arrow-down-left", [["path", { "d": "M17 7L7 17M17 17H7V7" }]]);
3
+ //#endregion
4
+ export { ArrowDownLeft as default };
@@ -0,0 +1 @@
1
+ import { ArrowDownLeft } from "./arrow-down-left.cjs";
@@ -0,0 +1 @@
1
+ import { ArrowDownLeft } from "./arrow-down-left.mjs";
@@ -0,0 +1,3 @@
1
+ const ArrowDownLeft = require("../createJeddIcon.cjs").default("arrow-down-left", [["path", { "d": "M18 7.41406L12.207 13.207L17 18H6V7L10.793 11.793L16.5859 6L18 7.41406Z" }]], "fill");
2
+ //#endregion
3
+ exports.default = ArrowDownLeft;
@@ -0,0 +1,5 @@
1
+ import { JeddIcon } from "../types.cjs";
2
+ //#region src/icons-fill/arrow-down-left.d.ts
3
+ declare const ArrowDownLeft: JeddIcon;
4
+ //#endregion
5
+ export { ArrowDownLeft };
@@ -0,0 +1,5 @@
1
+ import { JeddIcon } from "../types.mjs";
2
+ //#region src/icons-fill/arrow-down-left.d.ts
3
+ declare const ArrowDownLeft: JeddIcon;
4
+ //#endregion
5
+ export { ArrowDownLeft };
@@ -0,0 +1,4 @@
1
+ import createJeddIcon from "../createJeddIcon.mjs";
2
+ const ArrowDownLeft = createJeddIcon("arrow-down-left", [["path", { "d": "M18 7.41406L12.207 13.207L17 18H6V7L10.793 11.793L16.5859 6L18 7.41406Z" }]], "fill");
3
+ //#endregion
4
+ export { ArrowDownLeft as default };
@@ -0,0 +1 @@
1
+ import { ArrowDownLeft } from "./arrow-down-left.cjs";
@@ -0,0 +1 @@
1
+ import { ArrowDownLeft } from "./arrow-down-left.mjs";
package/dist/index.cjs ADDED
@@ -0,0 +1,10 @@
1
+ "use client";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const require_Icon = require("./Icon.cjs");
4
+ const require_createJeddIcon = require("./createJeddIcon.cjs");
5
+ const require_defaultAttributes = require("./defaultAttributes.cjs");
6
+ const require_arrow_down_left = require("./icons/arrow-down-left.cjs");
7
+ exports.ArrowDownLeft = require_arrow_down_left.default;
8
+ exports.Icon = require_Icon.default;
9
+ exports.createJeddIcon = require_createJeddIcon.default;
10
+ exports.defaultAttributes = require_defaultAttributes.default;
@@ -0,0 +1,7 @@
1
+ import { Variant, defaultAttributesCamel } from "./shared/dist/defaultAttributes.cjs";
2
+ import { IconNode } from "./shared/dist/types.cjs";
3
+ import { IconProps, JeddIcon } from "./types.cjs";
4
+ import { createJeddIcon } from "./createJeddIcon.cjs";
5
+ import { Icon } from "./Icon.cjs";
6
+ import { ArrowDownLeft } from "./icons/arrow-down-left.cjs";
7
+ export { ArrowDownLeft, Icon, type IconNode, type IconProps, type JeddIcon, type Variant, createJeddIcon, defaultAttributesCamel as defaultAttributes };
@@ -0,0 +1,7 @@
1
+ import { Variant, defaultAttributesCamel } from "./shared/dist/defaultAttributes.mjs";
2
+ import { IconNode } from "./shared/dist/types.mjs";
3
+ import { IconProps, JeddIcon } from "./types.mjs";
4
+ import { createJeddIcon } from "./createJeddIcon.mjs";
5
+ import { Icon } from "./Icon.mjs";
6
+ import { ArrowDownLeft } from "./icons/arrow-down-left.mjs";
7
+ export { ArrowDownLeft, Icon, type IconNode, type IconProps, type JeddIcon, type Variant, createJeddIcon, defaultAttributesCamel as defaultAttributes };
package/dist/index.mjs ADDED
@@ -0,0 +1,6 @@
1
+ "use client";
2
+ import Icon from "./Icon.mjs";
3
+ import createJeddIcon from "./createJeddIcon.mjs";
4
+ import defaultAttributes_default from "./defaultAttributes.mjs";
5
+ import ArrowDownLeft from "./icons/arrow-down-left.mjs";
6
+ export { ArrowDownLeft, Icon, createJeddIcon, defaultAttributes_default as defaultAttributes };
@@ -0,0 +1,31 @@
1
+ //#region ../shared/dist/defaultAttributes.mjs
2
+ const kebabToCamel = (s) => s.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
3
+ function toCamel(attrs) {
4
+ return Object.fromEntries(Object.entries(attrs).map(([k, v]) => [kebabToCamel(k), v]));
5
+ }
6
+ const strokeDefaultsCamel = toCamel({
7
+ xmlns: "http://www.w3.org/2000/svg",
8
+ width: 24,
9
+ height: 24,
10
+ viewBox: "0 0 24 24",
11
+ fill: "none",
12
+ stroke: "currentColor",
13
+ "stroke-width": 2,
14
+ "stroke-linecap": "butt",
15
+ "stroke-linejoin": "miter"
16
+ });
17
+ const variantDefaultsCamel = {
18
+ stroke: strokeDefaultsCamel,
19
+ fill: toCamel({
20
+ xmlns: "http://www.w3.org/2000/svg",
21
+ width: 24,
22
+ height: 24,
23
+ viewBox: "0 0 24 24",
24
+ fill: "currentColor",
25
+ stroke: "none"
26
+ })
27
+ };
28
+ const defaultAttributesCamel = strokeDefaultsCamel;
29
+ //#endregion
30
+ exports.defaultAttributesCamel = defaultAttributesCamel;
31
+ exports.variantDefaultsCamel = variantDefaultsCamel;
@@ -0,0 +1,16 @@
1
+ //#region ../shared/dist/defaultAttributes.d.mts
2
+ //#region src/defaultAttributes.d.ts
3
+ type Variant = "stroke" | "fill";
4
+ declare const defaultAttributesCamel: {
5
+ xmlns: string;
6
+ width: number;
7
+ height: number;
8
+ viewBox: string;
9
+ fill: string;
10
+ stroke: string;
11
+ strokeWidth: number;
12
+ strokeLinecap: string;
13
+ strokeLinejoin: string;
14
+ }; //#endregion
15
+ //#endregion
16
+ export { Variant, defaultAttributesCamel };
@@ -0,0 +1,16 @@
1
+ //#region ../shared/dist/defaultAttributes.d.mts
2
+ //#region src/defaultAttributes.d.ts
3
+ type Variant = "stroke" | "fill";
4
+ declare const defaultAttributesCamel: {
5
+ xmlns: string;
6
+ width: number;
7
+ height: number;
8
+ viewBox: string;
9
+ fill: string;
10
+ stroke: string;
11
+ strokeWidth: number;
12
+ strokeLinecap: string;
13
+ strokeLinejoin: string;
14
+ }; //#endregion
15
+ //#endregion
16
+ export { Variant, defaultAttributesCamel };
@@ -0,0 +1,30 @@
1
+ //#region ../shared/dist/defaultAttributes.mjs
2
+ const kebabToCamel = (s) => s.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
3
+ function toCamel(attrs) {
4
+ return Object.fromEntries(Object.entries(attrs).map(([k, v]) => [kebabToCamel(k), v]));
5
+ }
6
+ const strokeDefaultsCamel = toCamel({
7
+ xmlns: "http://www.w3.org/2000/svg",
8
+ width: 24,
9
+ height: 24,
10
+ viewBox: "0 0 24 24",
11
+ fill: "none",
12
+ stroke: "currentColor",
13
+ "stroke-width": 2,
14
+ "stroke-linecap": "butt",
15
+ "stroke-linejoin": "miter"
16
+ });
17
+ const variantDefaultsCamel = {
18
+ stroke: strokeDefaultsCamel,
19
+ fill: toCamel({
20
+ xmlns: "http://www.w3.org/2000/svg",
21
+ width: 24,
22
+ height: 24,
23
+ viewBox: "0 0 24 24",
24
+ fill: "currentColor",
25
+ stroke: "none"
26
+ })
27
+ };
28
+ const defaultAttributesCamel = strokeDefaultsCamel;
29
+ //#endregion
30
+ export { defaultAttributesCamel, variantDefaultsCamel };
@@ -0,0 +1,6 @@
1
+ //#region ../shared/dist/resolveStrokeWidth.mjs
2
+ function resolveStrokeWidth(strokeWidth, size, absolute) {
3
+ return absolute ? Number(strokeWidth) * 24 / Number(size) : strokeWidth;
4
+ }
5
+ //#endregion
6
+ exports.resolveStrokeWidth = resolveStrokeWidth;
@@ -0,0 +1,6 @@
1
+ //#region ../shared/dist/resolveStrokeWidth.mjs
2
+ function resolveStrokeWidth(strokeWidth, size, absolute) {
3
+ return absolute ? Number(strokeWidth) * 24 / Number(size) : strokeWidth;
4
+ }
5
+ //#endregion
6
+ export { resolveStrokeWidth };
@@ -0,0 +1,6 @@
1
+ //#region ../shared/dist/types.d.mts
2
+ //#region src/types.d.ts
3
+ type IconNodeChild = [tag: string, attrs: Record<string, string | number>, children?: IconNodeChild[]];
4
+ type IconNode = IconNodeChild[]; //#endregion
5
+ //#endregion
6
+ export { IconNode, IconNodeChild };
@@ -0,0 +1,6 @@
1
+ //#region ../shared/dist/types.d.mts
2
+ //#region src/types.d.ts
3
+ type IconNodeChild = [tag: string, attrs: Record<string, string | number>, children?: IconNodeChild[]];
4
+ type IconNode = IconNodeChild[]; //#endregion
5
+ //#endregion
6
+ export { IconNode, IconNodeChild };
@@ -0,0 +1,14 @@
1
+ import { Variant } from "./shared/dist/defaultAttributes.cjs";
2
+ import { IconNode, IconNodeChild } from "./shared/dist/types.cjs";
3
+ import { SVGProps } from "react";
4
+
5
+ //#region src/types.d.ts
6
+ interface IconProps extends Omit<SVGProps<SVGSVGElement>, "ref"> {
7
+ absoluteStrokeWidth?: boolean;
8
+ color?: string;
9
+ size?: number | string;
10
+ strokeWidth?: number | string;
11
+ }
12
+ type JeddIcon = React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
13
+ //#endregion
14
+ export { IconProps, JeddIcon };
@@ -0,0 +1,14 @@
1
+ import { Variant } from "./shared/dist/defaultAttributes.mjs";
2
+ import { IconNode, IconNodeChild } from "./shared/dist/types.mjs";
3
+ import { SVGProps } from "react";
4
+
5
+ //#region src/types.d.ts
6
+ interface IconProps extends Omit<SVGProps<SVGSVGElement>, "ref"> {
7
+ absoluteStrokeWidth?: boolean;
8
+ color?: string;
9
+ size?: number | string;
10
+ strokeWidth?: number | string;
11
+ }
12
+ type JeddIcon = React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
13
+ //#endregion
14
+ export { IconProps, JeddIcon };
package/package.json ADDED
@@ -0,0 +1,80 @@
1
+ {
2
+ "name": "@jedd-icons/react",
3
+ "version": "0.0.2",
4
+ "description": "Jedd icons for React.",
5
+ "license": "MIT",
6
+ "author": "Marcello Novelli",
7
+ "homepage": "https://jeddicons.com/",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/jedd-labs/jedd-icons.git",
11
+ "directory": "packages/react"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/jedd-labs/jedd-icons/issues"
15
+ },
16
+ "keywords": [
17
+ "jedd",
18
+ "jedd-icons",
19
+ "icons",
20
+ "icon",
21
+ "svg",
22
+ "react",
23
+ "react-icons",
24
+ "components",
25
+ "ui"
26
+ ],
27
+ "type": "module",
28
+ "sideEffects": false,
29
+ "publishConfig": {
30
+ "access": "public"
31
+ },
32
+ "main": "./dist/index.cjs",
33
+ "module": "./dist/index.mjs",
34
+ "types": "./dist/index.d.mts",
35
+ "exports": {
36
+ ".": {
37
+ "types": {
38
+ "import": "./dist/index.d.mts",
39
+ "require": "./dist/index.d.cts"
40
+ },
41
+ "import": "./dist/index.mjs",
42
+ "require": "./dist/index.cjs"
43
+ },
44
+ "./fill": {
45
+ "types": {
46
+ "import": "./dist/fill.d.mts",
47
+ "require": "./dist/fill.d.cts"
48
+ },
49
+ "import": "./dist/fill.mjs",
50
+ "require": "./dist/fill.cjs"
51
+ }
52
+ },
53
+ "typesVersions": {
54
+ "*": {
55
+ "fill": [
56
+ "./dist/fill.d.mts"
57
+ ]
58
+ }
59
+ },
60
+ "files": [
61
+ "dist"
62
+ ],
63
+ "peerDependencies": {
64
+ "react": "^17 || ^18 || ^19"
65
+ },
66
+ "devDependencies": {
67
+ "@types/react": "^19.2.14",
68
+ "react": "^19.2.6",
69
+ "tsdown": "^0.22.1",
70
+ "tsx": "^4.19.2",
71
+ "typescript": "^6.0.3",
72
+ "@jedd-icons/shared": "0.0.1"
73
+ },
74
+ "scripts": {
75
+ "gen": "tsx ../../tools/build-icons/build.ts",
76
+ "build": "pnpm gen && tsdown --config-loader tsx",
77
+ "dev": "pnpm gen && tsdown --config-loader tsx --watch",
78
+ "typecheck": "tsc --noEmit"
79
+ }
80
+ }