react-car-logo 0.2.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/LEGAL.md +22 -0
- package/LICENSE +26 -0
- package/README.md +106 -0
- package/dist/allLogos.d.ts +40 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.esm.js +694 -0
- package/dist/index.js +777 -0
- package/dist/logos/Abarth.d.ts +5 -0
- package/dist/logos/Abarth.js +20 -0
- package/dist/logos/AlfaRomeo.d.ts +5 -0
- package/dist/logos/AlfaRomeo.js +20 -0
- package/dist/logos/Alpine.d.ts +5 -0
- package/dist/logos/Alpine.js +20 -0
- package/dist/logos/Apollo.d.ts +5 -0
- package/dist/logos/Apollo.js +24 -0
- package/dist/logos/Arash.d.ts +5 -0
- package/dist/logos/Arash.js +20 -0
- package/dist/logos/AstonMartin.d.ts +5 -0
- package/dist/logos/AstonMartin.js +20 -0
- package/dist/logos/Audi.d.ts +5 -0
- package/dist/logos/Audi.js +20 -0
- package/dist/logos/BMW.d.ts +5 -0
- package/dist/logos/BMW.js +20 -0
- package/dist/logos/Bentley.d.ts +5 -0
- package/dist/logos/Bentley.js +20 -0
- package/dist/logos/Brabus.d.ts +5 -0
- package/dist/logos/Brabus.js +20 -0
- package/dist/logos/Bugatti.d.ts +5 -0
- package/dist/logos/Bugatti.js +20 -0
- package/dist/logos/Chevrolet.d.ts +5 -0
- package/dist/logos/Chevrolet.js +20 -0
- package/dist/logos/Czinger.d.ts +5 -0
- package/dist/logos/Czinger.js +24 -0
- package/dist/logos/Dallara.d.ts +5 -0
- package/dist/logos/Dallara.js +24 -0
- package/dist/logos/DeTomaso.d.ts +5 -0
- package/dist/logos/DeTomaso.js +20 -0
- package/dist/logos/Dodge.d.ts +5 -0
- package/dist/logos/Dodge.js +20 -0
- package/dist/logos/Ferrari.d.ts +5 -0
- package/dist/logos/Ferrari.js +20 -0
- package/dist/logos/Ford.d.ts +5 -0
- package/dist/logos/Ford.js +20 -0
- package/dist/logos/Glickenhaus.d.ts +5 -0
- package/dist/logos/Glickenhaus.js +24 -0
- package/dist/logos/Gumpert.d.ts +5 -0
- package/dist/logos/Gumpert.js +20 -0
- package/dist/logos/Hennessey.d.ts +5 -0
- package/dist/logos/Hennessey.js +20 -0
- package/dist/logos/Icona.d.ts +5 -0
- package/dist/logos/Icona.js +24 -0
- package/dist/logos/Italdesign.d.ts +5 -0
- package/dist/logos/Italdesign.js +24 -0
- package/dist/logos/Jaguar.d.ts +5 -0
- package/dist/logos/Jaguar.js +20 -0
- package/dist/logos/Koenigsegg.d.ts +5 -0
- package/dist/logos/Koenigsegg.js +20 -0
- package/dist/logos/Lamborghini.d.ts +5 -0
- package/dist/logos/Lamborghini.js +20 -0
- package/dist/logos/Lister.d.ts +5 -0
- package/dist/logos/Lister.js +24 -0
- package/dist/logos/Lotus.d.ts +5 -0
- package/dist/logos/Lotus.js +20 -0
- package/dist/logos/Lykan.d.ts +5 -0
- package/dist/logos/Lykan.js +24 -0
- package/dist/logos/Maserati.d.ts +5 -0
- package/dist/logos/Maserati.js +20 -0
- package/dist/logos/Maybach.d.ts +5 -0
- package/dist/logos/Maybach.js +20 -0
- package/dist/logos/McLaren.d.ts +5 -0
- package/dist/logos/McLaren.js +20 -0
- package/dist/logos/MercedesAMG.d.ts +5 -0
- package/dist/logos/MercedesAMG.js +20 -0
- package/dist/logos/Mosler.d.ts +5 -0
- package/dist/logos/Mosler.js +20 -0
- package/dist/logos/Noble.d.ts +5 -0
- package/dist/logos/Noble.js +24 -0
- package/dist/logos/Pagani.d.ts +5 -0
- package/dist/logos/Pagani.js +20 -0
- package/dist/logos/Pininfarina.d.ts +5 -0
- package/dist/logos/Pininfarina.js +20 -0
- package/dist/logos/Polestar.d.ts +5 -0
- package/dist/logos/Polestar.js +20 -0
- package/dist/logos/Porsche.d.ts +5 -0
- package/dist/logos/Porsche.js +20 -0
- package/dist/logos/RUF.d.ts +5 -0
- package/dist/logos/RUF.js +24 -0
- package/dist/logos/Radical.d.ts +5 -0
- package/dist/logos/Radical.js +20 -0
- package/dist/logos/Rimac.d.ts +5 -0
- package/dist/logos/Rimac.js +20 -0
- package/dist/logos/RollsRoyce.d.ts +5 -0
- package/dist/logos/RollsRoyce.js +20 -0
- package/dist/logos/SSC.d.ts +5 -0
- package/dist/logos/SSC.js +20 -0
- package/dist/logos/Saleen.d.ts +5 -0
- package/dist/logos/Saleen.js +20 -0
- package/dist/logos/Shelby.d.ts +5 -0
- package/dist/logos/Shelby.js +20 -0
- package/dist/logos/Spyker.d.ts +5 -0
- package/dist/logos/Spyker.js +20 -0
- package/dist/logos/TVR.d.ts +5 -0
- package/dist/logos/TVR.js +20 -0
- package/dist/logos/WMotors.d.ts +5 -0
- package/dist/logos/WMotors.js +20 -0
- package/dist/logos/Zenvo.d.ts +5 -0
- package/dist/logos/Zenvo.js +20 -0
- package/dist/types-B2mOhqdm.js +44 -0
- package/dist/types-DV3vCP6D.js +45 -0
- package/dist/types-DfZOvtAx.js +54 -0
- package/dist/types.d.ts +66 -0
- package/package.json +87 -0
- package/src/allLogos.ts +43 -0
- package/src/index.ts +47 -0
- package/src/logos/Abarth.tsx +39 -0
- package/src/logos/AlfaRomeo.tsx +39 -0
- package/src/logos/Alpine.tsx +39 -0
- package/src/logos/Arash.tsx +39 -0
- package/src/logos/AstonMartin.tsx +39 -0
- package/src/logos/Audi.tsx +39 -0
- package/src/logos/BMW.tsx +39 -0
- package/src/logos/Bentley.tsx +39 -0
- package/src/logos/Brabus.tsx +39 -0
- package/src/logos/Bugatti.tsx +39 -0
- package/src/logos/Chevrolet.tsx +39 -0
- package/src/logos/DeTomaso.tsx +39 -0
- package/src/logos/Dodge.tsx +39 -0
- package/src/logos/Ferrari.tsx +39 -0
- package/src/logos/Ford.tsx +39 -0
- package/src/logos/Gumpert.tsx +39 -0
- package/src/logos/Hennessey.tsx +39 -0
- package/src/logos/Jaguar.tsx +39 -0
- package/src/logos/Koenigsegg.tsx +39 -0
- package/src/logos/Lamborghini.tsx +39 -0
- package/src/logos/Lotus.tsx +39 -0
- package/src/logos/Maserati.tsx +39 -0
- package/src/logos/Maybach.tsx +39 -0
- package/src/logos/McLaren.tsx +39 -0
- package/src/logos/MercedesAMG.tsx +39 -0
- package/src/logos/Mosler.tsx +39 -0
- package/src/logos/Pagani.tsx +39 -0
- package/src/logos/Pininfarina.tsx +39 -0
- package/src/logos/Polestar.tsx +39 -0
- package/src/logos/Porsche.tsx +39 -0
- package/src/logos/Radical.tsx +39 -0
- package/src/logos/Rimac.tsx +39 -0
- package/src/logos/RollsRoyce.tsx +39 -0
- package/src/logos/SSC.tsx +39 -0
- package/src/logos/Saleen.tsx +39 -0
- package/src/logos/Shelby.tsx +39 -0
- package/src/logos/Spyker.tsx +39 -0
- package/src/logos/TVR.tsx +39 -0
- package/src/logos/WMotors.tsx +39 -0
- package/src/logos/Zenvo.tsx +39 -0
- package/src/types.ts +91 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { _ as __rest, S as SIZE_MAP } from '../types-B2mOhqdm.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Rolls-Royce",
|
|
6
|
+
slug: "rolls-royce",
|
|
7
|
+
pngUrl: "https://www.carlogos.org/logo/Rolls-Royce-logo.png",
|
|
8
|
+
country: "UK",
|
|
9
|
+
region: "British",
|
|
10
|
+
founded: 1904,
|
|
11
|
+
hex: "1A1A1A",
|
|
12
|
+
};
|
|
13
|
+
const RollsRoyce = (_a) => {
|
|
14
|
+
var _b;
|
|
15
|
+
var { size = "md", width, height, alt = "Rolls-Royce", loading = "lazy", style } = _a, props = __rest(_a, ["size", "width", "height", "alt", "loading", "style"]);
|
|
16
|
+
const renderPx = (_b = width !== null && width !== void 0 ? width : height) !== null && _b !== void 0 ? _b : SIZE_MAP[size];
|
|
17
|
+
return (React.createElement("img", Object.assign({ src: "https://www.carlogos.org/logo/Rolls-Royce-logo.png", alt: alt, width: renderPx, height: renderPx, loading: loading, style: Object.assign({ objectFit: "contain" }, style) }, props)));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { RollsRoyce, RollsRoyce as default, meta };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { _ as __rest, S as SIZE_MAP } from '../types-B2mOhqdm.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "SSC",
|
|
6
|
+
slug: "ssc",
|
|
7
|
+
pngUrl: "https://www.carlogos.org/logo/SSC-logo.png",
|
|
8
|
+
country: "USA",
|
|
9
|
+
region: "American",
|
|
10
|
+
founded: 1998,
|
|
11
|
+
hex: "1A1A1A",
|
|
12
|
+
};
|
|
13
|
+
const SSC = (_a) => {
|
|
14
|
+
var _b;
|
|
15
|
+
var { size = "md", width, height, alt = "SSC", loading = "lazy", style } = _a, props = __rest(_a, ["size", "width", "height", "alt", "loading", "style"]);
|
|
16
|
+
const renderPx = (_b = width !== null && width !== void 0 ? width : height) !== null && _b !== void 0 ? _b : SIZE_MAP[size];
|
|
17
|
+
return (React.createElement("img", Object.assign({ src: "https://www.carlogos.org/logo/SSC-logo.png", alt: alt, width: renderPx, height: renderPx, loading: loading, style: Object.assign({ objectFit: "contain" }, style) }, props)));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { SSC, SSC as default, meta };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { _ as __rest, S as SIZE_MAP } from '../types-B2mOhqdm.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Saleen",
|
|
6
|
+
slug: "saleen",
|
|
7
|
+
pngUrl: "https://www.carlogos.org/logo/Saleen-logo.png",
|
|
8
|
+
country: "USA",
|
|
9
|
+
region: "American",
|
|
10
|
+
founded: 1983,
|
|
11
|
+
hex: "1A1A1A",
|
|
12
|
+
};
|
|
13
|
+
const Saleen = (_a) => {
|
|
14
|
+
var _b;
|
|
15
|
+
var { size = "md", width, height, alt = "Saleen", loading = "lazy", style } = _a, props = __rest(_a, ["size", "width", "height", "alt", "loading", "style"]);
|
|
16
|
+
const renderPx = (_b = width !== null && width !== void 0 ? width : height) !== null && _b !== void 0 ? _b : SIZE_MAP[size];
|
|
17
|
+
return (React.createElement("img", Object.assign({ src: "https://www.carlogos.org/logo/Saleen-logo.png", alt: alt, width: renderPx, height: renderPx, loading: loading, style: Object.assign({ objectFit: "contain" }, style) }, props)));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { Saleen, Saleen as default, meta };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { _ as __rest, S as SIZE_MAP } from '../types-B2mOhqdm.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Shelby",
|
|
6
|
+
slug: "shelby",
|
|
7
|
+
pngUrl: "https://www.carlogos.org/logo/Shelby-logo.png",
|
|
8
|
+
country: "USA",
|
|
9
|
+
region: "American",
|
|
10
|
+
founded: 1962,
|
|
11
|
+
hex: "8B0000",
|
|
12
|
+
};
|
|
13
|
+
const Shelby = (_a) => {
|
|
14
|
+
var _b;
|
|
15
|
+
var { size = "md", width, height, alt = "Shelby", loading = "lazy", style } = _a, props = __rest(_a, ["size", "width", "height", "alt", "loading", "style"]);
|
|
16
|
+
const renderPx = (_b = width !== null && width !== void 0 ? width : height) !== null && _b !== void 0 ? _b : SIZE_MAP[size];
|
|
17
|
+
return (React.createElement("img", Object.assign({ src: "https://www.carlogos.org/logo/Shelby-logo.png", alt: alt, width: renderPx, height: renderPx, loading: loading, style: Object.assign({ objectFit: "contain" }, style) }, props)));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { Shelby, Shelby as default, meta };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { _ as __rest, S as SIZE_MAP } from '../types-B2mOhqdm.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Spyker",
|
|
6
|
+
slug: "spyker",
|
|
7
|
+
pngUrl: "https://www.carlogos.org/logo/Spyker-logo.png",
|
|
8
|
+
country: "Netherlands",
|
|
9
|
+
region: "Other",
|
|
10
|
+
founded: 1999,
|
|
11
|
+
hex: "003087",
|
|
12
|
+
};
|
|
13
|
+
const Spyker = (_a) => {
|
|
14
|
+
var _b;
|
|
15
|
+
var { size = "md", width, height, alt = "Spyker", loading = "lazy", style } = _a, props = __rest(_a, ["size", "width", "height", "alt", "loading", "style"]);
|
|
16
|
+
const renderPx = (_b = width !== null && width !== void 0 ? width : height) !== null && _b !== void 0 ? _b : SIZE_MAP[size];
|
|
17
|
+
return (React.createElement("img", Object.assign({ src: "https://www.carlogos.org/logo/Spyker-logo.png", alt: alt, width: renderPx, height: renderPx, loading: loading, style: Object.assign({ objectFit: "contain" }, style) }, props)));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { Spyker, Spyker as default, meta };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { _ as __rest, S as SIZE_MAP } from '../types-B2mOhqdm.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "TVR",
|
|
6
|
+
slug: "tvr",
|
|
7
|
+
pngUrl: "https://www.carlogos.org/logo/TVR-logo.png",
|
|
8
|
+
country: "UK",
|
|
9
|
+
region: "British",
|
|
10
|
+
founded: 1947,
|
|
11
|
+
hex: "8B0000",
|
|
12
|
+
};
|
|
13
|
+
const TVR = (_a) => {
|
|
14
|
+
var _b;
|
|
15
|
+
var { size = "md", width, height, alt = "TVR", loading = "lazy", style } = _a, props = __rest(_a, ["size", "width", "height", "alt", "loading", "style"]);
|
|
16
|
+
const renderPx = (_b = width !== null && width !== void 0 ? width : height) !== null && _b !== void 0 ? _b : SIZE_MAP[size];
|
|
17
|
+
return (React.createElement("img", Object.assign({ src: "https://www.carlogos.org/logo/TVR-logo.png", alt: alt, width: renderPx, height: renderPx, loading: loading, style: Object.assign({ objectFit: "contain" }, style) }, props)));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { TVR, TVR as default, meta };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { _ as __rest, S as SIZE_MAP } from '../types-B2mOhqdm.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "W Motors",
|
|
6
|
+
slug: "w-motors",
|
|
7
|
+
pngUrl: "https://www.carlogos.org/logo/W-Motors-logo.png",
|
|
8
|
+
country: "UAE",
|
|
9
|
+
region: "Other",
|
|
10
|
+
founded: 2012,
|
|
11
|
+
hex: "1A1A1A",
|
|
12
|
+
};
|
|
13
|
+
const WMotors = (_a) => {
|
|
14
|
+
var _b;
|
|
15
|
+
var { size = "md", width, height, alt = "W Motors", loading = "lazy", style } = _a, props = __rest(_a, ["size", "width", "height", "alt", "loading", "style"]);
|
|
16
|
+
const renderPx = (_b = width !== null && width !== void 0 ? width : height) !== null && _b !== void 0 ? _b : SIZE_MAP[size];
|
|
17
|
+
return (React.createElement("img", Object.assign({ src: "https://www.carlogos.org/logo/W-Motors-logo.png", alt: alt, width: renderPx, height: renderPx, loading: loading, style: Object.assign({ objectFit: "contain" }, style) }, props)));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { WMotors, WMotors as default, meta };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { _ as __rest, S as SIZE_MAP } from '../types-B2mOhqdm.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
|
|
4
|
+
const meta = {
|
|
5
|
+
title: "Zenvo",
|
|
6
|
+
slug: "zenvo",
|
|
7
|
+
pngUrl: "https://www.carlogos.org/logo/Zenvo-logo.png",
|
|
8
|
+
country: "Denmark",
|
|
9
|
+
region: "Other",
|
|
10
|
+
founded: 2004,
|
|
11
|
+
hex: "1A1A1A",
|
|
12
|
+
};
|
|
13
|
+
const Zenvo = (_a) => {
|
|
14
|
+
var _b;
|
|
15
|
+
var { size = "md", width, height, alt = "Zenvo", loading = "lazy", style } = _a, props = __rest(_a, ["size", "width", "height", "alt", "loading", "style"]);
|
|
16
|
+
const renderPx = (_b = width !== null && width !== void 0 ? width : height) !== null && _b !== void 0 ? _b : SIZE_MAP[size];
|
|
17
|
+
return (React.createElement("img", Object.assign({ src: "https://www.carlogos.org/logo/Zenvo-logo.png", alt: alt, width: renderPx, height: renderPx, loading: loading, style: Object.assign({ objectFit: "contain" }, style) }, props)));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { Zenvo, Zenvo as default, meta };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation.
|
|
3
|
+
|
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
+
purpose with or without fee is hereby granted.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
function __rest(s, e) {
|
|
19
|
+
var t = {};
|
|
20
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
21
|
+
t[p] = s[p];
|
|
22
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
23
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
24
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
25
|
+
t[p[i]] = s[p[i]];
|
|
26
|
+
}
|
|
27
|
+
return t;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
31
|
+
var e = new Error(message);
|
|
32
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Pixel dimensions for each size tier.
|
|
37
|
+
*/
|
|
38
|
+
const SIZE_MAP = {
|
|
39
|
+
sm: 80, // Thumbnails, nav icons, table cells
|
|
40
|
+
md: 160, // Cards, lists, sidebars (default)
|
|
41
|
+
lg: 320, // Hero sections, detail views
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export { SIZE_MAP as S, __rest as _ };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation.
|
|
3
|
+
|
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
+
purpose with or without fee is hereby granted.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
function __rest(s, e) {
|
|
19
|
+
var t = {};
|
|
20
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
21
|
+
t[p] = s[p];
|
|
22
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
23
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
24
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
25
|
+
t[p[i]] = s[p[i]];
|
|
26
|
+
}
|
|
27
|
+
return t;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
31
|
+
var e = new Error(message);
|
|
32
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Pixel dimensions for each size tier.
|
|
37
|
+
* Maps directly to carlogos.org's available PNG widths.
|
|
38
|
+
*/
|
|
39
|
+
const SIZE_MAP = {
|
|
40
|
+
sm: 80, // Thumbnails, nav icons, table cells
|
|
41
|
+
md: 160, // Cards, lists, sidebars (default)
|
|
42
|
+
lg: 320, // Hero sections, detail views
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export { SIZE_MAP as S, __rest as _ };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/******************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation.
|
|
3
|
+
|
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
+
purpose with or without fee is hereby granted.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
***************************************************************************** */
|
|
15
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
function __rest(s, e) {
|
|
19
|
+
var t = {};
|
|
20
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
21
|
+
t[p] = s[p];
|
|
22
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
23
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
24
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
25
|
+
t[p[i]] = s[p[i]];
|
|
26
|
+
}
|
|
27
|
+
return t;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
31
|
+
var e = new Error(message);
|
|
32
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Pixel dimensions for each size tier.
|
|
37
|
+
* Maps directly to carlogos.org's available PNG widths.
|
|
38
|
+
*/
|
|
39
|
+
const SIZE_MAP = {
|
|
40
|
+
sm: 80, // Thumbnails, nav icons, table cells
|
|
41
|
+
md: 160, // Cards, lists, sidebars (default)
|
|
42
|
+
lg: 320, // Hero sections, detail views
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Width in pixels used when fetching from carlogos.org.
|
|
46
|
+
* Their CDN serves: 160, 320, 640.
|
|
47
|
+
*/
|
|
48
|
+
const CDN_WIDTH_MAP = {
|
|
49
|
+
sm: 160, // Fetch 160px for 80px display (2x retina)
|
|
50
|
+
md: 320, // Fetch 320px for 160px display (2x retina)
|
|
51
|
+
lg: 640, // Fetch 640px for 320px display (2x retina)
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export { CDN_WIDTH_MAP as C, SIZE_MAP as S, __rest as _ };
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ImgHTMLAttributes } from "react";
|
|
2
|
+
/** Available logo size presets */
|
|
3
|
+
export type LogoSize = "sm" | "md" | "lg";
|
|
4
|
+
/**
|
|
5
|
+
* Pixel dimensions for each size tier.
|
|
6
|
+
*/
|
|
7
|
+
export declare const SIZE_MAP: Record<LogoSize, number>;
|
|
8
|
+
/**
|
|
9
|
+
* Width in pixels used when fetching logo images.
|
|
10
|
+
*/
|
|
11
|
+
export declare const CDN_WIDTH_MAP: Record<LogoSize, number>;
|
|
12
|
+
/**
|
|
13
|
+
* Props accepted by every car logo component.
|
|
14
|
+
* Extends standard <img> HTML attributes (minus src/width/height which are controlled).
|
|
15
|
+
*/
|
|
16
|
+
export interface CarLogoProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, "src" | "width" | "height"> {
|
|
17
|
+
/**
|
|
18
|
+
* Size preset. Controls both the rendered dimension and the PNG resolution fetched.
|
|
19
|
+
* - `'sm'` -> renders at 80px, fetches 160px PNG (2x retina)
|
|
20
|
+
* - `'md'` -> renders at 160px, fetches 320px PNG (2x retina) -- DEFAULT
|
|
21
|
+
* - `'lg'` -> renders at 320px, fetches 640px PNG (2x retina)
|
|
22
|
+
*/
|
|
23
|
+
size?: LogoSize;
|
|
24
|
+
/**
|
|
25
|
+
* Custom pixel width. Overrides `size` if provided.
|
|
26
|
+
* The highest available PNG resolution (640px) will be fetched.
|
|
27
|
+
*/
|
|
28
|
+
width?: number;
|
|
29
|
+
/**
|
|
30
|
+
* Custom pixel height. Overrides `size` if provided.
|
|
31
|
+
* The highest available PNG resolution (640px) will be fetched.
|
|
32
|
+
*/
|
|
33
|
+
height?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Accessible alt text for screen readers.
|
|
36
|
+
* Defaults to the brand's display name (e.g., "Ferrari").
|
|
37
|
+
*/
|
|
38
|
+
alt?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Native browser image loading strategy.
|
|
41
|
+
* Defaults to 'lazy' for performance.
|
|
42
|
+
*/
|
|
43
|
+
loading?: "lazy" | "eager";
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Metadata object exported alongside each logo component.
|
|
47
|
+
* Useful for building dynamic UIs, lists, and filters.
|
|
48
|
+
*/
|
|
49
|
+
export interface CarLogoMeta {
|
|
50
|
+
/** Brand display name, e.g. "Rolls-Royce" */
|
|
51
|
+
title: string;
|
|
52
|
+
/** URL-safe slug, e.g. "rolls-royce" */
|
|
53
|
+
slug: string;
|
|
54
|
+
/** PNG logo URL */
|
|
55
|
+
pngUrl: string;
|
|
56
|
+
/** Country of origin, e.g. "Italy" */
|
|
57
|
+
country: string;
|
|
58
|
+
/** Regional grouping: "Italian" | "German" | "British" | "French" | "American" | "Swedish" | "Other" */
|
|
59
|
+
region: string;
|
|
60
|
+
/** Year the brand was founded */
|
|
61
|
+
founded: number;
|
|
62
|
+
/** Primary brand hex color (without #), e.g. "CD212A" */
|
|
63
|
+
hex: string;
|
|
64
|
+
/** Link to the brand's official guidelines page (if known) */
|
|
65
|
+
guidelines?: string;
|
|
66
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-car-logo",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "PNG logo components for exotic & luxury car brands. React & React Native compatible. Tree-shakeable.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.esm.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"src",
|
|
11
|
+
"README.md",
|
|
12
|
+
"LICENSE",
|
|
13
|
+
"LEGAL.md"
|
|
14
|
+
],
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "rollup -c",
|
|
18
|
+
"dev": "rollup -c -w",
|
|
19
|
+
"typecheck": "tsc --noEmit",
|
|
20
|
+
"test": "jest",
|
|
21
|
+
"test:watch": "jest --watch",
|
|
22
|
+
"lint": "eslint src --ext .ts,.tsx",
|
|
23
|
+
"generate": "ts-node scripts/generate-logos.ts",
|
|
24
|
+
"prepublishOnly": "npm run typecheck && npm run test && npm run build"
|
|
25
|
+
},
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"import": "./dist/index.esm.js",
|
|
29
|
+
"require": "./dist/index.js",
|
|
30
|
+
"types": "./dist/index.d.ts"
|
|
31
|
+
},
|
|
32
|
+
"./logos/*": {
|
|
33
|
+
"import": "./dist/logos/*.js",
|
|
34
|
+
"require": "./dist/logos/*.js",
|
|
35
|
+
"types": "./dist/logos/*.d.ts"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"react": ">=16.8.0"
|
|
40
|
+
},
|
|
41
|
+
"peerDependenciesMeta": {
|
|
42
|
+
"react-native": {
|
|
43
|
+
"optional": true
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"keywords": [
|
|
47
|
+
"car",
|
|
48
|
+
"logos",
|
|
49
|
+
"png",
|
|
50
|
+
"react",
|
|
51
|
+
"react-native",
|
|
52
|
+
"exotic",
|
|
53
|
+
"luxury",
|
|
54
|
+
"automotive",
|
|
55
|
+
"icons",
|
|
56
|
+
"ferrari",
|
|
57
|
+
"lamborghini",
|
|
58
|
+
"porsche",
|
|
59
|
+
"bugatti",
|
|
60
|
+
"mclaren",
|
|
61
|
+
"koenigsegg"
|
|
62
|
+
],
|
|
63
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
64
|
+
"repository": {
|
|
65
|
+
"type": "git",
|
|
66
|
+
"url": "git+https://github.com/mattwhite8/exotic-car-logos.git"
|
|
67
|
+
},
|
|
68
|
+
"devDependencies": {
|
|
69
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
70
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
71
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
72
|
+
"@testing-library/react": "^16.3.2",
|
|
73
|
+
"@types/jest": "^30.0.0",
|
|
74
|
+
"@types/react": "^19.2.14",
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "^8.57.2",
|
|
76
|
+
"@typescript-eslint/parser": "^8.57.2",
|
|
77
|
+
"eslint": "^10.1.0",
|
|
78
|
+
"jest": "^30.3.0",
|
|
79
|
+
"jest-environment-jsdom": "^30.3.0",
|
|
80
|
+
"prettier": "^3.8.1",
|
|
81
|
+
"rollup": "^4.60.0",
|
|
82
|
+
"ts-jest": "^29.4.6",
|
|
83
|
+
"ts-node": "^10.9.2",
|
|
84
|
+
"tslib": "^2.8.1",
|
|
85
|
+
"typescript": "^5.9.3"
|
|
86
|
+
}
|
|
87
|
+
}
|
package/src/allLogos.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// Import this to get all logos in one object.
|
|
2
|
+
// WARNING: This disables tree-shaking. Use named imports where possible.
|
|
3
|
+
|
|
4
|
+
export { Abarth } from "./logos/Abarth";
|
|
5
|
+
export { AlfaRomeo } from "./logos/AlfaRomeo";
|
|
6
|
+
export { Alpine } from "./logos/Alpine";
|
|
7
|
+
export { Arash } from "./logos/Arash";
|
|
8
|
+
export { AstonMartin } from "./logos/AstonMartin";
|
|
9
|
+
export { Audi } from "./logos/Audi";
|
|
10
|
+
export { Bentley } from "./logos/Bentley";
|
|
11
|
+
export { BMW } from "./logos/BMW";
|
|
12
|
+
export { Brabus } from "./logos/Brabus";
|
|
13
|
+
export { Bugatti } from "./logos/Bugatti";
|
|
14
|
+
export { Chevrolet } from "./logos/Chevrolet";
|
|
15
|
+
export { DeTomaso } from "./logos/DeTomaso";
|
|
16
|
+
export { Dodge } from "./logos/Dodge";
|
|
17
|
+
export { Ferrari } from "./logos/Ferrari";
|
|
18
|
+
export { Ford } from "./logos/Ford";
|
|
19
|
+
export { Gumpert } from "./logos/Gumpert";
|
|
20
|
+
export { Hennessey } from "./logos/Hennessey";
|
|
21
|
+
export { Jaguar } from "./logos/Jaguar";
|
|
22
|
+
export { Koenigsegg } from "./logos/Koenigsegg";
|
|
23
|
+
export { Lamborghini } from "./logos/Lamborghini";
|
|
24
|
+
export { Lotus } from "./logos/Lotus";
|
|
25
|
+
export { Maserati } from "./logos/Maserati";
|
|
26
|
+
export { Maybach } from "./logos/Maybach";
|
|
27
|
+
export { McLaren } from "./logos/McLaren";
|
|
28
|
+
export { MercedesAMG } from "./logos/MercedesAMG";
|
|
29
|
+
export { Mosler } from "./logos/Mosler";
|
|
30
|
+
export { Pagani } from "./logos/Pagani";
|
|
31
|
+
export { Pininfarina } from "./logos/Pininfarina";
|
|
32
|
+
export { Polestar } from "./logos/Polestar";
|
|
33
|
+
export { Porsche } from "./logos/Porsche";
|
|
34
|
+
export { Radical } from "./logos/Radical";
|
|
35
|
+
export { Rimac } from "./logos/Rimac";
|
|
36
|
+
export { RollsRoyce } from "./logos/RollsRoyce";
|
|
37
|
+
export { Saleen } from "./logos/Saleen";
|
|
38
|
+
export { Shelby } from "./logos/Shelby";
|
|
39
|
+
export { Spyker } from "./logos/Spyker";
|
|
40
|
+
export { SSC } from "./logos/SSC";
|
|
41
|
+
export { TVR } from "./logos/TVR";
|
|
42
|
+
export { WMotors } from "./logos/WMotors";
|
|
43
|
+
export { Zenvo } from "./logos/Zenvo";
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// Auto-generated barrel export — do not edit by hand
|
|
2
|
+
// Run: npm run generate
|
|
3
|
+
|
|
4
|
+
export { Abarth, meta as AbarthMeta } from "./logos/Abarth";
|
|
5
|
+
export { AlfaRomeo, meta as AlfaRomeoMeta } from "./logos/AlfaRomeo";
|
|
6
|
+
export { Alpine, meta as AlpineMeta } from "./logos/Alpine";
|
|
7
|
+
export { Arash, meta as ArashMeta } from "./logos/Arash";
|
|
8
|
+
export { AstonMartin, meta as AstonMartinMeta } from "./logos/AstonMartin";
|
|
9
|
+
export { Audi, meta as AudiMeta } from "./logos/Audi";
|
|
10
|
+
export { Bentley, meta as BentleyMeta } from "./logos/Bentley";
|
|
11
|
+
export { BMW, meta as BMWMeta } from "./logos/BMW";
|
|
12
|
+
export { Brabus, meta as BrabusMeta } from "./logos/Brabus";
|
|
13
|
+
export { Bugatti, meta as BugattiMeta } from "./logos/Bugatti";
|
|
14
|
+
export { Chevrolet, meta as ChevroletMeta } from "./logos/Chevrolet";
|
|
15
|
+
export { DeTomaso, meta as DeTomasoMeta } from "./logos/DeTomaso";
|
|
16
|
+
export { Dodge, meta as DodgeMeta } from "./logos/Dodge";
|
|
17
|
+
export { Ferrari, meta as FerrariMeta } from "./logos/Ferrari";
|
|
18
|
+
export { Ford, meta as FordMeta } from "./logos/Ford";
|
|
19
|
+
export { Gumpert, meta as GumpertMeta } from "./logos/Gumpert";
|
|
20
|
+
export { Hennessey, meta as HennesseyMeta } from "./logos/Hennessey";
|
|
21
|
+
export { Jaguar, meta as JaguarMeta } from "./logos/Jaguar";
|
|
22
|
+
export { Koenigsegg, meta as KoenigseggMeta } from "./logos/Koenigsegg";
|
|
23
|
+
export { Lamborghini, meta as LamborghiniMeta } from "./logos/Lamborghini";
|
|
24
|
+
export { Lotus, meta as LotusMeta } from "./logos/Lotus";
|
|
25
|
+
export { Maserati, meta as MaseratiMeta } from "./logos/Maserati";
|
|
26
|
+
export { Maybach, meta as MaybachMeta } from "./logos/Maybach";
|
|
27
|
+
export { McLaren, meta as McLarenMeta } from "./logos/McLaren";
|
|
28
|
+
export { MercedesAMG, meta as MercedesAMGMeta } from "./logos/MercedesAMG";
|
|
29
|
+
export { Mosler, meta as MoslerMeta } from "./logos/Mosler";
|
|
30
|
+
export { Pagani, meta as PaganiMeta } from "./logos/Pagani";
|
|
31
|
+
export { Pininfarina, meta as PininfarinaMeta } from "./logos/Pininfarina";
|
|
32
|
+
export { Polestar, meta as PolestarMeta } from "./logos/Polestar";
|
|
33
|
+
export { Porsche, meta as PorscheMeta } from "./logos/Porsche";
|
|
34
|
+
export { Radical, meta as RadicalMeta } from "./logos/Radical";
|
|
35
|
+
export { Rimac, meta as RimacMeta } from "./logos/Rimac";
|
|
36
|
+
export { RollsRoyce, meta as RollsRoyceMeta } from "./logos/RollsRoyce";
|
|
37
|
+
export { Saleen, meta as SaleenMeta } from "./logos/Saleen";
|
|
38
|
+
export { Shelby, meta as ShelbyMeta } from "./logos/Shelby";
|
|
39
|
+
export { Spyker, meta as SpykerMeta } from "./logos/Spyker";
|
|
40
|
+
export { SSC, meta as SSCMeta } from "./logos/SSC";
|
|
41
|
+
export { TVR, meta as TVRMeta } from "./logos/TVR";
|
|
42
|
+
export { WMotors, meta as WMotorsMeta } from "./logos/WMotors";
|
|
43
|
+
export { Zenvo, meta as ZenvoMeta } from "./logos/Zenvo";
|
|
44
|
+
|
|
45
|
+
// Type and constant exports
|
|
46
|
+
export type { CarLogoProps, CarLogoMeta, LogoSize } from "./types";
|
|
47
|
+
export { SIZE_MAP, CDN_WIDTH_MAP } from "./types";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { CarLogoProps, CarLogoMeta } from "../types";
|
|
3
|
+
import { SIZE_MAP } from "../types";
|
|
4
|
+
|
|
5
|
+
export const meta: CarLogoMeta = {
|
|
6
|
+
title: "Abarth",
|
|
7
|
+
slug: "abarth",
|
|
8
|
+
pngUrl: "https://www.carlogos.org/logo/Abarth-logo.png",
|
|
9
|
+
country: "Italy",
|
|
10
|
+
region: "Italian",
|
|
11
|
+
founded: 1949,
|
|
12
|
+
hex: "CC0000",
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const Abarth: React.FC<CarLogoProps> = ({
|
|
16
|
+
size = "md",
|
|
17
|
+
width,
|
|
18
|
+
height,
|
|
19
|
+
alt = "Abarth",
|
|
20
|
+
loading = "lazy",
|
|
21
|
+
style,
|
|
22
|
+
...props
|
|
23
|
+
}) => {
|
|
24
|
+
const renderPx = width ?? height ?? SIZE_MAP[size];
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<img
|
|
28
|
+
src="https://www.carlogos.org/logo/Abarth-logo.png"
|
|
29
|
+
alt={alt}
|
|
30
|
+
width={renderPx}
|
|
31
|
+
height={renderPx}
|
|
32
|
+
loading={loading}
|
|
33
|
+
style={{ objectFit: "contain", ...style }}
|
|
34
|
+
{...props}
|
|
35
|
+
/>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default Abarth;
|