From 7011763664b8f709796677a796eeb433baa98536 Mon Sep 17 00:00:00 2001 From: Aleksandr Beliaev Date: Mon, 16 Jan 2023 16:24:35 +0200 Subject: [PATCH] refactor: simplify icons code and make them reusable Merge in SUN/veera-components from refactor-EBS-459-storybook-structure to master Squashed commit of the following: commit e973ef75cb5aff152a0e31993e6165c74642b009 Author: Aleksandr Beliaev Date: Sun Jan 15 20:35:47 2023 +0200 format(storybook): minor formatting commit 2ad02af4a5cf80b13b8f88e7766cd2f801f58ae6 Author: Aleksandr Beliaev Date: Sun Jan 15 20:33:42 2023 +0200 refactor(icons): removed hardcoded color from user icon (to be added in an app itself) commit e8fd48a7c4bdc43b61c5f2b73a7c5ab060c00d81 Author: Aleksandr Beliaev Date: Sun Jan 15 20:30:36 2023 +0200 refactor(icons): removed hardcoded color from sort icon (to be added in an app itself) commit 5708ff702196b79c2f9a4334693be698b9bfaa47 Author: Aleksandr Beliaev Date: Sun Jan 15 20:28:03 2023 +0200 refactor(icons): removed hardcoded color from happy-face and sad-face icons (to be added in an app itself) commit 2fab7fa6c12e953a932fae1b7fcd48bf6656c499 Author: Aleksandr Beliaev Date: Sun Jan 15 20:26:09 2023 +0200 refactor(icons): removed an unnecessary fill attribute from info icon commit 7c6fb5c9f39442eef160081b71e9dd699d5f3fc1 Author: Aleksandr Beliaev Date: Sun Jan 15 20:21:34 2023 +0200 refactor(icons): simplified path in error-outline icon commit 0d57fda39179c49aa46097c7f1324d8a05e37300 Author: Aleksandr Beliaev Date: Sun Jan 15 20:15:49 2023 +0200 refactor(icons): removed an unused attribute from email icon commit 1fb3ce3f6d52a3cb323d7dee24a701bdf0f1ffaf Author: Aleksandr Beliaev Date: Sun Jan 15 20:11:36 2023 +0200 refactor(icons): removed unnecessary group tags from all SVG icons commit c98e53f9d71145884b52836016e3f6e4e58e1d77 Author: Aleksandr Beliaev Date: Sun Jan 15 20:06:30 2023 +0200 feat(icons): mark as a linting error presence of a g tag inside SVG markup with only one child see https://github.com/birjj/svglint/issues/56 commit 909737f29f983014167267986fdd1cc4a9cfd979 Author: Aleksandr Beliaev Date: Sun Jan 15 20:03:14 2023 +0200 feat(icons): do not truncate errors list when linting icons see https://github.com/birjj/svglint/issues/56 commit eaa4bbf72bfacf7ea6cddf03fc55d1f5ef977461 Author: Aleksandr Beliaev Date: Sun Jan 15 20:01:59 2023 +0200 refactor(icons): simplified path in check-circle-outline icon commit b100f0e59272b738d915e52276a4c6b45b0fa848 Author: Aleksandr Beliaev Date: Sun Jan 15 20:01:14 2023 +0200 refactor(icons): removed hardcoded color and opacity from arrow-up-alt icon (to be added in an app itself) commit b3093c5d80c88d16ca75a5ee2ff450efea5cadef Author: Aleksandr Beliaev Date: Sun Jan 15 19:56:20 2023 +0200 feat(icons): added more rules to SVGLint config commit 75364d48869d08799d1f52eb9c87719838887aea Author: Aleksandr Beliaev Date: Sun Jan 15 19:55:38 2023 +0200 refactor(icons): removed hardcoded color from edit icon (to be added in an app itself) commit 8e3556503caf41ff135f610f73efd3bf47d0df01 Author: Aleksandr Beliaev Date: Sun Jan 15 19:55:11 2023 +0200 refactor(icons): removed hardcoded color and opacity from arrow-down-alt icon (to be added in an app itself) commit 841649248b51c3bcdc3943b85d147ddeea78090d Author: Aleksandr Beliaev Date: Sun Jan 15 19:10:07 2023 +0200 refactor(icons): removed hardcoded color from arrow-up icon (to be added in an app itself) commit 446e6bf9503512c044438fbe2187de20599a1a69 Author: Aleksandr Beliaev Date: Sun Jan 15 18:52:27 2023 +0200 refactor(icons): removed hardcoded color from arrow-down icon (to be added in an app itself) commit f69e285a06847c6faec28ad7d5a5dfd73161e451 Author: Aleksandr Beliaev Date: Sun Jan 15 18:51:53 2023 +0200 refactor(icons): removed hardcoded color from action icon (to be added in an app itself) commit f2c3e8b87bb558d13a45a086923d13029b36e6c6 Author: Aleksandr Beliaev Date: Sun Jan 15 18:43:52 2023 +0200 feat(icons): added an SVG linter and lint:svg command commit 3229f0ad8d6ddf9456684f11eba83337615ff808 Author: Aleksandr Beliaev Date: Sun Jan 15 18:12:54 2023 +0200 feat(storybook): expand height of All icons story when viewed in Docs tab ... and 5 more commits --- .svglintrc.js | 45 ++ libs/icons/src/lib/png/business.png | Bin 475 -> 0 bytes libs/icons/src/lib/png/consumer.png | Bin 438 -> 0 bytes libs/icons/src/lib/png/country.png | Bin 215 -> 0 bytes libs/icons/src/lib/png/culture.png | Bin 549 -> 0 bytes libs/icons/src/lib/png/disability.png | Bin 378 -> 0 bytes libs/icons/src/lib/png/documents.png | Bin 247 -> 0 bytes libs/icons/src/lib/png/education.png | Bin 448 -> 0 bytes libs/icons/src/lib/png/error.png | Bin 646 -> 0 bytes libs/icons/src/lib/png/family.png | Bin 396 -> 0 bytes libs/icons/src/lib/png/grants.png | Bin 446 -> 0 bytes libs/icons/src/lib/png/healthcare.png | Bin 460 -> 0 bytes libs/icons/src/lib/png/home.png | Bin 245 -> 0 bytes libs/icons/src/lib/png/justice.png | Bin 224 -> 0 bytes libs/icons/src/lib/png/language.png | Bin 547 -> 0 bytes libs/icons/src/lib/png/menu-icon.png | Bin 92 -> 0 bytes libs/icons/src/lib/png/money.png | Bin 356 -> 0 bytes libs/icons/src/lib/png/my-data.png | Bin 299 -> 0 bytes libs/icons/src/lib/png/security.png | Bin 285 -> 0 bytes libs/icons/src/lib/png/special-req.png | Bin 184 -> 0 bytes libs/icons/src/lib/png/success.png | Bin 659 -> 0 bytes libs/icons/src/lib/png/traffic.png | Bin 321 -> 0 bytes libs/icons/src/lib/png/warning.png | Bin 629 -> 0 bytes libs/icons/src/lib/png/work.png | Bin 263 -> 0 bytes libs/icons/src/lib/png/x-icon.png | Bin 225 -> 0 bytes libs/icons/src/lib/svg/action.svg | 4 +- libs/icons/src/lib/svg/arrow-down-alt.svg | 7 +- libs/icons/src/lib/svg/arrow-down.svg | 4 +- libs/icons/src/lib/svg/arrow-up-alt.svg | 7 +- libs/icons/src/lib/svg/arrow-up.svg | 9 +- libs/icons/src/lib/svg/call.svg | 4 +- .../src/lib/svg/check-circle-outline.svg | 6 +- libs/icons/src/lib/svg/edit.svg | 17 +- libs/icons/src/lib/svg/email.svg | 4 +- libs/icons/src/lib/svg/error-outline.svg | 8 +- libs/icons/src/lib/svg/happy-face.svg | 6 +- libs/icons/src/lib/svg/info.svg | 2 +- libs/icons/src/lib/svg/location.svg | 4 +- libs/icons/src/lib/svg/sad-face.svg | 6 +- libs/icons/src/lib/svg/screen-share.svg | 4 +- libs/icons/src/lib/svg/sort.svg | 6 +- libs/icons/src/lib/svg/user.svg | 4 +- libs/icons/src/lib/svg/veera.svg | 1 - libs/icons/src/lib/svg/warning-amber.svg | 16 +- libs/storybook/.storybook/theme.js | 2 +- .../src/lib/assets/images}/logo.svg | 0 .../src/lib/stories/icons-list.stories.mdx | 32 +- .../src/lib/stories/icons.stories.mdx | 4 +- package-lock.json | 545 ++++++++++++++++++ package.json | 2 + 50 files changed, 660 insertions(+), 89 deletions(-) create mode 100644 .svglintrc.js delete mode 100644 libs/icons/src/lib/png/business.png delete mode 100644 libs/icons/src/lib/png/consumer.png delete mode 100644 libs/icons/src/lib/png/country.png delete mode 100644 libs/icons/src/lib/png/culture.png delete mode 100644 libs/icons/src/lib/png/disability.png delete mode 100644 libs/icons/src/lib/png/documents.png delete mode 100644 libs/icons/src/lib/png/education.png delete mode 100644 libs/icons/src/lib/png/error.png delete mode 100644 libs/icons/src/lib/png/family.png delete mode 100644 libs/icons/src/lib/png/grants.png delete mode 100644 libs/icons/src/lib/png/healthcare.png delete mode 100644 libs/icons/src/lib/png/home.png delete mode 100644 libs/icons/src/lib/png/justice.png delete mode 100644 libs/icons/src/lib/png/language.png delete mode 100644 libs/icons/src/lib/png/menu-icon.png delete mode 100644 libs/icons/src/lib/png/money.png delete mode 100644 libs/icons/src/lib/png/my-data.png delete mode 100644 libs/icons/src/lib/png/security.png delete mode 100644 libs/icons/src/lib/png/special-req.png delete mode 100644 libs/icons/src/lib/png/success.png delete mode 100644 libs/icons/src/lib/png/traffic.png delete mode 100644 libs/icons/src/lib/png/warning.png delete mode 100644 libs/icons/src/lib/png/work.png delete mode 100644 libs/icons/src/lib/png/x-icon.png delete mode 100644 libs/icons/src/lib/svg/veera.svg rename libs/{icons/src/lib/svg => storybook/src/lib/assets/images}/logo.svg (100%) diff --git a/.svglintrc.js b/.svglintrc.js new file mode 100644 index 00000000..53f3338a --- /dev/null +++ b/.svglintrc.js @@ -0,0 +1,45 @@ +module.exports = { + rules: { + elm: { + svg: 1, + 'svg > style': 0, + 'g > :only-child': 0, + }, + attr: [ + { + 'rule::selector': 'svg', + viewBox: true, + version: false, + id: false, + 'data-name': false, + class: false, + style: false, + xmlns: 'http://www.w3.org/2000/svg', + fill: false, + 'xmlns:dc': false, + 'xmlns:cc': false, + 'xmlns:rdf': false, + 'xmlns:svg': false, + 'xml:space': false, + 'xmlns:sodipodi': false, + 'xmlns:inkscape': false, + x: false, + y: false, + }, + { + 'rule::selector': 'svg g', + style: false, + fill: false, + id: false, + class: false, + }, + { + 'rule::selector': 'svg path', + style: false, + fill: false, + 'fill-opacity': false, + class: false, + }, + ], + }, +}; diff --git a/libs/icons/src/lib/png/business.png b/libs/icons/src/lib/png/business.png deleted file mode 100644 index ff9f2948846efb217675fd95e703fa1500ee37fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 475 zcmV<10VMv3P)W#z3UMKs$1d~(Hn13Gl-x6l=z0qn@r zTmU??Mq^TKvf2y4g)Gf}z@V0l^}7YwSFOoPz{v{MY0<8RhPanaE+6p=d z;6??lH3U9rO+{P5OYMP95C!0n|KiKcU`yVYU82g&%wCqki!#_UbE^^?wIYh3G43SfU3UDz2?AaBlc@ z0d$xbSEkH2@K@RJyTV`aEoOU8gDy+bh;)0$Ot z^nkww>^*6jEt1;S^z|mS1H(d=0L)q(Z-V1-t&B$!bnXe^wOg`ibMq5dOqFdV6B)!`cK1CPR0?gXzUeM8T| z&M+_?bgCF%pkNf!qk^^ImP?cH8=xjS%SCZ*V4c_vV*kINBx9ccm&9F@`TVaV#%n-T ge*d{i%i^N|0KLr+jyLg*b^rhX07*qoM6N<$f~63`-~a#s diff --git a/libs/icons/src/lib/png/country.png b/libs/icons/src/lib/png/country.png deleted file mode 100644 index 556972a914fcd919fec01048e6b9914c56e1934a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 215 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k0wldT1B8LpJWm(LkP5~%H_X~Gy=T260gOQ5I0?00Q%cRJ-~y#Fi;i+eDw@$+?6vxt{Dbu zMM1R$tJ++N;%>m6})|?Ey@LS%%=bESeCi5m2a4 z_6h5Lb_(vxq7+<*_!r2l<=3yoPuTZfYCy54a0G^#%^hqOcZPI$-Hr zt>_5Qc3DkzKp$jQAlZ0nQ?T#`I#to00>D_jQM7LgV5SjO(E;T4w?1qKmVkCtj}$Q6 z`mjAv9;+ZW2F#pPMH!#)k diff --git a/libs/icons/src/lib/png/disability.png b/libs/icons/src/lib/png/disability.png deleted file mode 100644 index 6ac94fe389336461f4d7913ea6541bf289e7c42b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 378 zcmV-=0fqjFP)C`zGrqq@FkWt;Fmx-<9{(+I9rN9%q0 zd(iYbG!E9^)(uX?6Z8|C1xxP}l_sTQPd4ECO@N(G_oPFh7I39JHZ5}lTEd}1$6!;@ z+pNe2I0}2CC_{ifoyt@hunQOqg`zCTS0?C;;+gXR0CJ{+4?CWE%d*aKYC&zlt^M7e Y0Ua<@c}tNM^Z)<=07*qoM6N<$g8Dd_#{d8T diff --git a/libs/icons/src/lib/png/documents.png b/libs/icons/src/lib/png/documents.png deleted file mode 100644 index db16af2e57c75c52602ed5c1e611656c205e3ba6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 247 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k0wldT1B8LpK2I0NkP61PQ@4sT8Hg}k>`T1C z5GBLrkS%r~`0}&Ktx4h0f~?TK&1o%LDc~ODpddq5G4fw2x3@6F-Bn724fDk znQzK|TyxvrwgL75yxYFc`@i!{S0^yXeEX3p9sqb`qV>oq*OZVFH#p5l206t;#KUFK zJ`!S=ED|F^gcy=$k3O5s8VMxHCOv44XP|xS$v?OUB3`1(u8jmM9_~t6Co6()UK^4d3XTB7Uy_@g(Oh9r zA%z@NzBv~+@cU$iPb9&*4kYU&kPlW&WAw2_8i^7iLKOLCn_gp!0gmvfmgktTX%-Hb q|E{Aeoc1rs2PQgkWzU(e4)_7SJO7iWjUl1{0000}sF1UQR*1{kl#JF$ z)L7OCy5m9Y9JHd(CC82!Kfo4|>JUEi#sPYyf?)@QOP&lzSAe~zpTXQz@lzdNC^!t!t$6H2WDJ1z}Zb6g9tyDYld8?YW6 z7-qmof`*Zumxi-y;LpXY%1~fMI8p)sic?ZRBk`=B0nVy-+EZ4q*UFsbjfDgJGM{MU zhqE!|ije{b9@|^2Zr$hH1muJRkL|4ox5H<_S$RCEfH~nro|F>jh7(IXAa0T5h6DUX zLJQbC%`_7_S^^I6Z}(2G=H=ov+Tbx8M-9Rck9tH(BRn4|3rB`6 z;Xi)ca;(Gn;yWNwHNr=pVuG%aNebbT$C$Df`_p0)XiP@!^Tkw{6Z2$lO07*qoM6N<$g0X`bxBvhE diff --git a/libs/icons/src/lib/png/family.png b/libs/icons/src/lib/png/family.png deleted file mode 100644 index f63c771e3f1d9444941a606eb7e81e421c4154b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 396 zcmV;70dxL|P)lyiWmc48m_+KUV^bP zGFwPX5p_J0_ehNxIhrqpbn`&wfo@S-=1ZBVWrbIGWrbR48}DOQ{#vSOqlcb)XrpS9 zqnRp6F|EyX)JK_*j+&u$lG4&e`%KU=`4#wf@X34?^0%2KxM7VR*?&<_TPQVsWzLPB5a@d!#fP;?-KWW z!*~AoqYpf(csP5W(9t@lTdT2$LprzXBELa0A%&Oi5EU7(ljB~j zvxa)wBH9R;85jF~7o32r)QE=ikpFGfg3}v#MBFgGU=%ng))gLrA&*Nq*Ny4 o zTRkCEEtU$|(bv|84QHGYXOxoH4;MB%Ps1oRg?*5gbA^-%Q8!dbN}X~l1(i{X7Dy?- zU@gGNJ$a?%Snemz;FlU6Lzj1@;*1uA4x8-I6DrO~sU~?FZPF1c#7IG?lXJt6rzup* z#ZYC*J0nM3C|mvUyfQBxmZ$;+UH!3?nG?vqejfclH)s(`hk;QUe=9KNjm4jSo;Dij zvCV-|B{Ke2K!cpqutgV?vAH4TZ3QhhRI#v2ACyTb+X^zqw8^`0*k>S&PZcNueYRXY z9P;5YO2L4AH$I%uqrsjV5sqnp{f=C^FvX<%^Z5jZ3p|40vOQ=30000)4CEW6v+IgK-1%dbW442Rj(dc8ld7?7|hf!)Z|POUFZhczV%g z58Qd|k;xeu$+u<-CIBXiEt!%T5Hsb!nSki&5n+AgMvdr5N$C*vx=c)iXi0u22`!=_ zj(iI*EysPABA0lp&pu9lAowS%njX&gSw3xKe&Uu7G-w00000NkvXXu0mjf6Ypi< diff --git a/libs/icons/src/lib/png/justice.png b/libs/icons/src/lib/png/justice.png deleted file mode 100644 index 1a155e10c45485d5dd3b684344f40fd7666c1570..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 224 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k0wldT1B8Lpa!(h>kP6161=>II88qhe6$*4L zG~l=`%JD>wZKJtEfq=>;p_|Ty9kv`ohBFE$Y&*GMMPS)K@86fU^9ENI+-hP>@={y6 zBT4aS;n+51Qm1BL zgx}Twi0wbv;f=wt>@S3j3^P6z?@Gt0%78q;pvnl}z(kVLUWd#nNiVdZ#$v7+V_65&)m1!8yl4+IIj;lH#!y z@WOb#Kw3Ku{Q$#l^b4@9IL%tXK{YbzBG?n2lXFR;nG=B3N#U3T*e{hyZ2^sP>T3G~ zS|y2;J%CAt|EUk)kW@}y1TKa8<6wTyb;=R&Ugd(Kx!|?hdHFUN5$cD68+oa=S73HQ z(QDc8I*HLywseR^>txHiSab#S4tWQd9<`YPwuamfT!}^ZK%fgj^MTiAA3a6?H2_bTQ=0;B#TG);Q#&U})54Nc?IVgL|>)D(DmP zb}%z)Gb^5~`hu&mX#M~C{heh?r&yHoN;bTbN@C0gufn9g1qOxs;oxSNw6DReOo&n0 zdvH`LCocrYG0i4n#lg@)>IW>F2 zQd`3zz^c+L{=aNA9Q@EwJ896vcrO53lH#!(z;|hI%2kl|NxU5ukMXkKAY)WE!=tRX l>|zcP-#l^MW}TAq$Ug-kOv|n1+Zg}=002ovPDHLkV1lse2`VBp6OsFEs^HOeH~n!3+##lh0ZJd7_>!jv*C{ n$qJ$${{R0kKXb{>s!t3I&*G(X-_5)J6Qs@4)z4*}Q$iB}y>uFl diff --git a/libs/icons/src/lib/png/money.png b/libs/icons/src/lib/png/money.png deleted file mode 100644 index 487523316693087ce94d3b05ba58ca151eb09152..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 356 zcmV-q0h|7bP)*$%us& zRF?%wgBw&$evUl826a@I8vd8aiwz%}|5t^K)&c;YHH&G@LI}W>q{X{?A(z&kH2Yt# z=KdiqT)U2lfmQdRHE@awDED0>V`5{J7N9QrEVf&+Vq-pH)h>}|nPWPr2PWN?f17xh zb3E2)%MV6rw>Kb){r319>05dQc37}Xo<0*Vt<7>VT zSoR#?#mg`Ln+>~K#$c>vH}X+2vS_3d*(rFntfvrJsRJ&Rlw1KCk(B{Bi-c1!h^%~p zQY4hXG_o=U8y`^Va&sJooYG~0=HGd*aNg|rR6WLHu zQ+K0h4(9r<)zva&tEg=v%|u%o8I{&;>k18t>pFR&Wg7B8`mJXlP?id;_8J{Lf7n`11e&002ovPDHLkV1f}9a6HwBx0XxgIPXxMtS7q?`O%1+qWn$2fP_?i50=dr=i zH+~!s2M1UAqtvza^|jRxN6tMd_U!BsrfKPCOU?A#tN=4(V>7_YMH(~(A3D25$2*v& zFg06nTU_0Nty(;E4HkR*0^Gzy12Ea!Ctwf{4Z*N%|A&yOkszjEq*@L=Na?X0`jXOT zIRuJJ%*hj^p{uKr326x+xXOcG0KDcw8vvU;XbxbW2VHstK`Z~&dU_eJR?-OyQVPHM jL+)~KEvB_m|k1|%Oc%$NbB>OEZ?Ln;{Go;xncDds2mG?7iPr-^}%etyTK~yYXuK1ybyeUwBzA znhUtxcMyP)8c9C|?v`w0j#?U|t>{tNhv#Ov6ltnBhq9b-H z6g34cv=g%ijXGVX>P`p`@Q4B_2P^y|pKuS9qEWY{`doASqu?$YY_B-{kV&GZRgIjX zo*3w8MyGp3d$<_nl+&OUT*#+dO5}PJa7V+?UJULoKT;3ba2#!<($8#_O@#luDB986 z&<@T-%Z9Y4nujV!w1vA8kaiR=reg3_G={UI)Dh1NfSWi4>M8}!=ma9=Jfq$8=D-1N z9)3}UZ&qQC|A8}YoXu)?lKT-*3l7@1vmfkEd^#X4x}|VN4o?c;jNcLU4dF>Oha7qo|Dpy8I(4pz`fbX8^bPkrH9VyJRm=bY002ovPDHLkV1k8JBf9_q diff --git a/libs/icons/src/lib/png/traffic.png b/libs/icons/src/lib/png/traffic.png deleted file mode 100644 index a7ecfa0460ff4ac0590e5f248a5fc17616f9c84f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 321 zcmV-H0lxl;P)40rhG1Mr*?L+Jx};!nWmc^w?Pa%vvLq^q13Rpz^|Yc@qZ=}Y2IFHD&USV* znD+efe!TbISo>j3Lr*1tJ&nk-ZK}l7PUN^!>N1zvFabBJ%-w;BjaWt-%+w-7%?H?x zW!!@6SiyaEr)CEBVg>uzFLwyul7C(gc$>iUaL8md4Q zIr)A1K+CyiETHbhQDMjcP){~ZK)))l28=Lg}Q*}DBuZj94Tkt13OxaD1$V?YBL!~0HXi^yFV5) TTp^!=00000NkvXXu0mjfXj+7? diff --git a/libs/icons/src/lib/png/warning.png b/libs/icons/src/lib/png/warning.png deleted file mode 100644 index 6305a39c2bc96eddaaa63c2114ef0ed5eb128379..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 629 zcmV-*0*d{KP)H*zKk8LO^!15YV60@Z=|)xYU?9Aq|81cDVJqUbb~a-LKM{) ziBC03y0$_3J=jy&HtKtWe}a1?Kmi)~XI>xeQ zSbY4Aid?-G@r+3j7%uhB*QpWD*aS6(TdbpWbwn~Y!2-j*SiaZJ@z+E$d{ zk~JPN9|!imQ&6$SPs|68-HFH7J+=tw8M_BzW8eH978p8PAdN}C`yX$ViQX(EQ!+E(k8BO`!@s`l}ktac|ZbxzFe-`O*@nX P00000NkvXXu0mjfWS$L< diff --git a/libs/icons/src/lib/png/work.png b/libs/icons/src/lib/png/work.png deleted file mode 100644 index 9bcfabd58b8e2d45f2f3f5be6b189b85b969bd33..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 263 zcmeAS@N?(olHy`uVBq!ia0vp^Dj>|k0wldT1B8LpIZqeIkP5~(ml)ZY97P%)?sQRj z!BE=XcUh8&S$0{p4v@{&vCC;6L!7P8*-cLWn@z7Be{Qa>3m*`qO`D zss|iC@UxoZ$>f&`#Lg*GcsU+0z=9=G}WWjleF-6q?n-OG3AmEXj>bvDhg(~Hj;=raaS LS3j3^P6Sm|Y(Fi((z49x@&WzPJROD`99q{scOE=lr&1wkAH=JFpIpadtQ99W5u zDMsZ76f+bbIVQ>%L`*LKQDEZFOd+Ops;H51{_Vu8q;h|{C7_rMd4r6d7@n!rMPLsY zB{T`CAL@5%C}zhF6U8*x{<{0t@Id+>`6(|G{pq&zjO@h63=^9_Y?*&zu%|X_=kZ_4 bvm`kJ!LV3i&qsp>00000NkvXXu0mjfvENx_ diff --git a/libs/icons/src/lib/svg/action.svg b/libs/icons/src/lib/svg/action.svg index 102e3464..0e94a322 100644 --- a/libs/icons/src/lib/svg/action.svg +++ b/libs/icons/src/lib/svg/action.svg @@ -1,3 +1,3 @@ - - + + diff --git a/libs/icons/src/lib/svg/arrow-down-alt.svg b/libs/icons/src/lib/svg/arrow-down-alt.svg index fcb09452..b81e42f9 100644 --- a/libs/icons/src/lib/svg/arrow-down-alt.svg +++ b/libs/icons/src/lib/svg/arrow-down-alt.svg @@ -1,6 +1,3 @@ - - + + diff --git a/libs/icons/src/lib/svg/arrow-down.svg b/libs/icons/src/lib/svg/arrow-down.svg index e31f9ab1..e7aeab41 100644 --- a/libs/icons/src/lib/svg/arrow-down.svg +++ b/libs/icons/src/lib/svg/arrow-down.svg @@ -1,3 +1,3 @@ - - + + diff --git a/libs/icons/src/lib/svg/arrow-up-alt.svg b/libs/icons/src/lib/svg/arrow-up-alt.svg index 4cc9425a..caf073de 100644 --- a/libs/icons/src/lib/svg/arrow-up-alt.svg +++ b/libs/icons/src/lib/svg/arrow-up-alt.svg @@ -1,6 +1,3 @@ - - + + diff --git a/libs/icons/src/lib/svg/arrow-up.svg b/libs/icons/src/lib/svg/arrow-up.svg index bfa12f5e..ca54bf04 100644 --- a/libs/icons/src/lib/svg/arrow-up.svg +++ b/libs/icons/src/lib/svg/arrow-up.svg @@ -1,8 +1,3 @@ - - + + diff --git a/libs/icons/src/lib/svg/call.svg b/libs/icons/src/lib/svg/call.svg index d32c5329..44f75464 100644 --- a/libs/icons/src/lib/svg/call.svg +++ b/libs/icons/src/lib/svg/call.svg @@ -1,5 +1,3 @@ - - - + diff --git a/libs/icons/src/lib/svg/check-circle-outline.svg b/libs/icons/src/lib/svg/check-circle-outline.svg index 34b002a0..f2233a13 100644 --- a/libs/icons/src/lib/svg/check-circle-outline.svg +++ b/libs/icons/src/lib/svg/check-circle-outline.svg @@ -1,4 +1,4 @@ - - - + + + diff --git a/libs/icons/src/lib/svg/edit.svg b/libs/icons/src/lib/svg/edit.svg index 7baaa1cd..646d38eb 100644 --- a/libs/icons/src/lib/svg/edit.svg +++ b/libs/icons/src/lib/svg/edit.svg @@ -1,11 +1,8 @@ - - - - - - - - - - + + + diff --git a/libs/icons/src/lib/svg/email.svg b/libs/icons/src/lib/svg/email.svg index 699d9897..568e0d40 100644 --- a/libs/icons/src/lib/svg/email.svg +++ b/libs/icons/src/lib/svg/email.svg @@ -1,5 +1,3 @@ - - - + diff --git a/libs/icons/src/lib/svg/error-outline.svg b/libs/icons/src/lib/svg/error-outline.svg index e209b3e5..0bcf0ffa 100644 --- a/libs/icons/src/lib/svg/error-outline.svg +++ b/libs/icons/src/lib/svg/error-outline.svg @@ -1,4 +1,6 @@ - - - + + + + diff --git a/libs/icons/src/lib/svg/happy-face.svg b/libs/icons/src/lib/svg/happy-face.svg index 9589385f..80fc2405 100644 --- a/libs/icons/src/lib/svg/happy-face.svg +++ b/libs/icons/src/lib/svg/happy-face.svg @@ -1,5 +1,5 @@ - - - + + + diff --git a/libs/icons/src/lib/svg/info.svg b/libs/icons/src/lib/svg/info.svg index 6ec81a32..027fe7f2 100644 --- a/libs/icons/src/lib/svg/info.svg +++ b/libs/icons/src/lib/svg/info.svg @@ -1,3 +1,3 @@ - + diff --git a/libs/icons/src/lib/svg/location.svg b/libs/icons/src/lib/svg/location.svg index b73de42e..deaa60c6 100644 --- a/libs/icons/src/lib/svg/location.svg +++ b/libs/icons/src/lib/svg/location.svg @@ -1,5 +1,3 @@ - - - + diff --git a/libs/icons/src/lib/svg/sad-face.svg b/libs/icons/src/lib/svg/sad-face.svg index a30ec84d..1506c730 100644 --- a/libs/icons/src/lib/svg/sad-face.svg +++ b/libs/icons/src/lib/svg/sad-face.svg @@ -1,5 +1,5 @@ - - - + + + diff --git a/libs/icons/src/lib/svg/screen-share.svg b/libs/icons/src/lib/svg/screen-share.svg index 585b7fbb..1926b388 100644 --- a/libs/icons/src/lib/svg/screen-share.svg +++ b/libs/icons/src/lib/svg/screen-share.svg @@ -1,5 +1,3 @@ - - - + diff --git a/libs/icons/src/lib/svg/sort.svg b/libs/icons/src/lib/svg/sort.svg index ad948314..2a45eb41 100644 --- a/libs/icons/src/lib/svg/sort.svg +++ b/libs/icons/src/lib/svg/sort.svg @@ -1,4 +1,4 @@ - - - + + + diff --git a/libs/icons/src/lib/svg/user.svg b/libs/icons/src/lib/svg/user.svg index 3f3030d4..936e004c 100644 --- a/libs/icons/src/lib/svg/user.svg +++ b/libs/icons/src/lib/svg/user.svg @@ -1,3 +1,3 @@ - - + + diff --git a/libs/icons/src/lib/svg/veera.svg b/libs/icons/src/lib/svg/veera.svg deleted file mode 100644 index c12bae58..00000000 --- a/libs/icons/src/lib/svg/veera.svg +++ /dev/null @@ -1 +0,0 @@ -veera-logo \ No newline at end of file diff --git a/libs/icons/src/lib/svg/warning-amber.svg b/libs/icons/src/lib/svg/warning-amber.svg index a5e7de94..80c9a932 100644 --- a/libs/icons/src/lib/svg/warning-amber.svg +++ b/libs/icons/src/lib/svg/warning-amber.svg @@ -1,14 +1,6 @@ - - - - - - - - - - - - + + + + diff --git a/libs/storybook/.storybook/theme.js b/libs/storybook/.storybook/theme.js index 74fda6c1..3818a1c7 100644 --- a/libs/storybook/.storybook/theme.js +++ b/libs/storybook/.storybook/theme.js @@ -1,5 +1,5 @@ import { create } from '@storybook/theming'; -import logo from '../../icons/src/lib/svg/logo.svg'; +import logo from '../src/lib/assets/images/logo.svg'; export default create({ base: 'light', diff --git a/libs/icons/src/lib/svg/logo.svg b/libs/storybook/src/lib/assets/images/logo.svg similarity index 100% rename from libs/icons/src/lib/svg/logo.svg rename to libs/storybook/src/lib/assets/images/logo.svg diff --git a/libs/storybook/src/lib/stories/icons-list.stories.mdx b/libs/storybook/src/lib/stories/icons-list.stories.mdx index e943f0fd..efe4d803 100644 --- a/libs/storybook/src/lib/stories/icons-list.stories.mdx +++ b/libs/storybook/src/lib/stories/icons-list.stories.mdx @@ -1,17 +1,25 @@ import {Meta, Story} from '@storybook/addon-docs'; import { storybookIconsNames } from '../../../../ui/src/lib/icons/storybook-icons'; - + - - {{ - props: {icons: storybookIconsNames}, - template: ` - - - - - - `, - }} +export const Template = (args) => ({ props: { ...args, icons: storybookIconsNames }, template: ` + + + + + +` }) + +Switch to *Canvas* tab for a full-screen view. + + + { Template.bind({}) } diff --git a/libs/storybook/src/lib/stories/icons.stories.mdx b/libs/storybook/src/lib/stories/icons.stories.mdx index 13760ada..d55b0080 100644 --- a/libs/storybook/src/lib/stories/icons.stories.mdx +++ b/libs/storybook/src/lib/stories/icons.stories.mdx @@ -14,9 +14,9 @@ import iconsPkg from '/libs/icons/package.json' }} -1. Install the library +1. Install the library: ``` npm i --save @ria/veera-icons ``` -2. Check the usage page for examples +2. Check the usage page for examples. diff --git a/package-lock.json b/package-lock.json index 3ce43a93..80379d3b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -81,6 +81,7 @@ "react": "17.0.2", "react-dom": "17.0.2", "storybook-addon-pseudo-states": "^1.15.1", + "svglint": "^2.2.0", "ts-jest": "27.1.5", "ts-node": "10.9.1", "typescript": "~4.7.2", @@ -26100,6 +26101,12 @@ "safe-buffer": "~5.1.0" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -28116,6 +28123,22 @@ "devOptional": true, "license": "MIT" }, + "node_modules/fast-xml-parser": { + "version": "3.21.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz", + "integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==", + "dev": true, + "dependencies": { + "strnum": "^1.0.4" + }, + "bin": { + "xml2js": "cli.js" + }, + "funding": { + "type": "paypal", + "url": "https://paypal.me/naturalintelligence" + } + }, "node_modules/fastq": { "version": "1.14.0", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.14.0.tgz", @@ -47030,6 +47053,12 @@ "node": ">=0.10.0" } }, + "node_modules/strnum": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-1.0.5.tgz", + "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", + "dev": true + }, "node_modules/strong-log-transformer": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz", @@ -47439,6 +47468,522 @@ "node": ">=4.2.0" } }, + "node_modules/svglint": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/svglint/-/svglint-2.2.0.tgz", + "integrity": "sha512-0Cd0Mi87QPU+VT0TGXNtLPRFOtT5b92APGmrI7iHfUqTQSquRaIDHm1rbU6J9aHCNSVitKgPVaGMCV9ykwJiiQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1", + "chalk": "^5.0.0", + "cheerio": "^1.0.0-rc.6", + "fast-xml-parser": "^3.12.13", + "glob": "^7.1.2", + "htmlparser2": "^3.9.1", + "log-update": "^5.0.0", + "meow": "^10.1.1", + "strip-ansi": "^7.0.0" + }, + "bin": { + "svglint": "bin/cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || ^16.0.0 || >=18.0.0" + } + }, + "node_modules/svglint/node_modules/ansi-escapes": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-5.0.0.tgz", + "integrity": "sha512-5GFMVX8HqE/TB+FuBJGuO5XG0WrsA6ptUqoODaT/n9mmUaZFkqnBueB4leqGBCmrUHnCnC4PCZTCd0E7QQ83bA==", + "dev": true, + "dependencies": { + "type-fest": "^1.0.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/svglint/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/svglint/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/camelcase-keys": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-7.0.2.tgz", + "integrity": "sha512-Rjs1H+A9R+Ig+4E/9oyB66UC5Mj9Xq3N//vcLf2WzgdTi/3gUu3Z9KoqmlrEG4VuuLK8wJHofxzdQXz/knhiYg==", + "dev": true, + "dependencies": { + "camelcase": "^6.3.0", + "map-obj": "^4.1.0", + "quick-lru": "^5.1.1", + "type-fest": "^1.2.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/chalk": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", + "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==", + "dev": true, + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/svglint/node_modules/cli-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", + "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", + "dev": true, + "dependencies": { + "restore-cursor": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/decamelize": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-5.0.1.tgz", + "integrity": "sha512-VfxadyCECXgQlkoEAjeghAr5gY3Hf+IKjKb+X8tGVDtveCjN+USwprd2q3QXBR9T1+x2DG0XZF5/w+7HAtSaXA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/dom-serializer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "dev": true, + "dependencies": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + } + }, + "node_modules/svglint/node_modules/dom-serializer/node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, + "node_modules/svglint/node_modules/dom-serializer/node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/svglint/node_modules/domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true + }, + "node_modules/svglint/node_modules/domhandler": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", + "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "dev": true, + "dependencies": { + "domelementtype": "1" + } + }, + "node_modules/svglint/node_modules/domutils": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", + "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", + "dev": true, + "dependencies": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "node_modules/svglint/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/svglint/node_modules/entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "dev": true + }, + "node_modules/svglint/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/svglint/node_modules/htmlparser2": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", + "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", + "dev": true, + "dependencies": { + "domelementtype": "^1.3.1", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + } + }, + "node_modules/svglint/node_modules/indent-string": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-5.0.0.tgz", + "integrity": "sha512-m6FAo/spmsW2Ab2fU35JTYwtOKa2yAwXSwgjSv1TJzh4Mh7mC3lzAOVLBprb72XsTrgkEIsl7YrFNAiDiRhIGg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/is-fullwidth-code-point": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/log-update": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-5.0.1.tgz", + "integrity": "sha512-5UtUDQ/6edw4ofyljDNcOVJQ4c7OjDro4h3y8e1GQL5iYElYclVHJ3zeWchylvMaKnDbDilC8irOVyexnA/Slw==", + "dev": true, + "dependencies": { + "ansi-escapes": "^5.0.0", + "cli-cursor": "^4.0.0", + "slice-ansi": "^5.0.0", + "strip-ansi": "^7.0.1", + "wrap-ansi": "^8.0.1" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/meow": { + "version": "10.1.5", + "resolved": "https://registry.npmjs.org/meow/-/meow-10.1.5.tgz", + "integrity": "sha512-/d+PQ4GKmGvM9Bee/DPa8z3mXs/pkvJE2KEThngVNOqtmljC6K7NMPxtc2JeZYTmpWb9k/TmxjeL18ez3h7vCw==", + "dev": true, + "dependencies": { + "@types/minimist": "^1.2.2", + "camelcase-keys": "^7.0.0", + "decamelize": "^5.0.0", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.2", + "read-pkg-up": "^8.0.0", + "redent": "^4.0.0", + "trim-newlines": "^4.0.2", + "type-fest": "^1.2.2", + "yargs-parser": "^20.2.9" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/svglint/node_modules/quick-lru": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/read-pkg": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-6.0.0.tgz", + "integrity": "sha512-X1Fu3dPuk/8ZLsMhEj5f4wFAF0DWoK7qhGJvgaijocXxBmSToKfbFtqbxMO7bVjNA1dmE5huAzjXj/ey86iw9Q==", + "dev": true, + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^3.0.2", + "parse-json": "^5.2.0", + "type-fest": "^1.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/read-pkg-up": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-8.0.0.tgz", + "integrity": "sha512-snVCqPczksT0HS2EC+SxUndvSzn6LRCwpfSvLrIfR5BKDQQZMaI6jPRC9dYvYFDRAuFEAnkwww8kBBNE/3VvzQ==", + "dev": true, + "dependencies": { + "find-up": "^5.0.0", + "read-pkg": "^6.0.0", + "type-fest": "^1.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/redent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-4.0.0.tgz", + "integrity": "sha512-tYkDkVVtYkSVhuQ4zBgfvciymHaeuel+zFKXShfDnFP5SyVEP7qo70Rf1jTOTCx3vGNAbnEi/xFkcfQVMIBWag==", + "dev": true, + "dependencies": { + "indent-string": "^5.0.0", + "strip-indent": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/restore-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", + "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", + "dev": true, + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/slice-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/svglint/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/strip-ansi": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", + "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/svglint/node_modules/strip-ansi/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/svglint/node_modules/strip-indent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-4.0.0.tgz", + "integrity": "sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA==", + "dev": true, + "dependencies": { + "min-indent": "^1.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/trim-newlines": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-4.0.2.tgz", + "integrity": "sha512-GJtWyq9InR/2HRiLZgpIKv+ufIKrVrvjQWEj7PxAXNc5dwbNJkqhAUoAGgzRmULAnoOM5EIpveYd3J2VeSAIew==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/type-fest": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", + "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/svglint/node_modules/wrap-ansi": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.0.1.tgz", + "integrity": "sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/svglint/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/svgo": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz", diff --git a/package.json b/package.json index e6482560..259ce0b3 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "build": "nx build", "test": "nx test", "lint:all": "nx workspace-lint && nx run-many --target=lint --all", + "lint:svg": "svglint ./libs/icons/src/lib/svg/*.svg --ci", "affected:lint": "nx affected:lint --fix --parallel --uncommitted", "workspace-lint": "nx workspace-lint --uncommitted", "storybook:compodoc": "npx compodoc -p ./tsconfig.compodoc.json -e json -d ./libs/storybook/.storybook --disableLifeCycleHooks --disableInternal", @@ -98,6 +99,7 @@ "react": "17.0.2", "react-dom": "17.0.2", "storybook-addon-pseudo-states": "^1.15.1", + "svglint": "^2.2.0", "ts-jest": "27.1.5", "ts-node": "10.9.1", "typescript": "~4.7.2",