feat: Icon component (#1499)

* New icons and old strucure of OHIF ui v1

* Export icon

* Removing wrong import and fixing some exports

* Fixing svg loader and svg images to fullCurrent

* Small fixes on docz

* Remove repeated icon

* Update other components to use Icon

* Update platform/ui/src/components/Icon/icon.mdx

Co-Authored-By: Rodrigo Antinarelli <rodrigoantinarelli@gmail.com>

* Fixing callouts

* Move icons to assets and fixing layout on iconButtons

* Fix path of icons

Co-authored-by: Danny Brown <danny.ri.brown@gmail.com>
Co-authored-by: Rodrigo Antinarelli <rodrigoantinarelli@gmail.com>
This commit is contained in:
authored and James A. Petts committed 2020-05-15 13:35:57 +02:00
1 parent ff90f729ab
commit f4aea45e01
22 files changed
+370 -92

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="21" height="20" viewBox="0 0 21 20">
<g fill="currentColor">
<path d="M14.75.917c.693 0 1.263.528 1.327 1.205l.006.128v4.167c0 .276-.224.5-.5.5-.245 0-.45-.177-.492-.41l-.008-.09V2.25c0-.161-.114-.295-.266-.327l-.067-.006H2.25c-.161 0-.295.114-.327.266l-.006.067v12.5c0 .161.114.295.266.327l.067.006h4.167c.276 0 .5.224.5.5 0 .246-.177.45-.41.492l-.09.008H2.25c-.693 0-1.263-.528-1.327-1.205l-.006-.128V2.25c0-.693.528-1.263 1.205-1.327L2.25.917h12.5z" transform="translate(-.5 -1)"/>
<path d="M19.583 5.917H7.417c-.829 0-1.5.671-1.5 1.5v12.166c0 .829.671 1.5 1.5 1.5h12.166c.829 0 1.5-.671 1.5-1.5V7.417c0-.829-.671-1.5-1.5-1.5zm-12.166 1h12.166c.276 0 .5.224.5.5v12.166c0 .276-.224.5-.5.5H7.417c-.276 0-.5-.224-.5-.5V7.417c0-.276.224-.5.5-.5z" transform="translate(-.5 -1)"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 861 B

+8
View File
@@ -0,0 +1,8 @@
<svg xmlns="http://www.w3.org/2000/svg" width="19" height="19" viewBox="0 0 19 19">
<g fill="currentColor" fill-rule="evenodd">
<circle cx="9.5" cy="9.5" r="9.5" fill="currentColor"/>
<g stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5">
<path d="M.188.187L8.813 8.812M8.813.187L.188 8.812" transform="translate(5 5)"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 411 B

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<path fill="currentColor" fill-rule="evenodd" d="M10 13L5 7.737 5.7 7 10 11.526 14.3 7 15 7.737z"/>
</svg>

After

Width:  |  Height:  |  Size: 195 B

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
<path fill="currentColor" fill-rule="evenodd" d="M10 13L5 7.737 5.7 7 10 11.526 14.3 7 15 7.737z" transform="rotate(-90 10 10)"/>
</svg>

After

Width:  |  Height:  |  Size: 225 B

@@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<g fill="currentColor" fill-rule="evenodd">
<path d="M8 .117C3.645.117.115 3.647.115 8c0 4.355 3.53 7.885 7.885 7.885s7.885-3.53 7.885-7.885c0-4.354-3.53-7.884-7.885-7.884zm0 1c3.802 0 6.885 3.082 6.885 6.884 0 3.802-3.083 6.885-6.885 6.885-3.802 0-6.885-3.083-6.885-6.885C1.115 4.2 4.198 1.117 8 1.117z"/>
<path d="M7.385 6.27c.575 0 1.048.434 1.108.993l.007.122v4.307c0 .276-.224.5-.5.5-.245 0-.45-.177-.492-.41l-.008-.09V7.385c0-.051-.033-.095-.079-.11l-.036-.006H6.154c-.276 0-.5-.224-.5-.5 0-.245.177-.45.41-.492l.09-.008h1.23zM7.077 3.192l.101.007c.398.05.707.39.707.801 0 .446-.362.808-.808.808-.446 0-.808-.362-.808-.808 0-.412.308-.752.707-.801l.1-.007z"/>
<path d="M9.846 11.194c.276 0 .5.223.5.5 0 .245-.177.45-.41.491l-.09.009H6.154c-.276 0-.5-.224-.5-.5 0-.246.177-.45.41-.492l.09-.008h3.692z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 937 B

@@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<g fill="currentColor" fill-rule="evenodd">
<circle cx="12" cy="12" r="12" fill="currentColor"/>
<path fill="#000" fill-rule="nonzero" d="M17.207 10.793c.36.36.388.928.083 1.32l-.083.094-5 5c-.39.39-1.024.39-1.414 0-.36-.36-.388-.928-.083-1.32l.083-.094 4.292-4.293-4.292-4.293c-.36-.36-.388-.928-.083-1.32l.083-.094c.36-.36.928-.388 1.32-.083l.094.083 5 5z"/>
<path fill="#000" fill-rule="nonzero" d="M17.5 11.5c0 .513-.386.936-.883.993l-.117.007H6c-.552 0-1-.448-1-1 0-.513.386-.936.883-.993L6 10.5h10.5c.552 0 1 .448 1 1z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 656 B

@@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" width="21" height="22" viewBox="0 0 21 22">
<g fill="currentColor" fill-rule="evenodd">
<path d="M10.5.31C4.87.31.308 4.872.308 10.501c0 5.629 4.563 10.192 10.192 10.192 5.63 0 10.192-4.563 10.192-10.192C20.692 4.872 16.13.309 10.5.309zm0 1c5.077 0 9.192 4.115 9.192 9.192 0 5.076-4.115 9.192-9.192 9.192s-9.192-4.116-9.192-9.192c0-5.077 4.115-9.193 9.192-9.193z" transform="translate(0 .5)"/>
<path d="M9.692 8.385c.677 0 1.234.514 1.301 1.174l.007.133v5.654c0 .276-.224.5-.5.5-.245 0-.45-.177-.492-.41l-.008-.09V9.692c0-.145-.101-.267-.237-.3l-.07-.007H8.076c-.276 0-.5-.224-.5-.5 0-.246.177-.45.41-.492l.09-.008h1.615zM9.288 4.346l.114.007c.446.056.79.436.79.897 0 .5-.404.904-.904.904-.499 0-.903-.405-.903-.904 0-.46.344-.841.79-.897l.113-.007z" transform="translate(0 .5)"/>
<path d="M12.923 14.848c.276 0 .5.224.5.5 0 .245-.177.45-.41.492l-.09.008H8.077c-.276 0-.5-.224-.5-.5 0-.246.177-.45.41-.492l.09-.008h4.846z" transform="translate(0 .5)"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<g fill="currentColor" fill-rule="evenodd">
<path d="M11.5-1l-.164.005C10.032-.91 9 .175 9 1.5v1.08l-.064.02c-.278.084-.554.179-.825.282l-.201.079-.861-.86c-.976-.976-2.558-.976-3.535 0L2.1 3.516l-.121.131c-.853.982-.812 2.47.121 3.405l.862.861-.078.199c-.103.272-.197.547-.282.824L2.582 9 1.5 9.001c-1.38 0-2.5 1.12-2.5 2.5v1l.005.164C-.91 13.97.175 15.001 1.5 15.001L2.577 15l.02.066c.085.277.179.552.282.824l.078.199-.862.862c-.976.977-.976 2.56 0 3.535l1.421 1.417.13.121c.981.85 2.47.81 3.404-.123l.861-.864.2.08c.271.103.546.198.824.283l.065.018V22.5c0 1.38 1.12 2.5 2.5 2.5h1l.164-.005C13.968 24.91 15 23.825 15 22.5v-1.078l.064-.018c.278-.085.553-.179.825-.282l.198-.08.864.863c.976.976 2.558.976 3.534 0L21.9 20.49l.121-.131c.853-.982.812-2.47-.121-3.404l-.862-.863.08-.2c.104-.272.198-.547.284-.826L21.42 15h1.08c1.38 0 2.5-1.12 2.5-2.5v-1l-.005-.164C24.91 10.032 23.825 9 22.5 9h-1.079l-.018-.065c-.085-.278-.18-.553-.283-.825l-.08-.199.862-.86c.977-.977.977-2.56 0-3.536L20.484 2.1l-.13-.122c-.981-.85-2.47-.81-3.404.123l-.862.861-.198-.078c-.272-.103-.547-.198-.825-.283L15 2.583V1.5C15 .12 13.88-1 12.5-1h-1zm1 1.5c.513 0 .936.386.993.883l.007.117v2.251c.868.175 1.714.447 2.52.81l.4.19 1.59-1.589c.36-.36.928-.388 1.32-.083l.094.083 1.418 1.414c.36.36.388.928.083 1.32l-.083.094-1.589 1.588c.394.794.698 1.629.905 2.49l.095.432H22.5c.513 0 .936.386.993.883l.007.117v1c0 .513-.386.936-.883.993l-.117.007h-2.246c-.176.87-.449 1.717-.814 2.525l-.19.401 1.589 1.59c.36.36.388.928.083 1.32l-.083.094-1.414 1.414c-.36.36-.928.388-1.32.083l-.094-.083-1.591-1.589c-.793.394-1.628.697-2.488.904l-.432.096V22.5c0 .513-.386.936-.883.993l-.117.007h-1c-.513 0-.936-.386-.993-.883L10.5 22.5v-2.25c-.869-.175-1.715-.447-2.522-.81l-.4-.19-1.589 1.59c-.36.36-.928.388-1.32.083l-.094-.083-1.419-1.414c-.36-.36-.388-.928-.083-1.32l.083-.094 1.59-1.59c-.394-.794-.697-1.628-.904-2.489l-.096-.432H1.5c-.513 0-.936-.386-.993-.883L.5 12.5v-1c0-.513.386-.936.883-.993L1.5 10.5h2.25c.175-.868.447-1.714.81-2.52l.19-.401-1.59-1.589c-.36-.36-.388-.928-.083-1.32l.083-.094 1.415-1.415c.36-.36.928-.388 1.32-.083l.094.083 1.59 1.587c.793-.394 1.628-.698 2.489-.905l.432-.095V1.5c0-.513.386-.936.883-.993L11.5.5h1z"/>
<path d="M12 6.001c-3.314 0-6 2.686-6 6s2.686 6 6 6 6-2.686 6-6-2.686-6-6-6zm0 1.5c2.485 0 4.5 2.015 4.5 4.5s-2.015 4.5-4.5 4.5-4.5-2.015-4.5-4.5 2.015-4.5 4.5-4.5z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" width="9" height="16" viewBox="0 0 9 16">
<path fill="currentColor" fill-rule="evenodd" d="M8.69 7.516L7.51 6.274 4.5 9.442 1.49 6.274 0.31 7.516 4.5 11.926z"/>
</svg>

After

Width:  |  Height:  |  Size: 212 B

@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" width="9" height="16" viewBox="0 0 9 16">
<g fill="currentColor" fill-rule="evenodd">
<path fill="currentColor" d="M8.69 1.516L7.51 0.274 4.499 3.442 1.49 0.274 0.31 1.516 4.5 5.926z" transform="translate(0 5) matrix(1 0 0 -1 0 6.2)"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 304 B

+6
View File
@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="9" height="16" viewBox="0 0 9 16">
<g fill="currentColor" fill-rule="evenodd">
<path d="M8.69 11.516L7.51 10.274 4.5 13.442 1.49 10.274 0.31 11.516 4.5 15.926z"/>
<path d="M8.69 1.516L7.51 0.274 4.499 3.442 1.49 0.274 0.31 1.516 4.5 5.926z" transform="matrix(1 0 0 -1 0 6.2)"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 361 B