@brightlocal/icons 2.5.0 → 2.6.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/CHANGELOG.md +22 -19
- package/README.md +29 -20
- package/dist/index.cjs +1 -1
- package/dist/index.js +998 -990
- package/dist/social-media/apple-maps-neutral.cjs +1 -0
- package/dist/social-media/apple-maps-neutral.d.ts +17 -0
- package/dist/social-media/apple-maps-neutral.d.ts.map +1 -0
- package/dist/social-media/apple-maps-neutral.js +91 -0
- package/dist/social-media/apple-maps-original.cjs +1 -0
- package/dist/social-media/apple-maps-original.d.ts +17 -0
- package/dist/social-media/apple-maps-original.d.ts.map +1 -0
- package/dist/social-media/apple-maps-original.js +164 -0
- package/dist/social-media/dynamic-imports.cjs +1 -1
- package/dist/social-media/dynamic-imports.d.ts +12 -0
- package/dist/social-media/dynamic-imports.d.ts.map +1 -1
- package/dist/social-media/dynamic-imports.js +4 -0
- package/dist/social-media/google-analytics-neutral.cjs +1 -0
- package/dist/social-media/google-analytics-neutral.d.ts +17 -0
- package/dist/social-media/google-analytics-neutral.d.ts.map +1 -0
- package/dist/social-media/google-analytics-neutral.js +26 -0
- package/dist/social-media/google-analytics-original.cjs +1 -0
- package/dist/social-media/google-analytics-original.d.ts +17 -0
- package/dist/social-media/google-analytics-original.d.ts.map +1 -0
- package/dist/social-media/google-analytics-original.js +36 -0
- package/dist/social-media/index.cjs +1 -1
- package/dist/social-media/index.d.ts +9 -1
- package/dist/social-media/index.d.ts.map +1 -1
- package/dist/social-media/index.js +978 -970
- package/package.json +1 -1
- package/src/assets/social-media/apple-maps-neutral.svg +17 -0
- package/src/assets/social-media/apple-maps-original.svg +48 -0
- package/src/assets/social-media/google-analytics-neutral.svg +4 -0
- package/src/assets/social-media/google-analytics-original.svg +11 -0
- package/src/social-media/apple-maps-neutral.tsx +87 -0
- package/src/social-media/apple-maps-original.tsx +169 -0
- package/src/social-media/dynamic-imports.ts +16 -0
- package/src/social-media/google-analytics-neutral.tsx +48 -0
- package/src/social-media/google-analytics-original.tsx +55 -0
- package/src/social-media/index.ts +9 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,57 +7,60 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2.6.0] - 2026-11-17
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- **Apple Maps and GA4 brand marks** New brand marks for Apple Maps and Google Analytics 4 come in original and neutral versions. Apple Maps and Google Analytics 4 brand marks in Original (brand) and Neutral (currentColor, dark/light aware) variants: AppleMapsOriginal/Neutral, GoogleAnalyticsOriginal/Neutral (DS-1262)
|
|
14
|
+
|
|
10
15
|
## [2.5.0] - 2026-11-03
|
|
11
16
|
|
|
12
17
|
### Added
|
|
13
|
-
- Add 187 external source logos with original + neutral variants (DS-1060)
|
|
18
|
+
- **187 external source logos** New logos for 187 external sources come in original and neutral versions. Add 187 external source logos with original + neutral variants (DS-1060)
|
|
14
19
|
|
|
15
20
|
### Changed
|
|
16
|
-
- Icon width and height are now rem (numeric size / 16), so icons follow the browser's default font-size setting like text and spacing; identical at the default 16px (DS-1033)
|
|
17
|
-
|
|
18
|
-
`width` and `height` props on Lucide icons and `DynamicIcon` are deprecated — use `size` instead. The props are still accepted but ignored (dimensions are derived from `size`). Dynamically loaded Lucide icons get the same rem sizing and stroke as the static exports, so they no longer shrink after the loading placeholder.
|
|
19
|
-
- lucide-react 0.475 -> 1.x: Lucide 1.0 dropped brand logos. 10 names are now deprecated re-exports of their social-media equivalents: `Dribbble` → `DribbbleNeutral`, `Facebook` → `FacebookNeutral`, `Figma` → `FigmaNeutral`, `Github` → `GithubNeutral`, `Instagram` → `InstagramNeutral`, `Linkedin` → `LinkedinNeutral`, `Slack` → `SlackNeutral`, `Twitch` → `TwitchNeutral`, `Twitter` → `XExTwitterNeutral`, `Youtube` → `YoutubeNeutral`. These deprecated aliases will be removed in the next major version. 8 names with no replacement are removed: Chrome, Codepen, Codesandbox, Framer, Gitlab, Pocket, RailSymbol, Trello. 412 new icons added (DS-984)
|
|
21
|
+
- **Icons scale with browser text size** Icons now grow and shrink with the browser text size setting, like text does, and the old size props are deprecated. Icon width and height are now rem (numeric size / 16), so icons follow the browser's default font-size setting like text and spacing; identical at the default 16px (DS-1033) `width` and `height` props on Lucide icons and `DynamicIcon` are deprecated — use `size` instead. The props are still accepted but ignored (dimensions are derived from `size`). Dynamically loaded Lucide icons get the same rem sizing and stroke as the static exports, so they no longer shrink after the loading placeholder.
|
|
22
|
+
- **Lucide brand icons moved to social set** Brand logos removed from the Lucide icon library now point to their social media equivalents, and the old names are deprecated. lucide-react 0.475 -> 1.x: Lucide 1.0 dropped brand logos. 10 names are now deprecated re-exports of their social-media equivalents: `Dribbble` → `DribbbleNeutral`, `Facebook` → `FacebookNeutral`, `Figma` → `FigmaNeutral`, `Github` → `GithubNeutral`, `Instagram` → `InstagramNeutral`, `Linkedin` → `LinkedinNeutral`, `Slack` → `SlackNeutral`, `Twitch` → `TwitchNeutral`, `Twitter` → `XExTwitterNeutral`, `Youtube` → `YoutubeNeutral`. These deprecated aliases will be removed in the next major version. 8 names with no replacement are removed: Chrome, Codepen, Codesandbox, Framer, Gitlab, Pocket, RailSymbol, Trello. 412 new icons added (DS-984)
|
|
20
23
|
|
|
21
24
|
## [2.4.1] - 2026-10-16
|
|
22
25
|
|
|
23
26
|
### Fixed
|
|
24
|
-
- `typesVersions` now covers the bare `flag`, `social-media` and `custom` subpaths, so `moduleResolution: node` consumers get types for `@brightlocal/icons/flag` (and friends) instead of an untyped module. Caught by the new pre-release package export guard (DS-821)
|
|
27
|
+
- **Types found for flag and social icons** Developers now get correct type hints when importing flag, social media and custom icons. `typesVersions` now covers the bare `flag`, `social-media` and `custom` subpaths, so `moduleResolution: node` consumers get types for `@brightlocal/icons/flag` (and friends) instead of an untyped module. Caught by the new pre-release package export guard (DS-821)
|
|
25
28
|
|
|
26
29
|
## [2.4.0] - 2026-08-28
|
|
27
30
|
|
|
28
31
|
### Added
|
|
29
|
-
- ChatGPT and Gemini AI platform icons in Original (brand) and Neutral (currentColor, dark/light aware) variants (DS-911)
|
|
32
|
+
- **ChatGPT and Gemini icons** New icons for the ChatGPT and Gemini AI platforms come in original and neutral versions. ChatGPT and Gemini AI platform icons in Original (brand) and Neutral (currentColor, dark/light aware) variants (DS-911)
|
|
30
33
|
|
|
31
34
|
## [0.3.0] - 2026-02-12
|
|
32
35
|
|
|
33
36
|
### Removed
|
|
34
|
-
- `Icon` wrapper component and `IconProps`/`IconName` types
|
|
35
|
-
- `Icon` suffix aliases from lucide re-exports (`CheckIcon` -> use `Check`)
|
|
36
|
-
- Direct `lucide-react` re-export (icons now wrapped with BrightLocal defaults)
|
|
37
|
+
- **Icon wrapper component removed** The old Icon wrapper component and its types are gone, so icons must be used directly. `Icon` wrapper component and `IconProps`/`IconName` types
|
|
38
|
+
- **Icon suffix names removed** Icon names ending in Icon are no longer available; use the plain name instead. `Icon` suffix aliases from lucide re-exports (`CheckIcon` -> use `Check`)
|
|
39
|
+
- **Direct Lucide re-export removed** Icons are no longer passed straight through from Lucide; they now come with BrightLocal defaults. Direct `lucide-react` re-export (icons now wrapped with BrightLocal defaults)
|
|
37
40
|
|
|
38
41
|
### Added
|
|
39
|
-
- `LucideProps` and `LucideIcon` type exports
|
|
42
|
+
- **Icon type exports added** Developers can now import types describing icon properties and icon components. `LucideProps` and `LucideIcon` type exports
|
|
40
43
|
|
|
41
44
|
### Fixed
|
|
42
|
-
- Hyphenated SVG attributes converted to JSX camelCase in flag/social-media icons
|
|
45
|
+
- **Flag and social icons render correctly** Flag and social media icons now display properly in React. Hyphenated SVG attributes converted to JSX camelCase in flag/social-media icons
|
|
43
46
|
|
|
44
47
|
## [0.2.0] - 2026-02-09
|
|
45
48
|
|
|
46
49
|
### Changed
|
|
47
|
-
- Change default icon size from 24px to 16px
|
|
50
|
+
- **Default icon size is smaller** Icons are now smaller by default, which may change how existing layouts look. Change default icon size from 24px to 16px
|
|
48
51
|
## [0.1.2] - 2026-01-16
|
|
49
52
|
|
|
50
53
|
### Changed
|
|
51
|
-
- Add `absoluteStrokeWidth=true` default to maintain consistent stroke width regardless of icon size
|
|
54
|
+
- **Consistent icon stroke width** Icon lines now keep the same thickness whatever the icon size. Add `absoluteStrokeWidth=true` default to maintain consistent stroke width regardless of icon size
|
|
52
55
|
|
|
53
56
|
## [0.1.1] - 2024-11-19
|
|
54
57
|
|
|
55
58
|
### Added
|
|
56
|
-
- Initial public release
|
|
57
|
-
- Lucide icons with design system defaults (`strokeWidth: 1.33`)
|
|
58
|
-
- Flag icons for country representation
|
|
59
|
-
- Social media icons
|
|
60
|
-
- Custom BrightLocal icons
|
|
59
|
+
- **Initial icons release** The first public release of the BrightLocal icon package. Initial public release
|
|
60
|
+
- **Lucide icons with brand defaults** Lucide icons are now included with the design system's default line weight. Lucide icons with design system defaults (`strokeWidth: 1.33`)
|
|
61
|
+
- **Country flag icons** Flag icons are now available to represent countries. Flag icons for country representation
|
|
62
|
+
- **Social media icons** Social media icons are now available. Social media icons
|
|
63
|
+
- **BrightLocal custom icons** BrightLocal's own custom icons are now included. Custom BrightLocal icons
|
|
61
64
|
|
|
62
65
|
---
|
|
63
66
|
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ BrightLocal Design System Icons - Lucide defaults and custom icons
|
|
|
6
6
|
|
|
7
7
|
This package provides a unified icon system for the BrightLocal Design System, combining:
|
|
8
8
|
|
|
9
|
-
- All
|
|
9
|
+
- All 2,100+ Lucide React icons (tree-shakeable)
|
|
10
10
|
- Custom BrightLocal icons
|
|
11
11
|
- Dynamic icon loading for database-driven UI
|
|
12
12
|
- Full TypeScript support
|
|
@@ -36,15 +36,12 @@ import { Check, Heart, Star } from "@brightlocal/icons";
|
|
|
36
36
|
For database-driven icon rendering with code-splitting. Icons are loaded dynamically only when used.
|
|
37
37
|
|
|
38
38
|
```tsx
|
|
39
|
-
import { DynamicIcon } from "@brightlocal/icons";
|
|
39
|
+
import { DynamicIcon } from "@brightlocal/icons/dynamic";
|
|
40
40
|
|
|
41
41
|
// From database or CMS
|
|
42
42
|
const iconName = user.settings.preferredIcon; // "heart"
|
|
43
43
|
<DynamicIcon name={iconName} size={20} />
|
|
44
44
|
|
|
45
|
-
// Works with custom icons too
|
|
46
|
-
<DynamicIcon name="bright-local-logo" size={32} />
|
|
47
|
-
|
|
48
45
|
// With Suspense fallback (optional)
|
|
49
46
|
<React.Suspense fallback={<div className="w-6 h-6 animate-pulse bg-gray-200 rounded" />}>
|
|
50
47
|
<DynamicIcon name={dbIconName} size={16} />
|
|
@@ -54,16 +51,18 @@ const iconName = user.settings.preferredIcon; // "heart"
|
|
|
54
51
|
### 3. Custom BrightLocal Icons
|
|
55
52
|
|
|
56
53
|
```tsx
|
|
57
|
-
import {
|
|
54
|
+
import { MotifSparkle } from "@brightlocal/icons";
|
|
55
|
+
|
|
56
|
+
<MotifSparkle className="h-8 w-8" />;
|
|
58
57
|
|
|
59
|
-
|
|
58
|
+
// Custom icons are direct import only
|
|
60
59
|
```
|
|
61
60
|
|
|
62
61
|
## Component Props
|
|
63
62
|
|
|
64
63
|
### DynamicIcon Component
|
|
65
64
|
|
|
66
|
-
- `name`: Icon name (kebab-case, e.g., "camera", "chevron-down"
|
|
65
|
+
- `name`: Icon name (kebab-case, e.g., "camera", "chevron-down")
|
|
67
66
|
- `size`: Icon size in pixels (default: 16)
|
|
68
67
|
- `color`: Icon color (uses currentColor by default)
|
|
69
68
|
- `strokeWidth`: Stroke width (default: 1.33)
|
|
@@ -75,6 +74,8 @@ import { BrightLocalLogo } from "@brightlocal/icons";
|
|
|
75
74
|
- `className`: CSS classes for styling
|
|
76
75
|
- All standard SVG props
|
|
77
76
|
|
|
77
|
+
Flags from runtime data: `<DynamicFlagIcon country="GBR" />` falls back for unknown codes and shows a skeleton while loading. Flags and social-media icons are also available from the `@brightlocal/icons/flag` and `@brightlocal/icons/social-media` subpaths.
|
|
78
|
+
|
|
78
79
|
## Benefits
|
|
79
80
|
|
|
80
81
|
- **Tree-shakeable**: Only imports icons you use (with direct imports)
|
|
@@ -91,7 +92,7 @@ import { BrightLocalLogo } from "@brightlocal/icons";
|
|
|
91
92
|
Compatible with DynamicIcon and follows Lucide's guidelines (16×16 canvas, 2px strokes).
|
|
92
93
|
|
|
93
94
|
```tsx
|
|
94
|
-
// src/custom
|
|
95
|
+
// src/custom/my-icon.tsx
|
|
95
96
|
import { createLucideIcon } from "@brightlocal/icons";
|
|
96
97
|
|
|
97
98
|
export const MyIcon = createLucideIcon("MyIcon", [
|
|
@@ -108,7 +109,7 @@ Then add to dynamic imports:
|
|
|
108
109
|
// src/icons/dynamic-icon-imports.ts
|
|
109
110
|
const customIconImports = {
|
|
110
111
|
"my-icon": () =>
|
|
111
|
-
import("../custom
|
|
112
|
+
import("../custom/my-icon.js").then((m) => ({
|
|
112
113
|
default: m.MyIcon,
|
|
113
114
|
})),
|
|
114
115
|
};
|
|
@@ -119,7 +120,7 @@ const customIconImports = {
|
|
|
119
120
|
For icons that don't need dynamic loading.
|
|
120
121
|
|
|
121
122
|
```tsx
|
|
122
|
-
// src/custom
|
|
123
|
+
// src/custom/my-icon.tsx
|
|
123
124
|
import * as React from "react";
|
|
124
125
|
|
|
125
126
|
export const MyIcon = (props: React.SVGProps<SVGSVGElement>) => (
|
|
@@ -148,7 +149,7 @@ const icons = [Check, X, Plus, Minus, Heart, Star];
|
|
|
148
149
|
### Database-Driven Icons
|
|
149
150
|
|
|
150
151
|
```tsx
|
|
151
|
-
import { DynamicIcon } from "@brightlocal/icons";
|
|
152
|
+
import { DynamicIcon } from "@brightlocal/icons/dynamic";
|
|
152
153
|
|
|
153
154
|
// Icons stored in database
|
|
154
155
|
const features = [
|
|
@@ -186,8 +187,7 @@ When using `DynamicIcon`, icon names follow kebab-case format:
|
|
|
186
187
|
- `ChevronDown` → `"chevron-down"`
|
|
187
188
|
- `AlertCircle` → `"alert-circle"`
|
|
188
189
|
- `UserPlus` → `"user-plus"`
|
|
189
|
-
-
|
|
190
|
-
- `BrightLocalLogo` → `"bright-local-logo"`
|
|
190
|
+
- Flag and social-media icons: use the exact export name (`"USA"`, `"FacebookOriginal"`)
|
|
191
191
|
|
|
192
192
|
## Performance Considerations
|
|
193
193
|
|
|
@@ -224,10 +224,12 @@ All Lucide icons from `@brightlocal/icons` are wrapped with design system defaul
|
|
|
224
224
|
|
|
225
225
|
| Property | Default | Description |
|
|
226
226
|
|----------|---------|-------------|
|
|
227
|
-
| `size` | 16 | Icon
|
|
227
|
+
| `size` | 16 | Icon size: a number is pixels at the default root font size and renders as rem (`size / 16`); a string is a CSS length such as `"2rem"` |
|
|
228
228
|
| `strokeWidth` | 1.33 | Matches Figma design specs |
|
|
229
229
|
| `absoluteStrokeWidth` | true | Keeps stroke consistent regardless of icon size |
|
|
230
230
|
|
|
231
|
+
`width` and `height` are ignored; both derive from `size`.
|
|
232
|
+
|
|
231
233
|
### Default Sizes by Icon Type
|
|
232
234
|
|
|
233
235
|
| Icon Type | Default Size | Use Case |
|
|
@@ -251,7 +253,7 @@ All Lucide icons from `@brightlocal/icons` are wrapped with design system defaul
|
|
|
251
253
|
Full TypeScript support with type inference:
|
|
252
254
|
|
|
253
255
|
```tsx
|
|
254
|
-
import { DynamicIcon } from "@brightlocal/icons";
|
|
256
|
+
import { DynamicIcon } from "@brightlocal/icons/dynamic";
|
|
255
257
|
import type { DynamicIconProps } from "@brightlocal/icons";
|
|
256
258
|
|
|
257
259
|
// Props are fully typed
|
|
@@ -335,7 +337,7 @@ import { Heart } from "@brightlocal/icons";
|
|
|
335
337
|
|
|
336
338
|
## Resources
|
|
337
339
|
|
|
338
|
-
- [Lucide Icon Gallery](https://lucide.dev/icons) - Browse
|
|
340
|
+
- [Lucide Icon Gallery](https://lucide.dev/icons) - Browse the available icons
|
|
339
341
|
- [Lucide Documentation](https://lucide.dev/guide) - Learn more about Lucide icons
|
|
340
342
|
- [Storybook Documentation](../../../apps/docs/src/stories/Lucide.mdx) - Interactive icon gallery
|
|
341
343
|
- [Package Source](https://github.com/BrightLocal/design-system/tree/main/packages/icons) - View source code
|
|
@@ -344,7 +346,7 @@ import { Heart } from "@brightlocal/icons";
|
|
|
344
346
|
|
|
345
347
|
To add new custom icons:
|
|
346
348
|
|
|
347
|
-
1. Create icon file in `src/custom
|
|
349
|
+
1. Create icon file in `src/custom/`
|
|
348
350
|
2. Export from `src/index.ts`
|
|
349
351
|
3. Add to dynamic imports in `src/icons/dynamic-icon-imports.ts`
|
|
350
352
|
4. Update `customIconsData` in Storybook documentation
|
|
@@ -353,13 +355,20 @@ To add new custom icons:
|
|
|
353
355
|
### Adding Social Media Icons
|
|
354
356
|
|
|
355
357
|
Social media icons live in `src/social-media/` with an auto-generated barrel (`index.ts`).
|
|
356
|
-
The `
|
|
358
|
+
The `LogoMark` component in `@brightlocal/ui-components` resolves icon names automatically
|
|
357
359
|
by convention (`name` → `<PascalName>Original` / `<PascalName>Neutral`), so most new icons
|
|
358
360
|
work without any code change in `ui-components`.
|
|
359
361
|
|
|
360
362
|
**When to add an alias**: if the consumer-facing source key doesn't match the icon file stem
|
|
361
363
|
(e.g. consumers pass `"twitter"` but the icon file is `x-ex-twitter-original.tsx`), add an
|
|
362
|
-
entry to `SOURCE_ICON_ALIASES` in `packages/ui-components/src/components/
|
|
364
|
+
entry to `SOURCE_ICON_ALIASES` in `packages/ui-components/src/components/logo-mark.tsx`.
|
|
365
|
+
|
|
366
|
+
**Products shown with another brand's mark**: some products have no mark of their own.
|
|
367
|
+
Google Business Profile (formerly Google My Business) uses the standard coloured Google G
|
|
368
|
+
(`GoogleOriginal` / `GoogleNeutral`); the shopfront mark is the retired pre-rebrand icon, so
|
|
369
|
+
there is no GBP icon. For such a product, alias its names to the brand's stem in
|
|
370
|
+
`SOURCE_ICON_ALIASES` (LogoMark) and in `SOCIAL_MEDIA_BRAND_ALIASES` in
|
|
371
|
+
`apps/mcp-server/scripts/build-icon-registry.ts` (so the MCP `search_icons` / `get_icon` find it).
|
|
363
372
|
|
|
364
373
|
## License
|
|
365
374
|
|