Skip to content

Commit

Permalink
feat(lib): update assets and example to v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rektdeckard committed Mar 5, 2023
1 parent f3d94f0 commit acf6273
Show file tree
Hide file tree
Showing 1,264 changed files with 19,510 additions and 8,790 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img src="/meta/phosphor-mark-tight-yellow.png" width="128" align="right" />

# phosphor-react
# @phosphor-icons/react

Phosphor is a flexible icon family for interfaces, diagrams, presentations — whatever, really. Explore all our icons at [phosphoricons.com](https://phosphoricons.com).

Expand Down
2 changes: 1 addition & 1 deletion bin/assemble.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ main();

function main() {
exec(
"git submodule update --remote --init --recursive",
"git submodule update --remote --init --force --recursive",
(err, stdout, stderr) => {
if (err) {
console.error(`${chalk.inverse.red(" ERR ")} ${err.message}`);
Expand Down
16 changes: 8 additions & 8 deletions example/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ import { useState, useCallback } from "react";
import * as Icons from "../src";
import { IconContext } from "../src";
import type { IconWeight, Icon } from "../src";
import { icons } from "../core/src/icons";
import "./index.css";

const pascalNames = new Set(icons.map((entry) => entry.pascal_name));

const isIcon = (candidate: any): candidate is Icons.Icon =>
"displayName" in candidate && candidate.displayName !== "IconBase";
"displayName" in candidate;

const iconCount = Object.values(Icons).reduce<number>((total, Icon) => {
if (isIcon(Icon)) return total + 1;
return total;
}, 0);
const allIcons: Icon[] = Object.entries(Icons)
.filter(([name, module]) => pascalNames.has(name) && isIcon(module))
.map(([_, module]) => module as Icon);

if (process.env.NODE_ENV === "development") {
console.log(`${iconCount} icons`);
console.log(`${allIcons.length} icons`);
}

const allIcons: Icon[] = Object.values(Icons).filter(isIcon);

const App = () => {
const [color, setColor] = useState<string>("crimson");
const [weight, setWeight] = useState<IconWeight>("regular");
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@phosphor-icons/react",
"version": "2.0.3",
"version": "2.0.4",
"description": "A clean and friendly icon family for React",
"author": {
"name": "Tobias Fried",
Expand Down
50 changes: 0 additions & 50 deletions src/icons/Activity.tsx

This file was deleted.

12 changes: 6 additions & 6 deletions src/icons/AddressBook.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const weights = new Map<IconWeight, ReactElement>([
[
"bold",
<>
<path d="M208,20H64A20.1,20.1,0,0,0,44,40V56H32a12,12,0,0,0,0,24H44V96H32a12,12,0,0,0,0,24H44v16H32a12,12,0,0,0,0,24H44v16H32a12,12,0,0,0,0,24H44v16a20.1,20.1,0,0,0,20,20H208a20.1,20.1,0,0,0,20-20V40A20.1,20.1,0,0,0,208,20Zm-4,192H68V44H204ZM100.8,175.4a47.9,47.9,0,0,1,70.4,0A12,12,0,0,0,188.8,159a73.4,73.4,0,0,0-19.2-14.6,44,44,0,1,0-67.2,0A73.4,73.4,0,0,0,83.2,159a12,12,0,0,0,17.6,16.4ZM116,116a20,20,0,1,1,20,20A20.1,20.1,0,0,1,116,116Z" />
<path d="M208,20H64A20,20,0,0,0,44,40V60H32a12,12,0,0,0,0,24H44v32H32a12,12,0,0,0,0,24H44v32H32a12,12,0,0,0,0,24H44v20a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V40A20,20,0,0,0,208,20Zm-4,192H68V44H204ZM100.8,171.37a48,48,0,0,1,70.4,0,12,12,0,0,0,17.6-16.32,72,72,0,0,0-19.21-14.68,44,44,0,1,0-67.19,0,72.12,72.12,0,0,0-19.2,14.68,12,12,0,0,0,17.6,16.32ZM116,112a20,20,0,1,1,20,20A20,20,0,0,1,116,112Z" />
</>,
],
[
Expand All @@ -16,31 +16,31 @@ const weights = new Map<IconWeight, ReactElement>([
d="M208,32H64a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H208a8,8,0,0,0,8-8V40A8,8,0,0,0,208,32ZM136,144a32,32,0,1,1,32-32A32,32,0,0,1,136,144Z"
opacity="0.2"
/>
<path d="M83.2,174.4A7.7,7.7,0,0,0,88,176a8,8,0,0,0,6.4-3.2,52,52,0,0,1,83.2,0,8.1,8.1,0,0,0,11.2,1.6,8,8,0,0,0,1.6-11.2A67.8,67.8,0,0,0,163,141.5a40,40,0,1,0-54,0,67.8,67.8,0,0,0-27.4,21.7A8,8,0,0,0,83.2,174.4ZM112,112a24,24,0,1,1,24,24A24.1,24.1,0,0,1,112,112Zm96-88H64A16,16,0,0,0,48,40V60H32a8,8,0,0,0,0,16H48v24H32a8,8,0,0,0,0,16H48v24H32a8,8,0,0,0,0,16H48v24H32a8,8,0,0,0,0,16H48v20a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V40A16,16,0,0,0,208,24Zm0,192H64V40H208Z" />
<path d="M83.19,174.4a8,8,0,0,0,11.21-1.6,52,52,0,0,1,83.2,0,8,8,0,1,0,12.8-9.6A67.88,67.88,0,0,0,163,141.51a40,40,0,1,0-53.94,0A67.88,67.88,0,0,0,81.6,163.2,8,8,0,0,0,83.19,174.4ZM112,112a24,24,0,1,1,24,24A24,24,0,0,1,112,112Zm96-88H64A16,16,0,0,0,48,40V64H32a8,8,0,0,0,0,16H48v40H32a8,8,0,0,0,0,16H48v40H32a8,8,0,0,0,0,16H48v24a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V40A16,16,0,0,0,208,24Zm0,192H64V40H208Z" />
</>,
],
[
"fill",
<>
<path d="M160,112a24,24,0,1,1-24-24A24.1,24.1,0,0,1,160,112Zm64-72V216a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V196H32a8,8,0,0,1,0-16H48V156H32a8,8,0,0,1,0-16H48V116H32a8,8,0,0,1,0-16H48V76H32a8,8,0,0,1,0-16H48V40A16,16,0,0,1,64,24H208A16,16,0,0,1,224,40ZM190.4,163.2A67.8,67.8,0,0,0,163,141.5a40,40,0,1,0-54,0,67.8,67.8,0,0,0-27.4,21.7,8,8,0,0,0,1.6,11.2A7.7,7.7,0,0,0,88,176a8,8,0,0,0,6.4-3.2,52,52,0,0,1,83.2,0,8.1,8.1,0,0,0,11.2,1.6A8,8,0,0,0,190.4,163.2Z" />
<path d="M160,112a24,24,0,1,1-24-24A24,24,0,0,1,160,112Zm64-72V216a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V192H32a8,8,0,0,1,0-16H48V136H32a8,8,0,0,1,0-16H48V80H32a8,8,0,0,1,0-16H48V40A16,16,0,0,1,64,24H208A16,16,0,0,1,224,40ZM190.4,163.2A67.88,67.88,0,0,0,163,141.51a40,40,0,1,0-53.94,0A67.88,67.88,0,0,0,81.6,163.2a8,8,0,1,0,12.8,9.6,52,52,0,0,1,83.2,0,8,8,0,1,0,12.8-9.6Z" />
</>,
],
[
"light",
<>
<path d="M159.1,142.1A37.6,37.6,0,0,0,174,112a38,38,0,0,0-76,0,37.6,37.6,0,0,0,14.9,30.1,66.4,66.4,0,0,0-29.7,22.3,6,6,0,0,0,9.6,7.2,54,54,0,0,1,86.4,0,6,6,0,0,0,8.4,1.2,6,6,0,0,0,1.2-8.4A66.4,66.4,0,0,0,159.1,142.1ZM110,112a26,26,0,1,1,26,26A26.1,26.1,0,0,1,110,112Zm98-86H64A14,14,0,0,0,50,40V62H32a6,6,0,0,0,0,12H50v28H32a6,6,0,0,0,0,12H50v28H32a6,6,0,0,0,0,12H50v28H32a6,6,0,0,0,0,12H50v22a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V40A14,14,0,0,0,208,26Zm2,190a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z" />
<path d="M159.11,142.13a38,38,0,1,0-46.22,0A65.75,65.75,0,0,0,83.2,164.4a6,6,0,0,0,9.6,7.2,54,54,0,0,1,86.4,0,6,6,0,0,0,9.6-7.2A65.75,65.75,0,0,0,159.11,142.13ZM110,112a26,26,0,1,1,26,26A26,26,0,0,1,110,112Zm98-86H64A14,14,0,0,0,50,40V66H32a6,6,0,0,0,0,12H50v44H32a6,6,0,0,0,0,12H50v44H32a6,6,0,0,0,0,12H50v26a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V40A14,14,0,0,0,208,26Zm2,190a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z" />
</>,
],
[
"regular",
<>
<path d="M83.2,174.4A7.7,7.7,0,0,0,88,176a8,8,0,0,0,6.4-3.2,52,52,0,0,1,83.2,0,8.1,8.1,0,0,0,11.2,1.6,8,8,0,0,0,1.6-11.2A67.8,67.8,0,0,0,163,141.5a40,40,0,1,0-54,0,67.8,67.8,0,0,0-27.4,21.7A8,8,0,0,0,83.2,174.4ZM112,112a24,24,0,1,1,24,24A24.1,24.1,0,0,1,112,112Zm96-88H64A16,16,0,0,0,48,40V60H32a8,8,0,0,0,0,16H48v24H32a8,8,0,0,0,0,16H48v24H32a8,8,0,0,0,0,16H48v24H32a8,8,0,0,0,0,16H48v20a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V40A16,16,0,0,0,208,24Zm0,192H64V40H208Z" />
<path d="M83.19,174.4a8,8,0,0,0,11.21-1.6,52,52,0,0,1,83.2,0,8,8,0,1,0,12.8-9.6A67.88,67.88,0,0,0,163,141.51a40,40,0,1,0-53.94,0A67.88,67.88,0,0,0,81.6,163.2,8,8,0,0,0,83.19,174.4ZM112,112a24,24,0,1,1,24,24A24,24,0,0,1,112,112Zm96-88H64A16,16,0,0,0,48,40V64H32a8,8,0,0,0,0,16H48v40H32a8,8,0,0,0,0,16H48v40H32a8,8,0,0,0,0,16H48v24a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V40A16,16,0,0,0,208,24Zm0,192H64V40H208Z" />
</>,
],
[
"thin",
<>
<path d="M154.7,142.8a36,36,0,1,0-37.4,0,63,63,0,0,0-32.5,22.8,4,4,0,0,0,.8,5.6,4.3,4.3,0,0,0,2.4.8,4.2,4.2,0,0,0,3.2-1.6,56,56,0,0,1,89.6,0,4,4,0,0,0,6.4-4.8A63,63,0,0,0,154.7,142.8ZM108,112a28,28,0,1,1,28,28A28.1,28.1,0,0,1,108,112ZM208,28H64A12,12,0,0,0,52,40V64H32a4,4,0,0,0,0,8H52v32H32a4,4,0,0,0,0,8H52v32H32a4,4,0,0,0,0,8H52v32H32a4,4,0,0,0,0,8H52v24a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V40A12,12,0,0,0,208,28Zm4,188a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z" />
<path d="M154.7,142.75a36,36,0,1,0-37.4,0A63.61,63.61,0,0,0,84.8,165.6a4,4,0,0,0,6.4,4.8,56,56,0,0,1,89.6,0,4,4,0,0,0,6.4-4.8A63.65,63.65,0,0,0,154.7,142.75ZM108,112a28,28,0,1,1,28,28A28,28,0,0,1,108,112ZM208,28H64A12,12,0,0,0,52,40V68H32a4,4,0,0,0,0,8H52v48H32a4,4,0,0,0,0,8H52v48H32a4,4,0,0,0,0,8H52v28a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V40A12,12,0,0,0,208,28Zm4,188a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z" />
</>,
],
]);
Expand Down
54 changes: 54 additions & 0 deletions src/icons/AirTrafficControl.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/* GENERATED FILE */
import { forwardRef, ReactElement } from "react";
import { IconWeight, Icon, IconBase } from "../lib";

const weights = new Map<IconWeight, ReactElement>([
[
"bold",
<>
<path d="M232.38,60.52A20,20,0,0,0,216,52H140V28h12a12,12,0,0,0,0-24H104a12,12,0,0,0,0,24h12V52H40A20,20,0,0,0,21.2,78.83l26.19,72A20.06,20.06,0,0,0,66.18,164H92v60a12,12,0,0,0,24,0V164h24v60a12,12,0,0,0,24,0V164h25.82a20.06,20.06,0,0,0,18.79-13.17l26.19-72A20,20,0,0,0,232.38,60.52ZM114,140,102.38,76h51.24L142,140ZM45.71,76H78l11.64,64H69ZM187,140H166.38L178,76h32.27Z" />
</>,
],
[
"duotone",
<>
<path
d="M223.51,74.73l-26.18,72a8,8,0,0,1-7.52,5.27H66.19a8,8,0,0,1-7.52-5.27l-26.18-72A8,8,0,0,1,40,64H216A8,8,0,0,1,223.51,74.73Z"
opacity="0.2"
/>
<path d="M229.11,62.82A16,16,0,0,0,216,56H136V24h16a8,8,0,0,0,0-16H104a8,8,0,0,0,0,16h16V56H40A16,16,0,0,0,25,77.47l26.19,72a16,16,0,0,0,15,10.53H96v64a8,8,0,0,0,16,0V160h32v64a8,8,0,0,0,16,0V160h29.82a16,16,0,0,0,15-10.53l26.19-72A16,16,0,0,0,229.11,62.82ZM110.68,144,97.58,72h60.84l-13.1,72ZM40,72H81.32l13.09,72H66.18Zm149.82,72H161.59l13.09-72H216Z" />
</>,
],
[
"fill",
<>
<path d="M229.11,62.82A16,16,0,0,0,216,56H136V24h16a8,8,0,0,0,0-16H104a8,8,0,0,0,0,16h16V56H40A16,16,0,0,0,25,77.47l26.19,72a16,16,0,0,0,15,10.53H189.82a16,16,0,0,0,15-10.53l26.19-72A16,16,0,0,0,229.11,62.82ZM102.52,143.87a7.87,7.87,0,0,1-1.44.13,8,8,0,0,1-7.86-6.57L83,81.43a8,8,0,0,1,15.75-2.86l10.18,56A8,8,0,0,1,102.52,143.87ZM173,81.43l-10.19,56a8,8,0,0,1-7.86,6.57,7.87,7.87,0,0,1-1.44-.13,8,8,0,0,1-6.44-9.3l10.18-56A8,8,0,0,1,173,81.43ZM160,180v44a8,8,0,0,1-8,8H104a8,8,0,0,1-8-8V180a4,4,0,0,1,4-4h56A4,4,0,0,1,160,180Z" />
</>,
],
[
"light",
<>
<path d="M227.47,64A14,14,0,0,0,216,58H134V22h18a6,6,0,0,0,0-12H104a6,6,0,0,0,0,12h18V58H40A14,14,0,0,0,26.84,76.78l26.19,72A14,14,0,0,0,66.18,158H98v66a6,6,0,0,0,12,0V158h36v66a6,6,0,0,0,12,0V158h31.82A14,14,0,0,0,203,148.78l26.19-72A14,14,0,0,0,227.47,64ZM109,146,95.19,70h65.62L147,146ZM64.3,144.68l-26.18-72a2,2,0,0,1,.24-1.83A1.94,1.94,0,0,1,40,70H83l13.82,76H66.18A2,2,0,0,1,64.3,144.68Zm153.58-72-26.18,72a2,2,0,0,1-1.88,1.32H159.19L173,70h43a1.94,1.94,0,0,1,1.64.85A2,2,0,0,1,217.88,72.68Z" />
</>,
],
[
"regular",
<>
<path d="M229.11,62.82A16,16,0,0,0,216,56H136V24h16a8,8,0,0,0,0-16H104a8,8,0,0,0,0,16h16V56H40A16,16,0,0,0,25,77.47l26.19,72a16,16,0,0,0,15,10.53H96v64a8,8,0,0,0,16,0V160h32v64a8,8,0,0,0,16,0V160h29.82a16,16,0,0,0,15-10.53l26.19-72A16,16,0,0,0,229.11,62.82ZM110.68,144,97.58,72h60.84l-13.1,72ZM40,72H81.32l13.09,72H66.18Zm149.82,72H161.59l13.09-72H216Z" />
</>,
],
[
"thin",
<>
<path d="M225.83,65.11A12,12,0,0,0,216,60H132V20h20a4,4,0,0,0,0-8H104a4,4,0,0,0,0,8h20V60H40A12,12,0,0,0,28.72,76.1l26.19,72A12,12,0,0,0,66.18,156H100v68a4,4,0,0,0,8,0V156h40v68a4,4,0,0,0,8,0V156h33.82a12,12,0,0,0,11.27-7.9l26.19-72A12,12,0,0,0,225.83,65.11ZM107.34,148,92.79,68h70.42l-14.55,80Zm-44.92-2.63-26.18-72A4,4,0,0,1,40,68H84.66L99.2,148h-33A4,4,0,0,1,62.42,145.37Zm157.34-72-26.18,72a4,4,0,0,1-3.76,2.63h-33l14.55-80H216a4,4,0,0,1,3.76,5.37Z" />
</>,
],
]);

const AirTrafficControl: Icon = forwardRef((props, ref) => (
<IconBase ref={ref} {...props} weights={weights} />
));

AirTrafficControl.displayName = "AirTrafficControl";

export default AirTrafficControl;
Loading

0 comments on commit acf6273

Please sign in to comment.