From 90ebaf974e354c51074cb981c4407fc98091dbdf Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Mon, 24 Jan 2022 09:23:11 -0800 Subject: [PATCH 01/10] Upgrade @typescript-eslint to latest - to get https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/consistent-type-exports.md --- package.json | 4 +- yarn.lock | 208 +++++++++++++++++++++++++++++++++++---------------- 2 files changed, 147 insertions(+), 65 deletions(-) diff --git a/package.json b/package.json index 280aea97a90..82ff1dc6d38 100644 --- a/package.json +++ b/package.json @@ -132,8 +132,8 @@ "@types/tabbable": "^3.1.0", "@types/url-parse": "^1.4.3", "@types/uuid": "^8.3.0", - "@typescript-eslint/eslint-plugin": "^4.8.1", - "@typescript-eslint/parser": "^4.8.1", + "@typescript-eslint/eslint-plugin": "^5.10.0", + "@typescript-eslint/parser": "^5.10.0", "argparse": "^2.0.1", "autoprefixer": "^9.8.6", "axe-core": "^4.1.1", diff --git a/yarn.lock b/yarn.lock index 786f4eb3437..dd3b651c96b 100755 --- a/yarn.lock +++ b/yarn.lock @@ -3088,7 +3088,7 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.6.tgz#f4c7ec43e81b319a9815115031709f26987891f0" integrity sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw== -"@types/json-schema@^7.0.8": +"@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.9" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== @@ -3362,30 +3362,20 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^4.8.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.8.1.tgz#b362abe0ee478a6c6d06c14552a6497f0b480769" - integrity sha512-d7LeQ7dbUrIv5YVFNzGgaW3IQKMmnmKFneRWagRlGYOSfLJVaRbj/FrBNOBC1a3tVO+TgNq1GbHvRtg1kwL0FQ== +"@typescript-eslint/eslint-plugin@^5.10.0": + version "5.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.10.0.tgz#e90afea96dff8620892ad216b0e4ccdf8ee32d3a" + integrity sha512-XXVKnMsq2fuu9K2KsIxPUGqb6xAImz8MEChClbXmE3VbveFtBUU5bzM6IPVWqzyADIgdkS2Ws/6Xo7W2TeZWjQ== dependencies: - "@typescript-eslint/experimental-utils" "4.8.1" - "@typescript-eslint/scope-manager" "4.8.1" - debug "^4.1.1" + "@typescript-eslint/scope-manager" "5.10.0" + "@typescript-eslint/type-utils" "5.10.0" + "@typescript-eslint/utils" "5.10.0" + debug "^4.3.2" functional-red-black-tree "^1.0.1" - regexpp "^3.0.0" - semver "^7.3.2" - tsutils "^3.17.1" - -"@typescript-eslint/experimental-utils@4.8.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.8.1.tgz#27275c20fa4336df99ebcf6195f7d7aa7aa9f22d" - integrity sha512-WigyLn144R3+lGATXW4nNcDJ9JlTkG8YdBWHkDlN0lC3gUGtDi7Pe3h5GPvFKMcRz8KbZpm9FJV9NTW8CpRHpg== - dependencies: - "@types/json-schema" "^7.0.3" - "@typescript-eslint/scope-manager" "4.8.1" - "@typescript-eslint/types" "4.8.1" - "@typescript-eslint/typescript-estree" "4.8.1" - eslint-scope "^5.0.0" - eslint-utils "^2.0.0" + ignore "^5.1.8" + regexpp "^3.2.0" + semver "^7.3.5" + tsutils "^3.21.0" "@typescript-eslint/experimental-utils@^4.0.1": version "4.4.0" @@ -3399,15 +3389,15 @@ eslint-scope "^5.0.0" eslint-utils "^2.0.0" -"@typescript-eslint/parser@^4.8.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.8.1.tgz#4fe2fbdbb67485bafc4320b3ae91e34efe1219d1" - integrity sha512-QND8XSVetATHK9y2Ltc/XBl5Ro7Y62YuZKnPEwnNPB8E379fDsvzJ1dMJ46fg/VOmk0hXhatc+GXs5MaXuL5Uw== +"@typescript-eslint/parser@^5.10.0": + version "5.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.10.0.tgz#8f59e036f5f1cffc178cacbd5ccdd02aeb96c91c" + integrity sha512-pJB2CCeHWtwOAeIxv8CHVGJhI5FNyJAIpx5Pt72YkK3QfEzt6qAlXZuyaBmyfOdM62qU0rbxJzNToPTVeJGrQw== dependencies: - "@typescript-eslint/scope-manager" "4.8.1" - "@typescript-eslint/types" "4.8.1" - "@typescript-eslint/typescript-estree" "4.8.1" - debug "^4.1.1" + "@typescript-eslint/scope-manager" "5.10.0" + "@typescript-eslint/types" "5.10.0" + "@typescript-eslint/typescript-estree" "5.10.0" + debug "^4.3.2" "@typescript-eslint/scope-manager@4.4.0": version "4.4.0" @@ -3417,23 +3407,32 @@ "@typescript-eslint/types" "4.4.0" "@typescript-eslint/visitor-keys" "4.4.0" -"@typescript-eslint/scope-manager@4.8.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.8.1.tgz#e343c475f8f1d15801b546cb17d7f309b768fdce" - integrity sha512-r0iUOc41KFFbZdPAdCS4K1mXivnSZqXS5D9oW+iykQsRlTbQRfuFRSW20xKDdYiaCoH+SkSLeIF484g3kWzwOQ== +"@typescript-eslint/scope-manager@5.10.0": + version "5.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.10.0.tgz#bb5d872e8b9e36203908595507fbc4d3105329cb" + integrity sha512-tgNgUgb4MhqK6DoKn3RBhyZ9aJga7EQrw+2/OiDk5hKf3pTVZWyqBi7ukP+Z0iEEDMF5FDa64LqODzlfE4O/Dg== dependencies: - "@typescript-eslint/types" "4.8.1" - "@typescript-eslint/visitor-keys" "4.8.1" + "@typescript-eslint/types" "5.10.0" + "@typescript-eslint/visitor-keys" "5.10.0" + +"@typescript-eslint/type-utils@5.10.0": + version "5.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.10.0.tgz#8524b9479c19c478347a7df216827e749e4a51e5" + integrity sha512-TzlyTmufJO5V886N+hTJBGIfnjQDQ32rJYxPaeiyWKdjsv2Ld5l8cbS7pxim4DeNs62fKzRSt8Q14Evs4JnZyQ== + dependencies: + "@typescript-eslint/utils" "5.10.0" + debug "^4.3.2" + tsutils "^3.21.0" "@typescript-eslint/types@4.4.0": version "4.4.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.4.0.tgz#63440ef87a54da7399a13bdd4b82060776e9e621" integrity sha512-nU0VUpzanFw3jjX+50OTQy6MehVvf8pkqFcURPAE06xFNFenMj1GPEI6IESvp7UOHAnq+n/brMirZdR+7rCrlA== -"@typescript-eslint/types@4.8.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.8.1.tgz#23829c73c5fc6f4fcd5346a7780b274f72fee222" - integrity sha512-ave2a18x2Y25q5K05K/U3JQIe2Av4+TNi/2YuzyaXLAsDx6UZkz1boZ7nR/N6Wwae2PpudTZmHFXqu7faXfHmA== +"@typescript-eslint/types@5.10.0": + version "5.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.10.0.tgz#beb3cb345076f5b088afe996d57bcd1dfddaa75c" + integrity sha512-wUljCgkqHsMZbw60IbOqT/puLfyqqD5PquGiBo1u1IS3PLxdi3RDGlyf032IJyh+eQoGhz9kzhtZa+VC4eWTlQ== "@typescript-eslint/typescript-estree@1.11.0": version "1.11.0" @@ -3457,19 +3456,30 @@ semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/typescript-estree@4.8.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.8.1.tgz#7307e3f2c9e95df7daa8dc0a34b8c43b7ec0dd32" - integrity sha512-bJ6Fn/6tW2g7WIkCWh3QRlaSU7CdUUK52shx36/J7T5oTQzANvi6raoTsbwGM11+7eBbeem8hCCKbyvAc0X3sQ== +"@typescript-eslint/typescript-estree@5.10.0": + version "5.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.10.0.tgz#4be24a3dea0f930bb1397c46187d0efdd955a224" + integrity sha512-x+7e5IqfwLwsxTdliHRtlIYkgdtYXzE0CkFeV6ytAqq431ZyxCFzNMNR5sr3WOlIG/ihVZr9K/y71VHTF/DUQA== dependencies: - "@typescript-eslint/types" "4.8.1" - "@typescript-eslint/visitor-keys" "4.8.1" - debug "^4.1.1" - globby "^11.0.1" - is-glob "^4.0.1" - lodash "^4.17.15" - semver "^7.3.2" - tsutils "^3.17.1" + "@typescript-eslint/types" "5.10.0" + "@typescript-eslint/visitor-keys" "5.10.0" + debug "^4.3.2" + globby "^11.0.4" + is-glob "^4.0.3" + semver "^7.3.5" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.10.0": + version "5.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.10.0.tgz#c3d152a85da77c400e37281355561c72fb1b5a65" + integrity sha512-IGYwlt1CVcFoE2ueW4/ioEwybR60RAdGeiJX/iDAw0t5w0wK3S7QncDwpmsM70nKgGTuVchEWB8lwZwHqPAWRg== + dependencies: + "@types/json-schema" "^7.0.9" + "@typescript-eslint/scope-manager" "5.10.0" + "@typescript-eslint/types" "5.10.0" + "@typescript-eslint/typescript-estree" "5.10.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" "@typescript-eslint/visitor-keys@4.4.0": version "4.4.0" @@ -3479,13 +3489,13 @@ "@typescript-eslint/types" "4.4.0" eslint-visitor-keys "^2.0.0" -"@typescript-eslint/visitor-keys@4.8.1": - version "4.8.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.8.1.tgz#794f68ee292d1b2e3aa9690ebedfcb3a8c90e3c3" - integrity sha512-3nrwXFdEYALQh/zW8rFwP4QltqsanCDz4CwWMPiIZmwlk9GlvBeueEIbq05SEq4ganqM0g9nh02xXgv5XI3PeQ== +"@typescript-eslint/visitor-keys@5.10.0": + version "5.10.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.10.0.tgz#770215497ad67cd15a572b52089991d5dfe06281" + integrity sha512-GMxj0K1uyrFLPKASLmZzCuSddmjZVbVj3Ouy5QVuIGKZopxvOr24JsS7gruz6C3GExE01mublZ3mIBOaon9zuQ== dependencies: - "@typescript-eslint/types" "4.8.1" - eslint-visitor-keys "^2.0.0" + "@typescript-eslint/types" "5.10.0" + eslint-visitor-keys "^3.0.0" "@webassemblyjs/ast@1.9.0": version "1.9.0" @@ -7998,6 +8008,13 @@ eslint-utils@^2.1.0: dependencies: eslint-visitor-keys "^1.1.0" +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + dependencies: + eslint-visitor-keys "^2.0.0" + eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" @@ -8013,6 +8030,11 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== +eslint-visitor-keys@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz#6fbb166a6798ee5991358bc2daa1ba76cc1254a1" + integrity sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ== + eslint@^2.7.0: version "2.13.1" resolved "https://registry.yarnpkg.com/eslint/-/eslint-2.13.1.tgz#e4cc8fa0f009fb829aaae23855a29360be1f6c11" @@ -8553,6 +8575,17 @@ fast-glob@^3.1.1: micromatch "^4.0.2" picomatch "^2.2.1" +fast-glob@^3.2.9: + version "3.2.11" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" + integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" @@ -9442,7 +9475,7 @@ glob-parent@^5.0.0, glob-parent@^5.1.0, glob-parent@~5.1.0: dependencies: is-glob "^4.0.1" -glob-parent@~5.1.2: +glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -9639,6 +9672,18 @@ globby@^11.0.0, globby@^11.0.1: merge2 "^1.3.0" slash "^3.0.0" +globby@^11.0.4: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + globby@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" @@ -10492,6 +10537,11 @@ ignore@^5.1.4: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== +ignore@^5.1.8, ignore@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" + integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== + image-size@^0.6.2: version "0.6.3" resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.6.3.tgz#e7e5c65bb534bd7cdcedd6cb5166272a85f75fb2" @@ -11105,6 +11155,13 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" +is-glob@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + is-hexadecimal@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz#cc35c97588da4bd49a8eedd6bc4082d44dcb23a7" @@ -13060,7 +13117,7 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -merge2@^1.2.3, merge2@^1.3.0: +merge2@^1.2.3, merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== @@ -13121,6 +13178,14 @@ micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.0.5" +micromatch@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" + integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== + dependencies: + braces "^3.0.1" + picomatch "^2.2.3" + miller-rabin@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" @@ -14847,6 +14912,11 @@ picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== +picomatch@^2.2.3: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + pify@^2.0.0, pify@^2.2.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -16470,11 +16540,16 @@ regexp.prototype.flags@^1.3.0: define-properties "^1.1.3" es-abstract "^1.17.0-next.1" -regexpp@^3.0.0, regexpp@^3.1.0: +regexpp@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" integrity sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q== +regexpp@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + regexpu-core@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.7.0.tgz#fcbf458c50431b0bb7b45d6967b8192d91f3d938" @@ -17367,7 +17442,7 @@ semver@^7.1.3, semver@^7.2.1, semver@^7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -semver@^7.3.4: +semver@^7.3.4, semver@^7.3.5: version "7.3.5" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== @@ -19080,6 +19155,13 @@ tsutils@^3.17.1: dependencies: tslib "^1.8.1" +tsutils@^3.21.0: + version "3.21.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== + dependencies: + tslib "^1.8.1" + tty-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" From a7b6964251b02587bad2a0f9c125d491b95dd6f2 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Mon, 24 Jan 2022 09:25:26 -0800 Subject: [PATCH 02/10] Add consistent-type-exports rule + add parserOptions.project required by new rule + add .eslintrc.js files to .eslintignore, to stop vscode errors about the new project key (see https://github.com/typescript-eslint/typescript-eslint/issues/1723) --- .eslintignore | 1 + .eslintrc.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/.eslintignore b/.eslintignore index b170f1f9f2b..993c134d8e4 100644 --- a/.eslintignore +++ b/.eslintignore @@ -12,3 +12,4 @@ scripts generator-eui cypress react-datepicker +.eslintrc.js diff --git a/.eslintrc.js b/.eslintrc.js index 5acc6b7ebc4..04f93eae965 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -11,6 +11,7 @@ const SSPL_ELASTIC_2_0_LICENSE_HEADER = ` module.exports = { parser: '@typescript-eslint/parser', parserOptions: { + project: ['./tsconfig.json', './tsconfig-cypress.json'], ecmaFeatures: { jsx: true, }, @@ -110,6 +111,10 @@ module.exports = { 'ts-expect-error': 'allow-with-description', }, ], + '@typescript-eslint/consistent-type-exports': [ + 'error', + { fixMixedExportsWithInlineTypeSpecifier: false }, + ], }, env: { jest: true, From bce2ed968abc11376a56dd16d18a36e3c1610d7d Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Mon, 24 Jan 2022 09:43:16 -0800 Subject: [PATCH 03/10] Run yarn lint-es-fix --- src/components/accessibility/index.ts | 3 +- src/components/accordion/index.ts | 3 +- src/components/aspect_ratio/index.ts | 3 +- src/components/auto_sizer/index.ts | 3 +- src/components/avatar/index.ts | 3 +- src/components/badge/badge_group/index.ts | 3 +- src/components/badge/beta_badge/index.ts | 3 +- src/components/badge/index.ts | 9 ++- .../badge/notification_badge/index.ts | 6 +- src/components/basic_table/index.ts | 17 +++--- src/components/beacon/index.ts | 3 +- src/components/bottom_bar/index.ts | 3 +- src/components/breadcrumbs/index.ts | 4 +- src/components/button/button_empty/index.ts | 5 +- src/components/button/button_group/index.ts | 4 +- src/components/button/button_icon/index.ts | 4 +- src/components/button/index.ts | 21 +++---- src/components/call_out/index.ts | 3 +- src/components/card/checkable_card/index.ts | 3 +- src/components/card/index.ts | 6 +- src/components/code/index.ts | 6 +- .../collapsible_nav_group/index.ts | 6 +- src/components/collapsible_nav/index.ts | 9 ++- .../color_palette_display/index.ts | 18 ++---- .../color_palette_picker/index.ts | 4 +- .../color_picker/color_stops/index.ts | 2 +- src/components/color_picker/index.ts | 27 +++++---- .../combo_box/combo_box_input/index.ts | 6 +- .../combo_box/combo_box_options_list/index.ts | 9 ++- src/components/combo_box/index.ts | 5 +- src/components/comment_list/index.ts | 9 ++- src/components/context/index.ts | 3 +- src/components/context_menu/index.ts | 14 ++--- src/components/control_bar/index.ts | 3 +- src/components/copy/index.ts | 3 +- .../date_picker/auto_refresh/index.ts | 11 ++-- src/components/date_picker/index.ts | 11 ++-- .../super_date_picker/date_popover/index.ts | 18 +++--- .../date_picker/super_date_picker/index.ts | 10 ++-- .../quick_select_popover/index.ts | 18 +++--- src/components/delay_hide/index.ts | 3 +- src/components/delay_render/index.ts | 3 +- src/components/description_list/index.ts | 6 +- src/components/drag_and_drop/index.ts | 14 ++--- src/components/empty_prompt/index.ts | 3 +- src/components/error_boundary/index.ts | 3 +- src/components/expression/index.ts | 3 +- src/components/facet/index.ts | 6 +- src/components/filter_group/index.ts | 10 ++-- src/components/flex/index.ts | 13 ++--- src/components/flyout/index.ts | 12 ++-- src/components/focus_trap/index.ts | 3 +- src/components/form/checkbox/index.ts | 7 ++- .../form/described_form_group/index.ts | 6 +- src/components/form/field_number/index.ts | 3 +- src/components/form/field_password/index.ts | 3 +- src/components/form/field_search/index.ts | 3 +- src/components/form/field_text/index.ts | 3 +- src/components/form/file_picker/index.ts | 3 +- .../form/form_control_layout/index.ts | 12 ++-- src/components/form/form_error_text/index.ts | 3 +- src/components/form/form_fieldset/index.ts | 6 +- src/components/form/form_help_text/index.ts | 3 +- src/components/form/form_label/index.ts | 3 +- src/components/form/form_row/index.ts | 3 +- src/components/form/radio/index.ts | 10 ++-- src/components/form/range/index.ts | 6 +- src/components/form/select/index.ts | 3 +- src/components/form/super_select/index.ts | 7 ++- src/components/form/switch/index.ts | 3 +- src/components/form/text_area/index.ts | 3 +- .../form/validatable_control/index.ts | 6 +- src/components/header/header_alert/index.ts | 3 +- src/components/header/header_links/index.ts | 6 +- src/components/header/header_section/index.ts | 15 ++--- src/components/header/index.ts | 19 +++---- src/components/health/index.ts | 3 +- src/components/highlight/index.ts | 3 +- src/components/horizontal_rule/index.ts | 3 +- src/components/i18n/index.ts | 6 +- src/components/icon/index.ts | 5 +- src/components/image/index.ts | 3 +- src/components/inner_text/index.ts | 3 +- src/components/key_pad_menu/index.ts | 6 +- src/components/link/index.ts | 4 +- src/components/list_group/index.ts | 10 ++-- .../list_group/pinnable_list_group/index.ts | 4 +- src/components/loading/index.ts | 15 +++-- src/components/markdown_editor/index.ts | 8 ++- src/components/modal/index.ts | 20 ++++--- .../observer/mutation_observer/index.ts | 7 +-- .../observer/resize_observer/index.ts | 7 +-- .../outside_click_detector/index.ts | 6 +- src/components/overlay_mask/index.ts | 3 +- src/components/page/index.ts | 30 ++++++---- src/components/page/page_body/index.ts | 3 +- src/components/page/page_content/index.ts | 21 +++---- src/components/page/page_header/index.ts | 15 ++--- src/components/page/page_side_bar/index.ts | 3 +- src/components/pagination/index.ts | 9 ++- src/components/panel/index.ts | 3 +- src/components/panel/split_panel/index.ts | 4 +- src/components/popover/index.ts | 18 +++--- src/components/portal/index.ts | 3 +- src/components/progress/index.ts | 3 +- src/components/provider/index.ts | 3 +- src/components/resizable_container/index.ts | 6 +- src/components/responsive/index.ts | 6 +- src/components/search_bar/filters/index.ts | 5 +- src/components/search_bar/index.ts | 10 ++-- src/components/search_bar/search_filters.tsx | 2 +- src/components/selectable/index.ts | 29 +++++----- .../selectable/selectable_list/index.ts | 10 ++-- .../selectable/selectable_message/index.ts | 6 +- .../selectable/selectable_search/index.ts | 6 +- .../selectable/selectable_templates/index.ts | 10 ++-- src/components/side_nav/index.ts | 3 +- src/components/spacer/index.ts | 3 +- src/components/stat/index.ts | 3 +- src/components/steps/index.ts | 22 ++++--- src/components/suggest/index.ts | 9 ++- src/components/table/index.ts | 57 ++++++++----------- src/components/table/mobile/index.tsx | 12 ++-- .../table/table_pagination/index.ts | 6 +- src/components/tabs/index.ts | 10 ++-- src/components/tabs/tabbed_content/index.ts | 4 +- src/components/text/index.ts | 9 ++- src/components/text_diff/index.ts | 3 +- src/components/title/index.ts | 3 +- src/components/toast/index.ts | 10 ++-- src/components/token/index.ts | 2 +- src/components/tool_tip/index.ts | 6 +- src/components/tour/index.ts | 15 ++--- src/components/tree_view/index.ts | 3 +- src/services/color/index.ts | 2 +- src/services/color_picker/index.ts | 7 +-- src/services/index.ts | 22 +++---- src/services/popover/index.ts | 2 +- src/services/sort/index.ts | 6 +- src/services/theme/index.ts | 15 ++--- src/themes/index.ts | 3 +- 141 files changed, 541 insertions(+), 536 deletions(-) diff --git a/src/components/accessibility/index.ts b/src/components/accessibility/index.ts index 2807d54183f..ae112fda451 100644 --- a/src/components/accessibility/index.ts +++ b/src/components/accessibility/index.ts @@ -7,4 +7,5 @@ */ export { EuiScreenReaderOnly } from './screen_reader'; -export { EuiSkipLink, EuiSkipLinkProps } from './skip_link'; +export type { EuiSkipLinkProps } from './skip_link'; +export { EuiSkipLink } from './skip_link'; diff --git a/src/components/accordion/index.ts b/src/components/accordion/index.ts index 7a03b13f065..9d67a896fa9 100644 --- a/src/components/accordion/index.ts +++ b/src/components/accordion/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiAccordion, EuiAccordionProps } from './accordion'; +export type { EuiAccordionProps } from './accordion'; +export { EuiAccordion } from './accordion'; diff --git a/src/components/aspect_ratio/index.ts b/src/components/aspect_ratio/index.ts index 1db3d083dfe..84f541b5615 100644 --- a/src/components/aspect_ratio/index.ts +++ b/src/components/aspect_ratio/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiAspectRatio, EuiAspectRatioProps } from './aspect_ratio'; +export type { EuiAspectRatioProps } from './aspect_ratio'; +export { EuiAspectRatio } from './aspect_ratio'; diff --git a/src/components/auto_sizer/index.ts b/src/components/auto_sizer/index.ts index 60d0bc66cac..5bef4e49e35 100644 --- a/src/components/auto_sizer/index.ts +++ b/src/components/auto_sizer/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiAutoSizer, EuiAutoSizerProps } from './auto_sizer'; +export type { EuiAutoSizerProps } from './auto_sizer'; +export { EuiAutoSizer } from './auto_sizer'; diff --git a/src/components/avatar/index.ts b/src/components/avatar/index.ts index d8d4bac4a3b..304c29912fe 100644 --- a/src/components/avatar/index.ts +++ b/src/components/avatar/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiAvatar, EuiAvatarProps, checkValidColor } from './avatar'; +export type { EuiAvatarProps } from './avatar'; +export { EuiAvatar, checkValidColor } from './avatar'; diff --git a/src/components/badge/badge_group/index.ts b/src/components/badge/badge_group/index.ts index 9cdfb9b1223..a7ece9927d2 100644 --- a/src/components/badge/badge_group/index.ts +++ b/src/components/badge/badge_group/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiBadgeGroup, EuiBadgeGroupProps } from './badge_group'; +export type { EuiBadgeGroupProps } from './badge_group'; +export { EuiBadgeGroup } from './badge_group'; diff --git a/src/components/badge/beta_badge/index.ts b/src/components/badge/beta_badge/index.ts index 1a4555c1db7..de5f304b793 100644 --- a/src/components/badge/beta_badge/index.ts +++ b/src/components/badge/beta_badge/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiBetaBadge, EuiBetaBadgeProps } from './beta_badge'; +export type { EuiBetaBadgeProps } from './beta_badge'; +export { EuiBetaBadge } from './beta_badge'; diff --git a/src/components/badge/index.ts b/src/components/badge/index.ts index 5b9e2300671..cf032002aa2 100644 --- a/src/components/badge/index.ts +++ b/src/components/badge/index.ts @@ -6,10 +6,13 @@ * Side Public License, v 1. */ -export { EuiBadge, EuiBadgeProps } from './badge'; +export type { EuiBadgeProps } from './badge'; +export { EuiBadge } from './badge'; -export { EuiBetaBadge, EuiBetaBadgeProps } from './beta_badge'; +export type { EuiBetaBadgeProps } from './beta_badge'; +export { EuiBetaBadge } from './beta_badge'; export { EuiNotificationBadge } from './notification_badge'; -export { EuiBadgeGroup, EuiBadgeGroupProps } from './badge_group'; +export type { EuiBadgeGroupProps } from './badge_group'; +export { EuiBadgeGroup } from './badge_group'; diff --git a/src/components/badge/notification_badge/index.ts b/src/components/badge/notification_badge/index.ts index eddfe2a89dc..09c6bc3b81d 100644 --- a/src/components/badge/notification_badge/index.ts +++ b/src/components/badge/notification_badge/index.ts @@ -6,7 +6,5 @@ * Side Public License, v 1. */ -export { - EuiNotificationBadge, - EuiNotificationBadgeProps, -} from './badge_notification'; +export type { EuiNotificationBadgeProps } from './badge_notification'; +export { EuiNotificationBadge } from './badge_notification'; diff --git a/src/components/basic_table/index.ts b/src/components/basic_table/index.ts index 1c65e2d89eb..4bf94ae0f56 100644 --- a/src/components/basic_table/index.ts +++ b/src/components/basic_table/index.ts @@ -6,19 +6,16 @@ * Side Public License, v 1. */ -export { - EuiBasicTable, +export type { EuiBasicTableProps, EuiBasicTableColumn, Criteria, CriteriaWithPagination, } from './basic_table'; -export { - EuiInMemoryTable, - EuiInMemoryTableProps, - Search, -} from './in_memory_table'; -export { +export { EuiBasicTable } from './basic_table'; +export type { EuiInMemoryTableProps, Search } from './in_memory_table'; +export { EuiInMemoryTable } from './in_memory_table'; +export type { EuiTableDataType, EuiTableFooterProps, EuiTableFieldDataColumnType, @@ -27,5 +24,5 @@ export { EuiTableSelectionType, EuiTableSortingType, } from './table_types'; -export { Pagination } from './pagination_bar'; -export { DefaultItemAction, CustomItemAction } from './action_types'; +export type { Pagination } from './pagination_bar'; +export type { DefaultItemAction, CustomItemAction } from './action_types'; diff --git a/src/components/beacon/index.ts b/src/components/beacon/index.ts index 8668220a8a6..fe1a2423309 100644 --- a/src/components/beacon/index.ts +++ b/src/components/beacon/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiBeacon, EuiBeaconProps } from './beacon'; +export type { EuiBeaconProps } from './beacon'; +export { EuiBeacon } from './beacon'; diff --git a/src/components/bottom_bar/index.ts b/src/components/bottom_bar/index.ts index ec6203b92f1..fedcd49e587 100644 --- a/src/components/bottom_bar/index.ts +++ b/src/components/bottom_bar/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiBottomBar, EuiBottomBarProps } from './bottom_bar'; +export type { EuiBottomBarProps } from './bottom_bar'; +export { EuiBottomBar } from './bottom_bar'; diff --git a/src/components/breadcrumbs/index.ts b/src/components/breadcrumbs/index.ts index 86892419034..5d406077034 100644 --- a/src/components/breadcrumbs/index.ts +++ b/src/components/breadcrumbs/index.ts @@ -6,9 +6,9 @@ * Side Public License, v 1. */ -export { +export type { EuiBreadcrumb, - EuiBreadcrumbs, EuiBreadcrumbsProps, EuiBreadcrumbResponsiveMaxCount, } from './breadcrumbs'; +export { EuiBreadcrumbs } from './breadcrumbs'; diff --git a/src/components/button/button_empty/index.ts b/src/components/button/button_empty/index.ts index 79ac3074945..b7234b671c3 100644 --- a/src/components/button/button_empty/index.ts +++ b/src/components/button/button_empty/index.ts @@ -6,10 +6,9 @@ * Side Public License, v 1. */ -export { - COLORS, - EuiButtonEmpty, +export type { EuiButtonEmptyColor, EuiButtonEmptyProps, EuiButtonEmptySizes, } from './button_empty'; +export { COLORS, EuiButtonEmpty } from './button_empty'; diff --git a/src/components/button/button_group/index.ts b/src/components/button/button_group/index.ts index d711d20c92d..e542bc18095 100644 --- a/src/components/button/button_group/index.ts +++ b/src/components/button/button_group/index.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ -export { - EuiButtonGroup, +export type { EuiButtonGroupOptionProps, EuiButtonGroupProps, } from './button_group'; +export { EuiButtonGroup } from './button_group'; diff --git a/src/components/button/button_icon/index.ts b/src/components/button/button_icon/index.ts index 6c54524adfb..6eaa3f6ff03 100644 --- a/src/components/button/button_icon/index.ts +++ b/src/components/button/button_icon/index.ts @@ -6,10 +6,10 @@ * Side Public License, v 1. */ -export { - EuiButtonIcon, +export type { EuiButtonIconColor, EuiButtonIconProps, EuiButtonIconPropsForButton, EuiButtonIconPropsForAnchor, } from './button_icon'; +export { EuiButtonIcon } from './button_icon'; diff --git a/src/components/button/index.ts b/src/components/button/index.ts index 3c501b1cff4..4cac71c22d3 100644 --- a/src/components/button/index.ts +++ b/src/components/button/index.ts @@ -6,30 +6,25 @@ * Side Public License, v 1. */ -export { - COLORS, - ButtonColor, - ButtonSize, - EuiButton, - EuiButtonProps, -} from './button'; +export type { ButtonColor, ButtonSize, EuiButtonProps } from './button'; +export { COLORS, EuiButton } from './button'; -export { - EuiButtonEmpty, +export type { EuiButtonEmptyColor, EuiButtonEmptyProps, EuiButtonEmptySizes, } from './button_empty'; +export { EuiButtonEmpty } from './button_empty'; -export { - EuiButtonIcon, +export type { EuiButtonIconColor, EuiButtonIconProps, EuiButtonIconPropsForButton, } from './button_icon'; +export { EuiButtonIcon } from './button_icon'; -export { - EuiButtonGroup, +export type { EuiButtonGroupOptionProps, EuiButtonGroupProps, } from './button_group'; +export { EuiButtonGroup } from './button_group'; diff --git a/src/components/call_out/index.ts b/src/components/call_out/index.ts index 21cfc195045..4f3deba793c 100644 --- a/src/components/call_out/index.ts +++ b/src/components/call_out/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiCallOut, EuiCallOutProps } from './call_out'; +export type { EuiCallOutProps } from './call_out'; +export { EuiCallOut } from './call_out'; diff --git a/src/components/card/checkable_card/index.ts b/src/components/card/checkable_card/index.ts index 37783afaf27..ed826352438 100644 --- a/src/components/card/checkable_card/index.ts +++ b/src/components/card/checkable_card/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiCheckableCard, EuiCheckableCardProps } from './checkable_card'; +export type { EuiCheckableCardProps } from './checkable_card'; +export { EuiCheckableCard } from './checkable_card'; diff --git a/src/components/card/index.ts b/src/components/card/index.ts index 2380637132d..7af5c7b4f2f 100644 --- a/src/components/card/index.ts +++ b/src/components/card/index.ts @@ -6,5 +6,7 @@ * Side Public License, v 1. */ -export { EuiCard, EuiCardProps } from './card'; -export { EuiCheckableCard, EuiCheckableCardProps } from './checkable_card'; +export type { EuiCardProps } from './card'; +export { EuiCard } from './card'; +export type { EuiCheckableCardProps } from './checkable_card'; +export { EuiCheckableCard } from './checkable_card'; diff --git a/src/components/code/index.ts b/src/components/code/index.ts index a5ab4442b36..65d3ced595e 100644 --- a/src/components/code/index.ts +++ b/src/components/code/index.ts @@ -6,5 +6,7 @@ * Side Public License, v 1. */ -export { EuiCode, EuiCodeProps } from './code'; -export { EuiCodeBlock, EuiCodeBlockProps } from './code_block'; +export type { EuiCodeProps } from './code'; +export { EuiCode } from './code'; +export type { EuiCodeBlockProps } from './code_block'; +export { EuiCodeBlock } from './code_block'; diff --git a/src/components/collapsible_nav/collapsible_nav_group/index.ts b/src/components/collapsible_nav/collapsible_nav_group/index.ts index ff803e2d00f..b36a021b153 100644 --- a/src/components/collapsible_nav/collapsible_nav_group/index.ts +++ b/src/components/collapsible_nav/collapsible_nav_group/index.ts @@ -6,7 +6,5 @@ * Side Public License, v 1. */ -export { - EuiCollapsibleNavGroup, - EuiCollapsibleNavGroupProps, -} from './collapsible_nav_group'; +export type { EuiCollapsibleNavGroupProps } from './collapsible_nav_group'; +export { EuiCollapsibleNavGroup } from './collapsible_nav_group'; diff --git a/src/components/collapsible_nav/index.ts b/src/components/collapsible_nav/index.ts index 045a7fb9bc7..8d9c0794c68 100644 --- a/src/components/collapsible_nav/index.ts +++ b/src/components/collapsible_nav/index.ts @@ -6,9 +6,8 @@ * Side Public License, v 1. */ -export { - EuiCollapsibleNavGroup, - EuiCollapsibleNavGroupProps, -} from './collapsible_nav_group'; +export type { EuiCollapsibleNavGroupProps } from './collapsible_nav_group'; +export { EuiCollapsibleNavGroup } from './collapsible_nav_group'; -export { EuiCollapsibleNav, EuiCollapsibleNavProps } from './collapsible_nav'; +export type { EuiCollapsibleNavProps } from './collapsible_nav'; +export { EuiCollapsibleNav } from './collapsible_nav'; diff --git a/src/components/color_picker/color_palette_display/index.ts b/src/components/color_picker/color_palette_display/index.ts index 94507690a5a..df67459e60a 100644 --- a/src/components/color_picker/color_palette_display/index.ts +++ b/src/components/color_picker/color_palette_display/index.ts @@ -6,17 +6,11 @@ * Side Public License, v 1. */ -export { - EuiColorPaletteDisplay, - EuiColorPaletteDisplayProps, -} from './color_palette_display'; +export type { EuiColorPaletteDisplayProps } from './color_palette_display'; +export { EuiColorPaletteDisplay } from './color_palette_display'; -export { - EuiColorPaletteDisplayFixed, - EuiColorPaletteDisplayFixedProps, -} from './color_palette_display_fixed'; +export type { EuiColorPaletteDisplayFixedProps } from './color_palette_display_fixed'; +export { EuiColorPaletteDisplayFixed } from './color_palette_display_fixed'; -export { - EuiColorPaletteDisplayGradient, - EuiColorPaletteDisplayGradientProps, -} from './color_palette_display_gradient'; +export type { EuiColorPaletteDisplayGradientProps } from './color_palette_display_gradient'; +export { EuiColorPaletteDisplayGradient } from './color_palette_display_gradient'; diff --git a/src/components/color_picker/color_palette_picker/index.ts b/src/components/color_picker/color_palette_picker/index.ts index 0e8dc537159..fecb35370af 100644 --- a/src/components/color_picker/color_palette_picker/index.ts +++ b/src/components/color_picker/color_palette_picker/index.ts @@ -6,11 +6,11 @@ * Side Public License, v 1. */ -export { - EuiColorPalettePicker, +export type { EuiColorPalettePickerProps, EuiColorPalettePickerPaletteTextProps, EuiColorPalettePickerPaletteFixedProps, EuiColorPalettePickerPaletteGradientProps, EuiColorPalettePickerPaletteProps, } from './color_palette_picker'; +export { EuiColorPalettePicker } from './color_palette_picker'; diff --git a/src/components/color_picker/color_stops/index.ts b/src/components/color_picker/color_stops/index.ts index 2123496b15a..66e84e193f0 100644 --- a/src/components/color_picker/color_stops/index.ts +++ b/src/components/color_picker/color_stops/index.ts @@ -7,4 +7,4 @@ */ export { EuiColorStops } from './color_stops'; -export { ColorStop } from './color_stop_thumb'; +export type { ColorStop } from './color_stop_thumb'; diff --git a/src/components/color_picker/index.ts b/src/components/color_picker/index.ts index 78139a8b471..633320d6938 100644 --- a/src/components/color_picker/index.ts +++ b/src/components/color_picker/index.ts @@ -6,25 +6,24 @@ * Side Public License, v 1. */ -export { EuiColorPicker, EuiColorPickerProps } from './color_picker'; -export { - EuiColorPickerSwatch, - EuiColorPickerSwatchProps, -} from './color_picker_swatch'; -export { EuiHue, EuiHueProps } from './hue'; -export { EuiSaturation, EuiSaturationProps } from './saturation'; +export type { EuiColorPickerProps } from './color_picker'; +export { EuiColorPicker } from './color_picker'; +export type { EuiColorPickerSwatchProps } from './color_picker_swatch'; +export { EuiColorPickerSwatch } from './color_picker_swatch'; +export type { EuiHueProps } from './hue'; +export { EuiHue } from './hue'; +export type { EuiSaturationProps } from './saturation'; +export { EuiSaturation } from './saturation'; export { EuiColorStops } from './color_stops'; // TODO: Exporting `EuiColorStopsProps` from `'./color_stops'` // results in a duplicate d.ts entry that causes build warnings // and potential downstream TS project failures. -export { EuiColorStopsProps } from './color_stops/color_stops'; -export { - EuiColorPalettePicker, +export type { EuiColorStopsProps } from './color_stops/color_stops'; +export type { EuiColorPalettePickerProps, EuiColorPalettePickerPaletteProps, } from './color_palette_picker'; +export { EuiColorPalettePicker } from './color_palette_picker'; -export { - EuiColorPaletteDisplay, - EuiColorPaletteDisplayProps, -} from './color_palette_display'; +export type { EuiColorPaletteDisplayProps } from './color_palette_display'; +export { EuiColorPaletteDisplay } from './color_palette_display'; diff --git a/src/components/combo_box/combo_box_input/index.ts b/src/components/combo_box/combo_box_input/index.ts index 8c46dd6438e..6a1ac26e3b1 100644 --- a/src/components/combo_box/combo_box_input/index.ts +++ b/src/components/combo_box/combo_box_input/index.ts @@ -6,5 +6,7 @@ * Side Public License, v 1. */ -export { EuiComboBoxInput, EuiComboBoxInputProps } from './combo_box_input'; -export { EuiComboBoxPill, EuiComboBoxPillProps } from './combo_box_pill'; +export type { EuiComboBoxInputProps } from './combo_box_input'; +export { EuiComboBoxInput } from './combo_box_input'; +export type { EuiComboBoxPillProps } from './combo_box_pill'; +export { EuiComboBoxPill } from './combo_box_pill'; diff --git a/src/components/combo_box/combo_box_options_list/index.ts b/src/components/combo_box/combo_box_options_list/index.ts index a1e0c4b6e7a..3ed44a970fd 100644 --- a/src/components/combo_box/combo_box_options_list/index.ts +++ b/src/components/combo_box/combo_box_options_list/index.ts @@ -6,9 +6,8 @@ * Side Public License, v 1. */ -export { - EuiComboBoxOptionsList, - EuiComboBoxOptionsListProps, -} from './combo_box_options_list'; -export { EuiComboBoxOption, EuiComboBoxOptionProps } from './combo_box_option'; +export type { EuiComboBoxOptionsListProps } from './combo_box_options_list'; +export { EuiComboBoxOptionsList } from './combo_box_options_list'; +export type { EuiComboBoxOptionProps } from './combo_box_option'; +export { EuiComboBoxOption } from './combo_box_option'; export { EuiComboBoxTitle } from './combo_box_title'; diff --git a/src/components/combo_box/index.ts b/src/components/combo_box/index.ts index 9c1d0876071..e80488c60ac 100644 --- a/src/components/combo_box/index.ts +++ b/src/components/combo_box/index.ts @@ -6,10 +6,11 @@ * Side Public License, v 1. */ -export { EuiComboBox, EuiComboBoxProps } from './combo_box'; +export type { EuiComboBoxProps } from './combo_box'; +export { EuiComboBox } from './combo_box'; export * from './combo_box_input'; export * from './combo_box_options_list'; -export { +export type { EuiComboBoxOptionOption, EuiComboBoxOptionsListPosition, EuiComboBoxSingleSelectionShape, diff --git a/src/components/comment_list/index.ts b/src/components/comment_list/index.ts index 71a9bc7ed28..02fc806d698 100644 --- a/src/components/comment_list/index.ts +++ b/src/components/comment_list/index.ts @@ -6,10 +6,13 @@ * Side Public License, v 1. */ -export { EuiComment, EuiCommentProps } from './comment'; +export type { EuiCommentProps } from './comment'; +export { EuiComment } from './comment'; -export { EuiCommentEvent, EuiCommentType } from './comment_event'; +export type { EuiCommentType } from './comment_event'; +export { EuiCommentEvent } from './comment_event'; export { EuiCommentTimeline } from './comment_timeline'; -export { EuiCommentList, EuiCommentListProps } from './comment_list'; +export type { EuiCommentListProps } from './comment_list'; +export { EuiCommentList } from './comment_list'; diff --git a/src/components/context/index.ts b/src/components/context/index.ts index 2df50f7bbee..5c95533c395 100644 --- a/src/components/context/index.ts +++ b/src/components/context/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiContext, EuiI18nConsumer, EuiContextProps } from './context'; +export type { EuiContextProps } from './context'; +export { EuiContext, EuiI18nConsumer } from './context'; diff --git a/src/components/context_menu/index.ts b/src/components/context_menu/index.ts index 70ef108459a..57c400fb937 100644 --- a/src/components/context_menu/index.ts +++ b/src/components/context_menu/index.ts @@ -6,21 +6,19 @@ * Side Public License, v 1. */ -export { - EuiContextMenu, +export type { EuiContextMenuProps, EuiContextMenuPanelDescriptor, EuiContextMenuPanelItemDescriptor, } from './context_menu'; +export { EuiContextMenu } from './context_menu'; -export { - EuiContextMenuPanel, - EuiContextMenuPanelProps, -} from './context_menu_panel'; +export type { EuiContextMenuPanelProps } from './context_menu_panel'; +export { EuiContextMenuPanel } from './context_menu_panel'; -export { - EuiContextMenuItem, +export type { EuiContextMenuItemProps, EuiContextMenuItemIcon, EuiContextMenuItemLayoutAlignment, } from './context_menu_item'; +export { EuiContextMenuItem } from './context_menu_item'; diff --git a/src/components/control_bar/index.ts b/src/components/control_bar/index.ts index 976f5575117..993d75f9530 100644 --- a/src/components/control_bar/index.ts +++ b/src/components/control_bar/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiControlBar, EuiControlBarProps } from './control_bar'; +export type { EuiControlBarProps } from './control_bar'; +export { EuiControlBar } from './control_bar'; diff --git a/src/components/copy/index.ts b/src/components/copy/index.ts index f23c4e3674f..1148a649dc2 100644 --- a/src/components/copy/index.ts +++ b/src/components/copy/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiCopy, EuiCopyProps } from './copy'; +export type { EuiCopyProps } from './copy'; +export { EuiCopy } from './copy'; diff --git a/src/components/date_picker/auto_refresh/index.ts b/src/components/date_picker/auto_refresh/index.ts index 198581ff507..d5ef1b7d054 100644 --- a/src/components/date_picker/auto_refresh/index.ts +++ b/src/components/date_picker/auto_refresh/index.ts @@ -6,15 +6,12 @@ * Side Public License, v 1. */ -export { - EuiAutoRefresh, +export type { EuiAutoRefreshProps, - EuiAutoRefreshButton, EuiAutoRefreshButtonProps, EuiAutoRefreshSharedProps, } from './auto_refresh'; +export { EuiAutoRefresh, EuiAutoRefreshButton } from './auto_refresh'; -export { - EuiRefreshInterval, - EuiRefreshIntervalProps, -} from './refresh_interval'; +export type { EuiRefreshIntervalProps } from './refresh_interval'; +export { EuiRefreshInterval } from './refresh_interval'; diff --git a/src/components/date_picker/index.ts b/src/components/date_picker/index.ts index d2fc5721fae..04764572402 100644 --- a/src/components/date_picker/index.ts +++ b/src/components/date_picker/index.ts @@ -9,14 +9,13 @@ export * from './super_date_picker'; export * from './auto_refresh'; -export { EuiDatePicker, EuiDatePickerProps } from './date_picker'; +export type { EuiDatePickerProps } from './date_picker'; +export { EuiDatePicker } from './date_picker'; -export { - EuiDatePickerRange, - EuiDatePickerRangeProps, -} from './date_picker_range'; +export type { EuiDatePickerRangeProps } from './date_picker_range'; +export { EuiDatePickerRange } from './date_picker_range'; -export { +export type { ApplyTime, DurationRange as EuiSuperDatePickerCommonRange, DurationRange as EuiSuperDatePickerDurationRange, diff --git a/src/components/date_picker/super_date_picker/date_popover/index.ts b/src/components/date_picker/super_date_picker/date_popover/index.ts index 0fdd7866b08..e1ff3bd6f4a 100644 --- a/src/components/date_picker/super_date_picker/date_popover/index.ts +++ b/src/components/date_picker/super_date_picker/date_popover/index.ts @@ -6,13 +6,11 @@ * Side Public License, v 1. */ -export { EuiAbsoluteTab, EuiAbsoluteTabProps } from './absolute_tab'; -export { - EuiDatePopoverButton, - EuiDatePopoverButtonProps, -} from './date_popover_button'; -export { - EuiDatePopoverContent, - EuiDatePopoverContentProps, -} from './date_popover_content'; -export { EuiRelativeTab, EuiRelativeTabProps } from './relative_tab'; +export type { EuiAbsoluteTabProps } from './absolute_tab'; +export { EuiAbsoluteTab } from './absolute_tab'; +export type { EuiDatePopoverButtonProps } from './date_popover_button'; +export { EuiDatePopoverButton } from './date_popover_button'; +export type { EuiDatePopoverContentProps } from './date_popover_content'; +export { EuiDatePopoverContent } from './date_popover_content'; +export type { EuiRelativeTabProps } from './relative_tab'; +export { EuiRelativeTab } from './relative_tab'; diff --git a/src/components/date_picker/super_date_picker/index.ts b/src/components/date_picker/super_date_picker/index.ts index f2f063e77fd..397e96c4a78 100644 --- a/src/components/date_picker/super_date_picker/index.ts +++ b/src/components/date_picker/super_date_picker/index.ts @@ -10,16 +10,14 @@ export * from './date_popover'; export * from './quick_select_popover'; export { AsyncInterval } from './async_interval'; -export { - EuiSuperDatePicker, +export type { EuiSuperDatePickerProps, OnTimeChangeProps, OnRefreshProps, } from './super_date_picker'; +export { EuiSuperDatePicker } from './super_date_picker'; -export { - EuiSuperUpdateButton, - EuiSuperUpdateButtonProps, -} from './super_update_button'; +export type { EuiSuperUpdateButtonProps } from './super_update_button'; +export { EuiSuperUpdateButton } from './super_update_button'; export { prettyDuration, commonDurationRanges } from './pretty_duration'; diff --git a/src/components/date_picker/super_date_picker/quick_select_popover/index.ts b/src/components/date_picker/super_date_picker/quick_select_popover/index.ts index 4b5e1e6f109..93a893458b9 100644 --- a/src/components/date_picker/super_date_picker/quick_select_popover/index.ts +++ b/src/components/date_picker/super_date_picker/quick_select_popover/index.ts @@ -6,13 +6,11 @@ * Side Public License, v 1. */ -export { - EuiCommonlyUsedTimeRanges, - EuiCommonlyUsedTimeRangesProps, -} from './commonly_used_time_ranges'; -export { - EuiQuickSelectPopover, - EuiQuickSelectPopoverProps, -} from './quick_select_popover'; -export { EuiQuickSelect, EuiQuickSelectProps } from './quick_select'; -export { EuiRecentlyUsed, EuiRecentlyUsedProps } from './recently_used'; +export type { EuiCommonlyUsedTimeRangesProps } from './commonly_used_time_ranges'; +export { EuiCommonlyUsedTimeRanges } from './commonly_used_time_ranges'; +export type { EuiQuickSelectPopoverProps } from './quick_select_popover'; +export { EuiQuickSelectPopover } from './quick_select_popover'; +export type { EuiQuickSelectProps } from './quick_select'; +export { EuiQuickSelect } from './quick_select'; +export type { EuiRecentlyUsedProps } from './recently_used'; +export { EuiRecentlyUsed } from './recently_used'; diff --git a/src/components/delay_hide/index.ts b/src/components/delay_hide/index.ts index 6eb57b9c4db..272929d72d0 100644 --- a/src/components/delay_hide/index.ts +++ b/src/components/delay_hide/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiDelayHide, EuiDelayHideProps } from './delay_hide'; +export type { EuiDelayHideProps } from './delay_hide'; +export { EuiDelayHide } from './delay_hide'; diff --git a/src/components/delay_render/index.ts b/src/components/delay_render/index.ts index aaba33f59f1..12fab16f661 100644 --- a/src/components/delay_render/index.ts +++ b/src/components/delay_render/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiDelayRender, EuiDelayRenderProps } from './delay_render'; +export type { EuiDelayRenderProps } from './delay_render'; +export { EuiDelayRender } from './delay_render'; diff --git a/src/components/description_list/index.ts b/src/components/description_list/index.ts index 71c012ae8ee..74a7d5b431d 100644 --- a/src/components/description_list/index.ts +++ b/src/components/description_list/index.ts @@ -6,10 +6,8 @@ * Side Public License, v 1. */ -export { - EuiDescriptionList, - EuiDescriptionListProps, -} from './description_list'; +export type { EuiDescriptionListProps } from './description_list'; +export { EuiDescriptionList } from './description_list'; export { EuiDescriptionListTitle } from './description_list_title'; diff --git a/src/components/drag_and_drop/index.ts b/src/components/drag_and_drop/index.ts index cd0d9d8c713..3cdea7b4dd0 100644 --- a/src/components/drag_and_drop/index.ts +++ b/src/components/drag_and_drop/index.ts @@ -6,12 +6,12 @@ * Side Public License, v 1. */ -export { - EuiDragDropContext, - EuiDragDropContextProps, -} from './drag_drop_context'; -export { EuiDraggable, EuiDraggableProps } from './draggable'; -export { EuiDroppable, EuiDroppableProps } from './droppable'; +export type { EuiDragDropContextProps } from './drag_drop_context'; +export { EuiDragDropContext } from './drag_drop_context'; +export type { EuiDraggableProps } from './draggable'; +export { EuiDraggable } from './draggable'; +export type { EuiDroppableProps } from './droppable'; +export { EuiDroppable } from './droppable'; export { euiDragDropCopy, euiDragDropMove, @@ -20,7 +20,7 @@ export { // Interfaces in react-beautiful-dnd that EUI abstracts over // allows consumers to pull these from EUI instead of react-beautiful-dnd -export { +export type { DraggableLocation, DraggableProps, DraggableProvidedDragHandleProps, diff --git a/src/components/empty_prompt/index.ts b/src/components/empty_prompt/index.ts index c1de196e475..0f725822a5e 100644 --- a/src/components/empty_prompt/index.ts +++ b/src/components/empty_prompt/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiEmptyPrompt, EuiEmptyPromptProps } from './empty_prompt'; +export type { EuiEmptyPromptProps } from './empty_prompt'; +export { EuiEmptyPrompt } from './empty_prompt'; diff --git a/src/components/error_boundary/index.ts b/src/components/error_boundary/index.ts index 42d478188fd..172ca66a20f 100644 --- a/src/components/error_boundary/index.ts +++ b/src/components/error_boundary/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiErrorBoundary, EuiErrorBoundaryProps } from './error_boundary'; +export type { EuiErrorBoundaryProps } from './error_boundary'; +export { EuiErrorBoundary } from './error_boundary'; diff --git a/src/components/expression/index.ts b/src/components/expression/index.ts index 56246d99d56..856256eda6f 100644 --- a/src/components/expression/index.ts +++ b/src/components/expression/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiExpression, EuiExpressionProps } from './expression'; +export type { EuiExpressionProps } from './expression'; +export { EuiExpression } from './expression'; diff --git a/src/components/facet/index.ts b/src/components/facet/index.ts index de37f069106..8a9ee4653ae 100644 --- a/src/components/facet/index.ts +++ b/src/components/facet/index.ts @@ -6,6 +6,8 @@ * Side Public License, v 1. */ -export { EuiFacetButton, EuiFacetButtonProps } from './facet_button'; +export type { EuiFacetButtonProps } from './facet_button'; +export { EuiFacetButton } from './facet_button'; -export { EuiFacetGroup, EuiFacetGroupProps } from './facet_group'; +export type { EuiFacetGroupProps } from './facet_group'; +export { EuiFacetGroup } from './facet_group'; diff --git a/src/components/filter_group/index.ts b/src/components/filter_group/index.ts index c2ae9a7ac2e..aa1383b6b29 100644 --- a/src/components/filter_group/index.ts +++ b/src/components/filter_group/index.ts @@ -6,12 +6,14 @@ * Side Public License, v 1. */ -export { EuiFilterGroup, EuiFilterGroupProps } from './filter_group'; +export type { EuiFilterGroupProps } from './filter_group'; +export { EuiFilterGroup } from './filter_group'; -export { EuiFilterButton, EuiFilterButtonProps } from './filter_button'; +export type { EuiFilterButtonProps } from './filter_button'; +export { EuiFilterButton } from './filter_button'; -export { - EuiFilterSelectItem, +export type { EuiFilterSelectItemProps, FilterChecked, } from './filter_select_item'; +export { EuiFilterSelectItem } from './filter_select_item'; diff --git a/src/components/flex/index.ts b/src/components/flex/index.ts index 889e3b4b7a5..05f35e8eace 100644 --- a/src/components/flex/index.ts +++ b/src/components/flex/index.ts @@ -6,12 +6,11 @@ * Side Public License, v 1. */ -export { - EuiFlexGroup, - EuiFlexGroupProps, - EuiFlexGroupGutterSize, -} from './flex_group'; +export type { EuiFlexGroupProps, EuiFlexGroupGutterSize } from './flex_group'; +export { EuiFlexGroup } from './flex_group'; -export { EuiFlexGrid, EuiFlexGridProps } from './flex_grid'; +export type { EuiFlexGridProps } from './flex_grid'; +export { EuiFlexGrid } from './flex_grid'; -export { EuiFlexItem, EuiFlexItemProps } from './flex_item'; +export type { EuiFlexItemProps } from './flex_item'; +export { EuiFlexItem } from './flex_item'; diff --git a/src/components/flyout/index.ts b/src/components/flyout/index.ts index c1f3c668970..24ecf275de2 100644 --- a/src/components/flyout/index.ts +++ b/src/components/flyout/index.ts @@ -6,10 +6,14 @@ * Side Public License, v 1. */ -export { EuiFlyout, EuiFlyoutProps, EuiFlyoutSize } from './flyout'; +export type { EuiFlyoutProps, EuiFlyoutSize } from './flyout'; +export { EuiFlyout } from './flyout'; -export { EuiFlyoutBody, EuiFlyoutBodyProps } from './flyout_body'; +export type { EuiFlyoutBodyProps } from './flyout_body'; +export { EuiFlyoutBody } from './flyout_body'; -export { EuiFlyoutFooter, EuiFlyoutFooterProps } from './flyout_footer'; +export type { EuiFlyoutFooterProps } from './flyout_footer'; +export { EuiFlyoutFooter } from './flyout_footer'; -export { EuiFlyoutHeader, EuiFlyoutHeaderProps } from './flyout_header'; +export type { EuiFlyoutHeaderProps } from './flyout_header'; +export { EuiFlyoutHeader } from './flyout_header'; diff --git a/src/components/focus_trap/index.ts b/src/components/focus_trap/index.ts index 38bf34c2cdf..db79d840589 100644 --- a/src/components/focus_trap/index.ts +++ b/src/components/focus_trap/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiFocusTrap, EuiFocusTrapProps, FocusTarget } from './focus_trap'; +export type { EuiFocusTrapProps, FocusTarget } from './focus_trap'; +export { EuiFocusTrap } from './focus_trap'; diff --git a/src/components/form/checkbox/index.ts b/src/components/form/checkbox/index.ts index bf19d3a3ae1..5f374a3b30a 100644 --- a/src/components/form/checkbox/index.ts +++ b/src/components/form/checkbox/index.ts @@ -6,9 +6,10 @@ * Side Public License, v 1. */ -export { EuiCheckbox, EuiCheckboxProps } from './checkbox'; -export { - EuiCheckboxGroup, +export type { EuiCheckboxProps } from './checkbox'; +export { EuiCheckbox } from './checkbox'; +export type { EuiCheckboxGroupProps, EuiCheckboxGroupOption, } from './checkbox_group'; +export { EuiCheckboxGroup } from './checkbox_group'; diff --git a/src/components/form/described_form_group/index.ts b/src/components/form/described_form_group/index.ts index 4648263d70b..509faec7227 100644 --- a/src/components/form/described_form_group/index.ts +++ b/src/components/form/described_form_group/index.ts @@ -6,7 +6,5 @@ * Side Public License, v 1. */ -export { - EuiDescribedFormGroup, - EuiDescribedFormGroupProps, -} from './described_form_group'; +export type { EuiDescribedFormGroupProps } from './described_form_group'; +export { EuiDescribedFormGroup } from './described_form_group'; diff --git a/src/components/form/field_number/index.ts b/src/components/form/field_number/index.ts index 59378ae66f5..3a2fc241aa7 100644 --- a/src/components/form/field_number/index.ts +++ b/src/components/form/field_number/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiFieldNumber, EuiFieldNumberProps } from './field_number'; +export type { EuiFieldNumberProps } from './field_number'; +export { EuiFieldNumber } from './field_number'; diff --git a/src/components/form/field_password/index.ts b/src/components/form/field_password/index.ts index 3a94e8458c0..dbacfc6cb36 100644 --- a/src/components/form/field_password/index.ts +++ b/src/components/form/field_password/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiFieldPassword, EuiFieldPasswordProps } from './field_password'; +export type { EuiFieldPasswordProps } from './field_password'; +export { EuiFieldPassword } from './field_password'; diff --git a/src/components/form/field_search/index.ts b/src/components/form/field_search/index.ts index 96da3e1c2aa..5b40a96fa75 100644 --- a/src/components/form/field_search/index.ts +++ b/src/components/form/field_search/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiFieldSearch, EuiFieldSearchProps } from './field_search'; +export type { EuiFieldSearchProps } from './field_search'; +export { EuiFieldSearch } from './field_search'; diff --git a/src/components/form/field_text/index.ts b/src/components/form/field_text/index.ts index 497aec5d235..28d2c64008d 100644 --- a/src/components/form/field_text/index.ts +++ b/src/components/form/field_text/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiFieldText, EuiFieldTextProps } from './field_text'; +export type { EuiFieldTextProps } from './field_text'; +export { EuiFieldText } from './field_text'; diff --git a/src/components/form/file_picker/index.ts b/src/components/form/file_picker/index.ts index beda20d8670..0a4b3b443a9 100644 --- a/src/components/form/file_picker/index.ts +++ b/src/components/form/file_picker/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiFilePicker, EuiFilePickerProps } from './file_picker'; +export type { EuiFilePickerProps } from './file_picker'; +export { EuiFilePicker } from './file_picker'; diff --git a/src/components/form/form_control_layout/index.ts b/src/components/form/form_control_layout/index.ts index 18cbc5cc7c3..0e7a425ca3c 100644 --- a/src/components/form/form_control_layout/index.ts +++ b/src/components/form/form_control_layout/index.ts @@ -6,11 +6,7 @@ * Side Public License, v 1. */ -export { - EuiFormControlLayout, - EuiFormControlLayoutProps, -} from './form_control_layout'; -export { - EuiFormControlLayoutDelimited, - EuiFormControlLayoutDelimitedProps, -} from './form_control_layout_delimited'; +export type { EuiFormControlLayoutProps } from './form_control_layout'; +export { EuiFormControlLayout } from './form_control_layout'; +export type { EuiFormControlLayoutDelimitedProps } from './form_control_layout_delimited'; +export { EuiFormControlLayoutDelimited } from './form_control_layout_delimited'; diff --git a/src/components/form/form_error_text/index.ts b/src/components/form/form_error_text/index.ts index c38e55f7d12..4eb5bdf39e5 100644 --- a/src/components/form/form_error_text/index.ts +++ b/src/components/form/form_error_text/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiFormErrorText, EuiFormErrorTextProps } from './form_error_text'; +export type { EuiFormErrorTextProps } from './form_error_text'; +export { EuiFormErrorText } from './form_error_text'; diff --git a/src/components/form/form_fieldset/index.ts b/src/components/form/form_fieldset/index.ts index e6e07c09500..9ec919aed06 100644 --- a/src/components/form/form_fieldset/index.ts +++ b/src/components/form/form_fieldset/index.ts @@ -6,5 +6,7 @@ * Side Public License, v 1. */ -export { EuiFormFieldset, EuiFormFieldsetProps } from './form_fieldset'; -export { EuiFormLegend, EuiFormLegendProps } from './form_legend'; +export type { EuiFormFieldsetProps } from './form_fieldset'; +export { EuiFormFieldset } from './form_fieldset'; +export type { EuiFormLegendProps } from './form_legend'; +export { EuiFormLegend } from './form_legend'; diff --git a/src/components/form/form_help_text/index.ts b/src/components/form/form_help_text/index.ts index 69c872c1c5e..ba09924509c 100644 --- a/src/components/form/form_help_text/index.ts +++ b/src/components/form/form_help_text/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiFormHelpText, EuiFormHelpTextProps } from './form_help_text'; +export type { EuiFormHelpTextProps } from './form_help_text'; +export { EuiFormHelpText } from './form_help_text'; diff --git a/src/components/form/form_label/index.ts b/src/components/form/form_label/index.ts index 6041aef4c1d..8188ef1e0db 100644 --- a/src/components/form/form_label/index.ts +++ b/src/components/form/form_label/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiFormLabel, EuiFormLabelProps } from './form_label'; +export type { EuiFormLabelProps } from './form_label'; +export { EuiFormLabel } from './form_label'; diff --git a/src/components/form/form_row/index.ts b/src/components/form/form_row/index.ts index 446213863ce..35944ab3268 100644 --- a/src/components/form/form_row/index.ts +++ b/src/components/form/form_row/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiFormRow, EuiFormRowProps } from './form_row'; +export type { EuiFormRowProps } from './form_row'; +export { EuiFormRow } from './form_row'; diff --git a/src/components/form/radio/index.ts b/src/components/form/radio/index.ts index 65fd744c435..cc27b0f6e63 100644 --- a/src/components/form/radio/index.ts +++ b/src/components/form/radio/index.ts @@ -6,9 +6,7 @@ * Side Public License, v 1. */ -export { EuiRadio, EuiRadioProps } from './radio'; -export { - EuiRadioGroup, - EuiRadioGroupProps, - EuiRadioGroupOption, -} from './radio_group'; +export type { EuiRadioProps } from './radio'; +export { EuiRadio } from './radio'; +export type { EuiRadioGroupProps, EuiRadioGroupOption } from './radio_group'; +export { EuiRadioGroup } from './radio_group'; diff --git a/src/components/form/range/index.ts b/src/components/form/range/index.ts index e055c1652ad..76290944367 100644 --- a/src/components/form/range/index.ts +++ b/src/components/form/range/index.ts @@ -6,5 +6,7 @@ * Side Public License, v 1. */ -export { EuiDualRange, EuiDualRangeProps } from './dual_range'; -export { EuiRange, EuiRangeProps } from './range'; +export type { EuiDualRangeProps } from './dual_range'; +export { EuiDualRange } from './dual_range'; +export type { EuiRangeProps } from './range'; +export { EuiRange } from './range'; diff --git a/src/components/form/select/index.ts b/src/components/form/select/index.ts index bc6b8028ae6..6dcf8f15df2 100644 --- a/src/components/form/select/index.ts +++ b/src/components/form/select/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiSelect, EuiSelectProps, EuiSelectOption } from './select'; +export type { EuiSelectProps, EuiSelectOption } from './select'; +export { EuiSelect } from './select'; diff --git a/src/components/form/super_select/index.ts b/src/components/form/super_select/index.ts index 6ca83cff256..d043ad14022 100644 --- a/src/components/form/super_select/index.ts +++ b/src/components/form/super_select/index.ts @@ -6,9 +6,10 @@ * Side Public License, v 1. */ -export { EuiSuperSelect, EuiSuperSelectProps } from './super_select'; -export { - EuiSuperSelectControl, +export type { EuiSuperSelectProps } from './super_select'; +export { EuiSuperSelect } from './super_select'; +export type { EuiSuperSelectControlProps, EuiSuperSelectOption, } from './super_select_control'; +export { EuiSuperSelectControl } from './super_select_control'; diff --git a/src/components/form/switch/index.ts b/src/components/form/switch/index.ts index a0a34147fda..9fe2d481f94 100644 --- a/src/components/form/switch/index.ts +++ b/src/components/form/switch/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiSwitch, EuiSwitchProps, EuiSwitchEvent } from './switch'; +export type { EuiSwitchProps, EuiSwitchEvent } from './switch'; +export { EuiSwitch } from './switch'; diff --git a/src/components/form/text_area/index.ts b/src/components/form/text_area/index.ts index 12a934a5447..d9d44466791 100644 --- a/src/components/form/text_area/index.ts +++ b/src/components/form/text_area/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiTextArea, EuiTextAreaProps } from './text_area'; +export type { EuiTextAreaProps } from './text_area'; +export { EuiTextArea } from './text_area'; diff --git a/src/components/form/validatable_control/index.ts b/src/components/form/validatable_control/index.ts index 72e4f929b3d..d927432035f 100644 --- a/src/components/form/validatable_control/index.ts +++ b/src/components/form/validatable_control/index.ts @@ -6,7 +6,5 @@ * Side Public License, v 1. */ -export { - EuiValidatableControl, - EuiValidatableControlProps, -} from './validatable_control'; +export type { EuiValidatableControlProps } from './validatable_control'; +export { EuiValidatableControl } from './validatable_control'; diff --git a/src/components/header/header_alert/index.ts b/src/components/header/header_alert/index.ts index 07a92d9130e..9313267d7fa 100644 --- a/src/components/header/header_alert/index.ts +++ b/src/components/header/header_alert/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiHeaderAlert, EuiHeaderAlertProps } from './header_alert'; +export type { EuiHeaderAlertProps } from './header_alert'; +export { EuiHeaderAlert } from './header_alert'; diff --git a/src/components/header/header_links/index.ts b/src/components/header/header_links/index.ts index 0b8cd2a03f6..bad5b168e61 100644 --- a/src/components/header/header_links/index.ts +++ b/src/components/header/header_links/index.ts @@ -6,6 +6,8 @@ * Side Public License, v 1. */ -export { EuiHeaderLink, EuiHeaderLinkProps } from './header_link'; +export type { EuiHeaderLinkProps } from './header_link'; +export { EuiHeaderLink } from './header_link'; -export { EuiHeaderLinks, EuiHeaderLinksProps } from './header_links'; +export type { EuiHeaderLinksProps } from './header_links'; +export { EuiHeaderLinks } from './header_links'; diff --git a/src/components/header/header_section/index.ts b/src/components/header/header_section/index.ts index 3c5ff118ede..43502046cd8 100644 --- a/src/components/header/header_section/index.ts +++ b/src/components/header/header_section/index.ts @@ -6,14 +6,11 @@ * Side Public License, v 1. */ -export { EuiHeaderSection, EuiHeaderSectionProps } from './header_section'; +export type { EuiHeaderSectionProps } from './header_section'; +export { EuiHeaderSection } from './header_section'; -export { - EuiHeaderSectionItem, - EuiHeaderSectionItemProps, -} from './header_section_item'; +export type { EuiHeaderSectionItemProps } from './header_section_item'; +export { EuiHeaderSectionItem } from './header_section_item'; -export { - EuiHeaderSectionItemButton, - EuiHeaderSectionItemButtonProps, -} from './header_section_item_button'; +export type { EuiHeaderSectionItemButtonProps } from './header_section_item_button'; +export { EuiHeaderSectionItemButton } from './header_section_item_button'; diff --git a/src/components/header/index.ts b/src/components/header/index.ts index 2712fe47624..f0af017e16f 100644 --- a/src/components/header/index.ts +++ b/src/components/header/index.ts @@ -6,24 +6,23 @@ * Side Public License, v 1. */ -export { EuiHeader, EuiHeaderProps, EuiHeaderSections } from './header'; +export type { EuiHeaderProps, EuiHeaderSections } from './header'; +export { EuiHeader } from './header'; -export { EuiHeaderAlert, EuiHeaderAlertProps } from './header_alert'; +export type { EuiHeaderAlertProps } from './header_alert'; +export { EuiHeaderAlert } from './header_alert'; export { EuiHeaderBreadcrumbs } from './header_breadcrumbs'; -export { - EuiHeaderLink, - EuiHeaderLinkProps, - EuiHeaderLinks, - EuiHeaderLinksProps, -} from './header_links'; +export type { EuiHeaderLinkProps, EuiHeaderLinksProps } from './header_links'; +export { EuiHeaderLink, EuiHeaderLinks } from './header_links'; -export { EuiHeaderLogo, EuiHeaderLogoProps } from './header_logo'; +export type { EuiHeaderLogoProps } from './header_logo'; +export { EuiHeaderLogo } from './header_logo'; +export type { EuiHeaderSectionItemButtonProps } from './header_section'; export { EuiHeaderSection, EuiHeaderSectionItem, EuiHeaderSectionItemButton, - EuiHeaderSectionItemButtonProps, } from './header_section'; diff --git a/src/components/health/index.ts b/src/components/health/index.ts index 0712bebb2da..9e58b8996f6 100644 --- a/src/components/health/index.ts +++ b/src/components/health/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiHealth, EuiHealthProps } from './health'; +export type { EuiHealthProps } from './health'; +export { EuiHealth } from './health'; diff --git a/src/components/highlight/index.ts b/src/components/highlight/index.ts index 02f7515a9b5..54156108d5a 100644 --- a/src/components/highlight/index.ts +++ b/src/components/highlight/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiHighlight, EuiHighlightProps } from './highlight'; +export type { EuiHighlightProps } from './highlight'; +export { EuiHighlight } from './highlight'; diff --git a/src/components/horizontal_rule/index.ts b/src/components/horizontal_rule/index.ts index e8d22c08a64..8ebe103df1d 100644 --- a/src/components/horizontal_rule/index.ts +++ b/src/components/horizontal_rule/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiHorizontalRule, EuiHorizontalRuleProps } from './horizontal_rule'; +export type { EuiHorizontalRuleProps } from './horizontal_rule'; +export { EuiHorizontalRule } from './horizontal_rule'; diff --git a/src/components/i18n/index.ts b/src/components/i18n/index.ts index fa2cb07e21d..b73fbdf7228 100644 --- a/src/components/i18n/index.ts +++ b/src/components/i18n/index.ts @@ -6,5 +6,7 @@ * Side Public License, v 1. */ -export { EuiI18n, EuiI18nProps, useEuiI18n } from './i18n'; -export { EuiI18nNumber, EuiI18nNumberProps } from './i18n_number'; +export type { EuiI18nProps } from './i18n'; +export { EuiI18n, useEuiI18n } from './i18n'; +export type { EuiI18nNumberProps } from './i18n_number'; +export { EuiI18nNumber } from './i18n_number'; diff --git a/src/components/icon/index.ts b/src/components/icon/index.ts index 871dd2cb944..c2cf177684c 100644 --- a/src/components/icon/index.ts +++ b/src/components/icon/index.ts @@ -6,12 +6,9 @@ * Side Public License, v 1. */ +export type { EuiIconProps, IconColor, IconSize, IconType } from './icon'; export { EuiIcon, - EuiIconProps, - IconColor, - IconSize, - IconType, TYPES as ICON_TYPES, SIZES as ICON_SIZES, COLORS as ICON_COLORS, diff --git a/src/components/image/index.ts b/src/components/image/index.ts index 11d6cbfcb25..fdbb7b61bcd 100644 --- a/src/components/image/index.ts +++ b/src/components/image/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiImage, EuiImageProps } from './image'; +export type { EuiImageProps } from './image'; +export { EuiImage } from './image'; diff --git a/src/components/inner_text/index.ts b/src/components/inner_text/index.ts index 234c1ac26ba..71a826bb94f 100644 --- a/src/components/inner_text/index.ts +++ b/src/components/inner_text/index.ts @@ -6,5 +6,6 @@ * Side Public License, v 1. */ -export { useInnerText, EuiInnerText, EuiInnerTextProps } from './inner_text'; +export type { EuiInnerTextProps } from './inner_text'; +export { useInnerText, EuiInnerText } from './inner_text'; export { useRenderToText } from './render_to_text'; diff --git a/src/components/key_pad_menu/index.ts b/src/components/key_pad_menu/index.ts index 809cd082f8c..07a4165d955 100644 --- a/src/components/key_pad_menu/index.ts +++ b/src/components/key_pad_menu/index.ts @@ -6,6 +6,8 @@ * Side Public License, v 1. */ -export { EuiKeyPadMenu, EuiKeyPadMenuProps } from './key_pad_menu'; +export type { EuiKeyPadMenuProps } from './key_pad_menu'; +export { EuiKeyPadMenu } from './key_pad_menu'; -export { EuiKeyPadMenuItem, EuiKeyPadMenuItemProps } from './key_pad_menu_item'; +export type { EuiKeyPadMenuItemProps } from './key_pad_menu_item'; +export { EuiKeyPadMenuItem } from './key_pad_menu_item'; diff --git a/src/components/link/index.ts b/src/components/link/index.ts index 9c97770f021..6138555f0ef 100644 --- a/src/components/link/index.ts +++ b/src/components/link/index.ts @@ -6,11 +6,11 @@ * Side Public License, v 1. */ -export { - EuiLink, +export type { EuiLinkColor, EuiLinkProps, EuiLinkType, EuiLinkAnchorProps, EuiLinkButtonProps, } from './link'; +export { EuiLink } from './link'; diff --git a/src/components/list_group/index.ts b/src/components/list_group/index.ts index fff746c350a..c352cd007a4 100644 --- a/src/components/list_group/index.ts +++ b/src/components/list_group/index.ts @@ -6,10 +6,12 @@ * Side Public License, v 1. */ -export { EuiListGroup, EuiListGroupProps } from './list_group'; -export { EuiListGroupItem, EuiListGroupItemProps } from './list_group_item'; -export { - EuiPinnableListGroup, +export type { EuiListGroupProps } from './list_group'; +export { EuiListGroup } from './list_group'; +export type { EuiListGroupItemProps } from './list_group_item'; +export { EuiListGroupItem } from './list_group_item'; +export type { EuiPinnableListGroupProps, EuiPinnableListGroupItemProps, } from './pinnable_list_group'; +export { EuiPinnableListGroup } from './pinnable_list_group'; diff --git a/src/components/list_group/pinnable_list_group/index.ts b/src/components/list_group/pinnable_list_group/index.ts index 0788822ca14..a6304f788bc 100644 --- a/src/components/list_group/pinnable_list_group/index.ts +++ b/src/components/list_group/pinnable_list_group/index.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ -export { - EuiPinnableListGroup, +export type { EuiPinnableListGroupProps, EuiPinnableListGroupItemProps, } from './pinnable_list_group'; +export { EuiPinnableListGroup } from './pinnable_list_group'; diff --git a/src/components/loading/index.ts b/src/components/loading/index.ts index 3484f9d7b84..459707fbd76 100644 --- a/src/components/loading/index.ts +++ b/src/components/loading/index.ts @@ -6,8 +6,13 @@ * Side Public License, v 1. */ -export { EuiLoadingElastic, EuiLoadingElasticProps } from './loading_elastic'; -export { EuiLoadingChart, EuiLoadingChartProps } from './loading_chart'; -export { EuiLoadingContent, EuiLoadingContentProps } from './loading_content'; -export { EuiLoadingSpinner, EuiLoadingSpinnerProps } from './loading_spinner'; -export { EuiLoadingLogo, EuiLoadingLogoProps } from './loading_logo'; +export type { EuiLoadingElasticProps } from './loading_elastic'; +export { EuiLoadingElastic } from './loading_elastic'; +export type { EuiLoadingChartProps } from './loading_chart'; +export { EuiLoadingChart } from './loading_chart'; +export type { EuiLoadingContentProps } from './loading_content'; +export { EuiLoadingContent } from './loading_content'; +export type { EuiLoadingSpinnerProps } from './loading_spinner'; +export { EuiLoadingSpinner } from './loading_spinner'; +export type { EuiLoadingLogoProps } from './loading_logo'; +export { EuiLoadingLogo } from './loading_logo'; diff --git a/src/components/markdown_editor/index.ts b/src/components/markdown_editor/index.ts index 810eea8f236..d3a62e4a6c0 100644 --- a/src/components/markdown_editor/index.ts +++ b/src/components/markdown_editor/index.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -export { EuiMarkdownEditor, EuiMarkdownEditorProps } from './markdown_editor'; +export type { EuiMarkdownEditorProps } from './markdown_editor'; +export { EuiMarkdownEditor } from './markdown_editor'; export { getDefaultEuiMarkdownParsingPlugins, getDefaultEuiMarkdownProcessingPlugins, @@ -14,8 +15,9 @@ export { getDefaultEuiMarkdownPlugins, } from './plugins/markdown_default_plugins'; export { EuiMarkdownContext } from './markdown_context'; -export { EuiMarkdownFormat, EuiMarkdownFormatProps } from './markdown_format'; -export { +export type { EuiMarkdownFormatProps } from './markdown_format'; +export { EuiMarkdownFormat } from './markdown_format'; +export type { EuiMarkdownParseError, EuiMarkdownAstNode, EuiMarkdownAstNodePosition, diff --git a/src/components/modal/index.ts b/src/components/modal/index.ts index 672756e65a6..34010d102f8 100644 --- a/src/components/modal/index.ts +++ b/src/components/modal/index.ts @@ -6,17 +6,19 @@ * Side Public License, v 1. */ +export type { EuiConfirmModalProps } from './confirm_modal'; export { EuiConfirmModal, - EuiConfirmModalProps, CONFIRM_BUTTON as EUI_MODAL_CONFIRM_BUTTON, CANCEL_BUTTON as EUI_MODAL_CANCEL_BUTTON, } from './confirm_modal'; -export { EuiModal, EuiModalProps } from './modal'; -export { EuiModalFooter, EuiModalFooterProps } from './modal_footer'; -export { EuiModalHeader, EuiModalHeaderProps } from './modal_header'; -export { EuiModalBody, EuiModalBodyProps } from './modal_body'; -export { - EuiModalHeaderTitle, - EuiModalHeaderTitleProps, -} from './modal_header_title'; +export type { EuiModalProps } from './modal'; +export { EuiModal } from './modal'; +export type { EuiModalFooterProps } from './modal_footer'; +export { EuiModalFooter } from './modal_footer'; +export type { EuiModalHeaderProps } from './modal_header'; +export { EuiModalHeader } from './modal_header'; +export type { EuiModalBodyProps } from './modal_body'; +export { EuiModalBody } from './modal_body'; +export type { EuiModalHeaderTitleProps } from './modal_header_title'; +export { EuiModalHeaderTitle } from './modal_header_title'; diff --git a/src/components/observer/mutation_observer/index.ts b/src/components/observer/mutation_observer/index.ts index 0baf46f2efc..53d26ff6dc0 100644 --- a/src/components/observer/mutation_observer/index.ts +++ b/src/components/observer/mutation_observer/index.ts @@ -6,8 +6,5 @@ * Side Public License, v 1. */ -export { - EuiMutationObserver, - EuiMutationObserverProps, - useMutationObserver, -} from './mutation_observer'; +export type { EuiMutationObserverProps } from './mutation_observer'; +export { EuiMutationObserver, useMutationObserver } from './mutation_observer'; diff --git a/src/components/observer/resize_observer/index.ts b/src/components/observer/resize_observer/index.ts index 971489f56de..22fc6d2c353 100644 --- a/src/components/observer/resize_observer/index.ts +++ b/src/components/observer/resize_observer/index.ts @@ -6,8 +6,5 @@ * Side Public License, v 1. */ -export { - EuiResizeObserver, - EuiResizeObserverProps, - useResizeObserver, -} from './resize_observer'; +export type { EuiResizeObserverProps } from './resize_observer'; +export { EuiResizeObserver, useResizeObserver } from './resize_observer'; diff --git a/src/components/outside_click_detector/index.ts b/src/components/outside_click_detector/index.ts index 944bad9be7d..3648c88f6f3 100644 --- a/src/components/outside_click_detector/index.ts +++ b/src/components/outside_click_detector/index.ts @@ -6,7 +6,5 @@ * Side Public License, v 1. */ -export { - EuiOutsideClickDetector, - EuiOutsideClickDetectorProps, -} from './outside_click_detector'; +export type { EuiOutsideClickDetectorProps } from './outside_click_detector'; +export { EuiOutsideClickDetector } from './outside_click_detector'; diff --git a/src/components/overlay_mask/index.ts b/src/components/overlay_mask/index.ts index dae68f76069..eae4be44bfd 100644 --- a/src/components/overlay_mask/index.ts +++ b/src/components/overlay_mask/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiOverlayMask, EuiOverlayMaskProps } from './overlay_mask'; +export type { EuiOverlayMaskProps } from './overlay_mask'; +export { EuiOverlayMask } from './overlay_mask'; diff --git a/src/components/page/index.ts b/src/components/page/index.ts index 5b3a14524f4..ff790e3af55 100644 --- a/src/components/page/index.ts +++ b/src/components/page/index.ts @@ -6,30 +6,38 @@ * Side Public License, v 1. */ -export { EuiPage, EuiPageProps } from './page'; +export type { EuiPageProps } from './page'; +export { EuiPage } from './page'; -export { EuiPageBody, EuiPageBodyProps } from './page_body'; +export type { EuiPageBodyProps } from './page_body'; +export { EuiPageBody } from './page_body'; +export type { + EuiPageContentProps, + EuiPageContentBodyProps, + EuiPageContentHeaderProps, + EuiPageContentHeaderSectionProps, +} from './page_content'; export { EuiPageContent, - EuiPageContentProps, EuiPageContentBody, - EuiPageContentBodyProps, EuiPageContentHeader, - EuiPageContentHeaderProps, EuiPageContentHeaderSection, - EuiPageContentHeaderSectionProps, } from './page_content'; +export type { + EuiPageHeaderContentProps, + EuiPageHeaderProps, + EuiPageHeaderSectionProps, +} from './page_header'; export { EuiPageHeader, EuiPageHeaderContent, - EuiPageHeaderContentProps, - EuiPageHeaderProps, EuiPageHeaderSection, - EuiPageHeaderSectionProps, } from './page_header'; -export { EuiPageSideBar, EuiPageSideBarProps } from './page_side_bar'; +export type { EuiPageSideBarProps } from './page_side_bar'; +export { EuiPageSideBar } from './page_side_bar'; -export { EuiPageTemplate, EuiPageTemplateProps } from './page_template'; +export type { EuiPageTemplateProps } from './page_template'; +export { EuiPageTemplate } from './page_template'; diff --git a/src/components/page/page_body/index.ts b/src/components/page/page_body/index.ts index d08b36c479c..bb7613f37a9 100644 --- a/src/components/page/page_body/index.ts +++ b/src/components/page/page_body/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiPageBody, EuiPageBodyProps } from './page_body'; +export type { EuiPageBodyProps } from './page_body'; +export { EuiPageBody } from './page_body'; diff --git a/src/components/page/page_content/index.ts b/src/components/page/page_content/index.ts index 6734089bb80..73189e1ae51 100644 --- a/src/components/page/page_content/index.ts +++ b/src/components/page/page_content/index.ts @@ -6,16 +6,11 @@ * Side Public License, v 1. */ -export { EuiPageContent, EuiPageContentProps } from './page_content'; -export { - EuiPageContentBody, - EuiPageContentBodyProps, -} from './page_content_body'; -export { - EuiPageContentHeader, - EuiPageContentHeaderProps, -} from './page_content_header'; -export { - EuiPageContentHeaderSection, - EuiPageContentHeaderSectionProps, -} from './page_content_header_section'; +export type { EuiPageContentProps } from './page_content'; +export { EuiPageContent } from './page_content'; +export type { EuiPageContentBodyProps } from './page_content_body'; +export { EuiPageContentBody } from './page_content_body'; +export type { EuiPageContentHeaderProps } from './page_content_header'; +export { EuiPageContentHeader } from './page_content_header'; +export type { EuiPageContentHeaderSectionProps } from './page_content_header_section'; +export { EuiPageContentHeaderSection } from './page_content_header_section'; diff --git a/src/components/page/page_header/index.ts b/src/components/page/page_header/index.ts index 2a5c8e3170b..3dd17df8cd9 100644 --- a/src/components/page/page_header/index.ts +++ b/src/components/page/page_header/index.ts @@ -6,12 +6,9 @@ * Side Public License, v 1. */ -export { EuiPageHeader, EuiPageHeaderProps } from './page_header'; -export { - EuiPageHeaderContent, - EuiPageHeaderContentProps, -} from './page_header_content'; -export { - EuiPageHeaderSection, - EuiPageHeaderSectionProps, -} from './page_header_section'; +export type { EuiPageHeaderProps } from './page_header'; +export { EuiPageHeader } from './page_header'; +export type { EuiPageHeaderContentProps } from './page_header_content'; +export { EuiPageHeaderContent } from './page_header_content'; +export type { EuiPageHeaderSectionProps } from './page_header_section'; +export { EuiPageHeaderSection } from './page_header_section'; diff --git a/src/components/page/page_side_bar/index.ts b/src/components/page/page_side_bar/index.ts index 3af44a3f8af..454cfc7e4d5 100644 --- a/src/components/page/page_side_bar/index.ts +++ b/src/components/page/page_side_bar/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiPageSideBar, EuiPageSideBarProps } from './page_side_bar'; +export type { EuiPageSideBarProps } from './page_side_bar'; +export { EuiPageSideBar } from './page_side_bar'; diff --git a/src/components/pagination/index.ts b/src/components/pagination/index.ts index 8fafc59ca75..5b7023b4964 100644 --- a/src/components/pagination/index.ts +++ b/src/components/pagination/index.ts @@ -6,9 +6,8 @@ * Side Public License, v 1. */ -export { EuiPagination, EuiPaginationProps } from './pagination'; +export type { EuiPaginationProps } from './pagination'; +export { EuiPagination } from './pagination'; -export { - EuiPaginationButton, - EuiPaginationButtonProps, -} from './pagination_button'; +export type { EuiPaginationButtonProps } from './pagination_button'; +export { EuiPaginationButton } from './pagination_button'; diff --git a/src/components/panel/index.ts b/src/components/panel/index.ts index ef75e072a41..129d37c2064 100644 --- a/src/components/panel/index.ts +++ b/src/components/panel/index.ts @@ -6,5 +6,6 @@ * Side Public License, v 1. */ -export { EuiPanel, EuiPanelProps, PanelPaddingSize, SIZES } from './panel'; +export type { EuiPanelProps, PanelPaddingSize } from './panel'; +export { EuiPanel, SIZES } from './panel'; export { EuiSplitPanel } from './split_panel'; diff --git a/src/components/panel/split_panel/index.ts b/src/components/panel/split_panel/index.ts index 412f1547abc..38da9c2d4c3 100644 --- a/src/components/panel/split_panel/index.ts +++ b/src/components/panel/split_panel/index.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ -export { - EuiSplitPanel, +export type { _EuiSplitPanelInnerProps, _EuiSplitPanelOuterProps, } from './split_panel'; +export { EuiSplitPanel } from './split_panel'; diff --git a/src/components/popover/index.ts b/src/components/popover/index.ts index c1fb8936299..3b455f7d5bc 100644 --- a/src/components/popover/index.ts +++ b/src/components/popover/index.ts @@ -6,11 +6,13 @@ * Side Public License, v 1. */ -export { EuiInputPopover, EuiInputPopoverProps } from './input_popover'; -export { EuiPopover, EuiPopoverProps, PopoverAnchorPosition } from './popover'; -export { EuiPopoverTitle, EuiPopoverTitleProps } from './popover_title'; -export { EuiPopoverFooter, EuiPopoverFooterProps } from './popover_footer'; -export { - EuiWrappingPopover, - EuiWrappingPopoverProps, -} from './wrapping_popover'; +export type { EuiInputPopoverProps } from './input_popover'; +export { EuiInputPopover } from './input_popover'; +export type { EuiPopoverProps, PopoverAnchorPosition } from './popover'; +export { EuiPopover } from './popover'; +export type { EuiPopoverTitleProps } from './popover_title'; +export { EuiPopoverTitle } from './popover_title'; +export type { EuiPopoverFooterProps } from './popover_footer'; +export { EuiPopoverFooter } from './popover_footer'; +export type { EuiWrappingPopoverProps } from './wrapping_popover'; +export { EuiWrappingPopover } from './wrapping_popover'; diff --git a/src/components/portal/index.ts b/src/components/portal/index.ts index a81d82531aa..ab44058f623 100644 --- a/src/components/portal/index.ts +++ b/src/components/portal/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiPortal, EuiPortalProps } from './portal'; +export type { EuiPortalProps } from './portal'; +export { EuiPortal } from './portal'; diff --git a/src/components/progress/index.ts b/src/components/progress/index.ts index 461ad1b96f8..44ed611370e 100644 --- a/src/components/progress/index.ts +++ b/src/components/progress/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiProgress, EuiProgressProps } from './progress'; +export type { EuiProgressProps } from './progress'; +export { EuiProgress } from './progress'; diff --git a/src/components/provider/index.ts b/src/components/provider/index.ts index ea3ec0b586b..796ec921a23 100644 --- a/src/components/provider/index.ts +++ b/src/components/provider/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiProvider, EuiProviderProps } from './provider'; +export type { EuiProviderProps } from './provider'; +export { EuiProvider } from './provider'; diff --git a/src/components/resizable_container/index.ts b/src/components/resizable_container/index.ts index d1b6d3529b8..3b740c094c0 100644 --- a/src/components/resizable_container/index.ts +++ b/src/components/resizable_container/index.ts @@ -6,7 +6,5 @@ * Side Public License, v 1. */ -export { - EuiResizableContainer, - EuiResizableContainerProps, -} from './resizable_container'; +export type { EuiResizableContainerProps } from './resizable_container'; +export { EuiResizableContainer } from './resizable_container'; diff --git a/src/components/responsive/index.ts b/src/components/responsive/index.ts index 428d4549108..6a3510676fd 100644 --- a/src/components/responsive/index.ts +++ b/src/components/responsive/index.ts @@ -6,5 +6,7 @@ * Side Public License, v 1. */ -export { EuiHideFor, EuiHideForProps } from './hide_for'; -export { EuiShowFor, EuiShowForProps } from './show_for'; +export type { EuiHideForProps } from './hide_for'; +export { EuiHideFor } from './hide_for'; +export type { EuiShowForProps } from './show_for'; +export { EuiShowFor } from './show_for'; diff --git a/src/components/search_bar/filters/index.ts b/src/components/search_bar/filters/index.ts index 49d557cb173..03c6c935c8f 100644 --- a/src/components/search_bar/filters/index.ts +++ b/src/components/search_bar/filters/index.ts @@ -6,5 +6,6 @@ * Side Public License, v 1. */ -export { createFilter, SearchFilterConfig } from './filters'; -export { FieldValueOptionType } from './field_value_selection_filter'; +export type { SearchFilterConfig } from './filters'; +export { createFilter } from './filters'; +export type { FieldValueOptionType } from './field_value_selection_filter'; diff --git a/src/components/search_bar/index.ts b/src/components/search_bar/index.ts index 79e8be52f84..dc304a83a10 100644 --- a/src/components/search_bar/index.ts +++ b/src/components/search_bar/index.ts @@ -6,13 +6,11 @@ * Side Public License, v 1. */ -export { - EuiSearchBar, +export type { EuiSearchBarProps, EuiSearchBarOnChangeArgs, QueryType, - Query, - Ast, } from './search_bar'; -export { SearchFilterConfig } from './search_filters'; -export { FieldValueOptionType } from './filters/field_value_selection_filter'; +export { EuiSearchBar, Query, Ast } from './search_bar'; +export type { SearchFilterConfig } from './search_filters'; +export type { FieldValueOptionType } from './filters/field_value_selection_filter'; diff --git a/src/components/search_bar/search_filters.tsx b/src/components/search_bar/search_filters.tsx index c5d655fb94d..4b02380b24b 100644 --- a/src/components/search_bar/search_filters.tsx +++ b/src/components/search_bar/search_filters.tsx @@ -11,7 +11,7 @@ import { createFilter, SearchFilterConfig } from './filters'; import { Query } from './query'; import { EuiFilterGroup } from '../filter_group'; -export { SearchFilterConfig } from './filters'; +export type { SearchFilterConfig } from './filters'; interface EuiSearchFiltersProps { query: Query; diff --git a/src/components/selectable/index.ts b/src/components/selectable/index.ts index 9e44c33892c..084dd24314c 100644 --- a/src/components/selectable/index.ts +++ b/src/components/selectable/index.ts @@ -6,31 +6,28 @@ * Side Public License, v 1. */ -export { - EuiSelectable, +export type { EuiSelectableProps, EuiSelectableSearchableSearchProps, } from './selectable'; -export { - EuiSelectableList, +export { EuiSelectable } from './selectable'; +export type { EuiSelectableListProps, - EuiSelectableListItem, EuiSelectableListItemProps, EuiSelectableOptionsListProps, } from './selectable_list'; -export { - EuiSelectableMessage, - EuiSelectableMessageProps, -} from './selectable_message'; -export { EuiSelectableOption } from './selectable_option'; -export { - EuiSelectableSearch, - EuiSelectableSearchProps, -} from './selectable_search'; -export { - EuiSelectableTemplateSitewide, +export { EuiSelectableList, EuiSelectableListItem } from './selectable_list'; +export type { EuiSelectableMessageProps } from './selectable_message'; +export { EuiSelectableMessage } from './selectable_message'; +export type { EuiSelectableOption } from './selectable_option'; +export type { EuiSelectableSearchProps } from './selectable_search'; +export { EuiSelectableSearch } from './selectable_search'; +export type { EuiSelectableTemplateSitewideProps, EuiSelectableTemplateSitewideOption, EuiSelectableTemplateSitewideMetaData, +} from './selectable_templates'; +export { + EuiSelectableTemplateSitewide, euiSelectableTemplateSitewideRenderOptions, } from './selectable_templates'; diff --git a/src/components/selectable/selectable_list/index.ts b/src/components/selectable/selectable_list/index.ts index ba498f70b37..3fc6f8a84f1 100644 --- a/src/components/selectable/selectable_list/index.ts +++ b/src/components/selectable/selectable_list/index.ts @@ -6,13 +6,11 @@ * Side Public License, v 1. */ -export { - EuiSelectableList, +export type { EuiSelectableListProps, EuiSelectableOptionsListProps, EuiSelectableOptionsListVirtualizedProps, } from './selectable_list'; -export { - EuiSelectableListItem, - EuiSelectableListItemProps, -} from './selectable_list_item'; +export { EuiSelectableList } from './selectable_list'; +export type { EuiSelectableListItemProps } from './selectable_list_item'; +export { EuiSelectableListItem } from './selectable_list_item'; diff --git a/src/components/selectable/selectable_message/index.ts b/src/components/selectable/selectable_message/index.ts index b83d33e9275..912faf2caa2 100644 --- a/src/components/selectable/selectable_message/index.ts +++ b/src/components/selectable/selectable_message/index.ts @@ -6,7 +6,5 @@ * Side Public License, v 1. */ -export { - EuiSelectableMessage, - EuiSelectableMessageProps, -} from './selectable_message'; +export type { EuiSelectableMessageProps } from './selectable_message'; +export { EuiSelectableMessage } from './selectable_message'; diff --git a/src/components/selectable/selectable_search/index.ts b/src/components/selectable/selectable_search/index.ts index 78e1e8c6f00..6d41364381a 100644 --- a/src/components/selectable/selectable_search/index.ts +++ b/src/components/selectable/selectable_search/index.ts @@ -6,7 +6,5 @@ * Side Public License, v 1. */ -export { - EuiSelectableSearch, - EuiSelectableSearchProps, -} from './selectable_search'; +export type { EuiSelectableSearchProps } from './selectable_search'; +export { EuiSelectableSearch } from './selectable_search'; diff --git a/src/components/selectable/selectable_templates/index.ts b/src/components/selectable/selectable_templates/index.ts index c8924b32d5e..186a11aa799 100644 --- a/src/components/selectable/selectable_templates/index.ts +++ b/src/components/selectable/selectable_templates/index.ts @@ -6,14 +6,14 @@ * Side Public License, v 1. */ -export { - EuiSelectableTemplateSitewide, - EuiSelectableTemplateSitewideProps, -} from './selectable_template_sitewide'; +export type { EuiSelectableTemplateSitewideProps } from './selectable_template_sitewide'; +export { EuiSelectableTemplateSitewide } from './selectable_template_sitewide'; -export { +export type { EuiSelectableTemplateSitewideOption, EuiSelectableTemplateSitewideMetaData, +} from './selectable_template_sitewide_option'; +export { euiSelectableTemplateSitewideFormatOptions, euiSelectableTemplateSitewideRenderOptions, } from './selectable_template_sitewide_option'; diff --git a/src/components/side_nav/index.ts b/src/components/side_nav/index.ts index 3ba654581ee..1f807e457e2 100644 --- a/src/components/side_nav/index.ts +++ b/src/components/side_nav/index.ts @@ -6,6 +6,7 @@ * Side Public License, v 1. */ -export { EuiSideNav, EuiSideNavProps } from './side_nav'; +export type { EuiSideNavProps } from './side_nav'; +export { EuiSideNav } from './side_nav'; export * from './side_nav_types'; diff --git a/src/components/spacer/index.ts b/src/components/spacer/index.ts index 092dd703435..a07955f5c31 100644 --- a/src/components/spacer/index.ts +++ b/src/components/spacer/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiSpacer, EuiSpacerProps } from './spacer'; +export type { EuiSpacerProps } from './spacer'; +export { EuiSpacer } from './spacer'; diff --git a/src/components/stat/index.ts b/src/components/stat/index.ts index d4db5380d86..79e233eca39 100644 --- a/src/components/stat/index.ts +++ b/src/components/stat/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiStat, EuiStatProps } from './stat'; +export type { EuiStatProps } from './stat'; +export { EuiStat } from './stat'; diff --git a/src/components/steps/index.ts b/src/components/steps/index.ts index 2442a70bb18..506eb240c7e 100644 --- a/src/components/steps/index.ts +++ b/src/components/steps/index.ts @@ -6,21 +6,19 @@ * Side Public License, v 1. */ -export { EuiStep, EuiStepProps } from './step'; +export type { EuiStepProps } from './step'; +export { EuiStep } from './step'; -export { EuiSteps, EuiStepsProps } from './steps'; +export type { EuiStepsProps } from './steps'; +export { EuiSteps } from './steps'; -export { EuiSubSteps, EuiSubStepsProps } from './sub_steps'; +export type { EuiSubStepsProps } from './sub_steps'; +export { EuiSubSteps } from './sub_steps'; export { EuiStepHorizontal } from './step_horizontal'; -export { - EuiStepsHorizontal, - EuiStepsHorizontalProps, -} from './steps_horizontal'; +export type { EuiStepsHorizontalProps } from './steps_horizontal'; +export { EuiStepsHorizontal } from './steps_horizontal'; -export { - EuiStepStatus, - EuiStepNumber, - EuiStepNumberProps, -} from './step_number'; +export type { EuiStepStatus, EuiStepNumberProps } from './step_number'; +export { EuiStepNumber } from './step_number'; diff --git a/src/components/suggest/index.ts b/src/components/suggest/index.ts index 568d6938797..6239cf51904 100644 --- a/src/components/suggest/index.ts +++ b/src/components/suggest/index.ts @@ -6,8 +6,11 @@ * Side Public License, v 1. */ -export { EuiSuggestInput, EuiSuggestInputProps } from './suggest_input'; +export type { EuiSuggestInputProps } from './suggest_input'; +export { EuiSuggestInput } from './suggest_input'; -export { EuiSuggestItem, EuiSuggestItemProps } from './suggest_item'; +export type { EuiSuggestItemProps } from './suggest_item'; +export { EuiSuggestItem } from './suggest_item'; -export { EuiSuggest, EuiSuggestProps } from './suggest'; +export type { EuiSuggestProps } from './suggest'; +export { EuiSuggest } from './suggest'; diff --git a/src/components/table/index.ts b/src/components/table/index.ts index d51a837bb86..6946313be67 100644 --- a/src/components/table/index.ts +++ b/src/components/table/index.ts @@ -6,39 +6,30 @@ * Side Public License, v 1. */ -export { EuiTable, EuiTableProps } from './table'; -export { EuiTableBody, EuiTableBodyProps } from './table_body'; +export type { EuiTableProps } from './table'; +export { EuiTable } from './table'; +export type { EuiTableBodyProps } from './table_body'; +export { EuiTableBody } from './table_body'; export { EuiTableFooter } from './table_footer'; -export { - EuiTableFooterCell, - EuiTableFooterCellProps, -} from './table_footer_cell'; -export { EuiTableHeader, EuiTableHeaderProps } from './table_header'; -export { - EuiTableHeaderButton, - EuiTableHeaderButtonProps, -} from './table_header_button'; -export { - EuiTableHeaderCell, - EuiTableHeaderCellProps, -} from './table_header_cell'; -export { - EuiTableHeaderCellCheckbox, - EuiTableHeaderCellCheckboxProps, -} from './table_header_cell_checkbox'; -export { - EuiTablePagination, - EuiTablePaginationProps, -} from './table_pagination'; +export type { EuiTableFooterCellProps } from './table_footer_cell'; +export { EuiTableFooterCell } from './table_footer_cell'; +export type { EuiTableHeaderProps } from './table_header'; +export { EuiTableHeader } from './table_header'; +export type { EuiTableHeaderButtonProps } from './table_header_button'; +export { EuiTableHeaderButton } from './table_header_button'; +export type { EuiTableHeaderCellProps } from './table_header_cell'; +export { EuiTableHeaderCell } from './table_header_cell'; +export type { EuiTableHeaderCellCheckboxProps } from './table_header_cell_checkbox'; +export { EuiTableHeaderCellCheckbox } from './table_header_cell_checkbox'; +export type { EuiTablePaginationProps } from './table_pagination'; +export { EuiTablePagination } from './table_pagination'; export { EuiTableHeaderMobile } from './mobile/table_header_mobile'; -export { - EuiTableSortMobile, - EuiTableSortMobileProps, -} from './mobile/table_sort_mobile'; -export { - EuiTableSortMobileItem, - EuiTableSortMobileItemProps, -} from './mobile/table_sort_mobile_item'; -export { EuiTableRow, EuiTableRowProps } from './table_row'; -export { EuiTableRowCell, EuiTableRowCellProps } from './table_row_cell'; +export type { EuiTableSortMobileProps } from './mobile/table_sort_mobile'; +export { EuiTableSortMobile } from './mobile/table_sort_mobile'; +export type { EuiTableSortMobileItemProps } from './mobile/table_sort_mobile_item'; +export { EuiTableSortMobileItem } from './mobile/table_sort_mobile_item'; +export type { EuiTableRowProps } from './table_row'; +export { EuiTableRow } from './table_row'; +export type { EuiTableRowCellProps } from './table_row_cell'; +export { EuiTableRowCell } from './table_row_cell'; export { EuiTableRowCellCheckbox } from './table_row_cell_checkbox'; diff --git a/src/components/table/mobile/index.tsx b/src/components/table/mobile/index.tsx index 44d90be364e..19bcda888ac 100644 --- a/src/components/table/mobile/index.tsx +++ b/src/components/table/mobile/index.tsx @@ -8,12 +8,8 @@ export { EuiTableHeaderMobile } from './table_header_mobile'; -export { - EuiTableSortMobile, - EuiTableSortMobileProps, -} from './table_sort_mobile'; +export type { EuiTableSortMobileProps } from './table_sort_mobile'; +export { EuiTableSortMobile } from './table_sort_mobile'; -export { - EuiTableSortMobileItem, - EuiTableSortMobileItemProps, -} from './table_sort_mobile_item'; +export type { EuiTableSortMobileItemProps } from './table_sort_mobile_item'; +export { EuiTableSortMobileItem } from './table_sort_mobile_item'; diff --git a/src/components/table/table_pagination/index.ts b/src/components/table/table_pagination/index.ts index ae3ecb70782..2607fe7f966 100644 --- a/src/components/table/table_pagination/index.ts +++ b/src/components/table/table_pagination/index.ts @@ -6,7 +6,5 @@ * Side Public License, v 1. */ -export { - EuiTablePagination, - EuiTablePaginationProps, -} from './table_pagination'; +export type { EuiTablePaginationProps } from './table_pagination'; +export { EuiTablePagination } from './table_pagination'; diff --git a/src/components/tabs/index.ts b/src/components/tabs/index.ts index 6a3b2f68110..182f7bc8d70 100644 --- a/src/components/tabs/index.ts +++ b/src/components/tabs/index.ts @@ -6,10 +6,12 @@ * Side Public License, v 1. */ -export { EuiTab, EuiTabProps } from './tab'; -export { EuiTabs, EuiTabsProps } from './tabs'; -export { - EuiTabbedContent, +export type { EuiTabProps } from './tab'; +export { EuiTab } from './tab'; +export type { EuiTabsProps } from './tabs'; +export { EuiTabs } from './tabs'; +export type { EuiTabbedContentTab, EuiTabbedContentProps, } from './tabbed_content'; +export { EuiTabbedContent } from './tabbed_content'; diff --git a/src/components/tabs/tabbed_content/index.ts b/src/components/tabs/tabbed_content/index.ts index d2d9bcb47dc..ffa3b4898b8 100644 --- a/src/components/tabs/tabbed_content/index.ts +++ b/src/components/tabs/tabbed_content/index.ts @@ -6,8 +6,8 @@ * Side Public License, v 1. */ -export { - EuiTabbedContent, +export type { EuiTabbedContentTab, EuiTabbedContentProps, } from './tabbed_content'; +export { EuiTabbedContent } from './tabbed_content'; diff --git a/src/components/text/index.ts b/src/components/text/index.ts index 59ec44f2793..dfe564289e4 100644 --- a/src/components/text/index.ts +++ b/src/components/text/index.ts @@ -6,6 +6,9 @@ * Side Public License, v 1. */ -export { EuiText, EuiTextProps } from './text'; -export { EuiTextColor, EuiTextColorProps } from './text_color'; -export { EuiTextAlign, EuiTextAlignProps } from './text_align'; +export type { EuiTextProps } from './text'; +export { EuiText } from './text'; +export type { EuiTextColorProps } from './text_color'; +export { EuiTextColor } from './text_color'; +export type { EuiTextAlignProps } from './text_align'; +export { EuiTextAlign } from './text_align'; diff --git a/src/components/text_diff/index.ts b/src/components/text_diff/index.ts index deff0788eee..7528eed5ab9 100644 --- a/src/components/text_diff/index.ts +++ b/src/components/text_diff/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { useEuiTextDiff, EuiTextDiffProps } from './text_diff'; +export type { EuiTextDiffProps } from './text_diff'; +export { useEuiTextDiff } from './text_diff'; diff --git a/src/components/title/index.ts b/src/components/title/index.ts index d410c706cd5..7fc26c37db7 100644 --- a/src/components/title/index.ts +++ b/src/components/title/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiTitle, EuiTitleProps, EuiTitleSize } from './title'; +export type { EuiTitleProps, EuiTitleSize } from './title'; +export { EuiTitle } from './title'; diff --git a/src/components/toast/index.ts b/src/components/toast/index.ts index a1afb60b1f2..5b1301e0e53 100644 --- a/src/components/toast/index.ts +++ b/src/components/toast/index.ts @@ -8,13 +8,11 @@ export { EuiToast } from './toast'; -export { - EuiGlobalToastList, +export type { EuiGlobalToastListProps, Toast as EuiGlobalToastListToast, } from './global_toast_list'; +export { EuiGlobalToastList } from './global_toast_list'; -export { - EuiGlobalToastListItem, - EuiGlobalToastListItemProps, -} from './global_toast_list_item'; +export type { EuiGlobalToastListItemProps } from './global_toast_list_item'; +export { EuiGlobalToastListItem } from './global_toast_list_item'; diff --git a/src/components/token/index.ts b/src/components/token/index.ts index b10fe04c20a..ea078101591 100644 --- a/src/components/token/index.ts +++ b/src/components/token/index.ts @@ -6,9 +6,9 @@ * Side Public License, v 1. */ +export type { EuiTokenProps } from './token'; export { EuiToken, - EuiTokenProps, SIZES as TOKEN_SIZES, SHAPES as TOKEN_SHAPES, COLORS as TOKEN_COLORS, diff --git a/src/components/tool_tip/index.ts b/src/components/tool_tip/index.ts index 255994aec61..c14b6060949 100644 --- a/src/components/tool_tip/index.ts +++ b/src/components/tool_tip/index.ts @@ -6,6 +6,8 @@ * Side Public License, v 1. */ -export { EuiToolTip, ToolTipPositions, EuiToolTipProps } from './tool_tip'; +export type { ToolTipPositions, EuiToolTipProps } from './tool_tip'; +export { EuiToolTip } from './tool_tip'; -export { EuiIconTip, EuiIconTipProps } from './icon_tip'; +export type { EuiIconTipProps } from './icon_tip'; +export { EuiIconTip } from './icon_tip'; diff --git a/src/components/tour/index.ts b/src/components/tour/index.ts index ebef7930a7e..5863a3b37b4 100644 --- a/src/components/tour/index.ts +++ b/src/components/tour/index.ts @@ -6,11 +6,12 @@ * Side Public License, v 1. */ -export { EuiTour, EuiTourProps } from './tour'; -export { EuiTourStep, EuiTourStepProps } from './tour_step'; -export { - EuiTourStepIndicator, - EuiTourStepIndicatorProps, -} from './tour_step_indicator'; -export { useEuiTour, EuiStatelessTourStep } from './useEuiTour'; +export type { EuiTourProps } from './tour'; +export { EuiTour } from './tour'; +export type { EuiTourStepProps } from './tour_step'; +export { EuiTourStep } from './tour_step'; +export type { EuiTourStepIndicatorProps } from './tour_step_indicator'; +export { EuiTourStepIndicator } from './tour_step_indicator'; +export type { EuiStatelessTourStep } from './useEuiTour'; +export { useEuiTour } from './useEuiTour'; export * from './types'; diff --git a/src/components/tree_view/index.ts b/src/components/tree_view/index.ts index d65b3616290..77b2abcb85c 100644 --- a/src/components/tree_view/index.ts +++ b/src/components/tree_view/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiTreeView, EuiTreeViewProps } from './tree_view'; +export type { EuiTreeViewProps } from './tree_view'; +export { EuiTreeView } from './tree_view'; diff --git a/src/services/color/index.ts b/src/services/color/index.ts index c34d5637d4a..ee57703c181 100644 --- a/src/services/color/index.ts +++ b/src/services/color/index.ts @@ -37,7 +37,7 @@ export { euiPaletteWarm, euiPaletteGray, } from './eui_palettes'; -export { rgbDef, HSV, RGB } from './color_types'; +export type { rgbDef, HSV, RGB } from './color_types'; export { getSteppedGradient } from './stepped_gradient'; export * from './manipulation'; export * from './contrast'; diff --git a/src/services/color_picker/index.ts b/src/services/color_picker/index.ts index cc292ce895b..983281d1a0e 100644 --- a/src/services/color_picker/index.ts +++ b/src/services/color_picker/index.ts @@ -6,8 +6,5 @@ * Side Public License, v 1. */ -export { - useColorPickerState, - useColorStopsState, - EuiSetColorMethod, -} from './color_picker'; +export type { EuiSetColorMethod } from './color_picker'; +export { useColorPickerState, useColorStopsState } from './color_picker'; diff --git a/src/services/index.ts b/src/services/index.ts index d01172c9961..37b8b90e14d 100644 --- a/src/services/index.ts +++ b/src/services/index.ts @@ -18,13 +18,10 @@ export { useGeneratedHtmlId, } from './accessibility'; -export { - HorizontalAlignment, - LEFT_ALIGNMENT, - RIGHT_ALIGNMENT, - CENTER_ALIGNMENT, -} from './alignment'; +export type { HorizontalAlignment } from './alignment'; +export { LEFT_ALIGNMENT, RIGHT_ALIGNMENT, CENTER_ALIGNMENT } from './alignment'; +export type { EuiBreakpointSize } from './breakpoint'; export { BREAKPOINTS, BREAKPOINT_KEYS, @@ -32,9 +29,9 @@ export { isWithinBreakpoints, isWithinMaxBreakpoint, isWithinMinBreakpoint, - EuiBreakpointSize, } from './breakpoint'; +export type { HSV } from './color'; export { isColorDark, isValidHex, @@ -61,7 +58,6 @@ export { euiPaletteCool, euiPaletteWarm, euiPaletteGray, - HSV, getSteppedGradient, transparentize, tint, @@ -73,11 +69,8 @@ export { makeDisabledContrastColor, } from './color'; -export { - useColorPickerState, - useColorStopsState, - EuiSetColorMethod, -} from './color_picker'; +export type { EuiSetColorMethod } from './color_picker'; +export { useColorPickerState, useColorStopsState } from './color_picker'; export * from './console'; @@ -102,12 +95,11 @@ export { getSecureRelForTarget } from './security'; export { toSentenceCase, toInitials, slugify } from './string'; +export type { PropertySort, Direction } from './sort'; export { PropertySortType, - PropertySort, SortDirectionType, SortDirection, - Direction, SortableProperties, Comparators, } from './sort'; diff --git a/src/services/popover/index.ts b/src/services/popover/index.ts index 20c7aadb893..b89b73f6184 100644 --- a/src/services/popover/index.ts +++ b/src/services/popover/index.ts @@ -8,4 +8,4 @@ export { calculatePopoverPosition } from './calculate_popover_position'; export { findPopoverPosition, getElementZIndex } from './popover_positioning'; -export { EuiPopoverPosition } from './types'; +export type { EuiPopoverPosition } from './types'; diff --git a/src/services/sort/index.ts b/src/services/sort/index.ts index d837c6957a9..86b77405005 100644 --- a/src/services/sort/index.ts +++ b/src/services/sort/index.ts @@ -7,6 +7,8 @@ */ export { SortableProperties } from './sortable_properties'; -export { SortDirectionType, SortDirection, Direction } from './sort_direction'; -export { PropertySortType, PropertySort } from './property_sort'; +export type { Direction } from './sort_direction'; +export { SortDirectionType, SortDirection } from './sort_direction'; +export type { PropertySort } from './property_sort'; +export { PropertySortType } from './property_sort'; export { Comparators } from './comparators'; diff --git a/src/services/theme/index.ts b/src/services/theme/index.ts index dae2d87647a..5cf307f8879 100644 --- a/src/services/theme/index.ts +++ b/src/services/theme/index.ts @@ -12,13 +12,10 @@ export { EuiModificationsContext, EuiColorModeContext, } from './context'; -export { - useEuiTheme, - UseEuiTheme, - withEuiTheme, - WithEuiThemeProps, -} from './hooks'; -export { EuiThemeProvider, EuiThemeProviderProps } from './provider'; +export type { UseEuiTheme, WithEuiThemeProps } from './hooks'; +export { useEuiTheme, withEuiTheme } from './hooks'; +export type { EuiThemeProviderProps } from './provider'; +export { EuiThemeProvider } from './provider'; export { buildTheme, computed, @@ -30,7 +27,7 @@ export { setOn, Computed, } from './utils'; -export { +export type { ComputedThemeShape, EuiThemeColorMode, EuiThemeColorModeStandard, @@ -38,7 +35,7 @@ export { EuiThemeModifications, EuiThemeShape, EuiThemeSystem, - COLOR_MODES_STANDARD, } from './types'; +export { COLOR_MODES_STANDARD } from './types'; export { lineHeightFromBaseline } from './typography'; export { sizeToPixel } from './size'; diff --git a/src/themes/index.ts b/src/themes/index.ts index 8152cf54801..e1b0ae15b8c 100644 --- a/src/themes/index.ts +++ b/src/themes/index.ts @@ -6,7 +6,8 @@ * Side Public License, v 1. */ -export { EUI_THEMES, EUI_THEME, isLegacyTheme, isDefaultTheme } from './themes'; +export type { EUI_THEME } from './themes'; +export { EUI_THEMES, isLegacyTheme, isDefaultTheme } from './themes'; export { AMSTERDAM_NAME_KEY, EuiThemeAmsterdam } from './amsterdam/theme'; export { LEGACY_NAME_KEY, EuiThemeLegacy } from './legacy/theme'; From 4b850f73a2d33918fb4ecd366fe0338af6a1a76f Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Mon, 24 Jan 2022 09:52:37 -0800 Subject: [PATCH 04/10] Fix eslint failure on src/themes/index.d.ts by ignoring file Not sure if this is the best approach, will ping Greg --- .eslintignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintignore b/.eslintignore index 993c134d8e4..ccd4cd91b67 100644 --- a/.eslintignore +++ b/.eslintignore @@ -5,6 +5,7 @@ lib test-env types eui.d.ts +src/themes/index.d.ts package.json docs packages From 3f9d72f04b36210c02492de41482b5edcda64d06 Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Fri, 28 Jan 2022 11:33:12 -0600 Subject: [PATCH 05/10] remove generatePropTypes option --- .babelrc-optimize.js | 4 +--- scripts/babel/proptypes-from-ts-props/index.js | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.babelrc-optimize.js b/.babelrc-optimize.js index 7ac223e4c7f..6d1b8f012a0 100644 --- a/.babelrc-optimize.js +++ b/.babelrc-optimize.js @@ -2,13 +2,11 @@ const baseConfig = require('./.babelrc.js'); // Skip `propType` generation. -// Still removes type exports for the es builds baseConfig.plugins.splice( baseConfig.plugins.indexOf( './scripts/babel/proptypes-from-ts-props' ), - 1, - ['./scripts/babel/proptypes-from-ts-props', { generatePropTypes: false }] + 1 ); // Transform runtimes using babel plugin. // Requires consuming applications to use `@babel/runtime`. diff --git a/scripts/babel/proptypes-from-ts-props/index.js b/scripts/babel/proptypes-from-ts-props/index.js index 276c2edaef6..b02a9114394 100644 --- a/scripts/babel/proptypes-from-ts-props/index.js +++ b/scripts/babel/proptypes-from-ts-props/index.js @@ -1300,9 +1300,6 @@ const buildPropTypes = babelTemplate('COMPONENT_NAME.propTypes = PROP_TYPES'); function processComponentDeclaration(typeDefinition, path, state) { const types = state.get('types'); - // Do not generate propTypes - if (state.opts.generatePropTypes === false) return; - const propTypesAST = getPropTypesForNode(typeDefinition, false, state); // if the resulting proptype is PropTypes.any don't bother setting the proptypes From a3d1cf15e05e6c1dd52f049256490478ac7adcfe Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Fri, 28 Jan 2022 15:03:02 -0600 Subject: [PATCH 06/10] remove theme d.ts --- .eslintignore | 1 - src/themes/index.d.ts | 12 ------------ 2 files changed, 13 deletions(-) delete mode 100644 src/themes/index.d.ts diff --git a/.eslintignore b/.eslintignore index ccd4cd91b67..993c134d8e4 100644 --- a/.eslintignore +++ b/.eslintignore @@ -5,7 +5,6 @@ lib test-env types eui.d.ts -src/themes/index.d.ts package.json docs packages diff --git a/src/themes/index.d.ts b/src/themes/index.d.ts deleted file mode 100644 index f29936a1b51..00000000000 --- a/src/themes/index.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0 and the Server Side Public License, v 1; you may not use this file except - * in compliance with, at your election, the Elastic License 2.0 or the Server - * Side Public License, v 1. - */ - -declare module '@elastic/eui/dist/eui_theme_*.json' { - const value: any; - export default value; -} From c50e1a6df75d071d654ea926f959ffb5993a248d Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Fri, 28 Jan 2022 15:05:09 -0600 Subject: [PATCH 07/10] simplify proptypes-from-ts-props --- .../babel/proptypes-from-ts-props/index.js | 100 +++++++++--------- .../proptypes-from-ts-props/index.test.ts | 20 ---- 2 files changed, 50 insertions(+), 70 deletions(-) diff --git a/scripts/babel/proptypes-from-ts-props/index.js b/scripts/babel/proptypes-from-ts-props/index.js index b02a9114394..e4c42dff06f 100644 --- a/scripts/babel/proptypes-from-ts-props/index.js +++ b/scripts/babel/proptypes-from-ts-props/index.js @@ -1427,56 +1427,56 @@ module.exports = function propTypesFromTypeScript({ types }) { } } }, - exit: function exitProgram(programPath, state) { - // only process typescript files - if ( - path.extname(state.file.opts.filename) !== '.ts' && - path.extname(state.file.opts.filename) !== '.tsx' - ) - return; - - const types = state.get('types'); - const typeDefinitions = state.get('typeDefinitions'); - - // remove any exported identifiers that are TS types or interfaces - // this prevents TS-only identifiers from leaking into ES code - programPath.traverse({ - ExportNamedDeclaration: path => { - const specifiers = path.get('specifiers'); - const source = path.get('source'); - specifiers.forEach(specifierPath => { - if (types.isExportSpecifier(specifierPath)) { - const { - node: { local }, - } = specifierPath; - if (types.isIdentifier(local)) { - const { name } = local; - if (typeDefinitions.hasOwnProperty(name)) { - // this is a locally-known value - const def = typeDefinitions[name]; - if (isTSType(def)) { - specifierPath.remove(); - } - } else if (types.isStringLiteral(source)) { - const libraryName = source.get('value').node; - const isRelativeSource = libraryName.startsWith('.'); - if (isRelativeSource === false) { - // comes from a 3rd-party library - // best way to reliably check if this is - // a type or value is to require the - // library and check its exports - const library = require(libraryName); - if (library.hasOwnProperty(name) === false) { - specifierPath.remove(); - } - } - } - } - } - }); - }, - }); - }, + // exit: function exitProgram(programPath, state) { + // // only process typescript files + // if ( + // path.extname(state.file.opts.filename) !== '.ts' && + // path.extname(state.file.opts.filename) !== '.tsx' + // ) + // return; + + // const types = state.get('types'); + // const typeDefinitions = state.get('typeDefinitions'); + + // // remove any exported identifiers that are TS types or interfaces + // // this prevents TS-only identifiers from leaking into ES code + // programPath.traverse({ + // ExportNamedDeclaration: path => { + // const specifiers = path.get('specifiers'); + // const source = path.get('source'); + // specifiers.forEach(specifierPath => { + // if (types.isExportSpecifier(specifierPath)) { + // const { + // node: { local }, + // } = specifierPath; + // if (types.isIdentifier(local)) { + // const { name } = local; + // if (typeDefinitions.hasOwnProperty(name)) { + // // this is a locally-known value + // const def = typeDefinitions[name]; + // if (isTSType(def)) { + // specifierPath.remove(); + // } + // } else if (types.isStringLiteral(source)) { + // const libraryName = source.get('value').node; + // const isRelativeSource = libraryName.startsWith('.'); + // if (isRelativeSource === false) { + // // comes from a 3rd-party library + // // best way to reliably check if this is + // // a type or value is to require the + // // library and check its exports + // const library = require(libraryName); + // if (library.hasOwnProperty(name) === false) { + // specifierPath.remove(); + // } + // } + // } + // } + // } + // }); + // }, + // }); + // }, }, /** diff --git a/scripts/babel/proptypes-from-ts-props/index.test.ts b/scripts/babel/proptypes-from-ts-props/index.test.ts index d8024e10070..2037b20cbd0 100644 --- a/scripts/babel/proptypes-from-ts-props/index.test.ts +++ b/scripts/babel/proptypes-from-ts-props/index.test.ts @@ -2515,26 +2515,6 @@ let something: any; expect(result.code).toBe('let something;'); }); }); - - it('can be disabled', () => { - const configuredBabelOptions = JSON.parse(JSON.stringify(babelOptions)); - configuredBabelOptions.plugins[0] = ['./scripts/babel/proptypes-from-ts-props', { generatePropTypes: false }]; - - const result = transform( - ` -import React from 'react'; -interface IFooProps {bar: string} -const FooComponent: React.SFC = () => { - return (
Hello World
); -}`, - configuredBabelOptions - ); - - expect(result.code).toBe(`import React from 'react'; -const FooComponent = () => { - return
Hello World
; -};`); - }); }); describe('remove types from exports', () => { From 11188bfccd245d2f12e6f84d720748c16864a6a6 Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Fri, 28 Jan 2022 15:06:30 -0600 Subject: [PATCH 08/10] clean up --- .../babel/proptypes-from-ts-props/index.js | 50 ------------------- 1 file changed, 50 deletions(-) diff --git a/scripts/babel/proptypes-from-ts-props/index.js b/scripts/babel/proptypes-from-ts-props/index.js index e4c42dff06f..5ee71b02c59 100644 --- a/scripts/babel/proptypes-from-ts-props/index.js +++ b/scripts/babel/proptypes-from-ts-props/index.js @@ -1427,56 +1427,6 @@ module.exports = function propTypesFromTypeScript({ types }) { } } }, - // exit: function exitProgram(programPath, state) { - // // only process typescript files - // if ( - // path.extname(state.file.opts.filename) !== '.ts' && - // path.extname(state.file.opts.filename) !== '.tsx' - // ) - // return; - - // const types = state.get('types'); - // const typeDefinitions = state.get('typeDefinitions'); - - // // remove any exported identifiers that are TS types or interfaces - // // this prevents TS-only identifiers from leaking into ES code - // programPath.traverse({ - // ExportNamedDeclaration: path => { - // const specifiers = path.get('specifiers'); - // const source = path.get('source'); - // specifiers.forEach(specifierPath => { - // if (types.isExportSpecifier(specifierPath)) { - // const { - // node: { local }, - // } = specifierPath; - // if (types.isIdentifier(local)) { - // const { name } = local; - // if (typeDefinitions.hasOwnProperty(name)) { - // // this is a locally-known value - // const def = typeDefinitions[name]; - // if (isTSType(def)) { - // specifierPath.remove(); - // } - // } else if (types.isStringLiteral(source)) { - // const libraryName = source.get('value').node; - // const isRelativeSource = libraryName.startsWith('.'); - // if (isRelativeSource === false) { - // // comes from a 3rd-party library - // // best way to reliably check if this is - // // a type or value is to require the - // // library and check its exports - // const library = require(libraryName); - // if (library.hasOwnProperty(name) === false) { - // specifierPath.remove(); - // } - // } - // } - // } - // } - // }); - // }, - // }); - // }, }, /** From 196541e726a80df6ca5c33ff2c07fdc0f72a4cb8 Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Tue, 1 Feb 2022 14:05:39 -0600 Subject: [PATCH 09/10] merge fix --- src/components/accessibility/screen_reader_live/index.ts | 6 ++---- src/components/accessibility/screen_reader_only/index.ts | 6 ++---- src/components/accessibility/skip_link/index.ts | 3 ++- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/components/accessibility/screen_reader_live/index.ts b/src/components/accessibility/screen_reader_live/index.ts index c21251edfce..25887bb4922 100644 --- a/src/components/accessibility/screen_reader_live/index.ts +++ b/src/components/accessibility/screen_reader_live/index.ts @@ -6,7 +6,5 @@ * Side Public License, v 1. */ -export { - EuiScreenReaderLive, - EuiScreenReaderLiveProps, -} from './screen_reader_live'; +export { EuiScreenReaderLive } from './screen_reader_live'; +export type { EuiScreenReaderLiveProps } from './screen_reader_live'; diff --git a/src/components/accessibility/screen_reader_only/index.ts b/src/components/accessibility/screen_reader_only/index.ts index 5a8e9c04f1d..a95520fced4 100644 --- a/src/components/accessibility/screen_reader_only/index.ts +++ b/src/components/accessibility/screen_reader_only/index.ts @@ -6,7 +6,5 @@ * Side Public License, v 1. */ -export { - EuiScreenReaderOnly, - EuiScreenReaderOnlyProps, -} from './screen_reader_only'; +export type { EuiScreenReaderOnlyProps } from './screen_reader_only'; +export { EuiScreenReaderOnly } from './screen_reader_only'; diff --git a/src/components/accessibility/skip_link/index.ts b/src/components/accessibility/skip_link/index.ts index ecd21b7b215..b589187e09e 100644 --- a/src/components/accessibility/skip_link/index.ts +++ b/src/components/accessibility/skip_link/index.ts @@ -6,4 +6,5 @@ * Side Public License, v 1. */ -export { EuiSkipLink, EuiSkipLinkProps } from './skip_link'; +export type { EuiSkipLinkProps } from './skip_link'; +export { EuiSkipLink } from './skip_link'; From 3cbb6ab18e18a795030434335cf68dbb52e5b0f5 Mon Sep 17 00:00:00 2001 From: Greg Thompson Date: Tue, 1 Feb 2022 14:17:54 -0600 Subject: [PATCH 10/10] remove obsolete tests --- .../proptypes-from-ts-props/index.test.ts | 137 ------------------ 1 file changed, 137 deletions(-) diff --git a/scripts/babel/proptypes-from-ts-props/index.test.ts b/scripts/babel/proptypes-from-ts-props/index.test.ts index 2037b20cbd0..9a96aca23ee 100644 --- a/scripts/babel/proptypes-from-ts-props/index.test.ts +++ b/scripts/babel/proptypes-from-ts-props/index.test.ts @@ -2516,141 +2516,4 @@ let something: any; }); }); }); - - describe('remove types from exports', () => { - it('removes sole type export from ExportNamedDeclaration', () => { - const result = transform( - ` -type Foo = string; -export { Foo }; -`, - babelOptions - ); - - expect(result.code).toBe(''); - }); - - it('removes multiple type export from ExportNamedDeclaration', () => { - const result = transform( - ` -type Foo = string; -type Bar = number | Foo; -export { Foo, Bar }; -`, - babelOptions - ); - - expect(result.code).toBe(''); - }); - - it('removes type exports from ExportNamedDeclaration, leaving legitimate exports', () => { - const result = transform( - ` -type Foo = string; -type Bar = Foo | boolean; -const A = 500; -const B = { bar: A }; -export { Foo, A, Bar, B }; -`, - babelOptions - ); - - expect(result.code).toBe(`const A = 500; -const B = { - bar: A -}; -export { A, B };`); - }); - - it('removes type exports from ExportNamedDeclaration with a source', () => { - const result = transform( - ` -export { Foo, A } from './foo'; -`, - { - ...babelOptions, - plugins: [ - [ - './scripts/babel/proptypes-from-ts-props', - { - fs: { - existsSync: () => true, - statSync: () => ({ isDirectory: () => false }), - readFileSync: filepath => { - if (filepath.endsWith(`${path.sep}foo`)) { - return Buffer.from(` - export type Foo = string; - `); - } - - throw new Error(`Test tried to import from ${filepath}`); - }, - }, - }, - ], - ], - } - ); - - expect(result.code).toBe("export { A } from './foo';"); - }); - - it('removes type exports from ExportNamedDeclaration when the imported name differs from the exported one', () => { - const result = transform( - ` -export { Foo as Bar, A as B } from './foo'; -`, - { - ...babelOptions, - plugins: [ - [ - './scripts/babel/proptypes-from-ts-props', - { - fs: { - existsSync: () => true, - statSync: () => ({ isDirectory: () => false }), - readFileSync: filepath => { - if (filepath.endsWith(`${path.sep}foo`)) { - return Buffer.from(` - export const A = 5; - export type Foo = string; - `); - } - - throw new Error(`Test tried to import from ${filepath}`); - }, - }, - }, - ], - ], - } - ); - - expect(result.code).toBe("export { A as B } from './foo';"); - }); - - it('removes type export statements', () => { - const result = transform( - ` -export type Foo = string; -`, - babelOptions - ); - - expect(result.code).toBe(''); - }); - - it('removes 3rd-party type exports', () => { - const result = transform( - ` -export { DraggableLocation, Draggable, DragDropContextProps } from 'react-beautiful-dnd'; -`, - babelOptions - ); - - expect(result.code).toBe( - "export { Draggable } from 'react-beautiful-dnd';" - ); - }); - }); });