diff --git a/package-lock.json b/package-lock.json index 53812699cb1..74b16235d90 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6664,22 +6664,25 @@ } }, "node_modules/@leafygreen-ui/code": { - "version": "16.0.2", - "resolved": "https://registry.npmjs.org/@leafygreen-ui/code/-/code-16.0.2.tgz", - "integrity": "sha512-L56knC/HutinaImI7TAR/BrVM/e//28WZ0cNt/nMF7i4pF0aWwGQIcJ2vAsS/7mjcT4ddPDKrEUVAgzCRYyrbA==", + "version": "20.1.1", + "resolved": "https://registry.npmjs.org/@leafygreen-ui/code/-/code-20.1.1.tgz", + "integrity": "sha512-c9kkj6BCkWfUKBNcttsXm710Fyim9VWGIhyOHiNibgABT7rVwanQu3SrPzPPJpWkqXtbtaLhCWKk8M802stAPg==", "license": "Apache-2.0", "dependencies": { - "@leafygreen-ui/a11y": "^2.0.2", - "@leafygreen-ui/button": "^22.0.2", - "@leafygreen-ui/emotion": "^4.0.9", - "@leafygreen-ui/hooks": "^8.3.4", - "@leafygreen-ui/icon": "^13.1.2", - "@leafygreen-ui/icon-button": "^16.0.2", - "@leafygreen-ui/lib": "^14.0.2", - "@leafygreen-ui/palette": "^4.1.3", - "@leafygreen-ui/select": "^14.0.2", - "@leafygreen-ui/tokens": "^2.11.3", - "@leafygreen-ui/tooltip": "^13.0.2", + "@leafygreen-ui/a11y": "^3.0.5", + "@leafygreen-ui/button": "^25.1.0", + "@leafygreen-ui/emotion": "^5.0.3", + "@leafygreen-ui/hooks": "^9.2.0", + "@leafygreen-ui/icon": "^14.6.0", + "@leafygreen-ui/icon-button": "^17.1.0", + "@leafygreen-ui/lib": "^15.6.2", + "@leafygreen-ui/palette": "^5.0.2", + "@leafygreen-ui/select": "^16.1.4", + "@leafygreen-ui/skeleton-loader": "^3.0.6", + "@leafygreen-ui/tokens": "^3.2.4", + "@leafygreen-ui/tooltip": "^14.2.0", + "@leafygreen-ui/typography": "^22.1.3", + "@lg-tools/test-harnesses": "^0.3.4", "@types/facepaint": "^1.2.1", "@types/highlight.js": "^10.1.0", "clipboard": "^2.0.6", @@ -6690,9 +6693,189 @@ "polished": "^4.2.2" }, "peerDependencies": { - "@leafygreen-ui/leafygreen-provider": "^4.0.2" + "@leafygreen-ui/leafygreen-provider": "^5.0.4" + } + }, + "node_modules/@leafygreen-ui/code/node_modules/@leafygreen-ui/a11y": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@leafygreen-ui/a11y/-/a11y-3.0.5.tgz", + "integrity": "sha512-HJqDsLCNj4d1RQiifYuhpazZVYgsLZJeEboaQ+UsNhAppV13kdPb2qX7H4RbGmXkalTBzHOkbAYp6vvioSAVdQ==", + "license": "Apache-2.0", + "dependencies": { + "@leafygreen-ui/emotion": "^5.0.3", + "@leafygreen-ui/hooks": "^9.1.4", + "@leafygreen-ui/lib": "^15.4.0" + } + }, + "node_modules/@leafygreen-ui/code/node_modules/@leafygreen-ui/form-field": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@leafygreen-ui/form-field/-/form-field-4.0.4.tgz", + "integrity": "sha512-4XH+FR3pnkEPYRE4ma5IbvF89nqdBtAfQbodug1c18s+DkD4DvMaNV1klJ0LbkeSBscmNSUJnptTE6fHoVO6SQ==", + "license": "Apache-2.0", + "dependencies": { + "@leafygreen-ui/emotion": "^5.0.3", + "@leafygreen-ui/hooks": "^9.1.4", + "@leafygreen-ui/icon": "^14.5.1", + "@leafygreen-ui/lib": "^15.4.0", + "@leafygreen-ui/palette": "^5.0.2", + "@leafygreen-ui/tokens": "^3.2.4", + "@leafygreen-ui/typography": "^22.1.3" + }, + "peerDependencies": { + "@leafygreen-ui/leafygreen-provider": "^5.0.4" + } + }, + "node_modules/@leafygreen-ui/code/node_modules/@leafygreen-ui/select": { + "version": "16.1.4", + "resolved": "https://registry.npmjs.org/@leafygreen-ui/select/-/select-16.1.4.tgz", + "integrity": "sha512-iej6YbI2GDw9pUa8gGWNiTzeiYdqLr0l/Tg0j3xK5nZTZld0z5NbInbeAvNTIgXKyXzPK/gG007Cbb6v1fAGOw==", + "license": "Apache-2.0", + "dependencies": { + "@leafygreen-ui/button": "^25.1.0", + "@leafygreen-ui/emotion": "^5.0.3", + "@leafygreen-ui/form-field": "^4.0.4", + "@leafygreen-ui/hooks": "^9.2.0", + "@leafygreen-ui/icon": "^14.6.0", + "@leafygreen-ui/input-option": "^4.0.5", + "@leafygreen-ui/lib": "^15.6.2", + "@leafygreen-ui/palette": "^5.0.2", + "@leafygreen-ui/popover": "^14.1.0", + "@leafygreen-ui/tokens": "^3.2.4", + "@leafygreen-ui/typography": "^22.1.3", + "@lg-tools/test-harnesses": "^0.3.4", + "@types/react-is": "^18.0.0", + "lodash": "^4.17.21", + "polished": "^4.1.3", + "react-is": "^18.0.1" + }, + "peerDependencies": { + "@leafygreen-ui/leafygreen-provider": "^5.0.4" } }, + "node_modules/@leafygreen-ui/code/node_modules/@leafygreen-ui/skeleton-loader": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@leafygreen-ui/skeleton-loader/-/skeleton-loader-3.0.6.tgz", + "integrity": "sha512-9n5126UNxfPEoam39ewgOtTUoOPZkD1tBMRNkGsySxATNebKg86gq6e5YYSnb0bVP8TxOP6AXLvQstu1q6IpGg==", + "license": "Apache-2.0", + "dependencies": { + "@leafygreen-ui/card": "^13.0.5", + "@leafygreen-ui/emotion": "^5.0.3", + "@leafygreen-ui/icon": "^14.5.1", + "@leafygreen-ui/lib": "^15.4.0", + "@leafygreen-ui/palette": "^5.0.2", + "@leafygreen-ui/tokens": "^3.2.4", + "@leafygreen-ui/typography": "^22.1.3", + "lodash": "^4.17.21" + }, + "peerDependencies": { + "@leafygreen-ui/leafygreen-provider": "^5.0.4" + } + }, + "node_modules/@leafygreen-ui/code/node_modules/@leafygreen-ui/tooltip": { + "version": "14.2.0", + "resolved": "https://registry.npmjs.org/@leafygreen-ui/tooltip/-/tooltip-14.2.0.tgz", + "integrity": "sha512-+kOCnC9uTa7EViGeLlVthk//FPJ34r+Z7itSTJVt9Y+zB28FU31ZlAclC8VCxDTdRFWt1UtlaM00jj89NfAP/Q==", + "license": "Apache-2.0", + "dependencies": { + "@leafygreen-ui/emotion": "^5.0.3", + "@leafygreen-ui/hooks": "^9.2.0", + "@leafygreen-ui/icon": "^14.6.0", + "@leafygreen-ui/lib": "^15.6.1", + "@leafygreen-ui/palette": "^5.0.2", + "@leafygreen-ui/popover": "^14.1.0", + "@leafygreen-ui/tokens": "^3.2.4", + "@leafygreen-ui/typography": "^22.1.3", + "lodash": "^4.17.21", + "polished": "^4.2.2" + }, + "peerDependencies": { + "@leafygreen-ui/leafygreen-provider": "^5.0.4" + } + }, + "node_modules/@leafygreen-ui/code/node_modules/@lg-tools/test-harnesses": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@lg-tools/test-harnesses/-/test-harnesses-0.3.4.tgz", + "integrity": "sha512-JfJj2LSMe5vTSDQoLxWUHx2r4wUgKqU1UrgqjvNYM7iebXE0JCE7RvLiEg5SnsRO8xXQbEMjgISErmCDR4DS7Q==", + "license": "Apache-2.0", + "dependencies": { + "@testing-library/dom": "9.3.1" + } + }, + "node_modules/@leafygreen-ui/code/node_modules/@testing-library/dom": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.1.tgz", + "integrity": "sha512-0DGPd9AR3+iDTjGoMpxIkAsUihHZ3Ai6CneU6bRRrffXMgzCdlNk43jTrD2/5LT6CBb3MWTP8v510JzYtahD2w==", + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^5.0.1", + "aria-query": "5.1.3", + "chalk": "^4.1.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.5.0", + "pretty-format": "^27.0.2" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/@leafygreen-ui/code/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@leafygreen-ui/code/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@leafygreen-ui/code/node_modules/aria-query": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz", + "integrity": "sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==", + "license": "Apache-2.0", + "dependencies": { + "deep-equal": "^2.0.5" + } + }, + "node_modules/@leafygreen-ui/code/node_modules/pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@leafygreen-ui/code/node_modules/pretty-format/node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "license": "MIT" + }, + "node_modules/@leafygreen-ui/code/node_modules/react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "license": "MIT" + }, "node_modules/@leafygreen-ui/combobox": { "version": "11.0.2", "resolved": "https://registry.npmjs.org/@leafygreen-ui/combobox/-/combobox-11.0.2.tgz", @@ -48252,7 +48435,7 @@ "@leafygreen-ui/card": "^12.0.2", "@leafygreen-ui/checkbox": "^14.0.2", "@leafygreen-ui/chip": "^3.0.12", - "@leafygreen-ui/code": "^16.0.2", + "@leafygreen-ui/code": "^20.1.1", "@leafygreen-ui/combobox": "^11.0.2", "@leafygreen-ui/confirmation-modal": "^6.0.2", "@leafygreen-ui/copyable": "^10.0.14", @@ -59170,11 +59353,11 @@ } }, "@leafygreen-ui/code": { - "version": "16.0.2", - "resolved": "https://registry.npmjs.org/@leafygreen-ui/code/-/code-16.0.2.tgz", - "integrity": "sha512-L56knC/HutinaImI7TAR/BrVM/e//28WZ0cNt/nMF7i4pF0aWwGQIcJ2vAsS/7mjcT4ddPDKrEUVAgzCRYyrbA==", + "version": "20.1.1", + "resolved": "https://registry.npmjs.org/@leafygreen-ui/code/-/code-20.1.1.tgz", + "integrity": "sha512-c9kkj6BCkWfUKBNcttsXm710Fyim9VWGIhyOHiNibgABT7rVwanQu3SrPzPPJpWkqXtbtaLhCWKk8M802stAPg==", "requires": { - "@leafygreen-ui/a11y": "^2.0.2", + "@leafygreen-ui/a11y": "^3.0.5", "@leafygreen-ui/button": "^22.0.2", "@leafygreen-ui/emotion": "^4.0.9", "@leafygreen-ui/hooks": "^8.3.4", @@ -59182,9 +59365,12 @@ "@leafygreen-ui/icon-button": "^16.0.2", "@leafygreen-ui/lib": "^15.3.0", "@leafygreen-ui/palette": "^4.1.3", - "@leafygreen-ui/select": "^14.0.2", + "@leafygreen-ui/select": "^16.1.4", + "@leafygreen-ui/skeleton-loader": "^3.0.6", "@leafygreen-ui/tokens": "^3.2.4", - "@leafygreen-ui/tooltip": "^13.0.2", + "@leafygreen-ui/tooltip": "^14.2.0", + "@leafygreen-ui/typography": "^20.0.2", + "@lg-tools/test-harnesses": "^0.3.4", "@types/facepaint": "^1.2.1", "@types/highlight.js": "^10.1.0", "clipboard": "^2.0.6", @@ -59193,6 +59379,150 @@ "highlightjs-graphql": "^1.0.1", "lodash": "^4.17.21", "polished": "^4.2.2" + }, + "dependencies": { + "@leafygreen-ui/a11y": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@leafygreen-ui/a11y/-/a11y-3.0.5.tgz", + "integrity": "sha512-HJqDsLCNj4d1RQiifYuhpazZVYgsLZJeEboaQ+UsNhAppV13kdPb2qX7H4RbGmXkalTBzHOkbAYp6vvioSAVdQ==", + "requires": { + "@leafygreen-ui/emotion": "^4.0.9", + "@leafygreen-ui/hooks": "^8.3.4", + "@leafygreen-ui/lib": "^15.3.0" + } + }, + "@leafygreen-ui/form-field": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/@leafygreen-ui/form-field/-/form-field-4.0.4.tgz", + "integrity": "sha512-4XH+FR3pnkEPYRE4ma5IbvF89nqdBtAfQbodug1c18s+DkD4DvMaNV1klJ0LbkeSBscmNSUJnptTE6fHoVO6SQ==", + "requires": { + "@leafygreen-ui/emotion": "^4.0.9", + "@leafygreen-ui/hooks": "^8.3.4", + "@leafygreen-ui/icon": "^13.1.2", + "@leafygreen-ui/lib": "^15.3.0", + "@leafygreen-ui/palette": "^4.1.3", + "@leafygreen-ui/tokens": "^3.2.4", + "@leafygreen-ui/typography": "^20.0.2" + } + }, + "@leafygreen-ui/select": { + "version": "16.1.4", + "resolved": "https://registry.npmjs.org/@leafygreen-ui/select/-/select-16.1.4.tgz", + "integrity": "sha512-iej6YbI2GDw9pUa8gGWNiTzeiYdqLr0l/Tg0j3xK5nZTZld0z5NbInbeAvNTIgXKyXzPK/gG007Cbb6v1fAGOw==", + "requires": { + "@leafygreen-ui/button": "^22.0.2", + "@leafygreen-ui/emotion": "^4.0.9", + "@leafygreen-ui/form-field": "^4.0.4", + "@leafygreen-ui/hooks": "^8.3.4", + "@leafygreen-ui/icon": "^13.1.2", + "@leafygreen-ui/input-option": "^3.0.4", + "@leafygreen-ui/lib": "^15.3.0", + "@leafygreen-ui/palette": "^4.1.3", + "@leafygreen-ui/popover": "^13.0.11", + "@leafygreen-ui/tokens": "^3.2.4", + "@leafygreen-ui/typography": "^20.0.2", + "@lg-tools/test-harnesses": "^0.3.4", + "@types/react-is": "^18.0.0", + "lodash": "^4.17.21", + "polished": "^4.1.3", + "react-is": "^18.0.1" + } + }, + "@leafygreen-ui/skeleton-loader": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/@leafygreen-ui/skeleton-loader/-/skeleton-loader-3.0.6.tgz", + "integrity": "sha512-9n5126UNxfPEoam39ewgOtTUoOPZkD1tBMRNkGsySxATNebKg86gq6e5YYSnb0bVP8TxOP6AXLvQstu1q6IpGg==", + "requires": { + "@leafygreen-ui/card": "^12.0.2", + "@leafygreen-ui/emotion": "^4.0.9", + "@leafygreen-ui/icon": "^13.1.2", + "@leafygreen-ui/lib": "^15.3.0", + "@leafygreen-ui/palette": "^4.1.3", + "@leafygreen-ui/tokens": "^3.2.4", + "@leafygreen-ui/typography": "^20.0.2", + "lodash": "^4.17.21" + } + }, + "@leafygreen-ui/tooltip": { + "version": "14.2.0", + "resolved": "https://registry.npmjs.org/@leafygreen-ui/tooltip/-/tooltip-14.2.0.tgz", + "integrity": "sha512-+kOCnC9uTa7EViGeLlVthk//FPJ34r+Z7itSTJVt9Y+zB28FU31ZlAclC8VCxDTdRFWt1UtlaM00jj89NfAP/Q==", + "requires": { + "@leafygreen-ui/emotion": "^4.0.9", + "@leafygreen-ui/hooks": "^8.3.4", + "@leafygreen-ui/icon": "^13.1.2", + "@leafygreen-ui/lib": "^15.3.0", + "@leafygreen-ui/palette": "^4.1.3", + "@leafygreen-ui/popover": "^13.0.11", + "@leafygreen-ui/tokens": "^3.2.4", + "@leafygreen-ui/typography": "^20.0.2", + "lodash": "^4.17.21", + "polished": "^4.2.2" + } + }, + "@lg-tools/test-harnesses": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@lg-tools/test-harnesses/-/test-harnesses-0.3.4.tgz", + "integrity": "sha512-JfJj2LSMe5vTSDQoLxWUHx2r4wUgKqU1UrgqjvNYM7iebXE0JCE7RvLiEg5SnsRO8xXQbEMjgISErmCDR4DS7Q==", + "requires": { + "@testing-library/dom": "9.3.1" + } + }, + "@testing-library/dom": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.1.tgz", + "integrity": "sha512-0DGPd9AR3+iDTjGoMpxIkAsUihHZ3Ai6CneU6bRRrffXMgzCdlNk43jTrD2/5LT6CBb3MWTP8v510JzYtahD2w==", + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/runtime": "^7.12.5", + "@types/aria-query": "^5.0.1", + "aria-query": "5.1.3", + "chalk": "^4.1.0", + "dom-accessibility-api": "^0.5.9", + "lz-string": "^1.5.0", + "pretty-format": "^27.0.2" + } + }, + "ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + }, + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==" + }, + "aria-query": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz", + "integrity": "sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==", + "requires": { + "deep-equal": "^2.0.5" + } + }, + "pretty-format": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", + "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==", + "requires": { + "ansi-regex": "^5.0.1", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "dependencies": { + "react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" + } + } + }, + "react-is": { + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==" + } } }, "@leafygreen-ui/combobox": { @@ -61324,7 +61654,7 @@ "resolved": "https://registry.npmjs.org/@lg-chat/lg-markdown/-/lg-markdown-4.1.3.tgz", "integrity": "sha512-O7pz3URXfn8ZHA9k1MiKDdcUFo1f1bL9C73ysANl7UllFO3LK+QZNRemeQD5Le3btye0DtQKOhTMO8vkixW3tQ==", "requires": { - "@leafygreen-ui/code": "^16.0.2", + "@leafygreen-ui/code": "^20.1.1", "@leafygreen-ui/emotion": "^4.0.9", "@leafygreen-ui/lib": "^15.3.0", "@leafygreen-ui/tokens": "^3.2.4", @@ -62290,7 +62620,7 @@ "@leafygreen-ui/card": "^12.0.2", "@leafygreen-ui/checkbox": "^14.0.2", "@leafygreen-ui/chip": "^3.0.12", - "@leafygreen-ui/code": "^16.0.2", + "@leafygreen-ui/code": "^20.1.1", "@leafygreen-ui/combobox": "^11.0.2", "@leafygreen-ui/confirmation-modal": "^6.0.2", "@leafygreen-ui/copyable": "^10.0.14", diff --git a/package.json b/package.json index 9c9fcf2b2a5..1aec299c58d 100644 --- a/package.json +++ b/package.json @@ -129,7 +129,7 @@ "@leafygreen-ui/input-option": "^3.0.4", "@leafygreen-ui/polymorphic": "^2.0.5", "@leafygreen-ui/search-input": "^5.0.2", - "@leafygreen-ui/code": "^16.0.2", + "@leafygreen-ui/code": "^20.1.1", "@leafygreen-ui/text-area": "^10.0.2", "@leafygreen-ui/card": "^12.0.2", "@leafygreen-ui/logo": "^10.0.2" diff --git a/packages/compass-collection/src/components/mock-data-generator-modal/faker-mapping-selector.tsx b/packages/compass-collection/src/components/mock-data-generator-modal/faker-mapping-selector.tsx index 07c26457ba9..36220a58f89 100644 --- a/packages/compass-collection/src/components/mock-data-generator-modal/faker-mapping-selector.tsx +++ b/packages/compass-collection/src/components/mock-data-generator-modal/faker-mapping-selector.tsx @@ -115,7 +115,7 @@ const FakerMappingSelector = ({ id="faker-function-call-preview" data-testid="faker-function-call-preview" language="javascript" - copyable={false} + copyButtonAppearance="none" > {formatFakerFunctionCallWithArgs( activeFakerFunction, diff --git a/packages/compass-collection/src/components/mock-data-generator-modal/script-screen.tsx b/packages/compass-collection/src/components/mock-data-generator-modal/script-screen.tsx index 8b9316ae4b7..7ead7b87b94 100644 --- a/packages/compass-collection/src/components/mock-data-generator-modal/script-screen.tsx +++ b/packages/compass-collection/src/components/mock-data-generator-modal/script-screen.tsx @@ -153,7 +153,7 @@ const ScriptScreen = ({ mockdatascript.js (or any name you'd like). @@ -175,9 +175,7 @@ const ScriptScreen = ({ reversible. - - {RUN_SCRIPT_COMMAND} - + {RUN_SCRIPT_COMMAND}
c.toUpperCase()), confirmButtonProps: { variant: ButtonVariant.Default, + // @ts-expect-error actually supported by leafygreen, but not in types + autoFocus: true, }, }); }; diff --git a/packages/compass-connections/src/components/connection-status-notifications.tsx b/packages/compass-connections/src/components/connection-status-notifications.tsx index e94765e8dd2..3b76eed4b97 100644 --- a/packages/compass-connections/src/components/connection-status-notifications.tsx +++ b/packages/compass-connections/src/components/connection-status-notifications.tsx @@ -260,9 +260,7 @@ const openNotifyDeviceAuthModal = (

Enter the following code on that page: - - {userCode} - + {userCode} ), diff --git a/packages/compass-e2e-tests/tests/collection-aggregations-tab.test.ts b/packages/compass-e2e-tests/tests/collection-aggregations-tab.test.ts index 24f57f0a13d..aee5b663106 100644 --- a/packages/compass-e2e-tests/tests/collection-aggregations-tab.test.ts +++ b/packages/compass-e2e-tests/tests/collection-aggregations-tab.test.ts @@ -679,8 +679,13 @@ describe('Collection aggregations tab', function () { await errorDetailsJson.waitForDisplayed(); // exit details + // leafygreen autofocus triggers a tooltip on the error code element, + // "Tab" to remove the focus + await browser.keys('Tab'); + // now click the close button await browser.clickVisible(Selectors.confirmationModalConfirmButton()); - await errorElement.waitForDisplayed(); + // wait for the modal to go away + await errorDetailsJson.waitForDisplayed({ reverse: true }); }); }); diff --git a/packages/compass-e2e-tests/tests/collection-documents-tab.test.ts b/packages/compass-e2e-tests/tests/collection-documents-tab.test.ts index 5466975e8ab..d1aed3ce0e3 100644 --- a/packages/compass-e2e-tests/tests/collection-documents-tab.test.ts +++ b/packages/compass-e2e-tests/tests/collection-documents-tab.test.ts @@ -731,8 +731,13 @@ FindIterable result = collection.find(filter);`); await errorDetailsJson.waitForDisplayed(); // exit details + // leafygreen autofocus triggers a tooltip on the error code element, + // "Tab" to remove the focus + await browser.keys('Tab'); + // now click the close button await browser.clickVisible(Selectors.confirmationModalConfirmButton()); - await errorElement.waitForDisplayed(); + // wait for the modal to go away + await errorDetailsJson.waitForDisplayed({ reverse: true }); }); describe('Editing', function () { diff --git a/packages/compass-e2e-tests/tests/collection-import.test.ts b/packages/compass-e2e-tests/tests/collection-import.test.ts index de333b24c2a..4b8e542efbb 100644 --- a/packages/compass-e2e-tests/tests/collection-import.test.ts +++ b/packages/compass-e2e-tests/tests/collection-import.test.ts @@ -595,7 +595,13 @@ describe('Collection import', function () { expect(await errorDetailsJson.getText()).to.include( 'schemaRulesNotSatisfied' ); + // leafygreen autofocus triggers a tooltip on the error code element, + // "Tab" to remove the focus + await browser.keys('Tab'); + // now click the close button await browser.clickVisible(Selectors.confirmationModalConfirmButton()); + // wait for the modal to go away + await errorDetailsJson.waitForDisplayed({ reverse: true }); }); it('with CSV + abort on error unchecked, it includes the details in a file', async function () { diff --git a/packages/compass-export-to-language/src/components/modal.tsx b/packages/compass-export-to-language/src/components/modal.tsx index f5d650bdf4d..2de9c80e047 100644 --- a/packages/compass-export-to-language/src/components/modal.tsx +++ b/packages/compass-export-to-language/src/components/modal.tsx @@ -9,12 +9,9 @@ import { Banner, spacing, FormFieldContainer, + Panel, } from '@mongodb-js/compass-components'; import type { Language } from '@mongodb-js/compass-components'; -import { - outputLanguageToCodeLanguage, - codeLanguageToOutputLanguage, -} from '../modules/languages'; import type { OutputLanguage } from '../modules/languages'; import { isQueryExpression, runTranspiler } from '../modules/transpiler'; import type { InputExpression } from '../modules/transpiler'; @@ -33,7 +30,7 @@ type LanguageOption = { const languageOptions: LanguageOption[] = [ { displayName: 'Java', language: 'java' }, { displayName: 'Node', language: 'javascript' }, - { displayName: 'C#', language: 'cs' }, + { displayName: 'C#', language: 'csharp' }, { displayName: 'Python', language: 'python' }, { displayName: 'Ruby', language: 'ruby' }, { displayName: 'Go', language: 'go' }, @@ -41,6 +38,16 @@ const languageOptions: LanguageOption[] = [ { displayName: 'PHP', language: 'php' }, ]; +const SUPPORTED_LANGUAGES = new Set( + languageOptions.map((opt) => { + return opt.language; + }) +); + +function isSupportedLanguage(lang: string): lang is OutputLanguage { + return SUPPORTED_LANGUAGES.has(lang); +} + const shellLanguageOptions: LanguageOption[] = [ { displayName: 'Shell', language: 'javascript' }, ]; @@ -73,6 +80,13 @@ const editorHeadingStyles = css({ const codeStyles = css({ alignItems: 'start', height: `${spacing[1600] * 4 - spacing[800]}px`, + '& > div': { + height: '100%', + gridTemplateRows: 'min-content auto', + }, + '& pre': { + alignItems: 'flex-start', + }, }); const checkboxStyles = css({ @@ -240,13 +254,16 @@ const ExportToLanguageModal: React.FunctionComponent< className={codeStyles} id="export-to-language-input" data-testid="export-to-language-input" - languageOptions={shellLanguageOptions} - onChange={() => { - // There is only one language option and we don't allow to change - // the value - }} language="Shell" - copyable={true} + panel={ + { + // There is only one language option and we don't allow to change + // the value + }} + > + } > {prettyInput}
@@ -265,14 +282,19 @@ const ExportToLanguageModal: React.FunctionComponent< - setOutputLanguage(codeLanguageToOutputLanguage(option.language)) + panel={ + { + if (isSupportedLanguage(option.language)) { + return setOutputLanguage(option.language); + } + }} + onCopy={trackCopiedOutput} + > } - language={outputLanguageToCodeLanguage(outputLanguage)} - copyable={true} - onCopy={trackCopiedOutput} > {transpiledExpression || ''} diff --git a/packages/compass-import-export/src/components/export-code-view.tsx b/packages/compass-import-export/src/components/export-code-view.tsx index 82ecdcdfa02..2edfcc2ad7f 100644 --- a/packages/compass-import-export/src/components/export-code-view.tsx +++ b/packages/compass-import-export/src/components/export-code-view.tsx @@ -78,7 +78,6 @@ function ExportCodeView({ data-testid="export-collection-code-preview-wrapper" id={codeElementId} language="javascript" - copyable > {code} diff --git a/packages/compass-query-bar/src/components/query-history/query-item/query-item-content.tsx b/packages/compass-query-bar/src/components/query-history/query-item/query-item-content.tsx index 8511cad3ef9..746cc3d701d 100644 --- a/packages/compass-query-bar/src/components/query-history/query-item/query-item-content.tsx +++ b/packages/compass-query-bar/src/components/query-history/query-item/query-item-content.tsx @@ -30,7 +30,7 @@ export const QueryItemContent: React.FunctionComponent<{ className={queryCodeStyles} data-testid="query-history-query-code" language="javascript" - copyable={false} + copyButtonAppearance="none" > {formatQuery(value)}