diff --git a/package-lock.json b/package-lock.json index dfc65284..5a3a0a5b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@dassana-io/web-components", - "version": "0.6.2", + "version": "0.6.3", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2351,17 +2351,17 @@ } }, "@storybook/addon-actions": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/addon-actions/-/addon-actions-6.0.26.tgz", - "integrity": "sha512-9tWbAqSwzWWVz8zwAndZFusZYjIcRYgZUC0LqC8QlH79DgF3ASjw9y97+w1VTTAzdb6LYnsMuSpX6+8m5hrR4g==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/addon-actions/-/addon-actions-6.0.27.tgz", + "integrity": "sha512-GtYSjwGeuRSOAVLuSM2Kae5w17aUgKNXzy1zrWlXlBpTrcyhciRsRBSMGV3PV3EpF3HpxQfyWmJZa3OgFsXdRw==", "dev": true, "requires": { - "@storybook/addons": "6.0.26", - "@storybook/api": "6.0.26", - "@storybook/client-api": "6.0.26", - "@storybook/components": "6.0.26", - "@storybook/core-events": "6.0.26", - "@storybook/theming": "6.0.26", + "@storybook/addons": "6.0.27", + "@storybook/api": "6.0.27", + "@storybook/client-api": "6.0.27", + "@storybook/components": "6.0.27", + "@storybook/core-events": "6.0.27", + "@storybook/theming": "6.0.27", "core-js": "^3.0.1", "fast-deep-equal": "^3.1.1", "global": "^4.3.2", @@ -2377,17 +2377,17 @@ } }, "@storybook/addon-backgrounds": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/addon-backgrounds/-/addon-backgrounds-6.0.26.tgz", - "integrity": "sha512-Y9t1s4N2PgTxLhO85w+WFnnclZNRdxGpsoiLDPkb63HajZvUa5/ogmIOrfFl5DX2zCpkgNLlskmDcEP6n835cA==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/addon-backgrounds/-/addon-backgrounds-6.0.27.tgz", + "integrity": "sha512-TO7+ip7KzcADftuH+BFfH8aWVHfHs50Cl4/02uv8AQ/mLZFmb/HkuGDBfRwCv4fWclX613mmL9P0M4sbpYUlGw==", "dev": true, "requires": { - "@storybook/addons": "6.0.26", - "@storybook/api": "6.0.26", - "@storybook/client-logger": "6.0.26", - "@storybook/components": "6.0.26", - "@storybook/core-events": "6.0.26", - "@storybook/theming": "6.0.26", + "@storybook/addons": "6.0.27", + "@storybook/api": "6.0.27", + "@storybook/client-logger": "6.0.27", + "@storybook/components": "6.0.27", + "@storybook/core-events": "6.0.27", + "@storybook/theming": "6.0.27", "core-js": "^3.0.1", "memoizerific": "^1.11.3", "react": "^16.8.3", @@ -2395,31 +2395,31 @@ } }, "@storybook/addon-controls": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/addon-controls/-/addon-controls-6.0.26.tgz", - "integrity": "sha512-K3Oik9ClpShv8Qc6JeNwtmd4yJJcnO2nyaAYYFiyNt+Vsg7zMaDtE2wfvViThNKjX7nUXIeh+OscseIkdWgLuA==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/addon-controls/-/addon-controls-6.0.27.tgz", + "integrity": "sha512-YdAwizkDJKo+TpsBB4nnorZZuSdl7+lI0kD7CUUicDdcTAQdI/mNUvKOCKVWAnYLzQmdWRc3e3GNvp003Q155g==", "dev": true, "requires": { - "@storybook/addons": "6.0.26", - "@storybook/api": "6.0.26", - "@storybook/client-api": "6.0.26", - "@storybook/components": "6.0.26", - "@storybook/node-logger": "6.0.26", - "@storybook/theming": "6.0.26", + "@storybook/addons": "6.0.27", + "@storybook/api": "6.0.27", + "@storybook/client-api": "6.0.27", + "@storybook/components": "6.0.27", + "@storybook/node-logger": "6.0.27", + "@storybook/theming": "6.0.27", "core-js": "^3.0.1", "ts-dedent": "^1.1.1" } }, "@storybook/addon-cssresources": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/addon-cssresources/-/addon-cssresources-6.0.26.tgz", - "integrity": "sha512-bQQNzy9x8/UI00KtShNcsGzM92R01uQly76+daqie13M0Hr15s2ffb7qEkcmqyUpmrRjDSCFbk1uKUw0DS53pw==", - "requires": { - "@storybook/addons": "6.0.26", - "@storybook/api": "6.0.26", - "@storybook/components": "6.0.26", - "@storybook/core-events": "6.0.26", - "@storybook/theming": "6.0.26", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/addon-cssresources/-/addon-cssresources-6.0.27.tgz", + "integrity": "sha512-aHe2ChW6JWV/fgujWxxz3pETj4cgamafQZqERLN+z+YY0+xqeQ3xqbC1LW4gI0NprAm0sT3w1sx9kGw9xI6UVA==", + "requires": { + "@storybook/addons": "6.0.27", + "@storybook/api": "6.0.27", + "@storybook/components": "6.0.27", + "@storybook/core-events": "6.0.27", + "@storybook/theming": "6.0.27", "core-js": "^3.0.1", "global": "^4.3.2", "react": "^16.8.3", @@ -2427,9 +2427,9 @@ } }, "@storybook/addon-docs": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/addon-docs/-/addon-docs-6.0.26.tgz", - "integrity": "sha512-3t8AOPkp8ZW74h7FnzxF3wAeb1wRyYjMmgJZxqzgi/x7K0i1inbCq8MuJnytuTcZ7+EK4HR6Ih7o9tJuAtIBLw==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/addon-docs/-/addon-docs-6.0.27.tgz", + "integrity": "sha512-NXSNulvpH2CL/aPPVa/llVc7SFOZUMkECcVmNf3aO0inE3nn2QN1dW3LfJaESuZYwLKFRa7qY+0CmvNqOrHXrQ==", "dev": true, "requires": { "@babel/generator": "^7.9.6", @@ -2440,18 +2440,18 @@ "@mdx-js/loader": "^1.5.1", "@mdx-js/mdx": "^1.5.1", "@mdx-js/react": "^1.5.1", - "@storybook/addons": "6.0.26", - "@storybook/api": "6.0.26", - "@storybook/client-api": "6.0.26", - "@storybook/client-logger": "6.0.26", - "@storybook/components": "6.0.26", - "@storybook/core": "6.0.26", - "@storybook/core-events": "6.0.26", + "@storybook/addons": "6.0.27", + "@storybook/api": "6.0.27", + "@storybook/client-api": "6.0.27", + "@storybook/client-logger": "6.0.27", + "@storybook/components": "6.0.27", + "@storybook/core": "6.0.27", + "@storybook/core-events": "6.0.27", "@storybook/csf": "0.0.1", - "@storybook/node-logger": "6.0.26", - "@storybook/postinstall": "6.0.26", - "@storybook/source-loader": "6.0.26", - "@storybook/theming": "6.0.26", + "@storybook/node-logger": "6.0.27", + "@storybook/postinstall": "6.0.27", + "@storybook/source-loader": "6.0.27", + "@storybook/theming": "6.0.27", "acorn": "^7.1.0", "acorn-jsx": "^5.1.0", "acorn-walk": "^7.0.0", @@ -2473,21 +2473,21 @@ }, "dependencies": { "@jest/transform": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.6.0.tgz", - "integrity": "sha512-NUNA1NMCyVV9g5NIQF1jzW7QutQhB/HAocteCiUyH0VhmLXnGMTfPYQu1G6IjPk+k1SWdh2PD+Zs1vMqbavWzg==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.6.1.tgz", + "integrity": "sha512-oNFAqVtqRxZRx6vXL3I4bPKUK0BIlEeaalkwxyQGGI8oXDQBtYQBpiMe5F7qPs4QdvvFYB42gPGIMMcxXaBBxQ==", "dev": true, "requires": { "@babel/core": "^7.1.0", - "@jest/types": "^26.6.0", + "@jest/types": "^26.6.1", "babel-plugin-istanbul": "^6.0.0", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.6.0", + "jest-haste-map": "^26.6.1", "jest-regex-util": "^26.0.0", - "jest-util": "^26.6.0", + "jest-util": "^26.6.1", "micromatch": "^4.0.2", "pirates": "^4.0.1", "slash": "^3.0.0", @@ -2496,9 +2496,9 @@ } }, "@jest/types": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.0.tgz", - "integrity": "sha512-8pDeq/JVyAYw7jBGU83v8RMYAkdrRxLG3BGnAJuqaQAUd6GWBmND2uyl+awI88+hit48suLoLjNFtR+ZXxWaYg==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", @@ -2638,12 +2638,12 @@ } }, "jest-haste-map": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.0.tgz", - "integrity": "sha512-RpNqAGMR58uG9E9vWITorX2/R7he/tSbHWldX5upt1ymEcmCaXczqXxjqI6xOtRR8Ev6ZEYDfgSA5Fy7WHUL5w==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.1.tgz", + "integrity": "sha512-9kPafkv0nX6ta1PrshnkiyhhoQoFWncrU/uUBt3/AP1r78WSCU5iLceYRTwDvJl67H3RrXqSlSVDDa/AsUB7OQ==", "dev": true, "requires": { - "@jest/types": "^26.6.0", + "@jest/types": "^26.6.1", "@types/graceful-fs": "^4.1.2", "@types/node": "*", "anymatch": "^3.0.3", @@ -2652,8 +2652,8 @@ "graceful-fs": "^4.2.4", "jest-regex-util": "^26.0.0", "jest-serializer": "^26.5.0", - "jest-util": "^26.6.0", - "jest-worker": "^26.5.0", + "jest-util": "^26.6.1", + "jest-worker": "^26.6.1", "micromatch": "^4.0.2", "sane": "^4.0.3", "walker": "^1.0.7" @@ -2676,12 +2676,12 @@ } }, "jest-util": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.0.tgz", - "integrity": "sha512-/cUGqcnKeZMjvTQLfJo65nBOEZ/k0RB/8usv2JpfYya05u0XvBmKkIH5o5c4nCh9DD61B1YQjMGGqh1Ha0aXdg==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.1.tgz", + "integrity": "sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA==", "dev": true, "requires": { - "@jest/types": "^26.6.0", + "@jest/types": "^26.6.1", "@types/node": "*", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", @@ -2690,9 +2690,9 @@ } }, "jest-worker": { - "version": "26.5.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.5.0.tgz", - "integrity": "sha512-kTw66Dn4ZX7WpjZ7T/SUDgRhapFRKWmisVAF0Rv4Fu8SLFD7eLbqpLvbxVqYhSgaWa7I+bW7pHnbyfNsH6stug==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.1.tgz", + "integrity": "sha512-R5IE3qSGz+QynJx8y+ICEkdI2OJ3RJjRQVEyCcFAd3yVhQSEtquziPO29Mlzgn07LOVE8u8jhJ1FqcwegiXWOw==", "dev": true, "requires": { "@types/node": "*", @@ -2778,36 +2778,36 @@ } }, "@storybook/addon-essentials": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/addon-essentials/-/addon-essentials-6.0.26.tgz", - "integrity": "sha512-AsKcPrVFksYNWq07jKXX/GRcdTa6Uo3sTEwuV5ZazWltlbOIcI0YdQs6mCFaCElB5Dqg1jqyxZ3vcd+VHiRSkA==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/addon-essentials/-/addon-essentials-6.0.27.tgz", + "integrity": "sha512-JmiMojlqivAG3kaIAIdKX2eOd4jlNK0ATfcU7PLjTh45BlW08erQIwdLAmU5BlTld/HcwCiGkpGKC7KJgcjGGQ==", "dev": true, "requires": { - "@storybook/addon-actions": "6.0.26", - "@storybook/addon-backgrounds": "6.0.26", - "@storybook/addon-controls": "6.0.26", - "@storybook/addon-docs": "6.0.26", - "@storybook/addon-toolbars": "6.0.26", - "@storybook/addon-viewport": "6.0.26", - "@storybook/addons": "6.0.26", - "@storybook/api": "6.0.26", - "@storybook/node-logger": "6.0.26", + "@storybook/addon-actions": "6.0.27", + "@storybook/addon-backgrounds": "6.0.27", + "@storybook/addon-controls": "6.0.27", + "@storybook/addon-docs": "6.0.27", + "@storybook/addon-toolbars": "6.0.27", + "@storybook/addon-viewport": "6.0.27", + "@storybook/addons": "6.0.27", + "@storybook/api": "6.0.27", + "@storybook/node-logger": "6.0.27", "core-js": "^3.0.1", "regenerator-runtime": "^0.13.3", "ts-dedent": "^1.1.1" } }, "@storybook/addon-links": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/addon-links/-/addon-links-6.0.26.tgz", - "integrity": "sha512-yHC6gSMW6qLqikf9yF62tXvykwCDLZy/7SRW9PEAsQcz27bilTh5swoV4HK24Gb6d+TAR+8sJK+BXuFlKFJE+Q==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/addon-links/-/addon-links-6.0.27.tgz", + "integrity": "sha512-3jgGy+wgeJuqrdOPQCIOTk8TBtFGGoAbzahnuDjh4eH34uSAZgVurME3ojdnqq743ELzMZXL78Y46otZOzVnkA==", "dev": true, "requires": { - "@storybook/addons": "6.0.26", - "@storybook/client-logger": "6.0.26", - "@storybook/core-events": "6.0.26", + "@storybook/addons": "6.0.27", + "@storybook/client-logger": "6.0.27", + "@storybook/core-events": "6.0.27", "@storybook/csf": "0.0.1", - "@storybook/router": "6.0.26", + "@storybook/router": "6.0.27", "@types/qs": "^6.9.0", "core-js": "^3.0.1", "global": "^4.3.2", @@ -2818,15 +2818,15 @@ } }, "@storybook/addon-storyshots": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/addon-storyshots/-/addon-storyshots-6.0.26.tgz", - "integrity": "sha512-XLt7aqjp3lH9ye5zfgbcZIDe8B9riu9shOsJfhZ1DpzfXxb8NVgAcvsXyMW/7dJZ/paAadXAeZZtWnOBuqNnmw==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/addon-storyshots/-/addon-storyshots-6.0.27.tgz", + "integrity": "sha512-CUahFScZZwpb4+J79KyzJwACFBjnwoh/t7dAQ9KYKhAW7UG2lBiI83L8pVkZYx3LdMpcsqBaVwiueiRDOHzjGw==", "dev": true, "requires": { "@jest/transform": "^26.0.0", - "@storybook/addons": "6.0.26", - "@storybook/client-api": "6.0.26", - "@storybook/core": "6.0.26", + "@storybook/addons": "6.0.27", + "@storybook/client-api": "6.0.27", + "@storybook/core": "6.0.27", "@types/glob": "^7.1.1", "@types/jest": "^25.1.1", "@types/jest-specific-snapshot": "^0.5.3", @@ -2842,21 +2842,21 @@ }, "dependencies": { "@jest/transform": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.6.0.tgz", - "integrity": "sha512-NUNA1NMCyVV9g5NIQF1jzW7QutQhB/HAocteCiUyH0VhmLXnGMTfPYQu1G6IjPk+k1SWdh2PD+Zs1vMqbavWzg==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.6.1.tgz", + "integrity": "sha512-oNFAqVtqRxZRx6vXL3I4bPKUK0BIlEeaalkwxyQGGI8oXDQBtYQBpiMe5F7qPs4QdvvFYB42gPGIMMcxXaBBxQ==", "dev": true, "requires": { "@babel/core": "^7.1.0", - "@jest/types": "^26.6.0", + "@jest/types": "^26.6.1", "babel-plugin-istanbul": "^6.0.0", "chalk": "^4.0.0", "convert-source-map": "^1.4.0", "fast-json-stable-stringify": "^2.0.0", "graceful-fs": "^4.2.4", - "jest-haste-map": "^26.6.0", + "jest-haste-map": "^26.6.1", "jest-regex-util": "^26.0.0", - "jest-util": "^26.6.0", + "jest-util": "^26.6.1", "micromatch": "^4.0.2", "pirates": "^4.0.1", "slash": "^3.0.0", @@ -2865,9 +2865,9 @@ } }, "@jest/types": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.0.tgz", - "integrity": "sha512-8pDeq/JVyAYw7jBGU83v8RMYAkdrRxLG3BGnAJuqaQAUd6GWBmND2uyl+awI88+hit48suLoLjNFtR+ZXxWaYg==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", @@ -3127,12 +3127,12 @@ "dev": true }, "jest-haste-map": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.0.tgz", - "integrity": "sha512-RpNqAGMR58uG9E9vWITorX2/R7he/tSbHWldX5upt1ymEcmCaXczqXxjqI6xOtRR8Ev6ZEYDfgSA5Fy7WHUL5w==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.1.tgz", + "integrity": "sha512-9kPafkv0nX6ta1PrshnkiyhhoQoFWncrU/uUBt3/AP1r78WSCU5iLceYRTwDvJl67H3RrXqSlSVDDa/AsUB7OQ==", "dev": true, "requires": { - "@jest/types": "^26.6.0", + "@jest/types": "^26.6.1", "@types/graceful-fs": "^4.1.2", "@types/node": "*", "anymatch": "^3.0.3", @@ -3141,8 +3141,8 @@ "graceful-fs": "^4.2.4", "jest-regex-util": "^26.0.0", "jest-serializer": "^26.5.0", - "jest-util": "^26.6.0", - "jest-worker": "^26.5.0", + "jest-util": "^26.6.1", + "jest-worker": "^26.6.1", "micromatch": "^4.0.2", "sane": "^4.0.3", "walker": "^1.0.7" @@ -3165,12 +3165,12 @@ } }, "jest-util": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.0.tgz", - "integrity": "sha512-/cUGqcnKeZMjvTQLfJo65nBOEZ/k0RB/8usv2JpfYya05u0XvBmKkIH5o5c4nCh9DD61B1YQjMGGqh1Ha0aXdg==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.1.tgz", + "integrity": "sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA==", "dev": true, "requires": { - "@jest/types": "^26.6.0", + "@jest/types": "^26.6.1", "@types/node": "*", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", @@ -3179,9 +3179,9 @@ } }, "jest-worker": { - "version": "26.5.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.5.0.tgz", - "integrity": "sha512-kTw66Dn4ZX7WpjZ7T/SUDgRhapFRKWmisVAF0Rv4Fu8SLFD7eLbqpLvbxVqYhSgaWa7I+bW7pHnbyfNsH6stug==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.1.tgz", + "integrity": "sha512-R5IE3qSGz+QynJx8y+ICEkdI2OJ3RJjRQVEyCcFAd3yVhQSEtquziPO29Mlzgn07LOVE8u8jhJ1FqcwegiXWOw==", "dev": true, "requires": { "@types/node": "*", @@ -3206,15 +3206,23 @@ "dev": true }, "pretty-format": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.0.tgz", - "integrity": "sha512-Uumr9URVB7bm6SbaByXtx+zGlS+0loDkFMHP0kHahMjmfCtmFY03iqd++5v3Ld6iB5TocVXlBN/T+DXMn9d4BA==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.1.tgz", + "integrity": "sha512-MeqqsP5PYcRBbGMvwzsyBdmAJ4EFX7pWFyl7x4+dMVg5pE0ZDdBIvEH2ergvIO+Gvwv1wh64YuOY9y5LuyY/GA==", "dev": true, "requires": { - "@jest/types": "^26.6.0", + "@jest/types": "^26.6.1", "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", - "react-is": "^16.12.0" + "react-is": "^17.0.1" + }, + "dependencies": { + "react-is": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz", + "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==", + "dev": true + } } }, "read-pkg": { @@ -3310,30 +3318,30 @@ } }, "@storybook/addon-toolbars": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/addon-toolbars/-/addon-toolbars-6.0.26.tgz", - "integrity": "sha512-f9OI7ix0lQWg4eEHheWYB3dz7kYO6qCGkzp+oIQkPpjnYmY8ZghyRM+ui6vfq+G8BwxrAKGR0CB8ttNxVsd/9A==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/addon-toolbars/-/addon-toolbars-6.0.27.tgz", + "integrity": "sha512-Ak0srUPOX9m44UfQwZK4ue1hCNvkhfhB5PfVwjN6KyglpRCCNdFIT3BIPshmPXSyO1eeRL4rufxWtvtcqCodag==", "dev": true, "requires": { - "@storybook/addons": "6.0.26", - "@storybook/api": "6.0.26", - "@storybook/client-api": "6.0.26", - "@storybook/components": "6.0.26", + "@storybook/addons": "6.0.27", + "@storybook/api": "6.0.27", + "@storybook/client-api": "6.0.27", + "@storybook/components": "6.0.27", "core-js": "^3.0.1" } }, "@storybook/addon-viewport": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/addon-viewport/-/addon-viewport-6.0.26.tgz", - "integrity": "sha512-LdVW61iZhUf2npNk3qPH9DTunVMhKcyiFq2CRlgxcA5FwjdkAbcPiYMc18rfyTvp/Zd2idartvwYalBYpJhAhw==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/addon-viewport/-/addon-viewport-6.0.27.tgz", + "integrity": "sha512-oSHJeWsWr21UIxp5yU+aTpegBLBphz1Vx49t1v3uqxTWZaUAWtXTbdZxkvTd4kkEDzEEyUa4Vj8UoXPMTpYBAA==", "dev": true, "requires": { - "@storybook/addons": "6.0.26", - "@storybook/api": "6.0.26", - "@storybook/client-logger": "6.0.26", - "@storybook/components": "6.0.26", - "@storybook/core-events": "6.0.26", - "@storybook/theming": "6.0.26", + "@storybook/addons": "6.0.27", + "@storybook/api": "6.0.27", + "@storybook/client-logger": "6.0.27", + "@storybook/components": "6.0.27", + "@storybook/core-events": "6.0.27", + "@storybook/theming": "6.0.27", "core-js": "^3.0.1", "global": "^4.3.2", "memoizerific": "^1.11.3", @@ -3342,34 +3350,34 @@ } }, "@storybook/addons": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/addons/-/addons-6.0.26.tgz", - "integrity": "sha512-OhAApFKgsj9an7FLYfHI4cJQuZ4Zm6yoGOpaxhOvKQMw7dXUPsLvbCyw/6dZOLvaFhjJjQiXtbxtZG+UjR8nvA==", - "requires": { - "@storybook/api": "6.0.26", - "@storybook/channels": "6.0.26", - "@storybook/client-logger": "6.0.26", - "@storybook/core-events": "6.0.26", - "@storybook/router": "6.0.26", - "@storybook/theming": "6.0.26", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/addons/-/addons-6.0.27.tgz", + "integrity": "sha512-ruumzJ1BLQ/2+KbV6qTN1OWPqejPWczY2EjEKo8azMlmZ4xBSiczi5HvDto/fYt6fMQfzgkdIUAcofHGf4XQGQ==", + "requires": { + "@storybook/api": "6.0.27", + "@storybook/channels": "6.0.27", + "@storybook/client-logger": "6.0.27", + "@storybook/core-events": "6.0.27", + "@storybook/router": "6.0.27", + "@storybook/theming": "6.0.27", "core-js": "^3.0.1", "global": "^4.3.2", "regenerator-runtime": "^0.13.3" } }, "@storybook/api": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/api/-/api-6.0.26.tgz", - "integrity": "sha512-aszDoz1c6T+eRtTUwWvySoyd3gRXmQxsingD084NnEp4VfFLA5H7VS/0sre0ZvU5GWh8d9COxY0DS2Ry/QSKvw==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/api/-/api-6.0.27.tgz", + "integrity": "sha512-48LDFK+mOdPBHjZWYTOLZnOJ3XPn8OxJm7h5dCuuFe6wblQIYxXeyBwn6BVOkmonmNJ9OglUGY7KqslaOrGYyQ==", "requires": { "@reach/router": "^1.3.3", - "@storybook/channels": "6.0.26", - "@storybook/client-logger": "6.0.26", - "@storybook/core-events": "6.0.26", + "@storybook/channels": "6.0.27", + "@storybook/client-logger": "6.0.27", + "@storybook/core-events": "6.0.27", "@storybook/csf": "0.0.1", - "@storybook/router": "6.0.26", + "@storybook/router": "6.0.27", "@storybook/semver": "^7.3.2", - "@storybook/theming": "6.0.26", + "@storybook/theming": "6.0.27", "@types/reach__router": "^1.3.5", "core-js": "^3.0.1", "fast-deep-equal": "^3.1.1", @@ -3385,14 +3393,14 @@ } }, "@storybook/channel-postmessage": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/channel-postmessage/-/channel-postmessage-6.0.26.tgz", - "integrity": "sha512-FT6lC8M5JlNBxPT0rYfmF1yl9mBv04nfYs82TZpp1CzpLxf7wxdCBZ8SSRmvWIVBoNwGZPDhIk5+6JWyDEISBg==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/channel-postmessage/-/channel-postmessage-6.0.27.tgz", + "integrity": "sha512-ygLbzJ/WbllPL4albJUSRoiRC3M+Q/stq66PWkLBlb1NhoXanPbmLBFaAiGsypXyH/E9Z6bQT88eUyzM5IlTmw==", "dev": true, "requires": { - "@storybook/channels": "6.0.26", - "@storybook/client-logger": "6.0.26", - "@storybook/core-events": "6.0.26", + "@storybook/channels": "6.0.27", + "@storybook/client-logger": "6.0.27", + "@storybook/core-events": "6.0.27", "core-js": "^3.0.1", "global": "^4.3.2", "qs": "^6.6.0", @@ -3400,9 +3408,9 @@ } }, "@storybook/channels": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/channels/-/channels-6.0.26.tgz", - "integrity": "sha512-H0iUorayYqS+zfhbjd+cYRzAdRLGLWUeWFu2Aa+oJ4/zeAQNL+DafWboHc567RQ4Vb5KqE5QZoCFskWUUYqJYA==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/channels/-/channels-6.0.27.tgz", + "integrity": "sha512-W47tQO/1oAUDEb51URIsodT/G0QPkzpPVy+Q3bJ9buJ9TLIO/qObAH9pYw9ggUOgIJmHJY54I1KN7QAvhuVCfw==", "requires": { "core-js": "^3.0.1", "ts-dedent": "^1.1.1", @@ -3410,16 +3418,16 @@ } }, "@storybook/client-api": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/client-api/-/client-api-6.0.26.tgz", - "integrity": "sha512-Qd5wR5b5lio/EchuJMhAmmJAE1pfvnEyu+JnyFGwMZLV9mN9NSspz+YsqbSCCDZsYcP5ewvPEnumIWqmj/wagQ==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/client-api/-/client-api-6.0.27.tgz", + "integrity": "sha512-4AaBZCds2dr4JVVlOVa2LF3Vjv0VcLVWaqibydPRO6Ch2shDw2ImwQxYBEq0WygfHR7VzG1cmOK8D92C7goPKA==", "dev": true, "requires": { - "@storybook/addons": "6.0.26", - "@storybook/channel-postmessage": "6.0.26", - "@storybook/channels": "6.0.26", - "@storybook/client-logger": "6.0.26", - "@storybook/core-events": "6.0.26", + "@storybook/addons": "6.0.27", + "@storybook/channel-postmessage": "6.0.27", + "@storybook/channels": "6.0.27", + "@storybook/client-logger": "6.0.27", + "@storybook/core-events": "6.0.27", "@storybook/csf": "0.0.1", "@types/qs": "^6.9.0", "@types/webpack-env": "^1.15.2", @@ -3435,22 +3443,22 @@ } }, "@storybook/client-logger": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/client-logger/-/client-logger-6.0.26.tgz", - "integrity": "sha512-VNoL6/oehVhn3hZi9vrTNT+C/3oAZKV+smfZFnPtsCR/Fq7CKbmsBd0pGPL57f81RU8e8WygwrIlAGJTDSNIjw==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/client-logger/-/client-logger-6.0.27.tgz", + "integrity": "sha512-IY/p0f9XxfHZWVkjeIYOwF6xuonjgmZ9mYPy7Ks47zzDFrUe0/g5cqfBJBUj1YOqlANbF6XCO8YiKXjkE70olw==", "requires": { "core-js": "^3.0.1", "global": "^4.3.2" } }, "@storybook/components": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/components/-/components-6.0.26.tgz", - "integrity": "sha512-8wigI1pDFJO1m1IQWPguOK+nOsaAVRWkVdu+2te/rDcIR9QNvMzzou0+Lhfp3zKSVT4E6mEoGB/TWXXF5Iq0sQ==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/components/-/components-6.0.27.tgz", + "integrity": "sha512-CnWgr/jgo7/XU+s7jhpNYevUivEsJccMRxuyOI+Ry8ndnoheifT4fp4+O5OaOeC08hStlPyad85LdTbOKigt7g==", "requires": { - "@storybook/client-logger": "6.0.26", + "@storybook/client-logger": "6.0.27", "@storybook/csf": "0.0.1", - "@storybook/theming": "6.0.26", + "@storybook/theming": "6.0.27", "@types/overlayscrollbars": "^1.9.0", "@types/react-color": "^3.0.1", "@types/react-syntax-highlighter": "11.0.4", @@ -3473,9 +3481,9 @@ } }, "@storybook/core": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/core/-/core-6.0.26.tgz", - "integrity": "sha512-2kmkxbzDJVrjzCjlseffoQJwZRH9bHZUumo5m8gpbN9kVnADER7yd6RUf2Zle5BK3ExC+0PPI1Whfg0qkiXvqw==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/core/-/core-6.0.27.tgz", + "integrity": "sha512-qHONOXU8g17IfSaMF0HaSQfUFUGqOIBCX6g5qNHuzuASNsrdDmSr6xgF9+htltaQjSpC+s/4zOpn7kXfh1+eGQ==", "dev": true, "requires": { "@babel/plugin-proposal-class-properties": "^7.8.3", @@ -3499,20 +3507,20 @@ "@babel/preset-react": "^7.8.3", "@babel/preset-typescript": "^7.9.0", "@babel/register": "^7.10.5", - "@storybook/addons": "6.0.26", - "@storybook/api": "6.0.26", - "@storybook/channel-postmessage": "6.0.26", - "@storybook/channels": "6.0.26", - "@storybook/client-api": "6.0.26", - "@storybook/client-logger": "6.0.26", - "@storybook/components": "6.0.26", - "@storybook/core-events": "6.0.26", + "@storybook/addons": "6.0.27", + "@storybook/api": "6.0.27", + "@storybook/channel-postmessage": "6.0.27", + "@storybook/channels": "6.0.27", + "@storybook/client-api": "6.0.27", + "@storybook/client-logger": "6.0.27", + "@storybook/components": "6.0.27", + "@storybook/core-events": "6.0.27", "@storybook/csf": "0.0.1", - "@storybook/node-logger": "6.0.26", - "@storybook/router": "6.0.26", + "@storybook/node-logger": "6.0.27", + "@storybook/router": "6.0.27", "@storybook/semver": "^7.3.2", - "@storybook/theming": "6.0.26", - "@storybook/ui": "6.0.26", + "@storybook/theming": "6.0.27", + "@storybook/ui": "6.0.27", "@types/glob-base": "^0.3.0", "@types/micromatch": "^4.0.1", "@types/node-fetch": "^2.5.4", @@ -4317,9 +4325,9 @@ } }, "@storybook/core-events": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/core-events/-/core-events-6.0.26.tgz", - "integrity": "sha512-nWjS/+kMiw31OPgeJQaiFsJk9ZJJo3/d4c+kc6GOl2iC1H3Q4/5cm3NvJBn/7bUtKHmSFwfbDouj+XjUk5rZbQ==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/core-events/-/core-events-6.0.27.tgz", + "integrity": "sha512-w+Q2pt7DyhonWhHqjeBMMHMtV8h07ROOF9P40RthepT6/GO/471X33cgngr0i0uPgqha3JajNIl9fwAybsIROw==", "requires": { "core-js": "^3.0.1" } @@ -4333,9 +4341,9 @@ } }, "@storybook/node-logger": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/node-logger/-/node-logger-6.0.26.tgz", - "integrity": "sha512-mdILu91d/2ZgYfICoAMBjwBAYOgjk2URsPudrs5+23lFoPPIwf4CPWcfgs0f4GdfoICk3kV0W7+8bIARhRKp3g==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/node-logger/-/node-logger-6.0.27.tgz", + "integrity": "sha512-HlVWi2EvWPAOS19BctlhDZ989oBd7MvFbkgr2xTs01UhH96DcsUXCeMwQGhw1D5wgvpi7JtM4Y830BsBBiBLJQ==", "dev": true, "requires": { "@types/npmlog": "^4.1.2", @@ -4397,9 +4405,9 @@ } }, "@storybook/postinstall": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/postinstall/-/postinstall-6.0.26.tgz", - "integrity": "sha512-B9Dh66MfserWw1J4KbLqfxpnanN//yeDjrrkowzqa3OFLqEPQCekv0ALocovnCkQ13+TcVGjPprxnWXfGhEMpg==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/postinstall/-/postinstall-6.0.27.tgz", + "integrity": "sha512-GgrBCuOQKhlM3+X+bVCdoQqCofzfwCQS+21VgAfJ8bFeCHT8n6kY48OTf+vr6uosjSuQ7sJCiHWvosk3OqBsXA==", "dev": true, "requires": { "core-js": "^3.0.1" @@ -4428,22 +4436,22 @@ } }, "@storybook/react": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/react/-/react-6.0.26.tgz", - "integrity": "sha512-X02VpIEhpVc4avYiff861c015++tvMVSXJSrDP5J1xTAglVEiRFcU0Kn5h96o9N8FTup2n2xyj6Y7e8oC9yLXQ==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/react/-/react-6.0.27.tgz", + "integrity": "sha512-otIWq00UR7vfE4eeX9TIlgXy+UmaRitzqLRaFwdJCHUUWp9GZRrTcQLphJ5bl2tRO3GuzA/YO8VtJLGpCnkGXg==", "dev": true, "requires": { "@babel/preset-flow": "^7.0.0", "@babel/preset-react": "^7.0.0", - "@storybook/addons": "6.0.26", - "@storybook/core": "6.0.26", - "@storybook/node-logger": "6.0.26", + "@storybook/addons": "6.0.27", + "@storybook/core": "6.0.27", + "@storybook/node-logger": "6.0.27", "@storybook/semver": "^7.3.2", "@svgr/webpack": "^5.4.0", "@types/webpack-env": "^1.15.2", "babel-plugin-add-react-displayname": "^0.0.5", "babel-plugin-named-asset-import": "^0.3.1", - "babel-plugin-react-docgen": "^4.1.0", + "babel-plugin-react-docgen": "^4.2.1", "core-js": "^3.0.1", "global": "^4.3.2", "lodash": "^4.17.15", @@ -4759,6 +4767,26 @@ "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", "dev": true }, + "ast-types": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.14.2.tgz", + "integrity": "sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA==", + "dev": true, + "requires": { + "tslib": "^2.0.1" + } + }, + "babel-plugin-react-docgen": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/babel-plugin-react-docgen/-/babel-plugin-react-docgen-4.2.1.tgz", + "integrity": "sha512-UQ0NmGHj/HAqi5Bew8WvNfCk8wSsmdgNd8ZdMjBCICtyCJCq9LiqgqvjCYe570/Wg7AQArSq1VQ60Dd/CHN7mQ==", + "dev": true, + "requires": { + "ast-types": "^0.14.2", + "lodash": "^4.17.15", + "react-docgen": "^5.0.0" + } + }, "cacache": { "version": "12.0.4", "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz", @@ -4852,6 +4880,12 @@ "worker-farm": "^1.7.0" } }, + "tslib": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz", + "integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ==", + "dev": true + }, "webpack": { "version": "4.44.2", "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.44.2.tgz", @@ -4908,9 +4942,9 @@ } }, "@storybook/router": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/router/-/router-6.0.26.tgz", - "integrity": "sha512-kQ1LF/2gX3IkjS1wX7CsoeBc9ptHQzOsyax16rUyJa769DT5vMNtFtQxjNXMqSiSapPg2yrXJFKQNaoWvKgQEQ==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/router/-/router-6.0.27.tgz", + "integrity": "sha512-jo6d48mZLeHyv8wYf0NnV0eCtJ7LRsBaf1x2c967u4GAQ128+bYXm0iZwAtv4kYmH3YgETGuCbKpZyQbjbhUVQ==", "requires": { "@reach/router": "^1.3.3", "@types/reach__router": "^1.3.5", @@ -4930,13 +4964,13 @@ } }, "@storybook/source-loader": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/source-loader/-/source-loader-6.0.26.tgz", - "integrity": "sha512-axNYEHEj7c9oHUFTMKZ6xRyKZCEEP7Aa9sFPzV5Q3Vrq6/3qhih5fOPXhst6/s4XZC1eIoKKHb/Gk4hmjYOEYA==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/source-loader/-/source-loader-6.0.27.tgz", + "integrity": "sha512-mLncCAN0s9mcUY7/wFAwJvXDV2ts5XxB40ZHRZKlseTiI011uwf1AEBOmeSWft/CxOtbicHTYbIHdMokuWNjmg==", "dev": true, "requires": { - "@storybook/addons": "6.0.26", - "@storybook/client-logger": "6.0.26", + "@storybook/addons": "6.0.27", + "@storybook/client-logger": "6.0.27", "@storybook/csf": "0.0.1", "core-js": "^3.0.1", "estraverse": "^4.2.0", @@ -4961,14 +4995,14 @@ } }, "@storybook/theming": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/theming/-/theming-6.0.26.tgz", - "integrity": "sha512-9yon2ofb9a+RT1pdvn8Njydy7XRw0qXcIsMqGsJRKoZecmRRozqB6DxH9Gbdf1vRSbM9gYUUDjbiMDFz7+4RiQ==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/theming/-/theming-6.0.27.tgz", + "integrity": "sha512-6jm7tJuGUZzSftRQce776fS9/Pt5OAypmaTOj035z3RWswoQ1pj8olXVnSNxSt6jyYoWrJru8kiCl7w78q0rPg==", "requires": { "@emotion/core": "^10.0.20", "@emotion/is-prop-valid": "^0.8.6", "@emotion/styled": "^10.0.17", - "@storybook/client-logger": "6.0.26", + "@storybook/client-logger": "6.0.27", "core-js": "^3.0.1", "deep-object-diff": "^1.1.0", "emotion-theming": "^10.0.19", @@ -4980,21 +5014,21 @@ } }, "@storybook/ui": { - "version": "6.0.26", - "resolved": "https://registry.npmjs.org/@storybook/ui/-/ui-6.0.26.tgz", - "integrity": "sha512-Jb7oUJs6uyW+rM4zA8xDn9T0/0XtUAOC/zBl6ofdhYU9rVjYKAQUJqmYgUHNOggq1NGS7BVp1RJIzDWGYEagsA==", + "version": "6.0.27", + "resolved": "https://registry.npmjs.org/@storybook/ui/-/ui-6.0.27.tgz", + "integrity": "sha512-hxTeoe3QTSJ4P9EI8Kc8hroxem5OXEYq77zKq8XxgtOKhVzhQVaA+c4p/t6Z68+yK693CCp07+6QvGo++EQEHw==", "dev": true, "requires": { "@emotion/core": "^10.0.20", - "@storybook/addons": "6.0.26", - "@storybook/api": "6.0.26", - "@storybook/channels": "6.0.26", - "@storybook/client-logger": "6.0.26", - "@storybook/components": "6.0.26", - "@storybook/core-events": "6.0.26", - "@storybook/router": "6.0.26", + "@storybook/addons": "6.0.27", + "@storybook/api": "6.0.27", + "@storybook/channels": "6.0.27", + "@storybook/client-logger": "6.0.27", + "@storybook/components": "6.0.27", + "@storybook/core-events": "6.0.27", + "@storybook/router": "6.0.27", "@storybook/semver": "^7.3.2", - "@storybook/theming": "6.0.26", + "@storybook/theming": "6.0.27", "@types/markdown-to-jsx": "^6.11.0", "copy-to-clipboard": "^3.0.8", "core-js": "^3.0.1", @@ -15868,9 +15902,9 @@ }, "dependencies": { "@jest/types": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.0.tgz", - "integrity": "sha512-8pDeq/JVyAYw7jBGU83v8RMYAkdrRxLG3BGnAJuqaQAUd6GWBmND2uyl+awI88+hit48suLoLjNFtR+ZXxWaYg==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.1.tgz", + "integrity": "sha512-ywHavIKNpAVrStiRY5wiyehvcktpijpItvGiK72RAn5ctqmzvPk8OvKnvHeBqa1XdQr959CTWAJMqxI8BTibyg==", "dev": true, "requires": { "@types/istanbul-lib-coverage": "^2.0.0", @@ -15970,16 +16004,16 @@ "dev": true }, "expect": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/expect/-/expect-26.6.0.tgz", - "integrity": "sha512-EzhbZ1tbwcaa5Ok39BI11flIMeIUSlg1QsnXOrleaMvltwHsvIQPBtL710l+ma+qDFLUgktCXK4YuQzmHdm7cg==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/expect/-/expect-26.6.1.tgz", + "integrity": "sha512-BRfxIBHagghMmr1D2MRY0Qv5d3Nc8HCqgbDwNXw/9izmM5eBb42a2YjLKSbsqle76ozGkAEPELQX4IdNHAKRNA==", "dev": true, "requires": { - "@jest/types": "^26.6.0", + "@jest/types": "^26.6.1", "ansi-styles": "^4.0.0", "jest-get-type": "^26.3.0", - "jest-matcher-utils": "^26.6.0", - "jest-message-util": "^26.6.0", + "jest-matcher-utils": "^26.6.1", + "jest-message-util": "^26.6.1", "jest-regex-util": "^26.0.0" } }, @@ -16005,15 +16039,15 @@ "dev": true }, "jest-diff": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.0.tgz", - "integrity": "sha512-IH09rKsdWY8YEY7ii2BHlSq59oXyF2pK3GoK+hOK9eD/x6009eNB5Jv1shLMKgxekodPzLlV7eZP1jPFQYds8w==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.1.tgz", + "integrity": "sha512-BBNy/zin2m4kG5In126O8chOBxLLS/XMTuuM2+YhgyHk87ewPzKTuTJcqj3lOWOi03NNgrl+DkMeV/exdvG9gg==", "dev": true, "requires": { "chalk": "^4.0.0", "diff-sequences": "^26.5.0", "jest-get-type": "^26.3.0", - "pretty-format": "^26.6.0" + "pretty-format": "^26.6.1" } }, "jest-get-type": { @@ -16023,12 +16057,12 @@ "dev": true }, "jest-haste-map": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.0.tgz", - "integrity": "sha512-RpNqAGMR58uG9E9vWITorX2/R7he/tSbHWldX5upt1ymEcmCaXczqXxjqI6xOtRR8Ev6ZEYDfgSA5Fy7WHUL5w==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.1.tgz", + "integrity": "sha512-9kPafkv0nX6ta1PrshnkiyhhoQoFWncrU/uUBt3/AP1r78WSCU5iLceYRTwDvJl67H3RrXqSlSVDDa/AsUB7OQ==", "dev": true, "requires": { - "@jest/types": "^26.6.0", + "@jest/types": "^26.6.1", "@types/graceful-fs": "^4.1.2", "@types/node": "*", "anymatch": "^3.0.3", @@ -16037,33 +16071,33 @@ "graceful-fs": "^4.2.4", "jest-regex-util": "^26.0.0", "jest-serializer": "^26.5.0", - "jest-util": "^26.6.0", - "jest-worker": "^26.5.0", + "jest-util": "^26.6.1", + "jest-worker": "^26.6.1", "micromatch": "^4.0.2", "sane": "^4.0.3", "walker": "^1.0.7" } }, "jest-matcher-utils": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.6.0.tgz", - "integrity": "sha512-BUy/dQYb7ELGRazmK4ZVkbfPYCaNnrMtw1YljVhcKzWUxBM0xQ+bffrfnMLdRZp4wUUcT4ahaVnA3VWZtXWP9Q==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.6.1.tgz", + "integrity": "sha512-9iu3zrsYlUnl8pByhREF9rr5eYoiEb1F7ymNKg6lJr/0qD37LWS5FSW/JcoDl8UdMX2+zAzabDs7sTO+QFKjCg==", "dev": true, "requires": { "chalk": "^4.0.0", - "jest-diff": "^26.6.0", + "jest-diff": "^26.6.1", "jest-get-type": "^26.3.0", - "pretty-format": "^26.6.0" + "pretty-format": "^26.6.1" } }, "jest-message-util": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.0.tgz", - "integrity": "sha512-WPAeS38Kza29f04I0iOIQrXeiebRXjmn6cFehzI7KKJOgT0NmqYAcLgjWnIAfKs5FBmEQgje1kXab0DaLKCl2w==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.1.tgz", + "integrity": "sha512-cqM4HnqncIebBNdTKrBoWR/4ufHTll0pK/FWwX0YasK+TlBQEMqw3IEdynuuOTjDPFO3ONlFn37280X48beByw==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@jest/types": "^26.6.0", + "@jest/types": "^26.6.1", "@types/stack-utils": "^2.0.0", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", @@ -16079,18 +16113,18 @@ "dev": true }, "jest-resolve": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.0.tgz", - "integrity": "sha512-tRAz2bwraHufNp+CCmAD8ciyCpXCs1NQxB5EJAmtCFy6BN81loFEGWKzYu26Y62lAJJe4X4jg36Kf+NsQyiStQ==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.1.tgz", + "integrity": "sha512-hiHfQH6rrcpAmw9xCQ0vD66SDuU+7ZulOuKwc4jpbmFFsz0bQG/Ib92K+9/489u5rVw0btr/ZhiHqBpmkbCvuQ==", "dev": true, "requires": { - "@jest/types": "^26.6.0", + "@jest/types": "^26.6.1", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", "jest-pnp-resolver": "^1.2.2", - "jest-util": "^26.6.0", + "jest-util": "^26.6.1", "read-pkg-up": "^7.0.1", - "resolve": "^1.17.0", + "resolve": "^1.18.1", "slash": "^3.0.0" } }, @@ -16105,36 +16139,36 @@ } }, "jest-snapshot": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-26.6.0.tgz", - "integrity": "sha512-mcqJZeIZqxomvBcsaiIbiEe2g7K1UxnUpTwjMoHb+DX4uFGnuZoZ6m28YOYRyCfZsdU9mmq73rNBnEH2atTR4Q==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-26.6.1.tgz", + "integrity": "sha512-JA7bZp7HRTIJYAi85pJ/OZ2eur2dqmwIToA5/6d7Mn90isGEfeF9FvuhDLLEczgKP1ihreBzrJ6Vr7zteP5JNA==", "dev": true, "requires": { "@babel/types": "^7.0.0", - "@jest/types": "^26.6.0", + "@jest/types": "^26.6.1", "@types/babel__traverse": "^7.0.4", "@types/prettier": "^2.0.0", "chalk": "^4.0.0", - "expect": "^26.6.0", + "expect": "^26.6.1", "graceful-fs": "^4.2.4", - "jest-diff": "^26.6.0", + "jest-diff": "^26.6.1", "jest-get-type": "^26.3.0", - "jest-haste-map": "^26.6.0", - "jest-matcher-utils": "^26.6.0", - "jest-message-util": "^26.6.0", - "jest-resolve": "^26.6.0", + "jest-haste-map": "^26.6.1", + "jest-matcher-utils": "^26.6.1", + "jest-message-util": "^26.6.1", + "jest-resolve": "^26.6.1", "natural-compare": "^1.4.0", - "pretty-format": "^26.6.0", + "pretty-format": "^26.6.1", "semver": "^7.3.2" } }, "jest-util": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.0.tgz", - "integrity": "sha512-/cUGqcnKeZMjvTQLfJo65nBOEZ/k0RB/8usv2JpfYya05u0XvBmKkIH5o5c4nCh9DD61B1YQjMGGqh1Ha0aXdg==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.1.tgz", + "integrity": "sha512-xCLZUqVoqhquyPLuDXmH7ogceGctbW8SMyQVjD9o+1+NPWI7t0vO08udcFLVPLgKWcvc+zotaUv/RuaR6l8HIA==", "dev": true, "requires": { - "@jest/types": "^26.6.0", + "@jest/types": "^26.6.1", "@types/node": "*", "chalk": "^4.0.0", "graceful-fs": "^4.2.4", @@ -16143,9 +16177,9 @@ } }, "jest-worker": { - "version": "26.5.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.5.0.tgz", - "integrity": "sha512-kTw66Dn4ZX7WpjZ7T/SUDgRhapFRKWmisVAF0Rv4Fu8SLFD7eLbqpLvbxVqYhSgaWa7I+bW7pHnbyfNsH6stug==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.1.tgz", + "integrity": "sha512-R5IE3qSGz+QynJx8y+ICEkdI2OJ3RJjRQVEyCcFAd3yVhQSEtquziPO29Mlzgn07LOVE8u8jhJ1FqcwegiXWOw==", "dev": true, "requires": { "@types/node": "*", @@ -16170,17 +16204,23 @@ "dev": true }, "pretty-format": { - "version": "26.6.0", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.0.tgz", - "integrity": "sha512-Uumr9URVB7bm6SbaByXtx+zGlS+0loDkFMHP0kHahMjmfCtmFY03iqd++5v3Ld6iB5TocVXlBN/T+DXMn9d4BA==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.1.tgz", + "integrity": "sha512-MeqqsP5PYcRBbGMvwzsyBdmAJ4EFX7pWFyl7x4+dMVg5pE0ZDdBIvEH2ergvIO+Gvwv1wh64YuOY9y5LuyY/GA==", "dev": true, "requires": { - "@jest/types": "^26.6.0", + "@jest/types": "^26.6.1", "ansi-regex": "^5.0.0", "ansi-styles": "^4.0.0", - "react-is": "^16.12.0" + "react-is": "^17.0.1" } }, + "react-is": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz", + "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==", + "dev": true + }, "read-pkg": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", @@ -24101,9 +24141,9 @@ } }, "term-size": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.0.tgz", - "integrity": "sha512-a6sumDlzyHVJWb8+YofY4TW112G6p2FCPEAFk+59gIYHv3XHRhm9ltVQ9kli4hNWeQBwSpe8cRN25x0ROunMOw==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", + "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", "dev": true }, "terminal-link": { @@ -24199,9 +24239,9 @@ "dev": true }, "jest-worker": { - "version": "26.5.0", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.5.0.tgz", - "integrity": "sha512-kTw66Dn4ZX7WpjZ7T/SUDgRhapFRKWmisVAF0Rv4Fu8SLFD7eLbqpLvbxVqYhSgaWa7I+bW7pHnbyfNsH6stug==", + "version": "26.6.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.1.tgz", + "integrity": "sha512-R5IE3qSGz+QynJx8y+ICEkdI2OJ3RJjRQVEyCcFAd3yVhQSEtquziPO29Mlzgn07LOVE8u8jhJ1FqcwegiXWOw==", "dev": true, "requires": { "@types/node": "*", @@ -24929,22 +24969,22 @@ "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" }, "use-composed-ref": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/use-composed-ref/-/use-composed-ref-1.0.0.tgz", - "integrity": "sha512-RVqY3NFNjZa0xrmK3bIMWNmQ01QjKPDc7DeWR3xa/N8aliVppuutOE5bZzPkQfvL+5NRWMMp0DJ99Trd974FIw==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/use-composed-ref/-/use-composed-ref-1.1.0.tgz", + "integrity": "sha512-my1lNHGWsSDAhhVAT4MKs6IjBUtG6ZG11uUqexPH9PptiIZDQOzaF4f5tEbJ2+7qvNbtXNBbU3SfmN+fXlWDhg==", "requires": { "ts-essentials": "^2.0.3" } }, "use-isomorphic-layout-effect": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.0.0.tgz", - "integrity": "sha512-JMwJ7Vd86NwAt1jH7q+OIozZSIxA4ND0fx6AsOe2q1H8ooBUp5aN6DvVCqZiIaYU6JaMRJGyR0FO7EBCIsb/Rg==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.0.tgz", + "integrity": "sha512-kady5Z1O1qx5RitodCCKbpJSVEtECXYcnBnb5Q48Bz5V6gBmTu85ZcGdVwVFs8+DaOurNb/L5VdGHoQRMknghw==" }, "use-latest": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/use-latest/-/use-latest-1.1.0.tgz", - "integrity": "sha512-gF04d0ZMV3AMB8Q7HtfkAWe+oq1tFXP6dZKwBHQF5nVXtGsh2oAYeeqma5ZzxtlpOcW8Ro/tLcfmEodjDeqtuw==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/use-latest/-/use-latest-1.2.0.tgz", + "integrity": "sha512-d2TEuG6nSLKQLAfW3By8mKr8HurOlTkul0sOpxbClIv4SQ4iOd7BYr7VIzdbktUCnv7dua/60xzd8igMU6jmyw==", "requires": { "use-isomorphic-layout-effect": "^1.0.0" } diff --git a/package.json b/package.json index 8f09f9c5..c18ee363 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dassana-io/web-components", - "version": "0.6.2", + "version": "0.6.3", "publishConfig": { "registry": "https://npm.pkg.github.com/dassana-io" }, @@ -11,7 +11,7 @@ }, "dependencies": { "@ant-design/icons": "^4.2.2", - "@storybook/addon-cssresources": "^6.0.26", + "@storybook/addon-cssresources": "^6.0.27", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.5.0", "@testing-library/react-hooks": "^3.4.2", @@ -76,14 +76,14 @@ "@rollup/plugin-commonjs": "^15.1.0", "@rollup/plugin-image": "^2.0.5", "@rollup/plugin-node-resolve": "^9.0.0", - "@storybook/addon-actions": "^6.0.26", - "@storybook/addon-essentials": "^6.0.26", - "@storybook/addon-links": "^6.0.26", - "@storybook/addon-storyshots": "^6.0.26", - "@storybook/addons": "^6.0.26", + "@storybook/addon-actions": "^6.0.27", + "@storybook/addon-essentials": "^6.0.27", + "@storybook/addon-links": "^6.0.27", + "@storybook/addon-storyshots": "^6.0.27", + "@storybook/addons": "^6.0.27", "@storybook/preset-create-react-app": "^3.1.4", - "@storybook/react": "^6.0.26", - "@storybook/theming": "^6.0.26", + "@storybook/react": "^6.0.27", + "@storybook/theming": "^6.0.27", "@svgr/rollup": "^5.4.0", "@types/bytes": "^3.1.0", "@types/classnames": "^2.2.10", diff --git a/src/__snapshots__/storybook.test.ts.snap b/src/__snapshots__/storybook.test.ts.snap index 414bb62e..1442317b 100644 --- a/src/__snapshots__/storybook.test.ts.snap +++ b/src/__snapshots__/storybook.test.ts.snap @@ -211,22 +211,18 @@ exports[`Storyshots Input Default 1`] = `
-
- -
+
`; @@ -234,22 +230,18 @@ exports[`Storyshots Input Error 1`] = `
-
- -
+
`; @@ -257,22 +249,18 @@ exports[`Storyshots Input Full Width 1`] = `
-
- -
+
`; @@ -300,22 +288,18 @@ exports[`Storyshots Input Placeholder 1`] = `
-
- -
+
`; diff --git a/src/components/Input/index.tsx b/src/components/Input/index.tsx index 84ac83b7..a34d59e2 100644 --- a/src/components/Input/index.tsx +++ b/src/components/Input/index.tsx @@ -90,15 +90,13 @@ export const Input: FC = (props: InputProps) => { return loading ? ( ) : ( -
- -
+ ) } diff --git a/src/components/Table/Table.stories.mdx b/src/components/Table/Table.stories.mdx index 382d57bc..562faca6 100644 --- a/src/components/Table/Table.stories.mdx +++ b/src/components/Table/Table.stories.mdx @@ -100,7 +100,7 @@ The rendered table generated by the above code will look like: -## Searching +## Searching and Search Props The Table has a global search field that uses [Fuse.js](https://fusejs.io/) to fuzzy search the table. Both formatted and unformatted number data type can be searched. Searching is also enabled by default. To disable search, pass it as a prop to the table. E.g. @@ -108,6 +108,21 @@ The Table has a global search field that uses [Fuse.js](https://fusejs.io/) to f const tableProps = TableProps = { columns, data, search: false } ``` +The search bar is rendered on the left without a placeholder by default. You can change it by passing the following props to the table: + +```ts +const tableProps: TableProps = { + columns, + data, + searchProps: { + placeholder: 'Search...', + placement: 'right' + } +} +``` + +Take a look at the [Missing Cells Table](?path=/docs/table--missing-cells#missing-data-cells) for an example. + ## Sorting Each column is sortable by default. To disable sort on a specific column, add `sort: false` to the column configuration object. E.g. @@ -235,6 +250,7 @@ import { ColumnFormats, ColumnType, ColumnTypes, + DateDisplayFormat, Table, TableProps } from '@dassana-io/web-components' @@ -244,6 +260,7 @@ export interface File { data_size: number created_at: number updated_at?: number // Pass an optional type if there will be missing data + last_opened?: number } const { number, string } = ColumnTypes @@ -261,17 +278,24 @@ const columns: ColumnType[] = [ title: 'Size', type: number }, + { + dataIndex: 'last_opened', + format: date, + renderProps: { displayFormat: DateDisplayFormat.fromNow }, // display date as time from now. E.g. 3 months ago + title: 'Last Opened', + type: number + }, { dataIndex: 'created_at', format: date, - renderProps: { displayFormat: 'MMM D, YYYY h:mm A' }, // moment.js display format + renderProps: { displayFormat: dateFormat0 }, // moment.js display format title: 'Uploaded Time', type: number }, { dataIndex: 'updated_at', format: date, - renderProps: { displayFormat: 'lll' }, // moment.js format shortcuts also work + renderProps: { displayFormat: dateFormat1 }, // moment.js format shortcuts also work title: 'Last Updated Time', type: number } @@ -281,12 +305,14 @@ const data: File[] = [ { created_at: 1598400668681, data_size: 1048576, - file_name: 'IMG_4542.jpeg' + file_name: 'IMG_4542.jpeg', + last_opened: 1598400668681 }, { created_at: 1582330066861, data_size: 1998576, - file_name: 'test_123.png' + file_name: 'test_123.png', + last_opened: 1603779899922 }, { created_at: 1553223066861, @@ -307,7 +333,10 @@ const data: File[] = [ } ] -const tableProps: TableProps = { columns, data } +const tableProps: TableProps = { + columns, + data +} const FilesTable = () => {...tableProps} /> ``` diff --git a/src/components/Table/Table.stories.tsx b/src/components/Table/Table.stories.tsx index cad284fe..2ddb579e 100644 --- a/src/components/Table/Table.stories.tsx +++ b/src/components/Table/Table.stories.tsx @@ -1,3 +1,4 @@ +import { action } from '@storybook/addon-actions' import React from 'react' import { Story } from '@storybook/react/types-6-0' import { Table, TableProps } from '.' @@ -6,6 +7,38 @@ import tableData1, { File } from './fixtures/1_sample_data' import tableData2, { Client } from './fixtures/2_sample_data' import tableData3, { Client1 } from './fixtures/3_sample_data' +const commonArgTypes = { + dataTag: { + control: { disable: true } + }, + onRowClick: { + control: { disable: true }, + defaultValue: action('onRowClick'), + description: 'Optional callback that runs when a table row is clicked.', + table: { + type: { + detail: ` + interface OnRowClick { + (data: DataType, rowIndex: number): void +}` + } + } + }, + searchProps: { + control: 'object', + defaultValue: { placeholder: '', placement: 'left' }, // This isn't the default, it's a placeholder for storybook + table: { + type: { + detail: ` + interface SearchProps { + placeholder?: string + placement?: 'left' | 'right' +}` + } + } + } +} + const SimpleTemplate: Story> = args => ( {...args} /> ) @@ -14,6 +47,7 @@ Simple.args = { ...tableData0 } Simple.argTypes = { + ...commonArgTypes, columns: { description: 'Array of column objects. Click to view a simplified partial ColumnType interface used for this simple table.', @@ -52,6 +86,7 @@ Number.args = { ...tableData1 } Number.argTypes = { + ...commonArgTypes, columns: { description: /* eslint-disable quotes */ @@ -114,6 +149,7 @@ Mixed.args = { ...tableData2 } Mixed.argTypes = { + ...commonArgTypes, columns: { control: { disable: true }, description: `Array of column objects. [Click to view a partial ColumnType interface.](/?path=/docs/table--simple#representing-columntype-with-typescript-1)` @@ -146,6 +182,7 @@ MissingCells.args = { ...tableData3 } MissingCells.argTypes = { + ...commonArgTypes, columns: { control: { disable: true }, description: `Array of column objects. [Click to view a partial ColumnType interface.](/?path=/docs/table--simple#representing-columntype-with-typescript-1)` diff --git a/src/components/Table/__tests__/Table.test.tsx b/src/components/Table/__tests__/Table.test.tsx index 39578ede..51ca3bdf 100644 --- a/src/components/Table/__tests__/Table.test.tsx +++ b/src/components/Table/__tests__/Table.test.tsx @@ -1,6 +1,7 @@ import { act } from 'react-dom/test-utils' import moment from 'moment' import React from 'react' +import { Input as AntDInput, Table as AntDTable } from 'antd' import mockData, { DataType, dateFormat } from '__mocks__/table_mock_data' import mockData0, { Person } from '../fixtures/0_sample_data' import { mount, ReactWrapper } from 'enzyme' @@ -27,8 +28,20 @@ export function renderedData(wrapper: ReactWrapper, dataIndex = '') { } } -export function formatDate(unixTS: number, displayFormat: string) { - return moment(unixTS).format(displayFormat) +interface FormatDateParams { + displayFormat?: string + fromNow?: boolean + unixTS: number +} + +export function formatDate({ + unixTS, + displayFormat = '', + fromNow = false +}: FormatDateParams) { + return fromNow + ? moment(unixTS).fromNow() + : moment(unixTS).format(displayFormat) } let wrapper: ReactWrapper @@ -71,7 +84,13 @@ describe('Table', () => { it('renders all types and formats of data', () => { wrapper = mount(createTable(mockData)) const expected = { - _FORMATTED_DATA: [formatDate(1599193037581, dateFormat), '1KB'], + _FORMATTED_DATA: [ + formatDate({ + displayFormat: dateFormat, + unixTS: 1599193037581 + }), + '1KB' + ], byte: 1024, date: 1599193037581, icon: 'test', @@ -108,7 +127,7 @@ describe('Table props', () => { }) }) -describe('Table search', () => { +describe('Table search and searchProps', () => { it('renders by default', () => { const table = wrapper.find(Table) const searchBar = table.find('input') @@ -137,4 +156,61 @@ describe('Table search', () => { expect(renderedData(wrapper)).toHaveLength(2) }) + + it('it renders the search bar to the left by default', async () => { + const table = wrapper.find(Table) + const searchBar = table.find('input') + + const style = window.getComputedStyle(searchBar.getDOMNode()) + + expect(style.alignSelf).toBe('flex-start') + }) + + it('it renders the search bar to the right if searchProps.placement is passed as right', async () => { + wrapper = mount( + createTable({ + ...mockData, + searchProps: { placement: 'right' } + }) + ) + + const table = wrapper.find(Table) + const searchBar = table.find('input') + + const style = window.getComputedStyle(searchBar.getDOMNode()) + + expect(style.alignSelf).toBe('flex-end') + }) + + it('correctly passes the placeholder prop to the searchbar input', () => { + wrapper = mount( + createTable({ + ...mockData, + searchProps: { placeholder: 'Mock placeholder' } + }) + ) + + expect(wrapper.find(AntDInput).props().placeholder).toEqual( + 'Mock placeholder' + ) + }) +}) + +describe('Table onRowClick', () => { + it('calls onRowClick handler when a table row is clicked', () => { + const mockOnRowClick = jest.fn() + + wrapper = mount( + createTable({ ...mockData0, onRowClick: mockOnRowClick }) + ) + + const tableRow = wrapper.find('tbody').find('tr').at(1) + + tableRow.simulate('click') + expect(mockOnRowClick).toHaveBeenCalledTimes(1) + }) + + it('does not pass an onRow prop if onRowClick prop does not exist', () => { + expect(wrapper.find(AntDTable).props().onRow).toBeFalsy() + }) }) diff --git a/src/components/Table/__tests__/utils.test.tsx b/src/components/Table/__tests__/utils.test.tsx index 957e9c23..a069aae4 100644 --- a/src/components/Table/__tests__/utils.test.tsx +++ b/src/components/Table/__tests__/utils.test.tsx @@ -40,7 +40,11 @@ describe('processData', () => { { _FORMATTED_DATA: [ '1MB', - formatDate(1598400668681, dateFormat0), + formatDate({ fromNow: true, unixTS: 1598400668681 }), + formatDate({ + displayFormat: dateFormat0, + unixTS: 1598400668681 + }), null ], created_at: 1598400668681, @@ -51,7 +55,11 @@ describe('processData', () => { { _FORMATTED_DATA: [ '1.91MB', - formatDate(1582330066861, dateFormat0), + formatDate({ fromNow: true, unixTS: 1603779899922 }), + formatDate({ + displayFormat: dateFormat0, + unixTS: 1582330066861 + }), null ], created_at: 1582330066861, @@ -62,8 +70,15 @@ describe('processData', () => { { _FORMATTED_DATA: [ '1KB', - formatDate(1553223066861, dateFormat0), - formatDate(1582330063211, dateFormat1) + null, + formatDate({ + displayFormat: dateFormat0, + unixTS: 1553223066861 + }), + formatDate({ + displayFormat: dateFormat1, + unixTS: 1582330063211 + }) ], created_at: 1553223066861, data_size: 1024, @@ -74,7 +89,11 @@ describe('processData', () => { { _FORMATTED_DATA: [ '4MB', - formatDate(1511022066861, dateFormat0), + null, + formatDate({ + displayFormat: dateFormat0, + unixTS: 1511022066861 + }), null ], created_at: 1511022066861, @@ -85,8 +104,15 @@ describe('processData', () => { { _FORMATTED_DATA: [ '2KB', - formatDate(1515021066861, dateFormat0), - formatDate(1515121066861, dateFormat1) + null, + formatDate({ + displayFormat: dateFormat0, + unixTS: 1515021066861 + }), + formatDate({ + displayFormat: dateFormat1, + unixTS: 1515121066861 + }) ], created_at: 1515021066861, data_size: 2048, @@ -136,7 +162,9 @@ describe('createByteFormatter', () => { it('returns function that properly formats number into string date if input column provides valid format pattern', () => { const formattedDate = createDateFormatter(dateColumn)(1599193037581) - expect(formattedDate).toEqual(formatDate(1599193037581, 'MM/DD/YY')) + expect(formattedDate).toEqual( + formatDate({ displayFormat: 'MM/DD/YY', unixTS: 1599193037581 }) + ) }) it('returns function that returns null if input number is not provided', () => { diff --git a/src/components/Table/fixtures/1_sample_data.ts b/src/components/Table/fixtures/1_sample_data.ts index d30a826b..6ca73a06 100644 --- a/src/components/Table/fixtures/1_sample_data.ts +++ b/src/components/Table/fixtures/1_sample_data.ts @@ -1,3 +1,4 @@ +import { DateDisplayFormat } from '../types' import { ColumnFormats, ColumnType, ColumnTypes, TableProps } from '..' export interface File { @@ -5,6 +6,7 @@ export interface File { data_size: number created_at: number updated_at?: number // Pass an optional type if there will be missing data + last_opened?: number } export const dateFormat0 = 'MMM D, YYYY h:mm A' @@ -25,6 +27,13 @@ const columns: ColumnType[] = [ title: 'Size', type: number }, + { + dataIndex: 'last_opened', + format: date, + renderProps: { displayFormat: DateDisplayFormat.fromNow }, // display date as time from now. E.g. 3 months ago + title: 'Last Opened', + type: number + }, { dataIndex: 'created_at', format: date, @@ -45,12 +54,14 @@ const data: File[] = [ { created_at: 1598400668681, data_size: 1048576, - file_name: 'IMG_4542.jpeg' + file_name: 'IMG_4542.jpeg', + last_opened: 1598400668681 }, { created_at: 1582330066861, data_size: 1998576, - file_name: 'test_123.png' + file_name: 'test_123.png', + last_opened: 1603779899922 }, { created_at: 1553223066861, diff --git a/src/components/Table/fixtures/3_sample_data.ts b/src/components/Table/fixtures/3_sample_data.ts index abdefb97..dcdbac41 100644 --- a/src/components/Table/fixtures/3_sample_data.ts +++ b/src/components/Table/fixtures/3_sample_data.ts @@ -93,6 +93,13 @@ const data: Client1[] = [ } ] -const tableData2: TableProps = { columns, data } +const tableData2: TableProps = { + columns, + data, + searchProps: { + placeholder: 'Search...', + placement: 'right' + } +} export default tableData2 diff --git a/src/components/Table/index.tsx b/src/components/Table/index.tsx index 5087f3d1..34dd53bb 100644 --- a/src/components/Table/index.tsx +++ b/src/components/Table/index.tsx @@ -1,46 +1,95 @@ import 'antd/lib/table/style/index.css' import 'antd/lib/pagination/style/index.css' import { Table as AntDTable } from 'antd' +import cn from 'classnames' import { CommonComponentProps } from '../types' +import { createUseStyles } from 'react-jss' import debounce from 'lodash/debounce' import Fuse from 'fuse.js' import { getDataTestAttributeProp } from '../utils' import { Input } from '../Input' +import { styleguide } from 'components/assets/styles' import { ColumnType, ParentDataType } from './types' import { mapFilterKeys, processColumns, processData } from './utils' import React, { ChangeEvent, ReactElement, useCallback, useState } from 'react' +const { flexDown, spacing } = styleguide + +const useStyles = createUseStyles({ + searchBar: { + alignSelf: props => + props.searchProps.placement === 'right' ? 'flex-end' : 'flex-start', + marginBottom: spacing.m + }, + tableContainer: { + ...flexDown + } +}) + +export interface OnRowClick { + (data: DataType, rowIndex: number): void +} + +export interface SearchProps { + /** + * Describes expected value of element + */ + placeholder?: string + /** + * Which side of the table to render the search bar in. Defaults to 'right' + */ + placement?: 'left' | 'right' +} + export interface TableProps extends CommonComponentProps { /** - * Array of data objects + * Array of classes to pass to button. */ - data: DataType[] + classes?: string[] /** * Array of column objects */ columns: ColumnType[] + /** + * Array of data objects + */ + data: DataType[] + /** + * Optional callback that runs when a table row is clicked + */ + onRowClick?: OnRowClick /** * Optional prop to enable/disable table search. */ search?: boolean + /** + * Optional props for search input. + */ + searchProps?: SearchProps } export function Table({ + classes = [], columns, data, dataTag, - search = true + onRowClick, + search = true, + searchProps = {} as SearchProps }: TableProps): ReactElement { const [searchTerm, setSearchTerm] = useState('') const [filteredData, setFilteredData] = useState([]) - const delayedSearch = useCallback( - debounce(q => searchTable(q), 250), - [] - ) + + const tableClasses = useStyles({ searchProps }) const processedColumns = processColumns(columns) const processedData = processData(data, columns) + const delayedSearch = useCallback( + debounce(q => searchTable(q), 250), + [processedData] + ) + const fuse = new Fuse(processedData, { isCaseSensitive: false, keys: mapFilterKeys(columns), @@ -60,28 +109,31 @@ export function Table({ const handleChange = (e: ChangeEvent) => delayedSearch(e.target.value) + let optionalProps = {} + + if (onRowClick) { + optionalProps = { + onRow: (_: Record, rowIndex: number) => ({ + onClick: () => onRowClick(data[rowIndex], rowIndex) + }) + } + } + return ( -
+
{search && ( -
- -
+ )} -
) diff --git a/src/components/Table/types.ts b/src/components/Table/types.ts index 854b4de5..f3ea9a84 100644 --- a/src/components/Table/types.ts +++ b/src/components/Table/types.ts @@ -1,3 +1,4 @@ +import { Key } from 'react' import { SharedIconProps } from '../Icon' import { SharedLinkProps } from '../Link' @@ -37,11 +38,13 @@ interface NumberByteType extends Omit { format: ColumnFormats.byte } +export enum DateDisplayFormat { + fromNow = 'fromNow' +} + export interface NumberDateType extends Omit { format: ColumnFormats.date - renderProps?: { - displayFormat?: string - } + renderProps?: { displayFormat: string | DateDisplayFormat } } type NumberType = NumberDefaultType | NumberByteType | NumberDateType @@ -92,5 +95,5 @@ type ComponentType = export type ColumnType = StringType | NumberType | ComponentType export interface ParentDataType extends Record { - id?: string | number + id?: Key } diff --git a/src/components/Table/utils.tsx b/src/components/Table/utils.tsx index abb4804d..e9b32d64 100644 --- a/src/components/Table/utils.tsx +++ b/src/components/Table/utils.tsx @@ -7,6 +7,7 @@ import { ColumnFormats, ColumnType, ColumnTypes, + DateDisplayFormat, NumberDateType, ParentDataType } from './types' @@ -356,8 +357,14 @@ export function createDateFormatter( let displayFormat = '' const { renderProps } = column - if (renderProps && renderProps.displayFormat) + if (renderProps && renderProps.displayFormat) { + if (renderProps.displayFormat === DateDisplayFormat.fromNow) { + return (num?: number) => + num === undefined ? null : moment(num).fromNow() + } + displayFormat = renderProps.displayFormat + } return (num?: number) => num === undefined ? null : moment(num).format(displayFormat)