@brightlocal/icons 0.1.1 → 0.1.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.
- package/CHANGELOG.md +16 -0
- package/dist/icons/dynamic-icon.cjs +1 -1
- package/dist/icons/dynamic-icon.d.ts +6 -0
- package/dist/icons/dynamic-icon.d.ts.map +1 -1
- package/dist/icons/dynamic-icon.js +7 -7
- package/dist/icons/icon.cjs +1 -1
- package/dist/icons/icon.d.ts +5 -0
- package/dist/icons/icon.d.ts.map +1 -1
- package/dist/icons/icon.js +9 -7
- package/dist/icons/lucide-exports.cjs +1 -0
- package/dist/icons/lucide-exports.d.ts +10552 -0
- package/dist/icons/lucide-exports.d.ts.map +1 -0
- package/dist/icons/lucide-exports.js +7042 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4278 -765
- package/package.json +9 -2
- package/src/icons/dynamic-icon.tsx +8 -2
- package/src/icons/icon.tsx +8 -1
- package/src/icons/lucide-exports.ts +7074 -0
- package/src/index.ts +7 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to @brightlocal/icons will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## [Unreleased]
|
|
6
|
+
|
|
7
|
+
## [0.1.2] - 2026-01-16
|
|
8
|
+
|
|
9
|
+
- Add absoluteStrokeWidth=true default to maintain consistent stroke width regardless of icon size
|
|
10
|
+
## [0.1.1] - 2024-11-19
|
|
11
|
+
|
|
12
|
+
- Initial public release
|
|
13
|
+
- Lucide icons with design system defaults (strokeWidth: 1.33)
|
|
14
|
+
- Flag icons for country representation
|
|
15
|
+
- Social media icons
|
|
16
|
+
- Custom BrightLocal icons
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),f=require("react"),m=require("./dynamic-icon-imports.cjs");function d(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const c=d(f),s={};for(const[e,n]of Object.entries(m.iconImports))n&&(s[e]=c.lazy(n));const i=c.forwardRef(({name:e,size:n=24,strokeWidth:t=1.33,absoluteStrokeWidth:o=!0,...l},u)=>{const r=s[e];return r?a.jsx(c.Suspense,{fallback:null,children:a.jsx(r,{ref:u,absoluteStrokeWidth:o,size:n,strokeWidth:t,...l})}):(console.warn(`Icon "${e}" not found in iconImports`),null)});i.displayName="DynamicIcon";exports.DynamicIcon=i;
|
|
@@ -22,6 +22,12 @@ export interface DynamicIconProps extends React.ComponentProps<"svg"> {
|
|
|
22
22
|
* @default 1.33
|
|
23
23
|
*/
|
|
24
24
|
strokeWidth?: number;
|
|
25
|
+
/**
|
|
26
|
+
* When true, keeps stroke width consistent regardless of icon size.
|
|
27
|
+
* Uses formula: strokeWidth * 24 / size
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
30
|
+
absoluteStrokeWidth?: boolean;
|
|
25
31
|
}
|
|
26
32
|
/**
|
|
27
33
|
* DynamicIcon component for rendering icons by name at runtime.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-icon.d.ts","sourceRoot":"","sources":["../../src/icons/dynamic-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACnE;;;;;OAKG;IACH,IAAI,EAAE,cAAc,GAAG,MAAM,CAAC;IAC9B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"dynamic-icon.d.ts","sourceRoot":"","sources":["../../src/icons/dynamic-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAEL,KAAK,cAAc,EAEpB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACnE;;;;;OAKG;IACH,IAAI,EAAE,cAAc,GAAG,MAAM,CAAC;IAC9B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAsBD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,WAAW,qGAevB,CAAC"}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import * as r from "react";
|
|
3
|
-
import { iconImports as
|
|
3
|
+
import { iconImports as f } from "./dynamic-icon-imports.js";
|
|
4
4
|
const e = {};
|
|
5
|
-
for (const [o, n] of Object.entries(
|
|
5
|
+
for (const [o, n] of Object.entries(f))
|
|
6
6
|
n && (e[o] = r.lazy(
|
|
7
7
|
n
|
|
8
8
|
));
|
|
9
|
-
const
|
|
10
|
-
({ name: o, size: n = 24,
|
|
9
|
+
const m = r.forwardRef(
|
|
10
|
+
({ name: o, size: n = 24, strokeWidth: s = 1.33, absoluteStrokeWidth: a = !0, ...i }, l) => {
|
|
11
11
|
const c = e[o];
|
|
12
|
-
return c ? /* @__PURE__ */ t(r.Suspense, { fallback: null, children: /* @__PURE__ */ t(c, { ref: a, size: n,
|
|
12
|
+
return c ? /* @__PURE__ */ t(r.Suspense, { fallback: null, children: /* @__PURE__ */ t(c, { ref: l, absoluteStrokeWidth: a, size: n, strokeWidth: s, ...i }) }) : (console.warn(`Icon "${o}" not found in iconImports`), null);
|
|
13
13
|
}
|
|
14
14
|
);
|
|
15
|
-
|
|
15
|
+
m.displayName = "DynamicIcon";
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
m as DynamicIcon
|
|
18
18
|
};
|
package/dist/icons/icon.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),a=require("react"),j=require("lucide-react");function s(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const b=s(a),g=s(j),d=b.forwardRef(({name:e,customIcon:o,className:t,size:n=24,strokeWidth:f=1.33,...c},r)=>{if(o){const u=o;return i.jsx(u,{ref:r,className:t,height:n,width:n,...c})}if(!e)return null;if(typeof e=="function"){const u=e;return i.jsx(u,{ref:r,className:t,size:n,strokeWidth:f,...c})}const l=g[e];return l?i.jsx(l,{ref:r,className:t,size:n,strokeWidth:f,...c}):(console.warn(`Icon "${e}" not found in lucide-react`),null)});d.displayName="Icon";exports.Icon=d;
|
package/dist/icons/icon.d.ts
CHANGED
|
@@ -16,6 +16,11 @@ export interface IconProps extends Omit<LucideProps, "ref" | "name"> {
|
|
|
16
16
|
* Additional class names to apply to the icon
|
|
17
17
|
*/
|
|
18
18
|
className?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Stroke width for line icons
|
|
21
|
+
* @default 1.33
|
|
22
|
+
*/
|
|
23
|
+
strokeWidth?: number;
|
|
19
24
|
}
|
|
20
25
|
/**
|
|
21
26
|
* Icon component that renders Lucide icons or custom SVG icons
|
package/dist/icons/icon.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/icons/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,KAAK,WAAW,MAAM,cAAc,CAAC;AAE5C,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,WAAW,CAAC;AAEhD,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,WAAW,EAAE,KAAK,GAAG,MAAM,CAAC;IAClE;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC7B;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;IAChE;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../src/icons/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,KAAK,WAAW,MAAM,cAAc,CAAC;AAE5C,MAAM,MAAM,QAAQ,GAAG,MAAM,OAAO,WAAW,CAAC;AAEhD,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,WAAW,EAAE,KAAK,GAAG,MAAM,CAAC;IAClE;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC7B;;OAEG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;IAChE;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,IAAI,iFAqDhB,CAAC"}
|
package/dist/icons/icon.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
const
|
|
5
|
-
({ name: o, customIcon: i, className: t, size: n = 24, ...c }, r) => {
|
|
2
|
+
import * as I from "react";
|
|
3
|
+
import * as l from "lucide-react";
|
|
4
|
+
const m = I.forwardRef(
|
|
5
|
+
({ name: o, customIcon: i, className: t, size: n = 24, strokeWidth: f = 1.33, ...c }, r) => {
|
|
6
6
|
if (i)
|
|
7
7
|
return /* @__PURE__ */ u(
|
|
8
8
|
i,
|
|
@@ -23,22 +23,24 @@ const l = d.forwardRef(
|
|
|
23
23
|
ref: r,
|
|
24
24
|
className: t,
|
|
25
25
|
size: n,
|
|
26
|
+
strokeWidth: f,
|
|
26
27
|
...c
|
|
27
28
|
}
|
|
28
29
|
);
|
|
29
|
-
const e =
|
|
30
|
+
const e = l[o];
|
|
30
31
|
return e ? /* @__PURE__ */ u(
|
|
31
32
|
e,
|
|
32
33
|
{
|
|
33
34
|
ref: r,
|
|
34
35
|
className: t,
|
|
35
36
|
size: n,
|
|
37
|
+
strokeWidth: f,
|
|
36
38
|
...c
|
|
37
39
|
}
|
|
38
40
|
) : (console.warn(`Icon "${o}" not found in lucide-react`), null);
|
|
39
41
|
}
|
|
40
42
|
);
|
|
41
|
-
|
|
43
|
+
m.displayName = "Icon";
|
|
42
44
|
export {
|
|
43
|
-
|
|
45
|
+
m as Icon
|
|
44
46
|
};
|