diff --git a/package-lock.json b/package-lock.json index e30cc03d8..9ba89bc72 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,6 +31,7 @@ "@leafygreen-ui/logo": "^4.0.2", "@leafygreen-ui/modal": "^10.1.0", "@leafygreen-ui/palette": "^3.4.3", + "@leafygreen-ui/search-input": "^2.0.8", "@leafygreen-ui/segmented-control": "^8.0.0", "@leafygreen-ui/select": "^7.0.0", "@leafygreen-ui/side-nav": "^10.0.0", @@ -3411,21 +3412,19 @@ } }, "node_modules/@leafygreen-ui/a11y": { - "version": "1.4.2", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/a11y/-/a11y-1.4.2.tgz", - "integrity": "sha512-xIBYmA/kazyCieds9fmFBQmWfsqwOEOP6lX9EWEzecJnOreTflZcrZYV9ApnTQ2whw8k9CLT0wObaTHm4S1IMQ==", - "license": "Apache-2.0", + "version": "1.4.4", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/a11y/-/a11y-1.4.4.tgz", + "integrity": "sha512-QjXputn8XPagHPCibjfGcImQSUMgZijm9Da1VfIjZhxc47dSGD9cb7ncu9UIpu1w/Sz+2fjQ6oDbp+5K9MUO2w==", "dependencies": { "@leafygreen-ui/emotion": "^4.0.4", - "@leafygreen-ui/hooks": "^7.7.1", + "@leafygreen-ui/hooks": "^7.7.3", "@leafygreen-ui/lib": "^10.3.2" } }, "node_modules/@leafygreen-ui/a11y/node_modules/@leafygreen-ui/hooks": { - "version": "7.7.1", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/hooks/-/hooks-7.7.1.tgz", - "integrity": "sha512-P4uGzI0IBUX2g4MRY2FX6TPrMOLuh2/bOrq9TiWQgj/vhDPbAQt+62F7p3b3XL+Axywtqg6dIODNWW+WfJrXSA==", - "license": "Apache-2.0", + "version": "7.7.5", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/hooks/-/hooks-7.7.5.tgz", + "integrity": "sha512-Spk36yndhplGfCdLl14RWuoDPGYfEgA6AwqbaI4T45i+A2QtDTvdSFyMUkNmDK5vzk5cWmR/SmkRS/o5T9zgMA==", "dependencies": { "lodash": "^4.17.21" } @@ -3478,10 +3477,9 @@ } }, "node_modules/@leafygreen-ui/box": { - "version": "3.1.3", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/box/-/box-3.1.3.tgz", - "integrity": "sha512-lO4IHQIR36rpE19QBqeJxTnfZ4lHvPlSIC93UOdp97JUq0HEelrjsFLMy+262ZJxH2C+oDnuylv9QxdJej/wGw==", - "license": "Apache-2.0" + "version": "3.1.4", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/box/-/box-3.1.4.tgz", + "integrity": "sha512-cdEXGEafHuaH4zGx3NTX1bMOQ52EpoWA595BC1hh4/8BmXL+H4NFMGywuhZnvYjC4lyVGauX6sCspxrunbmfMQ==" }, "node_modules/@leafygreen-ui/button": { "version": "16.1.1", @@ -3957,30 +3955,28 @@ } }, "node_modules/@leafygreen-ui/input-option": { - "version": "1.0.3", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/input-option/-/input-option-1.0.3.tgz", - "integrity": "sha512-UfzfQsbAc9PJEN25N2Wa1kdnx1ce/202IzgciTUn1bl99ohI0n0ULDceo8lnt70WZzo7xlh8r3aIV+AZx63soA==", - "license": "Apache-2.0", + "version": "1.0.5", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/input-option/-/input-option-1.0.5.tgz", + "integrity": "sha512-gU051Rr5oB6CelLziN1xpbymexEP28DsbhgN+KTXxzpOM5q4l1dNAv12UDuCSEJS/xPP0kzkBkMWT/WPOEE/uQ==", "dependencies": { "@leafygreen-ui/a11y": "^1.4.2", "@leafygreen-ui/emotion": "^4.0.4", - "@leafygreen-ui/lib": "^10.3.3", + "@leafygreen-ui/lib": "^10.4.0", "@leafygreen-ui/palette": "^4.0.4", - "@leafygreen-ui/polymorphic": "^1.3.1", - "@leafygreen-ui/tokens": "^2.0.3", - "@leafygreen-ui/typography": "^16.3.0" + "@leafygreen-ui/polymorphic": "^1.3.2", + "@leafygreen-ui/tokens": "^2.1.1", + "@leafygreen-ui/typography": "^16.5.1" }, "peerDependencies": { - "@leafygreen-ui/leafygreen-provider": "^3.1.2" + "@leafygreen-ui/leafygreen-provider": "^3.1.3" } }, "node_modules/@leafygreen-ui/input-option/node_modules/@leafygreen-ui/lib": { - "version": "10.3.3", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/lib/-/lib-10.3.3.tgz", - "integrity": "sha512-n+L4u9TnwXgZlzGniEJ4QdKzeXlFU54AgTjb6a2k4nHLBL6eQgRwrHCL4Dviv6ARFHH0tfLWMqBguMOY33Cw2w==", - "license": "Apache-2.0", + "version": "10.4.0", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/lib/-/lib-10.4.0.tgz", + "integrity": "sha512-gGZBJ0Mjo2/hHfECbERGJbx1nPFNDqkge7L1K5y5LwBjpiOYjUNa1OsyBRwc9pr+zucdAF2FHSo+EdoT83Mbtg==", "dependencies": { - "@storybook/csf": "^0.0.2-next.10", + "@storybook/csf": "^0.1.0", "lodash": "^4.17.21", "prop-types": "^15.7.2" }, @@ -3991,8 +3987,47 @@ "node_modules/@leafygreen-ui/input-option/node_modules/@leafygreen-ui/palette": { "version": "4.0.4", "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/palette/-/palette-4.0.4.tgz", - "integrity": "sha512-nuZy2RtKHAGpIKrDduqC8P8PvajJRT1hQURoisYMiB32NmEEHGEhtHw4MlS+Kv92HFA0jxgMdZUHKTXq83BhjA==", - "license": "Apache-2.0" + "integrity": "sha512-nuZy2RtKHAGpIKrDduqC8P8PvajJRT1hQURoisYMiB32NmEEHGEhtHw4MlS+Kv92HFA0jxgMdZUHKTXq83BhjA==" + }, + "node_modules/@leafygreen-ui/input-option/node_modules/@leafygreen-ui/tokens": { + "version": "2.1.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/tokens/-/tokens-2.1.1.tgz", + "integrity": "sha512-5mpyxRhp+8aY6eX6UYacDV6PLl3OieWG061ceAn2ThYaanIP64AMbodWifrF/IFMItJPFkwAtfPtJqugOFVb7Q==", + "dependencies": { + "@leafygreen-ui/palette": "^4.0.4" + } + }, + "node_modules/@leafygreen-ui/input-option/node_modules/@leafygreen-ui/typography": { + "version": "16.5.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/typography/-/typography-16.5.1.tgz", + "integrity": "sha512-5dentOt4LubXxmkwVVy6ZlUvGsebJsHhZZ9LAlplUz13VkyvS458Bhnog4cqNqvnJjdlWLdO+ZO0/JyYUIIuXw==", + "dependencies": { + "@leafygreen-ui/emotion": "^4.0.4", + "@leafygreen-ui/icon": "^11.17.0", + "@leafygreen-ui/lib": "^10.4.0", + "@leafygreen-ui/palette": "^4.0.4", + "@leafygreen-ui/polymorphic": "^1.3.2", + "@leafygreen-ui/tokens": "^2.1.1" + }, + "peerDependencies": { + "@leafygreen-ui/leafygreen-provider": "^3.1.3" + } + }, + "node_modules/@leafygreen-ui/input-option/node_modules/@storybook/csf": { + "version": "0.1.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@storybook/csf/-/csf-0.1.1.tgz", + "integrity": "sha512-4hE3AlNVxR60Wc5KSC68ASYzUobjPqtSKyhV6G+ge0FIXU55N5nTY7dXGRZHQGDBPq+XqchMkIdlkHPRs8nTHg==", + "dependencies": { + "type-fest": "^2.19.0" + } + }, + "node_modules/@leafygreen-ui/input-option/node_modules/type-fest": { + "version": "2.19.0", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "engines": { + "node": ">=12.20" + } }, "node_modules/@leafygreen-ui/interaction-ring": { "version": "3.0.0", @@ -4117,34 +4152,31 @@ } }, "node_modules/@leafygreen-ui/portal": { - "version": "4.1.2", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/portal/-/portal-4.1.2.tgz", - "integrity": "sha512-HKUMXqafjc8N9TA7u7X3PZ7dBbfsnamc40RPoNLh9z6PzvGNia4wDbixMc2qeC3lWi1fWayFs31LAdIrdzQcXg==", - "license": "Apache-2.0", + "version": "4.1.4", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/portal/-/portal-4.1.4.tgz", + "integrity": "sha512-gtzQno7yXGmbblHIVBWpJ6+TIFwep/PL4M6vcloCzAaV88+gSMJ9lhrBJbqYQkfd65xeEaycClDsfCpI35p/nA==", "dependencies": { - "@leafygreen-ui/hooks": "^7.7.1", - "@leafygreen-ui/lib": "^10.3.3" + "@leafygreen-ui/hooks": "^7.7.5", + "@leafygreen-ui/lib": "^10.4.0" }, "peerDependencies": { "react-dom": "^17.0.0" } }, "node_modules/@leafygreen-ui/portal/node_modules/@leafygreen-ui/hooks": { - "version": "7.7.1", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/hooks/-/hooks-7.7.1.tgz", - "integrity": "sha512-P4uGzI0IBUX2g4MRY2FX6TPrMOLuh2/bOrq9TiWQgj/vhDPbAQt+62F7p3b3XL+Axywtqg6dIODNWW+WfJrXSA==", - "license": "Apache-2.0", + "version": "7.7.5", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/hooks/-/hooks-7.7.5.tgz", + "integrity": "sha512-Spk36yndhplGfCdLl14RWuoDPGYfEgA6AwqbaI4T45i+A2QtDTvdSFyMUkNmDK5vzk5cWmR/SmkRS/o5T9zgMA==", "dependencies": { "lodash": "^4.17.21" } }, "node_modules/@leafygreen-ui/portal/node_modules/@leafygreen-ui/lib": { - "version": "10.3.3", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/lib/-/lib-10.3.3.tgz", - "integrity": "sha512-n+L4u9TnwXgZlzGniEJ4QdKzeXlFU54AgTjb6a2k4nHLBL6eQgRwrHCL4Dviv6ARFHH0tfLWMqBguMOY33Cw2w==", - "license": "Apache-2.0", + "version": "10.4.0", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/lib/-/lib-10.4.0.tgz", + "integrity": "sha512-gGZBJ0Mjo2/hHfECbERGJbx1nPFNDqkge7L1K5y5LwBjpiOYjUNa1OsyBRwc9pr+zucdAF2FHSo+EdoT83Mbtg==", "dependencies": { - "@storybook/csf": "^0.0.2-next.10", + "@storybook/csf": "^0.1.0", "lodash": "^4.17.21", "prop-types": "^15.7.2" }, @@ -4152,6 +4184,22 @@ "react": "^17.0.0" } }, + "node_modules/@leafygreen-ui/portal/node_modules/@storybook/csf": { + "version": "0.1.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@storybook/csf/-/csf-0.1.1.tgz", + "integrity": "sha512-4hE3AlNVxR60Wc5KSC68ASYzUobjPqtSKyhV6G+ge0FIXU55N5nTY7dXGRZHQGDBPq+XqchMkIdlkHPRs8nTHg==", + "dependencies": { + "type-fest": "^2.19.0" + } + }, + "node_modules/@leafygreen-ui/portal/node_modules/type-fest": { + "version": "2.19.0", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "engines": { + "node": ">=12.20" + } + }, "node_modules/@leafygreen-ui/ripple": { "version": "1.1.8", "license": "Apache-2.0", @@ -4159,6 +4207,136 @@ "@leafygreen-ui/tokens": "^2.0.0" } }, + "node_modules/@leafygreen-ui/ripple/node_modules/@leafygreen-ui/tokens": { + "version": "2.0.0", + "license": "Apache-2.0", + "dependencies": { + "@leafygreen-ui/palette": "^3.4.7" + } + }, + "node_modules/@leafygreen-ui/search-input": { + "version": "2.0.8", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/search-input/-/search-input-2.0.8.tgz", + "integrity": "sha512-ijMpZgyUpOQM1fOnUs1XavIYAcD9P5PNRWp2hprgWMJZp8FrcopsslMJJIDaM00Sdj0MjSDAti9+aXeo+2ZgSw==", + "dependencies": { + "@leafygreen-ui/a11y": "^1.4.3", + "@leafygreen-ui/emotion": "^4.0.4", + "@leafygreen-ui/hooks": "^7.7.5", + "@leafygreen-ui/icon": "^11.17.0", + "@leafygreen-ui/icon-button": "^15.0.12", + "@leafygreen-ui/input-option": "^1.0.5", + "@leafygreen-ui/lib": "^10.4.0", + "@leafygreen-ui/palette": "^4.0.4", + "@leafygreen-ui/polymorphic": "^1.3.2", + "@leafygreen-ui/popover": "^11.0.12", + "@leafygreen-ui/tokens": "^2.1.1", + "@leafygreen-ui/typography": "^16.5.1", + "lodash": "^4.17.21", + "polished": "^4.2.2" + }, + "peerDependencies": { + "@leafygreen-ui/leafygreen-provider": "^3.1.3" + } + }, + "node_modules/@leafygreen-ui/search-input/node_modules/@leafygreen-ui/hooks": { + "version": "7.7.5", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/hooks/-/hooks-7.7.5.tgz", + "integrity": "sha512-Spk36yndhplGfCdLl14RWuoDPGYfEgA6AwqbaI4T45i+A2QtDTvdSFyMUkNmDK5vzk5cWmR/SmkRS/o5T9zgMA==", + "dependencies": { + "lodash": "^4.17.21" + } + }, + "node_modules/@leafygreen-ui/search-input/node_modules/@leafygreen-ui/icon-button": { + "version": "15.0.12", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/icon-button/-/icon-button-15.0.12.tgz", + "integrity": "sha512-19tXprK4/jIZq19o6Y2OnPw5ifuLIhpxAJ4/gs/lIFk/4A5PZJOnZzy6ABdiMaFk/1miSjoDQ5B+lncvgAx1gA==", + "dependencies": { + "@leafygreen-ui/a11y": "^1.4.2", + "@leafygreen-ui/box": "^3.1.4", + "@leafygreen-ui/emotion": "^4.0.4", + "@leafygreen-ui/icon": "^11.17.0", + "@leafygreen-ui/lib": "^10.4.0", + "@leafygreen-ui/palette": "^4.0.4", + "@leafygreen-ui/tokens": "^2.1.1" + }, + "peerDependencies": { + "@leafygreen-ui/leafygreen-provider": "^3.1.3" + } + }, + "node_modules/@leafygreen-ui/search-input/node_modules/@leafygreen-ui/lib": { + "version": "10.4.0", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/lib/-/lib-10.4.0.tgz", + "integrity": "sha512-gGZBJ0Mjo2/hHfECbERGJbx1nPFNDqkge7L1K5y5LwBjpiOYjUNa1OsyBRwc9pr+zucdAF2FHSo+EdoT83Mbtg==", + "dependencies": { + "@storybook/csf": "^0.1.0", + "lodash": "^4.17.21", + "prop-types": "^15.7.2" + }, + "peerDependencies": { + "react": "^17.0.0" + } + }, + "node_modules/@leafygreen-ui/search-input/node_modules/@leafygreen-ui/palette": { + "version": "4.0.4", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/palette/-/palette-4.0.4.tgz", + "integrity": "sha512-nuZy2RtKHAGpIKrDduqC8P8PvajJRT1hQURoisYMiB32NmEEHGEhtHw4MlS+Kv92HFA0jxgMdZUHKTXq83BhjA==" + }, + "node_modules/@leafygreen-ui/search-input/node_modules/@leafygreen-ui/popover": { + "version": "11.0.12", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/popover/-/popover-11.0.12.tgz", + "integrity": "sha512-zF8axGB+RhpoG0xgb4K/p8ydS5JAEXpwqdLrcrY9r7cAYzxX0F4mhIpYg+oyK2K5TIbgGR/fsFPbhKYsmreuMA==", + "dependencies": { + "@leafygreen-ui/emotion": "^4.0.4", + "@leafygreen-ui/hooks": "^7.7.5", + "@leafygreen-ui/lib": "^10.4.0", + "@leafygreen-ui/portal": "^4.1.4", + "@leafygreen-ui/tokens": "^2.1.1", + "react-transition-group": "^4.4.1" + }, + "peerDependencies": { + "@leafygreen-ui/leafygreen-provider": "^3.1.3" + } + }, + "node_modules/@leafygreen-ui/search-input/node_modules/@leafygreen-ui/tokens": { + "version": "2.1.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/tokens/-/tokens-2.1.1.tgz", + "integrity": "sha512-5mpyxRhp+8aY6eX6UYacDV6PLl3OieWG061ceAn2ThYaanIP64AMbodWifrF/IFMItJPFkwAtfPtJqugOFVb7Q==", + "dependencies": { + "@leafygreen-ui/palette": "^4.0.4" + } + }, + "node_modules/@leafygreen-ui/search-input/node_modules/@leafygreen-ui/typography": { + "version": "16.5.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/typography/-/typography-16.5.1.tgz", + "integrity": "sha512-5dentOt4LubXxmkwVVy6ZlUvGsebJsHhZZ9LAlplUz13VkyvS458Bhnog4cqNqvnJjdlWLdO+ZO0/JyYUIIuXw==", + "dependencies": { + "@leafygreen-ui/emotion": "^4.0.4", + "@leafygreen-ui/icon": "^11.17.0", + "@leafygreen-ui/lib": "^10.4.0", + "@leafygreen-ui/palette": "^4.0.4", + "@leafygreen-ui/polymorphic": "^1.3.2", + "@leafygreen-ui/tokens": "^2.1.1" + }, + "peerDependencies": { + "@leafygreen-ui/leafygreen-provider": "^3.1.3" + } + }, + "node_modules/@leafygreen-ui/search-input/node_modules/@storybook/csf": { + "version": "0.1.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@storybook/csf/-/csf-0.1.1.tgz", + "integrity": "sha512-4hE3AlNVxR60Wc5KSC68ASYzUobjPqtSKyhV6G+ge0FIXU55N5nTY7dXGRZHQGDBPq+XqchMkIdlkHPRs8nTHg==", + "dependencies": { + "type-fest": "^2.19.0" + } + }, + "node_modules/@leafygreen-ui/search-input/node_modules/type-fest": { + "version": "2.19.0", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==", + "engines": { + "node": ">=12.20" + } + }, "node_modules/@leafygreen-ui/segmented-control": { "version": "8.0.1", "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/segmented-control/-/segmented-control-8.0.1.tgz", @@ -25501,19 +25679,19 @@ } }, "@leafygreen-ui/a11y": { - "version": "1.4.2", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/a11y/-/a11y-1.4.2.tgz", - "integrity": "sha512-xIBYmA/kazyCieds9fmFBQmWfsqwOEOP6lX9EWEzecJnOreTflZcrZYV9ApnTQ2whw8k9CLT0wObaTHm4S1IMQ==", + "version": "1.4.4", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/a11y/-/a11y-1.4.4.tgz", + "integrity": "sha512-QjXputn8XPagHPCibjfGcImQSUMgZijm9Da1VfIjZhxc47dSGD9cb7ncu9UIpu1w/Sz+2fjQ6oDbp+5K9MUO2w==", "requires": { "@leafygreen-ui/emotion": "^4.0.4", - "@leafygreen-ui/hooks": "^7.7.1", + "@leafygreen-ui/hooks": "^7.7.3", "@leafygreen-ui/lib": "^10.3.2" }, "dependencies": { "@leafygreen-ui/hooks": { - "version": "7.7.1", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/hooks/-/hooks-7.7.1.tgz", - "integrity": "sha512-P4uGzI0IBUX2g4MRY2FX6TPrMOLuh2/bOrq9TiWQgj/vhDPbAQt+62F7p3b3XL+Axywtqg6dIODNWW+WfJrXSA==", + "version": "7.7.5", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/hooks/-/hooks-7.7.5.tgz", + "integrity": "sha512-Spk36yndhplGfCdLl14RWuoDPGYfEgA6AwqbaI4T45i+A2QtDTvdSFyMUkNmDK5vzk5cWmR/SmkRS/o5T9zgMA==", "requires": { "lodash": "^4.17.21" } @@ -25560,9 +25738,9 @@ } }, "@leafygreen-ui/box": { - "version": "3.1.3", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/box/-/box-3.1.3.tgz", - "integrity": "sha512-lO4IHQIR36rpE19QBqeJxTnfZ4lHvPlSIC93UOdp97JUq0HEelrjsFLMy+262ZJxH2C+oDnuylv9QxdJej/wGw==" + "version": "3.1.4", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/box/-/box-3.1.4.tgz", + "integrity": "sha512-cdEXGEafHuaH4zGx3NTX1bMOQ52EpoWA595BC1hh4/8BmXL+H4NFMGywuhZnvYjC4lyVGauX6sCspxrunbmfMQ==" }, "@leafygreen-ui/button": { "version": "16.1.1", @@ -25945,25 +26123,25 @@ } }, "@leafygreen-ui/input-option": { - "version": "1.0.3", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/input-option/-/input-option-1.0.3.tgz", - "integrity": "sha512-UfzfQsbAc9PJEN25N2Wa1kdnx1ce/202IzgciTUn1bl99ohI0n0ULDceo8lnt70WZzo7xlh8r3aIV+AZx63soA==", + "version": "1.0.5", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/input-option/-/input-option-1.0.5.tgz", + "integrity": "sha512-gU051Rr5oB6CelLziN1xpbymexEP28DsbhgN+KTXxzpOM5q4l1dNAv12UDuCSEJS/xPP0kzkBkMWT/WPOEE/uQ==", "requires": { "@leafygreen-ui/a11y": "^1.4.2", "@leafygreen-ui/emotion": "^4.0.4", - "@leafygreen-ui/lib": "^10.3.3", + "@leafygreen-ui/lib": "^10.4.0", "@leafygreen-ui/palette": "^4.0.4", - "@leafygreen-ui/polymorphic": "^1.3.1", - "@leafygreen-ui/tokens": "^2.0.3", - "@leafygreen-ui/typography": "^16.3.0" + "@leafygreen-ui/polymorphic": "^1.3.2", + "@leafygreen-ui/tokens": "^2.1.1", + "@leafygreen-ui/typography": "^16.5.1" }, "dependencies": { "@leafygreen-ui/lib": { - "version": "10.3.3", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/lib/-/lib-10.3.3.tgz", - "integrity": "sha512-n+L4u9TnwXgZlzGniEJ4QdKzeXlFU54AgTjb6a2k4nHLBL6eQgRwrHCL4Dviv6ARFHH0tfLWMqBguMOY33Cw2w==", + "version": "10.4.0", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/lib/-/lib-10.4.0.tgz", + "integrity": "sha512-gGZBJ0Mjo2/hHfECbERGJbx1nPFNDqkge7L1K5y5LwBjpiOYjUNa1OsyBRwc9pr+zucdAF2FHSo+EdoT83Mbtg==", "requires": { - "@storybook/csf": "^0.0.2-next.10", + "@storybook/csf": "^0.1.0", "lodash": "^4.17.21", "prop-types": "^15.7.2" } @@ -25972,6 +26150,40 @@ "version": "4.0.4", "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/palette/-/palette-4.0.4.tgz", "integrity": "sha512-nuZy2RtKHAGpIKrDduqC8P8PvajJRT1hQURoisYMiB32NmEEHGEhtHw4MlS+Kv92HFA0jxgMdZUHKTXq83BhjA==" + }, + "@leafygreen-ui/tokens": { + "version": "2.1.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/tokens/-/tokens-2.1.1.tgz", + "integrity": "sha512-5mpyxRhp+8aY6eX6UYacDV6PLl3OieWG061ceAn2ThYaanIP64AMbodWifrF/IFMItJPFkwAtfPtJqugOFVb7Q==", + "requires": { + "@leafygreen-ui/palette": "^4.0.4" + } + }, + "@leafygreen-ui/typography": { + "version": "16.5.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/typography/-/typography-16.5.1.tgz", + "integrity": "sha512-5dentOt4LubXxmkwVVy6ZlUvGsebJsHhZZ9LAlplUz13VkyvS458Bhnog4cqNqvnJjdlWLdO+ZO0/JyYUIIuXw==", + "requires": { + "@leafygreen-ui/emotion": "^4.0.4", + "@leafygreen-ui/icon": "^11.17.0", + "@leafygreen-ui/lib": "^10.4.0", + "@leafygreen-ui/palette": "^4.0.4", + "@leafygreen-ui/polymorphic": "^1.3.2", + "@leafygreen-ui/tokens": "^2.1.1" + } + }, + "@storybook/csf": { + "version": "0.1.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@storybook/csf/-/csf-0.1.1.tgz", + "integrity": "sha512-4hE3AlNVxR60Wc5KSC68ASYzUobjPqtSKyhV6G+ge0FIXU55N5nTY7dXGRZHQGDBPq+XqchMkIdlkHPRs8nTHg==", + "requires": { + "type-fest": "^2.19.0" + } + }, + "type-fest": { + "version": "2.19.0", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==" } } }, @@ -26078,31 +26290,44 @@ } }, "@leafygreen-ui/portal": { - "version": "4.1.2", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/portal/-/portal-4.1.2.tgz", - "integrity": "sha512-HKUMXqafjc8N9TA7u7X3PZ7dBbfsnamc40RPoNLh9z6PzvGNia4wDbixMc2qeC3lWi1fWayFs31LAdIrdzQcXg==", + "version": "4.1.4", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/portal/-/portal-4.1.4.tgz", + "integrity": "sha512-gtzQno7yXGmbblHIVBWpJ6+TIFwep/PL4M6vcloCzAaV88+gSMJ9lhrBJbqYQkfd65xeEaycClDsfCpI35p/nA==", "requires": { - "@leafygreen-ui/hooks": "^7.7.1", - "@leafygreen-ui/lib": "^10.3.3" + "@leafygreen-ui/hooks": "^7.7.5", + "@leafygreen-ui/lib": "^10.4.0" }, "dependencies": { "@leafygreen-ui/hooks": { - "version": "7.7.1", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/hooks/-/hooks-7.7.1.tgz", - "integrity": "sha512-P4uGzI0IBUX2g4MRY2FX6TPrMOLuh2/bOrq9TiWQgj/vhDPbAQt+62F7p3b3XL+Axywtqg6dIODNWW+WfJrXSA==", + "version": "7.7.5", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/hooks/-/hooks-7.7.5.tgz", + "integrity": "sha512-Spk36yndhplGfCdLl14RWuoDPGYfEgA6AwqbaI4T45i+A2QtDTvdSFyMUkNmDK5vzk5cWmR/SmkRS/o5T9zgMA==", "requires": { "lodash": "^4.17.21" } }, "@leafygreen-ui/lib": { - "version": "10.3.3", - "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/lib/-/lib-10.3.3.tgz", - "integrity": "sha512-n+L4u9TnwXgZlzGniEJ4QdKzeXlFU54AgTjb6a2k4nHLBL6eQgRwrHCL4Dviv6ARFHH0tfLWMqBguMOY33Cw2w==", + "version": "10.4.0", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/lib/-/lib-10.4.0.tgz", + "integrity": "sha512-gGZBJ0Mjo2/hHfECbERGJbx1nPFNDqkge7L1K5y5LwBjpiOYjUNa1OsyBRwc9pr+zucdAF2FHSo+EdoT83Mbtg==", "requires": { - "@storybook/csf": "^0.0.2-next.10", + "@storybook/csf": "^0.1.0", "lodash": "^4.17.21", "prop-types": "^15.7.2" } + }, + "@storybook/csf": { + "version": "0.1.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@storybook/csf/-/csf-0.1.1.tgz", + "integrity": "sha512-4hE3AlNVxR60Wc5KSC68ASYzUobjPqtSKyhV6G+ge0FIXU55N5nTY7dXGRZHQGDBPq+XqchMkIdlkHPRs8nTHg==", + "requires": { + "type-fest": "^2.19.0" + } + }, + "type-fest": { + "version": "2.19.0", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==" } } }, @@ -26112,6 +26337,113 @@ "@leafygreen-ui/tokens": "^2.0.0" } }, + "@leafygreen-ui/search-input": { + "version": "2.0.8", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/search-input/-/search-input-2.0.8.tgz", + "integrity": "sha512-ijMpZgyUpOQM1fOnUs1XavIYAcD9P5PNRWp2hprgWMJZp8FrcopsslMJJIDaM00Sdj0MjSDAti9+aXeo+2ZgSw==", + "requires": { + "@leafygreen-ui/a11y": "^1.4.3", + "@leafygreen-ui/emotion": "^4.0.4", + "@leafygreen-ui/hooks": "^7.7.5", + "@leafygreen-ui/icon": "^11.17.0", + "@leafygreen-ui/icon-button": "^15.0.12", + "@leafygreen-ui/input-option": "^1.0.5", + "@leafygreen-ui/lib": "^10.4.0", + "@leafygreen-ui/palette": "^4.0.4", + "@leafygreen-ui/polymorphic": "^1.3.2", + "@leafygreen-ui/popover": "^11.0.12", + "@leafygreen-ui/tokens": "^2.1.1", + "@leafygreen-ui/typography": "^16.5.1", + "lodash": "^4.17.21", + "polished": "^4.2.2" + }, + "dependencies": { + "@leafygreen-ui/hooks": { + "version": "7.7.5", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/hooks/-/hooks-7.7.5.tgz", + "integrity": "sha512-Spk36yndhplGfCdLl14RWuoDPGYfEgA6AwqbaI4T45i+A2QtDTvdSFyMUkNmDK5vzk5cWmR/SmkRS/o5T9zgMA==", + "requires": { + "lodash": "^4.17.21" + } + }, + "@leafygreen-ui/icon-button": { + "version": "15.0.12", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/icon-button/-/icon-button-15.0.12.tgz", + "integrity": "sha512-19tXprK4/jIZq19o6Y2OnPw5ifuLIhpxAJ4/gs/lIFk/4A5PZJOnZzy6ABdiMaFk/1miSjoDQ5B+lncvgAx1gA==", + "requires": { + "@leafygreen-ui/a11y": "^1.4.2", + "@leafygreen-ui/box": "^3.1.4", + "@leafygreen-ui/emotion": "^4.0.4", + "@leafygreen-ui/icon": "^11.17.0", + "@leafygreen-ui/lib": "^10.4.0", + "@leafygreen-ui/palette": "^4.0.4", + "@leafygreen-ui/tokens": "^2.1.1" + } + }, + "@leafygreen-ui/lib": { + "version": "10.4.0", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/lib/-/lib-10.4.0.tgz", + "integrity": "sha512-gGZBJ0Mjo2/hHfECbERGJbx1nPFNDqkge7L1K5y5LwBjpiOYjUNa1OsyBRwc9pr+zucdAF2FHSo+EdoT83Mbtg==", + "requires": { + "@storybook/csf": "^0.1.0", + "lodash": "^4.17.21", + "prop-types": "^15.7.2" + } + }, + "@leafygreen-ui/palette": { + "version": "4.0.4", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/palette/-/palette-4.0.4.tgz", + "integrity": "sha512-nuZy2RtKHAGpIKrDduqC8P8PvajJRT1hQURoisYMiB32NmEEHGEhtHw4MlS+Kv92HFA0jxgMdZUHKTXq83BhjA==" + }, + "@leafygreen-ui/popover": { + "version": "11.0.12", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/popover/-/popover-11.0.12.tgz", + "integrity": "sha512-zF8axGB+RhpoG0xgb4K/p8ydS5JAEXpwqdLrcrY9r7cAYzxX0F4mhIpYg+oyK2K5TIbgGR/fsFPbhKYsmreuMA==", + "requires": { + "@leafygreen-ui/emotion": "^4.0.4", + "@leafygreen-ui/hooks": "^7.7.5", + "@leafygreen-ui/lib": "^10.4.0", + "@leafygreen-ui/portal": "^4.1.4", + "@leafygreen-ui/tokens": "^2.1.1", + "react-transition-group": "^4.4.1" + } + }, + "@leafygreen-ui/tokens": { + "version": "2.1.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/tokens/-/tokens-2.1.1.tgz", + "integrity": "sha512-5mpyxRhp+8aY6eX6UYacDV6PLl3OieWG061ceAn2ThYaanIP64AMbodWifrF/IFMItJPFkwAtfPtJqugOFVb7Q==", + "requires": { + "@leafygreen-ui/palette": "^4.0.4" + } + }, + "@leafygreen-ui/typography": { + "version": "16.5.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/typography/-/typography-16.5.1.tgz", + "integrity": "sha512-5dentOt4LubXxmkwVVy6ZlUvGsebJsHhZZ9LAlplUz13VkyvS458Bhnog4cqNqvnJjdlWLdO+ZO0/JyYUIIuXw==", + "requires": { + "@leafygreen-ui/emotion": "^4.0.4", + "@leafygreen-ui/icon": "^11.17.0", + "@leafygreen-ui/lib": "^10.4.0", + "@leafygreen-ui/palette": "^4.0.4", + "@leafygreen-ui/polymorphic": "^1.3.2", + "@leafygreen-ui/tokens": "^2.1.1" + } + }, + "@storybook/csf": { + "version": "0.1.1", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@storybook/csf/-/csf-0.1.1.tgz", + "integrity": "sha512-4hE3AlNVxR60Wc5KSC68ASYzUobjPqtSKyhV6G+ge0FIXU55N5nTY7dXGRZHQGDBPq+XqchMkIdlkHPRs8nTHg==", + "requires": { + "type-fest": "^2.19.0" + } + }, + "type-fest": { + "version": "2.19.0", + "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/type-fest/-/type-fest-2.19.0.tgz", + "integrity": "sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==" + } + } + }, "@leafygreen-ui/segmented-control": { "version": "8.0.1", "resolved": "https://artifactory.corp.mongodb.com/artifactory/api/npm/npm/@leafygreen-ui/segmented-control/-/segmented-control-8.0.1.tgz", diff --git a/package.json b/package.json index 4767d4cc4..8cccb5f5e 100644 --- a/package.json +++ b/package.json @@ -76,6 +76,7 @@ "@leafygreen-ui/logo": "^4.0.2", "@leafygreen-ui/modal": "^10.1.0", "@leafygreen-ui/palette": "^3.4.3", + "@leafygreen-ui/search-input": "^2.0.8", "@leafygreen-ui/segmented-control": "^8.0.0", "@leafygreen-ui/select": "^7.0.0", "@leafygreen-ui/side-nav": "^10.0.0", diff --git a/src/components/SearchResults/SearchResults.js b/src/components/SearchResults/SearchResults.js index 6cf6c737f..6c476cf8d 100644 --- a/src/components/SearchResults/SearchResults.js +++ b/src/components/SearchResults/SearchResults.js @@ -5,7 +5,9 @@ import styled from '@emotion/styled'; import { useLocation } from '@gatsbyjs/reach-router'; import Button from '@leafygreen-ui/button'; import Icon from '@leafygreen-ui/icon'; +import { SearchInput } from '@leafygreen-ui/search-input'; import { palette } from '@leafygreen-ui/palette'; +import { H1 } from '@leafygreen-ui/typography'; import queryString from 'query-string'; import useScreenSize from '../../hooks/useScreenSize'; import { theme } from '../../theme/docsTheme'; @@ -236,6 +238,7 @@ const SearchResults = () => { const { isTabletOrMobile } = useScreenSize(); const [searchResults, setSearchResults] = useState([]); const [searchTerm, setSearchTerm] = useState(null); + const [searchField, setSearchField] = useState(null); const [searchFilter, setSearchFilter] = useState(null); const [searchFinished, setSearchFinished] = useState(false); const [firstRenderComplete, setFirstRenderComplete] = useState(false); @@ -244,6 +247,7 @@ const SearchResults = () => { const [showMobileFilters, setShowMobileFilters] = useState(false); const { filters, searchPropertyMapping } = useMarianManifests(); const specifySearchText = 'Specify your search'; + const newSearchInput = process.env.GATSBY_TEST_SEARCH_UI === 'true'; const resetFilters = useCallback(() => { setSelectedCategory(null); @@ -274,6 +278,7 @@ const SearchResults = () => { setFirstRenderComplete(true); const { q, searchProperty } = queryString.parse(search); setSearchTerm(q); + setSearchField(q); setSearchFilter(searchProperty); }, [search]); @@ -320,7 +325,27 @@ const SearchResults = () => { {!!searchTerm ? ( - Search results for "{searchTerm}" + {newSearchInput ? ( + <> +

Search Results

+ { + const newValue = event.target[0]?.value; + if (newValue === searchTerm) return; + setSearchResults([]); + setSearchFinished(false); + setSearchTerm(event.target[0].value); + }} + onChange={(e) => { + setSearchField(e.target.value); + }} + /> + + ) : ( + Search results for "{searchTerm}" + )} {!!searchFilter && ( {selectedCategory && ( @@ -345,7 +370,11 @@ const SearchResults = () => { - reportAnalytics('SearchSelection', { areaFrom: 'ResultsPage', rank: index, selectionUrl: url }) + reportAnalytics('SearchSelection', { + areaFrom: 'ResultsPage', + rank: index, + selectionUrl: url, + }) } title={title} preview={escapeHtml(preview)} @@ -400,6 +429,27 @@ const SearchResults = () => {
) : ( <> + {newSearchInput && ( + + +

Search Results

+ { + const newValue = event.target[0]?.value; + if (newValue === searchTerm) return; + setSearchResults([]); + setSearchFinished(false); + setSearchTerm(event.target[0].value); + }} + onChange={(e) => { + setSearchField(e.target.value); + }} + /> +
+
+ )} {!searchResults?.length && ( {firstRenderComplete ? : } diff --git a/tests/unit/SearchResults.test.js b/tests/unit/SearchResults.test.js index ff488c545..c5228a6ad 100644 --- a/tests/unit/SearchResults.test.js +++ b/tests/unit/SearchResults.test.js @@ -68,9 +68,8 @@ const expectUnfilteredResults = (wrapper) => { `http://localhost/${UNFILTERED_RESULT.url}` ); - // We always show this text, regardless of filter + // We always show this text automatically on page load in the search bar, regardless of filter expect(wrapper.queryAllByText('Search results for "stitch"').length).toBe(1); - // Check the dropdowns are not filled in expectValuesForFilters(wrapper, 'Filter by Category', 'Filter by Version'); };