diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7fc2f18271..f2762f823d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2947,6 +2947,9 @@ importers: '@graphql-mocks/network-msw': specifier: ^0.3.0 version: 0.3.0(graphql-mocks@0.10.0)(msw@0.35.0) + '@storybook/blocks': + specifier: 7.6.20 + version: 7.6.20(@types/react-dom@17.0.18)(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2) '@storybook/react-webpack5': specifier: 7.6.20 version: 7.6.20(@babel/core@7.22.11)(@types/webpack@5.28.0)(react-dom@17.0.2)(react@17.0.2)(typescript@4.9.4) @@ -3425,7 +3428,7 @@ packages: dependencies: '@babel/core': 7.26.0 '@babel/generator': 7.22.10 - '@babel/parser': 7.22.14 + '@babel/parser': 7.26.2 '@babel/runtime': 7.20.13 '@babel/traverse': 7.25.9 '@babel/types': 7.26.0 @@ -4362,7 +4365,7 @@ packages: '@babel/generator': 7.22.10 '@babel/helper-module-transforms': 7.26.0(@babel/core@7.12.9) '@babel/helpers': 7.22.11 - '@babel/parser': 7.22.14 + '@babel/parser': 7.26.2 '@babel/template': 7.25.9 '@babel/traverse': 7.25.9 '@babel/types': 7.26.0 @@ -4749,7 +4752,7 @@ packages: resolution: {integrity: sha512-9J0CxJLq315fEdi4s7xK5TQaNYjZw+nDVpVqr1axNGKzdrdwYBD5b4uKv3n75aABG0rCCTK8Im8Ww7eYfMrZgw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.11 + '@babel/types': 7.26.0 /@babel/helper-member-expression-to-functions@7.25.9: resolution: {integrity: sha512-wbfdZ9w5vk0C0oyHqAJbc62+vet5prjj01jjJ8sKn3j9h3MQQlflEdXYvuqRWjHnM12coDEqiC1IRCi0U/EKwQ==} @@ -4868,7 +4871,7 @@ packages: resolution: {integrity: sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.11 + '@babel/types': 7.26.0 /@babel/helper-optimise-call-expression@7.25.9: resolution: {integrity: sha512-FIpuNaz5ow8VyrYcnXQTDRGvV6tTjkNtCK/RYNDXGSLlUD6cBuQTSw43CShGxjvfBTfcUA/r6UhUCbtYqkhcuQ==} @@ -4944,7 +4947,7 @@ packages: '@babel/helper-optimise-call-expression': 7.18.6 '@babel/template': 7.22.5 '@babel/traverse': 7.22.11 - '@babel/types': 7.22.11 + '@babel/types': 7.26.0 transitivePeerDependencies: - supports-color @@ -5001,7 +5004,7 @@ packages: resolution: {integrity: sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.22.11 + '@babel/types': 7.26.0 /@babel/helper-skip-transparent-expression-wrappers@7.25.9: resolution: {integrity: sha512-K4Du3BFa3gvyhzgPcntrkDgZzQaq6uozzcpGbOO1OEJaI+EJdqWIMTLgFgQf6lrfiDFo5FU+BxKepI9RmZqahA==} @@ -5762,7 +5765,6 @@ packages: dependencies: '@babel/core': 7.22.11 '@babel/helper-plugin-utils': 7.20.2 - dev: false /@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.22.11): resolution: {integrity: sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==} @@ -9389,7 +9391,6 @@ packages: find-root: 1.1.0 source-map: 0.5.7 stylis: 4.1.3 - dev: false /@emotion/cache@10.0.29: resolution: {integrity: sha512-fU2VtSVlHiF27empSbxi1O2JFdNWZO+2NFHfwO0pxgTep6Xa3uGb+3pVKfLww2l/IBGLNEZl5Xf/++A4wAYDYQ==} @@ -9498,7 +9499,6 @@ packages: '@types/react': 17.0.53 hoist-non-react-statics: 3.3.2 react: 17.0.2 - dev: false /@emotion/react@11.9.3(@babel/core@7.22.11)(@types/react@18.3.3)(react@18.3.1): resolution: {integrity: sha512-g9Q1GcTOlzOEjqwuLF/Zd9LC+4FljjPjDfxSM7KmEakm+hsHXk+bYZ2q+/hTJzr0OUNkujo72pXLQvXj6H+GJQ==} @@ -9595,7 +9595,6 @@ packages: '@emotion/utils': 1.2.0 '@types/react': 17.0.53 react: 17.0.2 - dev: false /@emotion/stylis@0.8.5: resolution: {integrity: sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ==} @@ -10152,14 +10151,12 @@ packages: resolution: {integrity: sha512-8GrTWmoFhm5BsMZOTHeGD2/0FLKLQQHvO/ZmQga4tKempYRLz8aqJGqXVuQgisnMObq2YZ2SgkwctN1LOOxcqA==} dependencies: '@floating-ui/utils': 0.2.5 - dev: false /@floating-ui/dom@1.6.8: resolution: {integrity: sha512-kx62rP19VZ767Q653wsP1XZCGIirkE09E0QUGNYTM/ttbbQHqcGPdSfWFxUyyNLc/W6aoJRBajOSXhP6GXjC0Q==} dependencies: '@floating-ui/core': 1.6.5 '@floating-ui/utils': 0.2.5 - dev: false /@floating-ui/react-dom@2.1.2(react-dom@17.0.2)(react@17.0.2): resolution: {integrity: sha512-06okr5cgPzMNBy+Ycse2A6udMi4bqwW/zgBF/rwjcNqWkyr82Mcg8b0vjX8OJpZFy/FKjJmw6wV7t44kK6kW7A==} @@ -10170,11 +10167,9 @@ packages: '@floating-ui/dom': 1.6.8 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) - dev: false /@floating-ui/utils@0.2.5: resolution: {integrity: sha512-sTcG+QZ6fdEUObICavU+aB3Mp8HY4n14wYHdxK4fXjPmv3PXZZeY5RaguJmGyeH/CJQhX3fqKUtS4qc1LoHwhQ==} - dev: false /@fontsource-variable/roboto-flex@5.0.15: resolution: {integrity: sha512-CTBG6EceGcuj49sYZVPx533laiGxKboq0H4GLTJ+/2FkqTsSYIYoF8RzeyySTiCSmY7+EfWckfwYW7L9Wlh3bw==} @@ -11853,7 +11848,6 @@ packages: /@juggle/resize-observer@3.4.0: resolution: {integrity: sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==} - dev: false /@kubernetes/client-node@0.18.1: resolution: {integrity: sha512-F3JiK9iZnbh81O/da1tD0h8fQMi/MDttWc/JydyUVnjPEom55wVfnpl4zQ/sWD4uKB8FlxYRPiLwV2ZXB+xPKw==} @@ -12265,8 +12259,8 @@ packages: optional: true dependencies: '@babel/runtime': 7.20.13 - '@emotion/react': 11.9.3(@babel/core@7.20.12)(@types/react@17.0.53)(react@17.0.2) - '@emotion/styled': 11.10.5(@babel/core@7.20.12)(@emotion/react@11.9.3)(@types/react@17.0.53)(react@17.0.2) + '@emotion/react': 11.9.3(@babel/core@7.22.11)(@types/react@17.0.53)(react@17.0.2) + '@emotion/styled': 11.10.5(@babel/core@7.22.11)(@emotion/react@11.9.3)(@types/react@17.0.53)(react@17.0.2) '@mui/base': 5.0.0-alpha.115(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2) '@mui/core-downloads-tracker': 5.11.6 '@mui/system': 5.11.5(@emotion/react@11.9.3)(@emotion/styled@11.10.5)(@types/react@17.0.53)(react@17.0.2) @@ -12313,8 +12307,8 @@ packages: dependencies: '@babel/runtime': 7.20.13 '@emotion/cache': 11.10.5 - '@emotion/react': 11.9.3(@babel/core@7.20.12)(@types/react@17.0.53)(react@17.0.2) - '@emotion/styled': 11.10.5(@babel/core@7.20.12)(@emotion/react@11.9.3)(@types/react@17.0.53)(react@17.0.2) + '@emotion/react': 11.9.3(@babel/core@7.22.11)(@types/react@17.0.53)(react@17.0.2) + '@emotion/styled': 11.10.5(@babel/core@7.22.11)(@emotion/react@11.9.3)(@types/react@17.0.53)(react@17.0.2) csstype: 3.1.1 prop-types: 15.8.1 react: 17.0.2 @@ -12336,8 +12330,8 @@ packages: optional: true dependencies: '@babel/runtime': 7.20.13 - '@emotion/react': 11.9.3(@babel/core@7.20.12)(@types/react@17.0.53)(react@17.0.2) - '@emotion/styled': 11.10.5(@babel/core@7.20.12)(@emotion/react@11.9.3)(@types/react@17.0.53)(react@17.0.2) + '@emotion/react': 11.9.3(@babel/core@7.22.11)(@types/react@17.0.53)(react@17.0.2) + '@emotion/styled': 11.10.5(@babel/core@7.22.11)(@emotion/react@11.9.3)(@types/react@17.0.53)(react@17.0.2) '@mui/private-theming': 5.11.2(@types/react@17.0.53)(react@17.0.2) '@mui/styled-engine': 5.11.0(@emotion/react@11.9.3)(@emotion/styled@11.10.5)(react@17.0.2) '@mui/types': 7.2.3(@types/react@17.0.53) @@ -14020,17 +14014,14 @@ packages: resolution: {integrity: sha512-T5gIdVO2mmPW3NNhjNgEP3cqMXjXL9UbO0BzWcXfvdBs+BohbQxvd/K5hSVKmn9/lbTdsQVKbUcP5WLCwvUbBg==} dependencies: '@babel/runtime': 7.20.13 - dev: false /@radix-ui/primitive@1.0.1: resolution: {integrity: sha512-yQ8oGX2GVsEYMWGxcovu1uGWPCxV5BFfeeYxqPmuAzUyLT9qmaMXSAhXpb0WrspIeqYzdJpkh2vHModJPgRIaw==} dependencies: '@babel/runtime': 7.20.13 - dev: false /@radix-ui/primitive@1.1.0: resolution: {integrity: sha512-4Z8dn6Upk0qk4P74xBhZ6Hd/w0mPEzOOLxy4xiPXOXqjF7jZS0VAKk7/x/H6FyY2zCkYJqePf1G5KmkmNJ4RBA==} - dev: false /@radix-ui/react-arrow@1.0.3(@types/react-dom@17.0.18)(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2): resolution: {integrity: sha512-wSP+pHsB/jQRaL6voubsQ/ZlrGBHHrOjmBnr19hxYgtS0WvAFwZhK2WP/YY5yF9uKECCEEDGxuLxq1NBK51wFA==} @@ -14051,7 +14042,6 @@ packages: '@types/react-dom': 17.0.18 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) - dev: false /@radix-ui/react-collection@1.0.3(@types/react-dom@17.0.18)(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2): resolution: {integrity: sha512-3SzW+0PW7yBBoQlT8wNcGtaxaD0XSu0uLUFgrtHY08Acx05TaHaOmVLR73c0j/cqpDy53KBMO7s0dx2wmOIDIA==} @@ -14075,7 +14065,6 @@ packages: '@types/react-dom': 17.0.18 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) - dev: false /@radix-ui/react-collection@1.1.0(@types/react-dom@17.0.18)(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2): resolution: {integrity: sha512-GZsZslMJEyo1VKm5L1ZJY8tGDxZNPAoUeQUIbKeJfoi7Q4kmig5AsgLMYYuyYbfjd8fBmFORAIwYAkXMnXZgZw==} @@ -14098,7 +14087,6 @@ packages: '@types/react-dom': 17.0.18 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) - dev: false /@radix-ui/react-compose-refs@1.0.1(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw==} @@ -14112,7 +14100,6 @@ packages: '@babel/runtime': 7.20.13 '@types/react': 17.0.53 react: 17.0.2 - dev: false /@radix-ui/react-compose-refs@1.1.0(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==} @@ -14125,7 +14112,6 @@ packages: dependencies: '@types/react': 17.0.53 react: 17.0.2 - dev: false /@radix-ui/react-context@1.0.1(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-ebbrdFoYTcuZ0v4wG5tedGnp9tzcV8awzsxYph7gXUyvnNLuTIcCk1q17JEbnVhXAKG9oX3KtchwiMIAYp9NLg==} @@ -14139,7 +14125,6 @@ packages: '@babel/runtime': 7.20.13 '@types/react': 17.0.53 react: 17.0.2 - dev: false /@radix-ui/react-context@1.1.0(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A==} @@ -14152,7 +14137,6 @@ packages: dependencies: '@types/react': 17.0.53 react: 17.0.2 - dev: false /@radix-ui/react-direction@1.0.1(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-RXcvnXgyvYvBEOhCBuddKecVkoMiI10Jcm5cTI7abJRAHYfFxeu+FBQs/DvdxSYucxR5mna0dNsL6QFlds5TMA==} @@ -14166,7 +14150,6 @@ packages: '@babel/runtime': 7.20.13 '@types/react': 17.0.53 react: 17.0.2 - dev: false /@radix-ui/react-direction@1.1.0(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-BUuBvgThEiAXh2DWu93XsT+a3aWrGqolGlqqw5VU1kG7p/ZH2cuDlM1sRLNnY3QcBS69UIz2mcKhMxDsdewhjg==} @@ -14179,7 +14162,6 @@ packages: dependencies: '@types/react': 17.0.53 react: 17.0.2 - dev: false /@radix-ui/react-dismissable-layer@1.0.4(@types/react-dom@17.0.18)(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2): resolution: {integrity: sha512-7UpBa/RKMoHJYjie1gkF1DlK8l1fdU/VKDpoS3rCCo8YBJR294GwcEHyxHw72yvphJ7ld0AXEcSLAzY2F/WyCg==} @@ -14204,7 +14186,6 @@ packages: '@types/react-dom': 17.0.18 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) - dev: false /@radix-ui/react-focus-guards@1.0.1(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-Rect2dWbQ8waGzhMavsIbmSVCgYxkXLxxR3ZvCX79JOglzdEy4JXMb98lq4hPxUbLr77nP0UOGf4rcMU+s1pUA==} @@ -14218,7 +14199,6 @@ packages: '@babel/runtime': 7.20.13 '@types/react': 17.0.53 react: 17.0.2 - dev: false /@radix-ui/react-focus-scope@1.0.3(@types/react-dom@17.0.18)(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2): resolution: {integrity: sha512-upXdPfqI4islj2CslyfUBNlaJCPybbqRHAi1KER7Isel9Q2AtSJ0zRBZv8mWQiFXD2nyAJ4BhC3yXgZ6kMBSrQ==} @@ -14241,7 +14221,6 @@ packages: '@types/react-dom': 17.0.18 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) - dev: false /@radix-ui/react-id@1.0.1(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-tI7sT/kqYp8p96yGWY1OAnLHrqDgzHefRBKQ2YAkBS5ja7QLcZ9Z/uY7bEjPUatf8RomoXM8/1sMj1IJaE5UzQ==} @@ -14256,7 +14235,6 @@ packages: '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@17.0.53)(react@17.0.2) '@types/react': 17.0.53 react: 17.0.2 - dev: false /@radix-ui/react-id@1.1.0(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA==} @@ -14270,7 +14248,6 @@ packages: '@radix-ui/react-use-layout-effect': 1.1.0(@types/react@17.0.53)(react@17.0.2) '@types/react': 17.0.53 react: 17.0.2 - dev: false /@radix-ui/react-popper@1.1.2(@types/react-dom@17.0.18)(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2): resolution: {integrity: sha512-1CnGGfFi/bbqtJZZ0P/NQY20xdG3E0LALJaLUEoKwPLwl6PPPfbeiCqMVQnhoFRAxjJj4RpBRJzDmUgsex2tSg==} @@ -14300,7 +14277,6 @@ packages: '@types/react-dom': 17.0.18 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) - dev: false /@radix-ui/react-portal@1.0.3(@types/react-dom@17.0.18)(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2): resolution: {integrity: sha512-xLYZeHrWoPmA5mEKEfZZevoVRK/Q43GfzRXkWV6qawIWWK8t6ifIiLQdd7rmQ4Vk1bmI21XhqF9BN3jWf+phpA==} @@ -14321,7 +14297,6 @@ packages: '@types/react-dom': 17.0.18 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) - dev: false /@radix-ui/react-primitive@1.0.3(@types/react-dom@17.0.18)(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2): resolution: {integrity: sha512-yi58uVyoAcK/Nq1inRY56ZSjKypBNKTa/1mcL8qdl6oJeEaDbOldlzrGn7P6Q3Id5d+SYNGc5AJgc4vGhjs5+g==} @@ -14342,7 +14317,6 @@ packages: '@types/react-dom': 17.0.18 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) - dev: false /@radix-ui/react-primitive@2.0.0(@types/react-dom@17.0.18)(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2): resolution: {integrity: sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw==} @@ -14362,7 +14336,6 @@ packages: '@types/react-dom': 17.0.18 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) - dev: false /@radix-ui/react-roving-focus@1.1.0(@types/react-dom@17.0.18)(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2): resolution: {integrity: sha512-EA6AMGeq9AEeQDeSH0aZgG198qkfHSbvWTf1HvoDmOB5bBG/qTxjYMWUKMnYiV6J/iP/J8MEFSuB2zRU2n7ODA==} @@ -14390,7 +14363,6 @@ packages: '@types/react-dom': 17.0.18 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) - dev: false /@radix-ui/react-select@1.2.2(@types/react-dom@17.0.18)(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2): resolution: {integrity: sha512-zI7McXr8fNaSrUY9mZe4x/HC0jTLY9fWNhO1oLWYMQGDXuV4UCivIGTxwioSzO0ZCYX9iSLyWmAh/1TOmX3Cnw==} @@ -14431,7 +14403,6 @@ packages: react: 17.0.2 react-dom: 17.0.2(react@17.0.2) react-remove-scroll: 2.5.5(@types/react@17.0.53)(react@17.0.2) - dev: false /@radix-ui/react-separator@1.1.0(@types/react-dom@17.0.18)(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2): resolution: {integrity: sha512-3uBAs+egzvJBDZAzvb/n4NxxOYpnspmWxO2u5NbZ8Y6FM/NdrGSF9bop3Cf6F6C71z1rTSn8KV0Fo2ZVd79lGA==} @@ -14451,7 +14422,6 @@ packages: '@types/react-dom': 17.0.18 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) - dev: false /@radix-ui/react-slot@1.0.2(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==} @@ -14466,7 +14436,6 @@ packages: '@radix-ui/react-compose-refs': 1.0.1(@types/react@17.0.53)(react@17.0.2) '@types/react': 17.0.53 react: 17.0.2 - dev: false /@radix-ui/react-slot@1.1.0(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==} @@ -14480,7 +14449,6 @@ packages: '@radix-ui/react-compose-refs': 1.1.0(@types/react@17.0.53)(react@17.0.2) '@types/react': 17.0.53 react: 17.0.2 - dev: false /@radix-ui/react-toggle-group@1.1.0(@types/react-dom@17.0.18)(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2): resolution: {integrity: sha512-PpTJV68dZU2oqqgq75Uzto5o/XfOVgkrJ9rulVmfTKxWp3HfUjHE6CP/WLRR4AzPX9HWxw7vFow2me85Yu+Naw==} @@ -14506,7 +14474,6 @@ packages: '@types/react-dom': 17.0.18 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) - dev: false /@radix-ui/react-toggle@1.1.0(@types/react-dom@17.0.18)(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2): resolution: {integrity: sha512-gwoxaKZ0oJ4vIgzsfESBuSgJNdc0rv12VhHgcqN0TEJmmZixXG/2XpsLK8kzNWYcnaoRIEEQc0bEi3dIvdUpjw==} @@ -14528,7 +14495,6 @@ packages: '@types/react-dom': 17.0.18 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) - dev: false /@radix-ui/react-toolbar@1.1.0(@types/react-dom@17.0.18)(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2): resolution: {integrity: sha512-ZUKknxhMTL/4hPh+4DuaTot9aO7UD6Kupj4gqXCsBTayX1pD1L+0C2/2VZKXb4tIifQklZ3pf2hG9T+ns+FclQ==} @@ -14554,7 +14520,6 @@ packages: '@types/react-dom': 17.0.18 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) - dev: false /@radix-ui/react-use-callback-ref@1.0.1(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-D94LjX4Sp0xJFVaoQOd3OO9k7tpBYNOXdVhkltUbGv2Qb9OXdrg/CpsjlZv7ia14Sylv398LswWBVVu5nqKzAQ==} @@ -14568,7 +14533,6 @@ packages: '@babel/runtime': 7.20.13 '@types/react': 17.0.53 react: 17.0.2 - dev: false /@radix-ui/react-use-callback-ref@1.1.0(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw==} @@ -14581,7 +14545,6 @@ packages: dependencies: '@types/react': 17.0.53 react: 17.0.2 - dev: false /@radix-ui/react-use-controllable-state@1.0.1(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-Svl5GY5FQeN758fWKrjM6Qb7asvXeiZltlT4U2gVfl8Gx5UAv2sMR0LWo8yhsIZh2oQ0eFdZ59aoOOMV7b47VA==} @@ -14596,7 +14559,6 @@ packages: '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@17.0.53)(react@17.0.2) '@types/react': 17.0.53 react: 17.0.2 - dev: false /@radix-ui/react-use-controllable-state@1.1.0(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw==} @@ -14610,7 +14572,6 @@ packages: '@radix-ui/react-use-callback-ref': 1.1.0(@types/react@17.0.53)(react@17.0.2) '@types/react': 17.0.53 react: 17.0.2 - dev: false /@radix-ui/react-use-escape-keydown@1.0.3(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-vyL82j40hcFicA+M4Ex7hVkB9vHgSse1ZWomAqV2Je3RleKGO5iM8KMOEtfoSB0PnIelMd2lATjTGMYqN5ylTg==} @@ -14625,7 +14586,6 @@ packages: '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@17.0.53)(react@17.0.2) '@types/react': 17.0.53 react: 17.0.2 - dev: false /@radix-ui/react-use-layout-effect@1.0.1(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-v/5RegiJWYdoCvMnITBkNNx6bCj20fiaJnWtRkU18yITptraXjffz5Qbn05uOiQnOvi+dbkznkoaMltz1GnszQ==} @@ -14639,7 +14599,6 @@ packages: '@babel/runtime': 7.20.13 '@types/react': 17.0.53 react: 17.0.2 - dev: false /@radix-ui/react-use-layout-effect@1.1.0(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w==} @@ -14652,7 +14611,6 @@ packages: dependencies: '@types/react': 17.0.53 react: 17.0.2 - dev: false /@radix-ui/react-use-previous@1.0.1(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-cV5La9DPwiQ7S0gf/0qiD6YgNqM5Fk97Kdrlc5yBcrF3jyEZQwm7vYFqMo4IfeHgJXsRaMvLABFtd0OVEmZhDw==} @@ -14666,7 +14624,6 @@ packages: '@babel/runtime': 7.20.13 '@types/react': 17.0.53 react: 17.0.2 - dev: false /@radix-ui/react-use-rect@1.0.1(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-Cq5DLuSiuYVKNU8orzJMbl15TXilTnJKUCltMVQg53BQOF1/C5toAaGrowkgksdBQ9H+SRL23g0HDmg9tvmxXw==} @@ -14681,7 +14638,6 @@ packages: '@radix-ui/rect': 1.0.1 '@types/react': 17.0.53 react: 17.0.2 - dev: false /@radix-ui/react-use-size@1.0.1(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-ibay+VqrgcaI6veAojjofPATwledXiSmX+C0KrBk/xgpX9rBzPV3OsfwlhQdUOFbh+LKQorLYT+xTXW9V8yd0g==} @@ -14696,7 +14652,6 @@ packages: '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@17.0.53)(react@17.0.2) '@types/react': 17.0.53 react: 17.0.2 - dev: false /@radix-ui/react-visually-hidden@1.0.3(@types/react-dom@17.0.18)(@types/react@17.0.53)(react-dom@17.0.2)(react@17.0.2): resolution: {integrity: sha512-D4w41yN5YRKtu464TLnByKzMDG/JlMPHtfZgQAu9v6mNakUqGUI9vUrfQKz8NK41VMm/xbZbh76NUTVtIYqOMA==} @@ -14717,13 +14672,11 @@ packages: '@types/react-dom': 17.0.18 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) - dev: false /@radix-ui/rect@1.0.1: resolution: {integrity: sha512-fyrgCaedtvMg9NK3en0pnOYJdtfwxUcNolezkNPUsoX57X8oQk+NkqcvzHXD2uKNij6GXmWU9NDru2IWjrO4BQ==} dependencies: '@babel/runtime': 7.20.13 - dev: false /@react-dnd/asap@5.0.2: resolution: {integrity: sha512-WLyfoHvxhs0V9U+GTsGilGgf2QsPl6ZZ44fnv0/b8T3nQyvzxidxsg/ZltbWssbsRDlYW8UKSQMTGotuTotZ6A==} @@ -15587,7 +15540,6 @@ packages: - '@types/react-dom' - encoding - supports-color - dev: false /@storybook/builder-manager@7.6.20: resolution: {integrity: sha512-e2GzpjLaw6CM/XSmc4qJRzBF8GOoOyotyu3JrSPTYOt4RD8kjUsK4QlismQM1DQRu8i39aIexxmRbiJyD74xzQ==} @@ -15677,7 +15629,7 @@ packages: '@storybook/global': 5.0.0 qs: 6.11.0 telejson: 7.2.0 - tiny-invariant: 1.3.1 + tiny-invariant: 1.3.3 /@storybook/cli@7.6.20: resolution: {integrity: sha512-ZlP+BJyqg7HlnXf7ypjG2CKMI/KVOn03jFIiClItE/jQfgR6kRFgtjRU7uajh427HHfjv9DRiur8nBzuO7vapA==} @@ -15777,7 +15729,6 @@ packages: transitivePeerDependencies: - '@types/react' - '@types/react-dom' - dev: false /@storybook/core-client@7.6.20: resolution: {integrity: sha512-upQuQQinLmlOPKcT8yqXNtwIucZ4E4qegYZXH5HXRWoLAL6GQtW7sUVSIuFogdki8OXRncr/dz8OA+5yQyYS4w==} @@ -15954,7 +15905,6 @@ packages: transitivePeerDependencies: - react - react-dom - dev: false /@storybook/manager@7.6.20: resolution: {integrity: sha512-0Cf6WN0t7yEG2DR29tN5j+i7H/TH5EfPppg9h9/KiQSoFHk+6KLoy2p5do94acFU+Ro4+zzxvdCGbcYGKuArpg==} @@ -16154,7 +16104,6 @@ packages: '@storybook/client-logger': 7.6.20 memoizerific: 1.11.3 qs: 6.11.0 - dev: false /@storybook/source-loader@7.6.20: resolution: {integrity: sha512-AlOX5w95tajmZEsEcbYCtwtpKYW0xLV2hRzk2MZfc6XUXC9/n2jwhz1X4EKilwKGCWFUj/HAYbNc2XChS9juvg==} @@ -16194,7 +16143,6 @@ packages: memoizerific: 1.11.3 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) - dev: false /@storybook/types@7.6.20: resolution: {integrity: sha512-GncdY3x0LpbhmUAAJwXYtJDUQEwfF175gsjH0/fxPkxPoV7Sef9TM41jQLJW/5+6TnZoCZP/+aJZTJtq3ni23Q==} @@ -16655,8 +16603,8 @@ packages: /@types/babel__core@7.20.0: resolution: {integrity: sha512-+n8dL/9GWblDO0iU6eZAwEIJVr5DWigtle+Q6HLOrh/pdbXOhOtqzq8VPPE2zvNJzSKY4vH/z3iT3tn0A3ypiQ==} dependencies: - '@babel/parser': 7.22.14 - '@babel/types': 7.22.11 + '@babel/parser': 7.26.2 + '@babel/types': 7.26.0 '@types/babel__generator': 7.6.4 '@types/babel__template': 7.4.1 '@types/babel__traverse': 7.18.3 @@ -16669,7 +16617,7 @@ packages: /@types/babel__template@7.4.1: resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==} dependencies: - '@babel/parser': 7.22.14 + '@babel/parser': 7.26.2 '@babel/types': 7.26.0 /@types/babel__traverse@7.18.3: @@ -18562,7 +18510,6 @@ packages: engines: {node: '>=10'} dependencies: tslib: 2.6.3 - dev: false /aria-query@5.1.3: resolution: {integrity: sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==} @@ -18640,7 +18587,7 @@ packages: engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 - define-properties: 1.1.4 + define-properties: 1.2.1 es-abstract: 1.21.1 es-shim-unscopables: 1.0.0 dev: false @@ -21279,9 +21226,9 @@ packages: /deep-equal@2.2.0: resolution: {integrity: sha512-RdpzE0Hv4lhowpIUKKMJfeH6C1pXdtT1/it80ubgWqwI3qpuxUBpC1S4hnHg+zjnuOoDkzUtUCEEkG+XG5l3Mw==} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.7 es-get-iterator: 1.1.3 - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.4 is-arguments: 1.1.1 is-array-buffer: 3.0.1 is-date-object: 1.0.5 @@ -21290,7 +21237,7 @@ packages: isarray: 2.0.5 object-is: 1.1.5 object-keys: 1.1.1 - object.assign: 4.1.4 + object.assign: 4.1.5 regexp.prototype.flags: 1.4.3 side-channel: 1.0.4 which-boxed-primitive: 1.0.2 @@ -21370,7 +21317,7 @@ packages: engines: {node: '>= 0.4'} dependencies: define-data-property: 1.1.4 - has-property-descriptors: 1.0.0 + has-property-descriptors: 1.0.2 object-keys: 1.1.1 /defu@6.1.4: @@ -21452,7 +21399,6 @@ packages: /detect-node-es@1.1.0: resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==} - dev: false /detect-node@2.1.0: resolution: {integrity: sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==} @@ -22169,8 +22115,8 @@ packages: /es-get-iterator@1.1.3: resolution: {integrity: sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==} dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.0 + call-bind: 1.0.7 + get-intrinsic: 1.2.4 has-symbols: 1.0.3 is-arguments: 1.1.1 is-map: 2.0.2 @@ -22220,7 +22166,7 @@ packages: resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.4 has: 1.0.3 has-tostringtag: 1.0.0 @@ -23840,8 +23786,8 @@ packages: resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - define-properties: 1.1.4 + call-bind: 1.0.7 + define-properties: 1.2.1 es-abstract: 1.21.1 functions-have-names: 1.2.3 @@ -23914,14 +23860,13 @@ packages: dependencies: es-errors: 1.3.0 function-bind: 1.1.2 - has-proto: 1.0.1 + has-proto: 1.0.3 has-symbols: 1.0.3 hasown: 2.0.2 /get-nonce@1.0.1: resolution: {integrity: sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==} engines: {node: '>=6'} - dev: false /get-npm-tarball-url@2.1.0: resolution: {integrity: sha512-ro+DiMu5DXgRBabqXupW38h7WPZ9+Ad8UjwhvsmmN8w1sU7ab0nzAXvVZ4kqYg57OrqomRtJvepX5/xvFKNtjA==} @@ -23999,8 +23944,8 @@ packages: resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.0 + call-bind: 1.0.7 + get-intrinsic: 1.2.4 /get-symbol-description@1.0.2: resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} @@ -24157,7 +24102,7 @@ packages: resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} engines: {node: '>= 0.4'} dependencies: - define-properties: 1.1.4 + define-properties: 1.2.1 /globalyzer@0.1.0: resolution: {integrity: sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==} @@ -24218,7 +24163,7 @@ packages: /gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.4 /got@11.8.6: resolution: {integrity: sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g==} @@ -24510,7 +24455,7 @@ packages: /has-property-descriptors@1.0.0: resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} dependencies: - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.4 /has-property-descriptors@1.0.2: resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} @@ -24524,7 +24469,6 @@ packages: /has-proto@1.0.3: resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} engines: {node: '>= 0.4'} - dev: false /has-symbols@1.0.3: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} @@ -24551,7 +24495,7 @@ packages: resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} engines: {node: '>= 0.4.0'} dependencies: - function-bind: 1.1.1 + function-bind: 1.1.2 /hasha@5.2.2: resolution: {integrity: sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==} @@ -25121,7 +25065,7 @@ packages: resolution: {integrity: sha512-tA8URYccNzMo94s5MQZgH8NB/XTa6HsOo0MLfXTKKEnHVVdegzaQoFZ7Jp44bdvLvY2waT5dc+j5ICEswhi7UQ==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.4 has: 1.0.3 side-channel: 1.0.4 @@ -25218,14 +25162,14 @@ packages: resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.7 has-tostringtag: 1.0.0 /is-array-buffer@3.0.1: resolution: {integrity: sha512-ASfLknmY8Xa2XtB4wmbz13Wu202baeA18cJBCeCy0wXUHZF0IPyVEXqKEcd+t2fNSLLL1vC6k7lxZEojNbISXQ==} dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.0 + call-bind: 1.0.7 + get-intrinsic: 1.2.4 is-typed-array: 1.1.10 /is-array-buffer@3.0.4: @@ -25575,7 +25519,7 @@ packages: /is-shared-array-buffer@1.0.2: resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.7 /is-shared-array-buffer@1.0.3: resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} @@ -25624,7 +25568,7 @@ packages: engines: {node: '>= 0.4'} dependencies: available-typed-arrays: 1.0.5 - call-bind: 1.0.2 + call-bind: 1.0.7 for-each: 0.3.3 gopd: 1.0.1 has-tostringtag: 1.0.0 @@ -25666,13 +25610,13 @@ packages: /is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.7 /is-weakset@2.0.2: resolution: {integrity: sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==} dependencies: call-bind: 1.0.7 - get-intrinsic: 1.2.0 + get-intrinsic: 1.2.4 /is-weakset@2.0.3: resolution: {integrity: sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==} @@ -25756,7 +25700,7 @@ packages: engines: {node: '>=8'} dependencies: '@babel/core': 7.26.0 - '@babel/parser': 7.22.14 + '@babel/parser': 7.26.2 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.0 semver: 6.3.1 @@ -26201,7 +26145,7 @@ packages: '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.22.11) '@babel/plugin-syntax-typescript': 7.20.0(@babel/core@7.22.11) '@babel/traverse': 7.22.11 - '@babel/types': 7.22.11 + '@babel/types': 7.26.0 '@jest/expect-utils': 29.5.0 '@jest/transform': 29.5.0 '@jest/types': 29.5.0 @@ -27296,7 +27240,6 @@ packages: react: '>= 0.14.0' dependencies: react: 17.0.2 - dev: false /material-design-icons@3.0.1: resolution: {integrity: sha512-t19Z+QZBwSZulxptEu05kIm+UyfIdJY1JDwI+nx02j269m6W414whiQz9qfvQIiLrdx71RQv+T48nHhuQXOCIQ==} @@ -28121,8 +28064,8 @@ packages: resolution: {integrity: sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - define-properties: 1.1.4 + call-bind: 1.0.7 + define-properties: 1.2.1 /object-keys@1.1.1: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} @@ -28137,7 +28080,7 @@ packages: resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.7 define-properties: 1.1.4 has-symbols: 1.0.3 object-keys: 1.1.1 @@ -28943,7 +28886,6 @@ packages: engines: {node: '>=10'} dependencies: '@babel/runtime': 7.20.13 - dev: false /pony-cause@2.1.8: resolution: {integrity: sha512-c4E5sVlX+npoRiKb72SkMOYMZ/c+jehaKAytybykhh49tEQYkjHxKSZ3YHUyH1v3oEL+wl3aXtkyYhJp+cNXDg==} @@ -30157,7 +30099,6 @@ packages: dependencies: react: 17.0.2 react-dom: 17.0.2(react@17.0.2) - dev: false /react-cool-dimensions@2.0.7(react@17.0.2): resolution: {integrity: sha512-z1VwkAAJ5d8QybDRuYIXTE41RxGr5GYsv1bQhbOBE8cMfoZQZpcF0odL64vdgrQVzat2jayedj1GoYi80FWcbA==} @@ -30588,7 +30529,6 @@ packages: react: 17.0.2 react-style-singleton: 2.2.1(@types/react@17.0.53)(react@17.0.2) tslib: 2.6.3 - dev: false /react-remove-scroll@2.5.5(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-ImKhrzJJsyXJfBZ4bzu8Bwpka14c/fQt0k+cyFp/PBhTfyDnU5hjOtM4AG/0AMyy8oKzOTR0lDgJIM7pYXI0kw==} @@ -30607,7 +30547,6 @@ packages: tslib: 2.6.3 use-callback-ref: 1.3.2(@types/react@17.0.53)(react@17.0.2) use-sidecar: 1.1.2(@types/react@17.0.53)(react@17.0.2) - dev: false /react-router-config@5.1.1(react-router@5.3.4)(react@17.0.2): resolution: {integrity: sha512-DuanZjaD8mQp1ppHjgnnUnyOlqYXZVjnov/JzFhjLEwd3Z4dYjMSnqrEzzGThH47vpCOqPPwJM2FtthLeJ8Pbg==} @@ -30724,7 +30663,6 @@ packages: invariant: 2.2.4 react: 17.0.2 tslib: 2.6.3 - dev: false /react-textarea-autosize@8.5.2(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-uOkyjkEl0ByEK21eCJMHDGBAAd/BoFQBawYK5XItjAmCTeSbjxghd8qnt7nzsLYzidjnoObu6M26xts0YGKsGg==} @@ -31015,8 +30953,8 @@ packages: resolution: {integrity: sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.2 - define-properties: 1.1.4 + call-bind: 1.0.7 + define-properties: 1.2.1 functions-have-names: 1.2.3 /regexp.prototype.flags@1.5.2: @@ -31513,8 +31451,8 @@ packages: /safe-regex-test@1.0.0: resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} dependencies: - call-bind: 1.0.2 - get-intrinsic: 1.2.0 + call-bind: 1.0.7 + get-intrinsic: 1.2.4 is-regex: 1.1.4 /safe-regex-test@1.0.3: @@ -32229,7 +32167,6 @@ packages: /store2@2.14.2: resolution: {integrity: sha512-siT1RiqlfQnGqgT/YzXVUNsom9S0H1OX+dpdGN1xkyYATo4I6sep5NmsRD/40s3IIOvlCq6akxkqG82urIZW1w==} - dev: false /storybook@7.6.20: resolution: {integrity: sha512-Wt04pPTO71pwmRmsgkyZhNo4Bvdb/1pBAMsIFb9nQLykEdzzpXjvingxFFvdOG4nIowzwgxD+CLlyRqVJqnATw==} @@ -32377,7 +32314,7 @@ packages: /string.prototype.repeat@1.0.0: resolution: {integrity: sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==} dependencies: - define-properties: 1.1.4 + define-properties: 1.2.1 es-abstract: 1.21.1 dev: false @@ -32394,8 +32331,8 @@ packages: /string.prototype.trimend@1.0.6: resolution: {integrity: sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==} dependencies: - call-bind: 1.0.2 - define-properties: 1.1.4 + call-bind: 1.0.7 + define-properties: 1.2.1 es-abstract: 1.21.1 /string.prototype.trimend@1.0.8: @@ -32409,8 +32346,8 @@ packages: /string.prototype.trimstart@1.0.6: resolution: {integrity: sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==} dependencies: - call-bind: 1.0.2 - define-properties: 1.1.4 + call-bind: 1.0.7 + define-properties: 1.2.1 es-abstract: 1.21.1 /string.prototype.trimstart@1.0.8: @@ -32735,7 +32672,7 @@ packages: engines: {node: '>=8'} dependencies: buffer: 5.7.1 - node-fetch: 2.6.8 + node-fetch: 2.7.0 transitivePeerDependencies: - encoding dev: true @@ -33068,7 +33005,6 @@ packages: /tocbot@4.32.2: resolution: {integrity: sha512-UbVZNXX79LUqMzsnSTwE/YF/PYc2pg3G77D/jcolHd6lmw+oklzfcLtHSsmWBhOf1wfWD1HfYzdjGQef1VcQgg==} - dev: false /toggle-selection@1.0.6: resolution: {integrity: sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==} @@ -33520,7 +33456,7 @@ packages: /typed-array-length@1.0.4: resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.7 for-each: 0.3.3 is-typed-array: 1.1.10 @@ -33581,7 +33517,7 @@ packages: /unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} dependencies: - call-bind: 1.0.2 + call-bind: 1.0.7 has-bigints: 1.0.2 has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 @@ -33907,7 +33843,6 @@ packages: '@types/react': 17.0.53 react: 17.0.2 tslib: 2.6.3 - dev: false /use-composed-ref@1.3.0(react@17.0.2): resolution: {integrity: sha512-GLMG0Jc/jiKov/3Ulid1wbv3r54K9HlMW29IWcDFPEqFkSO2nS0MuefWgMJpeHQ9YJeXDL3ZUF+P3jdXlZX/cQ==} @@ -33992,7 +33927,6 @@ packages: '@juggle/resize-observer': 3.4.0 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) - dev: false /use-sidecar@1.1.2(@types/react@17.0.53)(react@17.0.2): resolution: {integrity: sha512-epTbsLuzZ7lPClpz2TyryBfztm7m+28DlEv2ZCQ3MDr5ssiwyOwGH/e5F9CkfWjJ1t4clvI58yF822/GUkjjhw==} @@ -34008,7 +33942,6 @@ packages: detect-node-es: 1.1.0 react: 17.0.2 tslib: 2.6.3 - dev: false /use-sync-external-store@1.2.0(react@17.0.2): resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} @@ -34718,7 +34651,7 @@ packages: engines: {node: '>= 0.4'} dependencies: available-typed-arrays: 1.0.5 - call-bind: 1.0.2 + call-bind: 1.0.7 for-each: 0.3.3 gopd: 1.0.1 has-tostringtag: 1.0.0 diff --git a/storybook/.storybook/main.ts b/storybook/.storybook/main.ts index 449e52a517..dcc06c94d5 100644 --- a/storybook/.storybook/main.ts +++ b/storybook/.storybook/main.ts @@ -2,7 +2,7 @@ import * as path from "path"; export default { framework: "@storybook/react-webpack5", - stories: ["../src/**/*.stories.@(mdx|tsx)"], + stories: ["../src/**/*.@(mdx|stories.tsx)"], features: { // Workaround for storybook's incompatibility with emotion >= 11 // See: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#emotion11-quasi-compatibility diff --git a/storybook/package.json b/storybook/package.json index 11fa3eb453..4438729191 100644 --- a/storybook/package.json +++ b/storybook/package.json @@ -68,6 +68,7 @@ "@comet/eslint-config": "workspace:*", "@faker-js/faker": "^7.6.0", "@graphql-mocks/network-msw": "^0.3.0", + "@storybook/blocks": "7.6.20", "@storybook/react-webpack5": "7.6.20", "@types/draft-js": "^0.11.10", "@types/faker": "^5.5.8", diff --git a/storybook/src/docs/Intro.stories.mdx b/storybook/src/docs/Intro.mdx similarity index 100% rename from storybook/src/docs/Intro.stories.mdx rename to storybook/src/docs/Intro.mdx diff --git a/storybook/src/docs/bestPractices/Overview.stories.mdx b/storybook/src/docs/bestPractices/Overview.mdx similarity index 100% rename from storybook/src/docs/bestPractices/Overview.stories.mdx rename to storybook/src/docs/bestPractices/Overview.mdx diff --git a/storybook/src/docs/bestPractices/ThemeAndStyling.stories.mdx b/storybook/src/docs/bestPractices/ThemeAndStyling.mdx similarity index 100% rename from storybook/src/docs/bestPractices/ThemeAndStyling.stories.mdx rename to storybook/src/docs/bestPractices/ThemeAndStyling.mdx diff --git a/storybook/src/docs/components/AppHeader/AppHeader.stories.mdx b/storybook/src/docs/components/AppHeader/AppHeader.mdx similarity index 69% rename from storybook/src/docs/components/AppHeader/AppHeader.stories.mdx rename to storybook/src/docs/components/AppHeader/AppHeader.mdx index f3c3903142..b0d167d4b4 100644 --- a/storybook/src/docs/components/AppHeader/AppHeader.stories.mdx +++ b/storybook/src/docs/components/AppHeader/AppHeader.mdx @@ -1,6 +1,8 @@ import { Meta, Canvas, Story } from "@storybook/addon-docs"; - +import * as AppHeaderStories from "./AppHeader.stories"; + + # AppHeader @@ -10,7 +12,7 @@ It should contain the controls for the main-menu and other commonly needed actio _**Note:** When using the component inside `MasterLayout`, the props `position` and `headerHeight` should not be set, they may only be useful, if the component is used on it's own._ - + ## Components @@ -28,7 +30,7 @@ The AppHeader system consists of multiple basic components that can be combined `AppHeader` gives you a blank header, to which you can add things like a menu-button, a application-specific logo and buttons to the `children`. - + ### AppHeaderMenuButton @@ -37,7 +39,7 @@ The AppHeader system consists of multiple basic components that can be combined Optionally you can add a custom icon as `children` or add a custom `onClick` if you want it to do something other than toggling the menu in `MasterLayout`. - + ### AppHeaderFillSpace @@ -46,7 +48,7 @@ The `AppHeaderFillSpace` component is used to separate the left and right elemen Basically everything after `AppHeaderFillSpace` is pushed to the right of the `AppHeader`. - + ### AppHeaderButton @@ -54,19 +56,19 @@ Basically everything after `AppHeaderFillSpace` is pushed to the right of the `A `AppHeaderButton` should generally be used for buttons on the right side of the `AppHeader`. - + - + - + - + ### AppHeaderDropdown @@ -74,5 +76,5 @@ Basically everything after `AppHeaderFillSpace` is pushed to the right of the `A `AppHeaderDropdown` can be used for dropdown menus or other dropdown content. - + diff --git a/storybook/src/docs/components/AppHeader/AppHeader.stories.tsx b/storybook/src/docs/components/AppHeader/AppHeader.stories.tsx new file mode 100644 index 0000000000..75c63e3ceb --- /dev/null +++ b/storybook/src/docs/components/AppHeader/AppHeader.stories.tsx @@ -0,0 +1,217 @@ +import { AppHeader, AppHeaderButton, AppHeaderDropdown, AppHeaderFillSpace, AppHeaderMenuButton, CometLogo } from "@comet/admin"; +import { Account, Language, Logout, Preview, Snips, SwitchUser, Wrench } from "@comet/admin-icons"; +import { Avatar, Box, Button, Divider, MenuItem, MenuList, Typography } from "@mui/material"; +import * as React from "react"; + +export default { + title: "Docs/Components/AppHeader", +}; + +export const Basic = { + render: () => { + function AccountHeaderItem() { + return ( + + + + + User Name + + ); + } + + return ( + + + + + + + }>Preview + + }> + {(closeDropdown: () => void) => { + const onItemClicked = () => { + closeDropdown(); + // Change language + }; + + return ( + + DE + EN + FR + ES + + ); + }} + + + }> + + Edit Profile + Change Password + + + + + + + + + + ); + }, + name: "AppHeader", +}; + +export const Empty = { + render: () => { + return ( + + {/* AppHeader content should be here */} + + ); + }, + name: "AppHeader Empty", +}; + +export const MenuButton = { + render: () => { + return ( + + + + ); + }, + name: "AppHeader MenuButton", +}; + +export const FillSpace = { + render: () => { + return ( + + Left Content + + + + Right Content + + ); + }, + name: "AppHeader FillSpace", +}; + +export const ButtonText = { + render: () => { + return ( + + Header button + + + My Button + + ); + }, + name: "AppHeader Button text", +}; + +export const ButtonTextAndIcon = { + render: () => { + return ( + + Header buttons with icon + + + }>My Button + + }>My Button + + ); + }, + name: "AppHeader Button text and icon", +}; + +export const ButtonIcon = { + render: () => { + return ( + + Header buttons with icon only + + + + + + + + + + + ); + }, + name: "AppHeader Button icon", +}; + +export const CustomButton = { + render: () => { + return ( + + Header button custom content + + + + + + + + User Name + + + + ); + }, + name: "AppHeader Button custom", +}; + +export const Dropdown = { + render: () => { + const [open, setOpen] = React.useState(false); + + return ( + <> +
Dropdown Menu state: {open ? "open" : "closed"}
+ + Header dropdown + + + } dropdownArrow={null}> + + + Dropdown Text +
+
+ Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus, nisi erat + porttitor ligula, eget lacinia odio sem nec elit. +
+
+
+ + + {() => { + return ( + + Item 1 + Item 2 + Item 3 + + ); + }} + +
+ + ); + }, + name: "AppHeader Dropdown", +}; diff --git a/storybook/src/docs/components/AppHeader/stories/AppHeader.stories.tsx b/storybook/src/docs/components/AppHeader/stories/AppHeader.stories.tsx deleted file mode 100644 index 59891a8443..0000000000 --- a/storybook/src/docs/components/AppHeader/stories/AppHeader.stories.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import { AppHeader, AppHeaderButton, AppHeaderDropdown, AppHeaderFillSpace, AppHeaderMenuButton, CometLogo } from "@comet/admin"; -import { Account, Language, Logout, Preview } from "@comet/admin-icons"; -import { Avatar, Box, Button, Divider, MenuItem, MenuList } from "@mui/material"; -import * as React from "react"; - -export default { - title: "stories/components/AppHeader/AppHeader", -}; - -export const _AppHeader = { - render: () => { - function AccountHeaderItem() { - return ( - - - - - User Name - - ); - } - - return ( - - - - - - - }>Preview - - }> - {(closeDropdown: () => void) => { - const onItemClicked = () => { - closeDropdown(); - // Change language - }; - - return ( - - DE - EN - FR - ES - - ); - }} - - - }> - - Edit Profile - Change Password - - - - - - - - - - ); - }, - - name: "AppHeader", -}; diff --git a/storybook/src/docs/components/AppHeader/stories/AppHeaderButtonCustom.stories.tsx b/storybook/src/docs/components/AppHeader/stories/AppHeaderButtonCustom.stories.tsx deleted file mode 100644 index 68e2230192..0000000000 --- a/storybook/src/docs/components/AppHeader/stories/AppHeaderButtonCustom.stories.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { AppHeader, AppHeaderButton, AppHeaderFillSpace } from "@comet/admin"; -import { Account } from "@comet/admin-icons"; -import { Avatar, Box, Typography } from "@mui/material"; -import * as React from "react"; - -export default { - title: "stories/components/AppHeader/Button custom", -}; - -export const AppHeaderButtonCustom = { - render: () => { - return ( - - Header button custom content - - - - - - - - User Name - - - - ); - }, - - name: "AppHeader Button custom", -}; diff --git a/storybook/src/docs/components/AppHeader/stories/AppHeaderButtonIcon.stories.tsx b/storybook/src/docs/components/AppHeader/stories/AppHeaderButtonIcon.stories.tsx deleted file mode 100644 index 5b489e7e99..0000000000 --- a/storybook/src/docs/components/AppHeader/stories/AppHeaderButtonIcon.stories.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { AppHeader, AppHeaderButton, AppHeaderFillSpace } from "@comet/admin"; -import { SwitchUser, Wrench } from "@comet/admin-icons"; -import { Typography } from "@mui/material"; -import * as React from "react"; - -export default { - title: "stories/components/AppHeader/Button icon", -}; - -export const AppHeaderButtonIcon = { - render: () => { - return ( - - Header buttons with icon only - - - - - - - - - - - ); - }, - - name: "AppHeader Button icon", -}; diff --git a/storybook/src/docs/components/AppHeader/stories/AppHeaderButtonText.stories.tsx b/storybook/src/docs/components/AppHeader/stories/AppHeaderButtonText.stories.tsx deleted file mode 100644 index 528d424e9d..0000000000 --- a/storybook/src/docs/components/AppHeader/stories/AppHeaderButtonText.stories.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { AppHeader, AppHeaderButton, AppHeaderFillSpace } from "@comet/admin"; -import { Typography } from "@mui/material"; -import * as React from "react"; - -export default { - title: "stories/components/AppHeader/Button text", -}; - -export const AppHeaderButtonText = { - render: () => { - return ( - - Header button - - - My Button - - ); - }, - - name: "AppHeader Button text", -}; diff --git a/storybook/src/docs/components/AppHeader/stories/AppHeaderButtonTextAndIcon.stories.tsx b/storybook/src/docs/components/AppHeader/stories/AppHeaderButtonTextAndIcon.stories.tsx deleted file mode 100644 index 073c32b2c7..0000000000 --- a/storybook/src/docs/components/AppHeader/stories/AppHeaderButtonTextAndIcon.stories.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { AppHeader, AppHeaderButton, AppHeaderFillSpace } from "@comet/admin"; -import { Wrench } from "@comet/admin-icons"; -import { Typography } from "@mui/material"; -import * as React from "react"; - -export default { - title: "stories/components/AppHeader/Button text and icon", -}; - -export const AppHeaderButtonTextAndIcon = { - render: () => { - return ( - - Header buttons with icon - - - }>My Button - - }>My Button - - ); - }, - - name: "AppHeader Button text and icon", -}; diff --git a/storybook/src/docs/components/AppHeader/stories/AppHeaderDropdown.stories.tsx b/storybook/src/docs/components/AppHeader/stories/AppHeaderDropdown.stories.tsx deleted file mode 100644 index 99fcb2b694..0000000000 --- a/storybook/src/docs/components/AppHeader/stories/AppHeaderDropdown.stories.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { AppHeader, AppHeaderDropdown, AppHeaderFillSpace } from "@comet/admin"; -import { Snips } from "@comet/admin-icons"; -import { Box, MenuItem, MenuList, Typography } from "@mui/material"; -import * as React from "react"; - -export default { - title: "stories/components/AppHeader/Dropdown", -}; - -export const _AppHeaderDropdown = { - render: () => { - const [open, setOpen] = React.useState(false); - - return ( - <> -
Dropdown Menu state: {open ? "open" : "closed"}
- - Header dropdown - - - } dropdownArrow={null}> - - - Dropdown Text -
-
- Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus, nisi erat - porttitor ligula, eget lacinia odio sem nec elit. -
-
-
- - - {() => { - return ( - - Item 1 - Item 2 - Item 3 - - ); - }} - -
- - ); - }, - - name: "AppHeader Dropdown", -}; diff --git a/storybook/src/docs/components/AppHeader/stories/AppHeaderEmpty.stories.tsx b/storybook/src/docs/components/AppHeader/stories/AppHeaderEmpty.stories.tsx deleted file mode 100644 index d8881ea864..0000000000 --- a/storybook/src/docs/components/AppHeader/stories/AppHeaderEmpty.stories.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { AppHeader } from "@comet/admin"; -import * as React from "react"; - -export default { - title: "stories/components/AppHeader/Empty", -}; - -export const AppHeaderEmpty = { - render: () => { - return ( - - {/* AppHeader content should be here */} - - ); - }, - - name: "AppHeader Empty", -}; diff --git a/storybook/src/docs/components/AppHeader/stories/AppHeaderFillSpace.stories.tsx b/storybook/src/docs/components/AppHeader/stories/AppHeaderFillSpace.stories.tsx deleted file mode 100644 index 3324948da7..0000000000 --- a/storybook/src/docs/components/AppHeader/stories/AppHeaderFillSpace.stories.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { AppHeader, AppHeaderFillSpace } from "@comet/admin"; -import { Typography } from "@mui/material"; -import * as React from "react"; - -export default { - title: "stories/components/AppHeader/FillSpace", -}; - -export const _AppHeaderFillSpace = { - render: () => { - return ( - - Left Content - - - - Right Content - - ); - }, - - name: "AppHeader FillSpace", -}; diff --git a/storybook/src/docs/components/AppHeader/stories/AppHeaderMenuButton.stories.tsx b/storybook/src/docs/components/AppHeader/stories/AppHeaderMenuButton.stories.tsx deleted file mode 100644 index 0fa64fa637..0000000000 --- a/storybook/src/docs/components/AppHeader/stories/AppHeaderMenuButton.stories.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { AppHeader, AppHeaderMenuButton } from "@comet/admin"; -import * as React from "react"; - -export default { - title: "stories/components/AppHeader/MenuButton", -}; - -export const _AppHeaderMenuButton = { - render: () => { - return ( - - - - ); - }, - - name: "AppHeader MenuButton", -}; diff --git a/storybook/src/docs/components/ClearInputAdornment/ClearInputAdornment.stories.mdx b/storybook/src/docs/components/ClearInputAdornment/ClearInputAdornment.mdx similarity index 66% rename from storybook/src/docs/components/ClearInputAdornment/ClearInputAdornment.stories.mdx rename to storybook/src/docs/components/ClearInputAdornment/ClearInputAdornment.mdx index f87d4aaeb3..29afcca7de 100644 --- a/storybook/src/docs/components/ClearInputAdornment/ClearInputAdornment.stories.mdx +++ b/storybook/src/docs/components/ClearInputAdornment/ClearInputAdornment.mdx @@ -1,6 +1,8 @@ import { Meta, Story, Canvas } from "@storybook/addon-docs"; - +import * as ClearInputAdornmentStories from "./ClearInputAdornment.stories"; + + # ClearInputAdornment @@ -8,7 +10,7 @@ import { Meta, Story, Canvas } from "@storybook/addon-docs"; It is based on and therefore used the same way as [MuiInputAdornment](https://mui.com/api/input-adornment/). - + ## Existing `clearable` prop @@ -16,5 +18,5 @@ It is based on and therefore used the same way as [MuiInputAdornment](https://mu Many components in Comet Admin already implement the ClearInputAdornment. It can be enabled with the `clearable` prop. - + diff --git a/storybook/src/docs/components/ClearInputAdornment/stories/ExistingClearableProp.stories.tsx b/storybook/src/docs/components/ClearInputAdornment/ClearInputAdornment.stories.tsx similarity index 53% rename from storybook/src/docs/components/ClearInputAdornment/stories/ExistingClearableProp.stories.tsx rename to storybook/src/docs/components/ClearInputAdornment/ClearInputAdornment.stories.tsx index 45fd2fd3ca..593ab9005c 100644 --- a/storybook/src/docs/components/ClearInputAdornment/stories/ExistingClearableProp.stories.tsx +++ b/storybook/src/docs/components/ClearInputAdornment/ClearInputAdornment.stories.tsx @@ -1,14 +1,53 @@ -import { Field, FinalFormInput, FinalFormSelect } from "@comet/admin"; +import { ClearInputAdornment, Field, FieldContainer, FinalFormInput, FinalFormSelect } from "@comet/admin"; import { FinalFormDatePicker } from "@comet/admin-date-time"; -import { Grid, MenuItem } from "@mui/material"; +import { Cut } from "@comet/admin-icons"; +import { Grid, InputBase, MenuItem } from "@mui/material"; import * as React from "react"; import { Form } from "react-final-form"; export default { - title: "stories/components/Clear Input Adornment/Existing clearable prop", + title: "Docs/Components/Clear Input Adornment", }; -export const ExistingClearableProp = { +export const Basic = { + render: () => { + const [inputText, setInputText] = React.useState("Lorem ipsum"); + + return ( + + + + setInputText(e.target.value)} + endAdornment={ + setInputText("")} /> + } + /> + + + + + setInputText(e.target.value)} + endAdornment={ + setInputText("")} + icon={} + /> + } + /> + + + + ); + }, +}; + +export const ClearableProp = { render: () => { const selectOptions = [ { value: "chocolate", label: "Chocolate" }, @@ -53,6 +92,5 @@ export const ExistingClearableProp = { ); }, - - name: "Existing clearable prop", + name: "Clearable prop", }; diff --git a/storybook/src/docs/components/ClearInputAdornment/stories/Usage.stories.tsx b/storybook/src/docs/components/ClearInputAdornment/stories/Usage.stories.tsx deleted file mode 100644 index 9a3df7e32c..0000000000 --- a/storybook/src/docs/components/ClearInputAdornment/stories/Usage.stories.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { ClearInputAdornment, FieldContainer } from "@comet/admin"; -import { Cut } from "@comet/admin-icons"; -import { Grid, InputBase } from "@mui/material"; -import * as React from "react"; - -export default { - title: "stories/components/Clear Input Adornment/Usage", -}; - -export const Usage = () => { - const [inputText, setInputText] = React.useState("Lorem ipsum"); - - return ( - - - - setInputText(e.target.value)} - endAdornment={ - setInputText("")} /> - } - /> - - - - - setInputText(e.target.value)} - endAdornment={ - setInputText("")} - icon={} - /> - } - /> - - - - ); -}; diff --git a/storybook/src/docs/components/ClearInputButton/ClearInputButton.stories.mdx b/storybook/src/docs/components/ClearInputButton/ClearInputButton.mdx similarity index 59% rename from storybook/src/docs/components/ClearInputButton/ClearInputButton.stories.mdx rename to storybook/src/docs/components/ClearInputButton/ClearInputButton.mdx index ba1537f2f2..7e00cd6484 100644 --- a/storybook/src/docs/components/ClearInputButton/ClearInputButton.stories.mdx +++ b/storybook/src/docs/components/ClearInputButton/ClearInputButton.mdx @@ -1,6 +1,8 @@ import { Meta, Story, Canvas } from "@storybook/addon-docs"; - +import * as ClearInputButtonStories from "./ClearInputButton.stories"; + + # ClearInputButton @@ -9,7 +11,7 @@ The ClearInputButton extends the props from the [Material UI ButtonBase](https:/ It lets you specify which ClearIcon you want to display. - + ## Examples @@ -17,17 +19,17 @@ It lets you specify which ClearIcon you want to display. ### Clearable Input Field - + ### Disabled Clear InputButton - + ### Custom Clear Icon - + diff --git a/storybook/src/docs/components/ClearInputButton/ClearInputButton.stories.tsx b/storybook/src/docs/components/ClearInputButton/ClearInputButton.stories.tsx new file mode 100644 index 0000000000..cf39eb063d --- /dev/null +++ b/storybook/src/docs/components/ClearInputButton/ClearInputButton.stories.tsx @@ -0,0 +1,88 @@ +import { ClearInputButton } from "@comet/admin"; +import { Cut } from "@comet/admin-icons"; +import { Box, InputAdornment, InputBase, Typography } from "@mui/material"; +import * as React from "react"; + +export default { + title: "Docs/Components/ClearInputButton", +}; + +export const Default = { + render: () => { + return ( + + + Input Field with Default ClearInputButton: + + + + + } + /> + + ); + }, +}; + +export const ClearableInputField = { + render: () => { + const [inputText, setInputText] = React.useState(""); + + return ( + + + Input Field with clearable onClick Button Functionality: + + setInputText(e.target.value)} + endAdornment={ + + setInputText("")} /> + + } + /> + + ); + }, +}; + +export const Disabled = { + render: () => { + return ( + + + Input Field with disabled ClearInputButton: + + + + + } + /> + + ); + }, +}; + +export const CustomClearIcon = { + render: () => { + return ( + + + Input Field with Custom ClearInputButton Icon: + + + } /> + + } + /> + + ); + }, +}; diff --git a/storybook/src/docs/components/ClearInputButton/stories/ClearableInputField.stories.tsx b/storybook/src/docs/components/ClearInputButton/stories/ClearableInputField.stories.tsx deleted file mode 100644 index 9069410913..0000000000 --- a/storybook/src/docs/components/ClearInputButton/stories/ClearableInputField.stories.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { ClearInputButton } from "@comet/admin"; -import { Box, InputAdornment, InputBase, Typography } from "@mui/material"; -import * as React from "react"; - -export default { - title: "stories/components/Clear Input Button/Clearable Input Field", -}; - -export const ClearableInputField = () => { - const [inputText, setInputText] = React.useState(""); - - return ( - - - Input Field with clearable onClick Button Functionality: - - setInputText(e.target.value)} - endAdornment={ - - setInputText("")} /> - - } - /> - - ); -}; diff --git a/storybook/src/docs/components/ClearInputButton/stories/CustomClearIcon.stories.tsx b/storybook/src/docs/components/ClearInputButton/stories/CustomClearIcon.stories.tsx deleted file mode 100644 index ead6427d6d..0000000000 --- a/storybook/src/docs/components/ClearInputButton/stories/CustomClearIcon.stories.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { ClearInputButton } from "@comet/admin"; -import { Cut } from "@comet/admin-icons"; -import { Box, InputAdornment, InputBase, Typography } from "@mui/material"; -import * as React from "react"; - -export default { - title: "stories/components/Clear Input Button/Custom Clear Icon", -}; - -export const CustomClearIcon = () => { - return ( - - - Input Field with Custom ClearInputButton Icon: - - - } /> - - } - /> - - ); -}; diff --git a/storybook/src/docs/components/ClearInputButton/stories/Default.stories.tsx b/storybook/src/docs/components/ClearInputButton/stories/Default.stories.tsx deleted file mode 100644 index ff0320dfc1..0000000000 --- a/storybook/src/docs/components/ClearInputButton/stories/Default.stories.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { ClearInputButton } from "@comet/admin"; -import { Box, InputAdornment, InputBase, Typography } from "@mui/material"; -import * as React from "react"; - -export default { - title: "stories/components/Clear Input Button/Default", -}; - -export const Default = () => { - return ( - - - Input Field with Default ClearInputButton: - - - - - } - /> - - ); -}; diff --git a/storybook/src/docs/components/ClearInputButton/stories/Disabled.stories.tsx b/storybook/src/docs/components/ClearInputButton/stories/Disabled.stories.tsx deleted file mode 100644 index 3bab3d0e09..0000000000 --- a/storybook/src/docs/components/ClearInputButton/stories/Disabled.stories.tsx +++ /dev/null @@ -1,24 +0,0 @@ -import { ClearInputButton } from "@comet/admin"; -import { Box, InputAdornment, InputBase, Typography } from "@mui/material"; -import * as React from "react"; - -export default { - title: "stories/components/Clear Input Button/Disabled", -}; - -export const Disabled = () => { - return ( - - - Input Field with disabled ClearInputButton: - - - - - } - /> - - ); -}; diff --git a/storybook/src/docs/components/ColorPicker/ColorPicker.stories.mdx b/storybook/src/docs/components/ColorPicker/ColorPicker.mdx similarity index 53% rename from storybook/src/docs/components/ColorPicker/ColorPicker.stories.mdx rename to storybook/src/docs/components/ColorPicker/ColorPicker.mdx index a9e5927313..0708a58168 100644 --- a/storybook/src/docs/components/ColorPicker/ColorPicker.stories.mdx +++ b/storybook/src/docs/components/ColorPicker/ColorPicker.mdx @@ -1,6 +1,8 @@ import { Meta, Canvas, Story } from "@storybook/addon-docs"; - +import * as ColorPickerStories from "./ColorPicker.stories"; + + # Color Picker @@ -11,17 +13,17 @@ _Note: For use inside forms built with final-form, use the `FinalFormColorPicker ## Normal Usage - + ## Usage Inside FinalForm - + ## Customization - + diff --git a/storybook/src/docs/components/ColorPicker/ColorPicker.stories.tsx b/storybook/src/docs/components/ColorPicker/ColorPicker.stories.tsx new file mode 100644 index 0000000000..23beb6946b --- /dev/null +++ b/storybook/src/docs/components/ColorPicker/ColorPicker.stories.tsx @@ -0,0 +1,195 @@ +import { Field, FieldContainer } from "@comet/admin"; +import { ColorPicker, ColorPickerColorPreviewProps, FinalFormColorPicker } from "@comet/admin-color-picker"; +import { StateFilled, StateRing, Warning } from "@comet/admin-icons"; +import { Grid } from "@mui/material"; +import * as React from "react"; +import { Form } from "react-final-form"; + +export default { + title: "Docs/Components/Color Picker", +}; + +export const Basic = { + render: () => { + const [colorOne, setColorOne] = React.useState("#00ff00"); + const [colorTwo, setColorTwo] = React.useState("rgba(255, 127, 80, 0.75)"); + const [colorThree, setColorThree] = React.useState(); + const [colorFour, setColorFour] = React.useState(); + const [colorFive, setColorFive] = React.useState(); + + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); + }, +}; + +export const FinalForm = { + render: () => { + return ( +
{}}> + {() => ( + + + + + + + + + + + + + + + + + + )} +
+ ); + }, +}; + +export const Customized = { + render: () => { + const [colorOne, setColorOne] = React.useState("#00ff00"); + const [colorTwo, setColorTwo] = React.useState(); + + const CustomColorPreview = ({ color }: ColorPickerColorPreviewProps): React.ReactElement => { + return ; + }; + + const CustomColorEmptyPreview = (): React.ReactElement => { + return ; + }; + + const CustomColorInvalidPreview = (): React.ReactElement => { + return ; + }; + + return ( + + + + + + + + + + + + + ); + }, +}; diff --git a/storybook/src/docs/components/ColorPicker/stories/ColorPicker.stories.tsx b/storybook/src/docs/components/ColorPicker/stories/ColorPicker.stories.tsx deleted file mode 100644 index 74027a8e32..0000000000 --- a/storybook/src/docs/components/ColorPicker/stories/ColorPicker.stories.tsx +++ /dev/null @@ -1,70 +0,0 @@ -import { FieldContainer } from "@comet/admin"; -import { ColorPicker } from "@comet/admin-color-picker"; -import { Grid } from "@mui/material"; -import * as React from "react"; - -export default { - title: "stories/components/Color Picker/Color Picker", -}; - -export const _ColorPicker = () => { - const [colorOne, setColorOne] = React.useState("#00ff00"); - const [colorTwo, setColorTwo] = React.useState("rgba(255, 127, 80, 0.75)"); - const [colorThree, setColorThree] = React.useState(); - const [colorFour, setColorFour] = React.useState(); - const [colorFive, setColorFive] = React.useState(); - - return ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - ); -}; diff --git a/storybook/src/docs/components/ColorPicker/stories/ColorPickerCustomized.stories.tsx b/storybook/src/docs/components/ColorPicker/stories/ColorPickerCustomized.stories.tsx deleted file mode 100644 index e5cda92346..0000000000 --- a/storybook/src/docs/components/ColorPicker/stories/ColorPickerCustomized.stories.tsx +++ /dev/null @@ -1,75 +0,0 @@ -import { FieldContainer } from "@comet/admin"; -import { ColorPicker, ColorPickerColorPreviewProps } from "@comet/admin-color-picker"; -import { StateFilled, StateRing, Warning } from "@comet/admin-icons"; -import { Grid } from "@mui/material"; -import * as React from "react"; - -export default { - title: "stories/components/Color Picker/Color Picker Customized", -}; - -export const ColorPickerCustomized = () => { - const [colorOne, setColorOne] = React.useState("#00ff00"); - const [colorTwo, setColorTwo] = React.useState(); - - const CustomColorPreview = ({ color }: ColorPickerColorPreviewProps): React.ReactElement => { - return ; - }; - - const CustomColorEmptyPreview = (): React.ReactElement => { - return ; - }; - - const CustomColorInvalidPreview = (): React.ReactElement => { - return ; - }; - - return ( - - - - - - - - - - - - - ); -}; diff --git a/storybook/src/docs/components/ColorPicker/stories/ColorPickerFinalForm.stories.tsx b/storybook/src/docs/components/ColorPicker/stories/ColorPickerFinalForm.stories.tsx deleted file mode 100644 index 1f22cc946e..0000000000 --- a/storybook/src/docs/components/ColorPicker/stories/ColorPickerFinalForm.stories.tsx +++ /dev/null @@ -1,60 +0,0 @@ -import { Field } from "@comet/admin"; -import { FinalFormColorPicker } from "@comet/admin-color-picker"; -import { Grid } from "@mui/material"; -import * as React from "react"; -import { Form } from "react-final-form"; - -export default { - title: "stories/components/Color Picker/Color Picker Final Form", -}; - -export const ColorPickerFinalForm = () => { - return ( -
{}}> - {() => ( - - - - - - - - - - - - - - - - - - )} -
- ); -}; diff --git a/storybook/src/docs/components/ContentOverflow/BasicUsage.stories.tsx b/storybook/src/docs/components/ContentOverflow/BasicUsage.stories.tsx deleted file mode 100644 index 5827bc3744..0000000000 --- a/storybook/src/docs/components/ContentOverflow/BasicUsage.stories.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import { ContentOverflow } from "@comet/admin"; -import { Box, Link, Paper, Typography, TypographyProps } from "@mui/material"; -import {} from "@mui/system"; -import * as React from "react"; - -export default { - title: "stories/components/ContentOverflow", -}; - -export const BasicUsage = { - render: () => { - const DummyParagraph = (p: TypographyProps) => ( - - Curabitur blandit tempus porttitor. Nullam id dolor{" "} - - this is a link - {" "} - id nibh ultricies vehicula ut id elit. Cras mattis consectetur purus sit amet fermentum. Fusce dapibus, tellus ac cursus commodo, - tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. - - ); - - const DummyImage = () => ( - ({ - aspectRatio: "21 / 9", - backgroundColor: palette.grey[100], - display: "flex", - justifyContent: "center", - alignItems: "center", - mb: 4, - })} - > - This could be an image. - - ); - - return ( - - - - Ornare Inceptos Egestas Bibendum - - - - - - - - - - - ); - }, - - name: "Basic usage", -}; diff --git a/storybook/src/docs/components/ContentOverflow/ContentOverflow.stories.mdx b/storybook/src/docs/components/ContentOverflow/ContentOverflow.mdx similarity index 77% rename from storybook/src/docs/components/ContentOverflow/ContentOverflow.stories.mdx rename to storybook/src/docs/components/ContentOverflow/ContentOverflow.mdx index 70a652e05c..3c5328435f 100644 --- a/storybook/src/docs/components/ContentOverflow/ContentOverflow.stories.mdx +++ b/storybook/src/docs/components/ContentOverflow/ContentOverflow.mdx @@ -1,6 +1,8 @@ import { Meta, Story, Canvas } from "@storybook/addon-docs"; - +import * as ContentOverflowStories from "./ContentOverflow.stories"; + + # ContentOverflow @@ -25,11 +27,11 @@ If used outside a `DataGrid`, the height must be limited by a parent container, ## Basic Usage - + ## Usage inside `DataGrid` - + diff --git a/storybook/src/docs/components/ContentOverflow/DataGrid.stories.tsx b/storybook/src/docs/components/ContentOverflow/ContentOverflow.stories.tsx similarity index 53% rename from storybook/src/docs/components/ContentOverflow/DataGrid.stories.tsx rename to storybook/src/docs/components/ContentOverflow/ContentOverflow.stories.tsx index e3ed03639a..0d67638fe3 100644 --- a/storybook/src/docs/components/ContentOverflow/DataGrid.stories.tsx +++ b/storybook/src/docs/components/ContentOverflow/ContentOverflow.stories.tsx @@ -1,10 +1,59 @@ import { ContentOverflow, GridColDef } from "@comet/admin"; -import { Typography } from "@mui/material"; +import { Box, Link, Paper, Typography, TypographyProps } from "@mui/material"; +import {} from "@mui/system"; import { DataGrid } from "@mui/x-data-grid"; import * as React from "react"; export default { - title: "stories/components/ContentOverflow", + title: "Docs/Components/ContentOverflow", +}; + +export const BasicUsage = { + render: () => { + const DummyParagraph = (p: TypographyProps) => ( + + Curabitur blandit tempus porttitor. Nullam id dolor{" "} + + this is a link + {" "} + id nibh ultricies vehicula ut id elit. Cras mattis consectetur purus sit amet fermentum. Fusce dapibus, tellus ac cursus commodo, + tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. + + ); + + const DummyImage = () => ( + ({ + aspectRatio: "21 / 9", + backgroundColor: palette.grey[100], + display: "flex", + justifyContent: "center", + alignItems: "center", + mb: 4, + })} + > + This could be an image. + + ); + + return ( + + + + Ornare Inceptos Egestas Bibendum + + + + + + + + + + + ); + }, + name: "Basic usage", }; export const InDataGrid = { @@ -54,6 +103,5 @@ export const InDataGrid = { return ; }, - name: "In DataGrid", }; diff --git a/storybook/src/docs/components/CopyToClipboardButton/CopyToClipboardButton.mdx b/storybook/src/docs/components/CopyToClipboardButton/CopyToClipboardButton.mdx new file mode 100644 index 0000000000..2c7258588d --- /dev/null +++ b/storybook/src/docs/components/CopyToClipboardButton/CopyToClipboardButton.mdx @@ -0,0 +1,13 @@ +import { Meta, Canvas, Story } from "@storybook/addon-docs"; + +import * as CopyToClipboardButtonStories from "./CopyToClipboardButton.stories"; + + + +# CopyToClipboardButton + +A user-friendly way for the user to copy a string to the clipboard. + + + + diff --git a/storybook/src/docs/components/CopyToClipboardButton/CopyToClipboardButton.stories.mdx b/storybook/src/docs/components/CopyToClipboardButton/CopyToClipboardButton.stories.mdx deleted file mode 100644 index 74c5c3f1bd..0000000000 --- a/storybook/src/docs/components/CopyToClipboardButton/CopyToClipboardButton.stories.mdx +++ /dev/null @@ -1,11 +0,0 @@ -import { Meta, Canvas, Story } from "@storybook/addon-docs"; - - - -# CopyToClipboardButton - -A user-friendly way for the user to copy a string to the clipboard. - - - - diff --git a/storybook/src/docs/components/CopyToClipboardButton/CopyToClipboardButton.stories.tsx b/storybook/src/docs/components/CopyToClipboardButton/CopyToClipboardButton.stories.tsx index 4da7453355..8a8e5347cd 100644 --- a/storybook/src/docs/components/CopyToClipboardButton/CopyToClipboardButton.stories.tsx +++ b/storybook/src/docs/components/CopyToClipboardButton/CopyToClipboardButton.stories.tsx @@ -3,10 +3,10 @@ import { Card, CardContent, Grid, Typography, useTheme } from "@mui/material"; import * as React from "react"; export default { - title: "stories/components/CopyToClipboardButton", + title: "Docs/Components/CopyToClipboardButton", }; -export const _CopyToClipboardButton = { +export const Basic = { render: () => { const { typography: { fontWeightMedium }, @@ -37,6 +37,5 @@ export const _CopyToClipboardButton = { ); }, - name: "CopyToClipboardButton", }; diff --git a/storybook/src/docs/components/DataGrid/DataGrid.stories.mdx b/storybook/src/docs/components/DataGrid/DataGrid.mdx similarity index 90% rename from storybook/src/docs/components/DataGrid/DataGrid.stories.mdx rename to storybook/src/docs/components/DataGrid/DataGrid.mdx index b58d84ade1..a470805e9d 100644 --- a/storybook/src/docs/components/DataGrid/DataGrid.stories.mdx +++ b/storybook/src/docs/components/DataGrid/DataGrid.mdx @@ -1,6 +1,8 @@ import { Meta, Canvas, Story } from "@storybook/addon-docs"; - +import * as DataGridStories from "./DataGrid.stories"; + + # DataGrid @@ -28,19 +30,19 @@ It's up to the application code to pass filterModel, sortModel and page/pageSize #### Example - + #### Example Initial Sort - + #### Example Initial Filter - + ## usePersistentColumnState @@ -63,7 +65,7 @@ Supported states: #### Example - + ## useBufferedRowCount @@ -84,7 +86,7 @@ Hook for excel export functionality. To use it, the following steps are necessar Typical Usage Example: - + ## Responsive column visibility @@ -100,7 +102,7 @@ In this example, the `First name` and `Last name` columns are combined into a si Since the `ID` column has no `visible` setting, it will always be shown. - + ## GridFilterButton @@ -108,7 +110,7 @@ Since the `ID` column has no `visible` setting, it will always be shown. Small Component that can be placed in the Toolbar that will show the Filter. Must be used as DataGrid child as shown in the story below. - + ## CrudContextMenu @@ -122,7 +124,7 @@ Component that can be rendered as ContextMenu in a row that has some basic CRUD - `refetchQueries: RefetchQueriesOptions["include"];`: called on apollo after executing delete or paste - + ## CrudMoreActionsMenu @@ -140,7 +142,7 @@ The `ActionItem` type has the following properties: - `divider?: boolean`: If true, a divider will be displayed below the action. - + ## DataGrid to Comet Graphl API Converter diff --git a/storybook/src/docs/components/DataGrid/DataGrid.stories.tsx b/storybook/src/docs/components/DataGrid/DataGrid.stories.tsx index 57af0650f1..1081c125a2 100644 --- a/storybook/src/docs/components/DataGrid/DataGrid.stories.tsx +++ b/storybook/src/docs/components/DataGrid/DataGrid.stories.tsx @@ -74,7 +74,7 @@ const exampleColumns: GridColDef[] = [ ]; export default { - title: "stories/components/DataGrid", + title: "Docs/Components/DataGrid", decorators: [storyRouterDecorator(), apolloStoryDecorator("/graphql")], }; @@ -128,7 +128,6 @@ export const UseDataGridRemote = { ); }, - name: "useDataGridRemote", }; @@ -182,7 +181,6 @@ export const UseDataGridRemoteInitialSort = { ); }, - name: "useDataGridRemoteInitialSort", }; @@ -239,7 +237,6 @@ export const UseDataGridRemoteInitialFilter = { ); }, - name: "useDataGridRemoteInitialFilter", }; @@ -253,7 +250,6 @@ export const UsePersistentColumnState = { ); }, - name: "usePersistentColumnState", }; @@ -291,8 +287,7 @@ export const ResponsiveColumns = { return ; }, - - name: "responsiveColumns", + name: "Responsive columns", }; export const _GridFilterButton = { @@ -320,7 +315,6 @@ export const _GridFilterButton = { ); }, - name: "GridFilterButton", }; @@ -392,7 +386,6 @@ export const _CrudContextMenu = { ); }, - name: "CrudContextMenu", }; @@ -507,7 +500,6 @@ export const UseDataGridExcelExport = { ); }, - name: "useDataGridExcelExport", }; @@ -585,6 +577,5 @@ export const _CrudMoreActionsMenu = { ); }, - name: "CrudMoreActionsMenu", }; diff --git a/storybook/src/docs/components/EditDialog/EditDialog.stories.mdx b/storybook/src/docs/components/EditDialog/EditDialog.mdx similarity index 74% rename from storybook/src/docs/components/EditDialog/EditDialog.stories.mdx rename to storybook/src/docs/components/EditDialog/EditDialog.mdx index 5ecf04fa26..b5c79ab0e9 100644 --- a/storybook/src/docs/components/EditDialog/EditDialog.stories.mdx +++ b/storybook/src/docs/components/EditDialog/EditDialog.mdx @@ -1,8 +1,9 @@ import { Meta, Story, Canvas, Source } from "@storybook/addon-docs"; - import dedent from "ts-dedent"; - +import * as EditDialogStories from "./EditDialog.stories"; + + # Edit Dialog @@ -19,7 +20,7 @@ The recommended way is to use the `useEditDialog` hook. It returns an instance of `EditDialog` and the corresponding `editDialogApi`. - + ### 2) EditDialog Component @@ -28,7 +29,7 @@ Alternatively, you can import the `EditDialog` component from `@comet/admin` and To gain access to the `editDialogApi`, you need to attach a ref to the component. - + ## useEditDialogApi and EditDialogApiContext @@ -38,7 +39,7 @@ As a prerequisite, you need to pass the `editDialogApi` to the `EditDialogApiCon in the component tree. - + ## Form in EditDialog @@ -47,7 +48,7 @@ The `EditDialog` typically contains a form for editing a resource. When submitting the changes to an API via GraphQL mutation, the loading and error states are displayed automatically by the `SaveButton`. - + ## EditDialog and Table @@ -55,7 +56,7 @@ When submitting the changes to an API via GraphQL mutation, the loading and erro The most common use case for an EditDialog is for editing single rows in a table. - + ## EditDialog and Selection API @@ -76,11 +77,11 @@ The `id` then specifies which resource is edited and is appended to the URL (e.g ### Example with useEditDialog (Recommended) - + ### Example with EditDialog Component - + diff --git a/storybook/src/docs/components/EditDialog/EditDialog.stories.tsx b/storybook/src/docs/components/EditDialog/EditDialog.stories.tsx new file mode 100644 index 0000000000..33d258dd7e --- /dev/null +++ b/storybook/src/docs/components/EditDialog/EditDialog.stories.tsx @@ -0,0 +1,421 @@ +import { + EditDialog, + EditDialogApiContext, + Field, + FinalForm, + FinalFormInput, + FinalFormSelect, + IEditDialogApi, + ISelectionApi, + Table, + Toolbar, + ToolbarFillSpace, + ToolbarItem, + useEditDialog, + useEditDialogApi, +} from "@comet/admin"; +import { Button, MenuItem, Typography } from "@mui/material"; +import * as React from "react"; +import { useLocation } from "react-router"; +import { v4 as uuid } from "uuid"; + +import { editDialogDecorator } from "./editDialog.decorator"; + +export default { + title: "Docs/Components/Edit Dialog", + decorators: [editDialogDecorator()], +}; + +export const Hook = { + render: () => { + const [EditDialog, , editDialogApi] = useEditDialog(); + + return ( + <> +

useEditDialog Variant:

+ + + { + window.alert(`Name: ${name}`); + }} + > + + + + + ); + }, + name: "useEditDialog", +}; + +export const Component = { + render: () => { + const editDialogApi = React.useRef(null); + + return ( + <> +

EditDialog Component Variant:

+ + + {() => { + return ( + { + window.alert(`Name: ${name}`); + }} + > + + + ); + }} + + + ); + }, + name: "EditDialog", +}; + +export const UseEditDialogApi = { + render: () => { + const ChildComponentWithOpenButton: React.VoidFunctionComponent = () => { + const editDialogApi = useEditDialogApi(); + + return ( + + ); + }; + + const [EditDialog, , editDialogApi] = useEditDialog(); + + return ( + + + + { + window.alert(`Name: ${name}`); + }} + > + + + + + ); + }, + name: "useEditDialogApi", +}; + +export const WithForm = { + render: () => { + const [EditDialog, , editDialogApi] = useEditDialog(); + + return ( + <> +

Loading and Error State of EditDialog:

+ + + { + return new Promise((resolve, reject) => { + setTimeout(() => { + if (desiredOutcome === "success") { + resolve(); + } else { + reject("This is an Error Message"); + } + }, 3000); + }); + }} + initialValues={{ + desiredOutcome: "success", + }} + > + + {(props) => ( + + + Success + + Error + + )} + + + + + ); + }, + name: "EditDialog with Form", +}; + +export const WithTable = { + render: () => { + interface User { + id: string; + name: string; + } + + const [users, setUsers] = React.useState([ + { id: "8a31ea9d-d00a-4e37-807b-a69624964ba0", name: "Isabella" }, + { id: "a5baf49a-d53c-4b3f-abd4-80d2b418589d", name: "Theo" }, + { id: "29734826-06b4-491b-ada7-cf1000d95790", name: "Maria" }, + ]); + + const addUser = (name: string) => { + setUsers((users) => [ + ...users, + { + id: uuid(), + name: name, + }, + ]); + }; + + const updateUser = (id: string, name: string) => { + const idx = users.findIndex((user) => user.id === id); + + if (idx == -1) { + throw new Error("User doesn't exist"); + } + + setUsers((users) => { + const newUsers = [...users]; + newUsers[idx].name = name; + return newUsers; + }); + }; + + interface UserFormProps { + mode?: "add" | "edit"; + id?: string; + selectionApi: ISelectionApi; + } + + const UserForm: React.VoidFunctionComponent = ({ selectionApi, id, mode = "add" }) => { + const selection = { id, mode }; + const user = selection.mode === "edit" ? users.find((user) => user.id === id) : undefined; + + return ( + + mode={selection.mode} + onSubmit={async ({ name }) => { + if (selection.mode === "edit") { + updateUser(selection.id as string, name); + } else { + addUser(name); + } + }} + onAfterSubmit={() => { + selectionApi.handleDeselect(); + }} + initialValues={user} + > + + + ); + }; + + const [EditDialog, { id: selectedId, mode: selectionMode }, editDialogApi, selectionApi] = useEditDialog(); + + return ( + <> + + + + + + + { + return ( + + ); + }, + }, + ]} + /> + + + + + ); + }, + name: "EditDialog with Table", +}; + +export const SelectionWithHook = { + render: () => { + interface User { + id: string; + name: string; + } + + const users: User[] = [ + { id: "8a31ea9d-d00a-4e37-807b-a69624964ba0", name: "Isabella" }, + { id: "a5baf49a-d53c-4b3f-abd4-80d2b418589d", name: "Theo" }, + { id: "29734826-06b4-491b-ada7-cf1000d95790", name: "Maria" }, + ]; + + const location = useLocation(); + const [EditDialog, { id, mode }, editDialogApi] = useEditDialog(); + + return ( + <> +

Click on a button to see the current selection values:

+ + + + + + +
{ + return ( + + ); + }, + }, + ]} + /> + + + Mode: {mode} + + + + ID: {id} + + + + URL: {location.pathname} + + + + ); + }, + name: "EditDialog and Selection (Hook)", +}; + +export const SelectionWithComponent = { + render: () => { + interface User { + id: string; + name: string; + } + + const users: User[] = [ + { id: "8a31ea9d-d00a-4e37-807b-a69624964ba0", name: "Isabella" }, + { id: "a5baf49a-d53c-4b3f-abd4-80d2b418589d", name: "Theo" }, + { id: "29734826-06b4-491b-ada7-cf1000d95790", name: "Maria" }, + ]; + + const location = useLocation(); + const editDialogApi = React.useRef(null); + + return ( + <> +

Click on a button to see the current selection values:

+ + + + + + +
{ + return ( + + ); + }, + }, + ]} + /> + + {({ selectionMode, selectedId }) => { + return ( + <> + + Mode: {selectionMode} + + + + ID: {selectedId} + + + + URL: {location.pathname} + + + ); + }} + + + ); + }, + + name: "EditDialog and Selection (Component)", +}; diff --git a/storybook/src/docs/components/EditDialog/stories/EditDialog.stories.tsx b/storybook/src/docs/components/EditDialog/stories/EditDialog.stories.tsx deleted file mode 100644 index 3434eae04d..0000000000 --- a/storybook/src/docs/components/EditDialog/stories/EditDialog.stories.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { EditDialog, Field, FinalForm, FinalFormInput, IEditDialogApi } from "@comet/admin"; -import { Button } from "@mui/material"; -import * as React from "react"; - -import { editDialogDecorator } from "../editDialog.decorator"; - -export default { - title: "stories/components/EditDialog/Edit Dialog", - decorators: [editDialogDecorator()], -}; - -export const _EditDialog = () => { - const editDialogApi = React.useRef(null); - - return ( - <> -

EditDialog Component Variant:

- - - {() => { - return ( - { - window.alert(`Name: ${name}`); - }} - > - - - ); - }} - - - ); -}; diff --git a/storybook/src/docs/components/EditDialog/stories/EditDialogAndSelection.stories.tsx b/storybook/src/docs/components/EditDialog/stories/EditDialogAndSelection.stories.tsx deleted file mode 100644 index 24733d3462..0000000000 --- a/storybook/src/docs/components/EditDialog/stories/EditDialogAndSelection.stories.tsx +++ /dev/null @@ -1,88 +0,0 @@ -import { EditDialog, IEditDialogApi, Table, Toolbar, ToolbarFillSpace, ToolbarItem } from "@comet/admin"; -import { Button, Typography } from "@mui/material"; -import * as React from "react"; -import { useLocation } from "react-router"; - -import { editDialogDecorator } from "../editDialog.decorator"; - -interface User { - id: string; - name: string; -} - -const users: User[] = [ - { id: "8a31ea9d-d00a-4e37-807b-a69624964ba0", name: "Isabella" }, - { id: "a5baf49a-d53c-4b3f-abd4-80d2b418589d", name: "Theo" }, - { id: "29734826-06b4-491b-ada7-cf1000d95790", name: "Maria" }, -]; - -export default { - title: "stories/components/EditDialog/Edit Dialog and Selection (EditDialog Component)", - decorators: [editDialogDecorator()], -}; - -export const EditDialogAndSelectionEditDialogComponent = { - render: () => { - const location = useLocation(); - const editDialogApi = React.useRef(null); - - return ( - <> -

Click on a button to see the current selection values:

- - - - - - -
{ - return ( - - ); - }, - }, - ]} - /> - - {({ selectionMode, selectedId }) => { - return ( - <> - - Mode: {selectionMode} - - - - ID: {selectedId} - - - - URL: {location.pathname} - - - ); - }} - - - ); - }, - - name: "Edit Dialog and Selection (EditDialog Component)", -}; diff --git a/storybook/src/docs/components/EditDialog/stories/EditDialogAndSelectionWithUseEditDialog.stories.tsx b/storybook/src/docs/components/EditDialog/stories/EditDialogAndSelectionWithUseEditDialog.stories.tsx deleted file mode 100644 index 3f89009f63..0000000000 --- a/storybook/src/docs/components/EditDialog/stories/EditDialogAndSelectionWithUseEditDialog.stories.tsx +++ /dev/null @@ -1,82 +0,0 @@ -import { Table, Toolbar, ToolbarFillSpace, ToolbarItem, useEditDialog } from "@comet/admin"; -import { Button, Typography } from "@mui/material"; -import * as React from "react"; -import { useLocation } from "react-router"; - -import { editDialogDecorator } from "../editDialog.decorator"; - -interface User { - id: string; - name: string; -} - -const users: User[] = [ - { id: "8a31ea9d-d00a-4e37-807b-a69624964ba0", name: "Isabella" }, - { id: "a5baf49a-d53c-4b3f-abd4-80d2b418589d", name: "Theo" }, - { id: "29734826-06b4-491b-ada7-cf1000d95790", name: "Maria" }, -]; - -export default { - title: "stories/components/EditDialog/Edit Dialog and Selection (useEditDialog)", - decorators: [editDialogDecorator()], -}; - -export const EditDialogAndSelectionUseEditDialog = { - render: () => { - const location = useLocation(); - const [EditDialog, { id, mode }, editDialogApi] = useEditDialog(); - - return ( - <> -

Click on a button to see the current selection values:

- - - - - - -
{ - return ( - - ); - }, - }, - ]} - /> - - - Mode: {mode} - - - - ID: {id} - - - - URL: {location.pathname} - - - - ); - }, - - name: "Edit Dialog and Selection (useEditDialog)", -}; diff --git a/storybook/src/docs/components/EditDialog/stories/EditDialogUserTable.stories.tsx b/storybook/src/docs/components/EditDialog/stories/EditDialogUserTable.stories.tsx deleted file mode 100644 index 3a4135a454..0000000000 --- a/storybook/src/docs/components/EditDialog/stories/EditDialogUserTable.stories.tsx +++ /dev/null @@ -1,119 +0,0 @@ -import { Field, FinalForm, FinalFormInput, ISelectionApi, Table, Toolbar, ToolbarFillSpace, ToolbarItem, useEditDialog } from "@comet/admin"; -import { Button } from "@mui/material"; -import * as React from "react"; -import { v4 as uuid } from "uuid"; - -import { editDialogDecorator } from "../editDialog.decorator"; - -interface User { - id: string; - name: string; -} - -const users: User[] = [ - { id: "8a31ea9d-d00a-4e37-807b-a69624964ba0", name: "Isabella" }, - { id: "a5baf49a-d53c-4b3f-abd4-80d2b418589d", name: "Theo" }, - { id: "29734826-06b4-491b-ada7-cf1000d95790", name: "Maria" }, -]; - -const getUsers = (): User[] => users; -const getUser = (id: string): User | undefined => { - return users.find((user) => user.id === id); -}; -const addUser = (name: string): User[] => { - users.push({ - id: uuid(), - name: name, - }); - return users; -}; -const updateUser = (id: string, name: string): User => { - const idx = users.findIndex((user) => user.id === id); - - if (idx == -1) { - throw new Error("User doesn't exist"); - } - - users[idx].name = name; - return users[idx]; -}; - -interface UserFormProps { - mode?: "add" | "edit"; - id?: string; - selectionApi: ISelectionApi; -} - -export default { - title: "stories/components/EditDialog/Edit Dialog User Table", - decorators: [editDialogDecorator()], -}; - -export const EditDialogUserTable = () => { - const UserForm: React.VoidFunctionComponent = ({ selectionApi, id, mode = "add" }) => { - const selection = { id, mode }; - const user = selection.mode === "edit" ? getUser(selection.id as string) : undefined; - - return ( - - mode={selection.mode} - onSubmit={async ({ name }) => { - if (selection.mode === "edit") { - updateUser(selection.id as string, name); - } else { - addUser(name); - } - }} - onAfterSubmit={() => { - selectionApi.handleDeselect(); - }} - initialValues={user} - > - - - ); - }; - - const [EditDialog, { id: selectedId, mode: selectionMode }, editDialogApi, selectionApi] = useEditDialog(); - const users = getUsers(); - - return ( - <> - - - - - - -
{ - return ( - - ); - }, - }, - ]} - /> - - - - - ); -}; diff --git a/storybook/src/docs/components/EditDialog/stories/FormInEditDialog.stories.tsx b/storybook/src/docs/components/EditDialog/stories/FormInEditDialog.stories.tsx deleted file mode 100644 index ddcff61866..0000000000 --- a/storybook/src/docs/components/EditDialog/stories/FormInEditDialog.stories.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import { Field, FinalForm, FinalFormSelect, useEditDialog } from "@comet/admin"; -import { Button, MenuItem } from "@mui/material"; -import * as React from "react"; - -import { editDialogDecorator } from "../editDialog.decorator"; - -export default { - title: "stories/components/EditDialog/Form in EditDialog", - decorators: [editDialogDecorator()], -}; - -export const EditDialogAndFormStates = { - render: () => { - const [EditDialog, , editDialogApi] = useEditDialog(); - - return ( - <> -

Loading and Error State of EditDialog:

- - - { - return new Promise((resolve, reject) => { - setTimeout(() => { - if (desiredOutcome === "success") { - resolve(); - } else { - reject("This is an Error Message"); - } - }, 3000); - }); - }} - initialValues={{ - desiredOutcome: "success", - }} - > - - {(props) => ( - - - Success - - Error - - )} - - - - - ); - }, - - name: "Edit Dialog and Form States", -}; diff --git a/storybook/src/docs/components/EditDialog/stories/useEditDialog.stories.tsx b/storybook/src/docs/components/EditDialog/stories/useEditDialog.stories.tsx deleted file mode 100644 index 39f77eac74..0000000000 --- a/storybook/src/docs/components/EditDialog/stories/useEditDialog.stories.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { Field, FinalForm, FinalFormInput, useEditDialog } from "@comet/admin"; -import { Button } from "@mui/material"; -import * as React from "react"; - -import { editDialogDecorator } from "../editDialog.decorator"; - -export default { - title: "stories/components/EditDialog/useEditDialog", - decorators: [editDialogDecorator()], -}; - -export const UseEditDialog = { - render: () => { - const [EditDialog, , editDialogApi] = useEditDialog(); - - return ( - <> -

useEditDialog Variant:

- - - { - window.alert(`Name: ${name}`); - }} - > - - - - - ); - }, - - name: "useEditDialog", -}; diff --git a/storybook/src/docs/components/EditDialog/stories/useEditDialogApi.stories.tsx b/storybook/src/docs/components/EditDialog/stories/useEditDialogApi.stories.tsx deleted file mode 100644 index b89a80eb4b..0000000000 --- a/storybook/src/docs/components/EditDialog/stories/useEditDialogApi.stories.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import { EditDialogApiContext, Field, FinalForm, FinalFormInput, useEditDialog, useEditDialogApi } from "@comet/admin"; -import { Button } from "@mui/material"; -import * as React from "react"; - -import { editDialogDecorator } from "../editDialog.decorator"; - -export default { - title: "stories/components/EditDialog/useEditDialogApi", - decorators: [editDialogDecorator()], -}; - -export const UseEditDialogApi = { - render: () => { - const ChildComponentWithOpenButton: React.VoidFunctionComponent = () => { - const editDialogApi = useEditDialogApi(); - - return ( - - ); - }; - - const [EditDialog, , editDialogApi] = useEditDialog(); - - return ( - - - - { - window.alert(`Name: ${name}`); - }} - > - - - - - ); - }, - - name: "useEditDialogApi", -}; diff --git a/storybook/src/docs/components/ErrorHandling/ErrorBoundaries.stories.mdx b/storybook/src/docs/components/ErrorHandling/ErrorBoundaries.mdx similarity index 100% rename from storybook/src/docs/components/ErrorHandling/ErrorBoundaries.stories.mdx rename to storybook/src/docs/components/ErrorHandling/ErrorBoundaries.mdx diff --git a/storybook/src/docs/components/ErrorHandling/ErrorDialog/ErrorDialog.stories.mdx b/storybook/src/docs/components/ErrorHandling/ErrorDialog/ErrorDialog.mdx similarity index 80% rename from storybook/src/docs/components/ErrorHandling/ErrorDialog/ErrorDialog.stories.mdx rename to storybook/src/docs/components/ErrorHandling/ErrorDialog/ErrorDialog.mdx index 2fed1aa6ef..7910dd1eb0 100644 --- a/storybook/src/docs/components/ErrorHandling/ErrorDialog/ErrorDialog.stories.mdx +++ b/storybook/src/docs/components/ErrorHandling/ErrorDialog/ErrorDialog.mdx @@ -1,6 +1,8 @@ import { Meta, Canvas, Story } from "@storybook/addon-docs"; - +import * as ErrorDialogStories from "./ErrorDialog.stories"; + + # Error Dialog @@ -49,11 +51,11 @@ return new ApolloClient({ Error Dialog can be used to display an error in a dialog. Try it out by simply pressing the Button below. You can also use the errorDialog with the `useErrorDialog` Hook - + ### Automatic Error Dialog on GraphQL Error - + diff --git a/storybook/src/docs/components/ErrorHandling/ErrorDialog/stories/AutomaticGraphqlErrorDialog.stories.tsx b/storybook/src/docs/components/ErrorHandling/ErrorDialog/ErrorDialog.stories.tsx similarity index 62% rename from storybook/src/docs/components/ErrorHandling/ErrorDialog/stories/AutomaticGraphqlErrorDialog.stories.tsx rename to storybook/src/docs/components/ErrorHandling/ErrorDialog/ErrorDialog.stories.tsx index 43d52a9360..71b51ba764 100644 --- a/storybook/src/docs/components/ErrorHandling/ErrorDialog/stories/AutomaticGraphqlErrorDialog.stories.tsx +++ b/storybook/src/docs/components/ErrorHandling/ErrorDialog/ErrorDialog.stories.tsx @@ -1,16 +1,42 @@ -import { useQuery } from "@apollo/client"; +import { gql, useQuery } from "@apollo/client"; +import { useErrorDialog } from "@comet/admin"; import { Button, Typography } from "@mui/material"; -import gql from "graphql-tag"; import * as React from "react"; -import { apolloSwapiStoryDecorator } from "../../../../../apollo-story.decorator"; -import { errorDialogStoryProviderDecorator } from "../error-dialog-provider.decorator"; +import { apolloSwapiStoryDecorator } from "../../../../apollo-story.decorator"; +import { errorDialogStoryProviderDecorator } from "./error-dialog-provider.decorator"; export default { - title: "stories/components/Error Handling/Error Dialog/Automatic Graphql Error Dialog", + title: "Docs/Components/Error Handling/Error Dialog", decorators: [apolloSwapiStoryDecorator(), errorDialogStoryProviderDecorator()], }; +export const ManualErrorDialog = { + render: () => { + const Story = () => { + const errorDialog = useErrorDialog(); + return ( +
+ +
+ ); + }; + return ; + }, +}; + export const AutomaticErrorOnGraphqlError = { render: () => { const Story = () => { @@ -56,6 +82,5 @@ export const AutomaticErrorOnGraphqlError = { }; return ; }, - name: "Automatic Error on Graphql Error", }; diff --git a/storybook/src/docs/components/ErrorHandling/ErrorDialog/stories/ManualErrorDialog.stories.tsx b/storybook/src/docs/components/ErrorHandling/ErrorDialog/stories/ManualErrorDialog.stories.tsx deleted file mode 100644 index 6cae3dabec..0000000000 --- a/storybook/src/docs/components/ErrorHandling/ErrorDialog/stories/ManualErrorDialog.stories.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import { useErrorDialog } from "@comet/admin"; -import { Button } from "@mui/material"; -import * as React from "react"; - -import { apolloSwapiStoryDecorator } from "../../../../../apollo-story.decorator"; -import { errorDialogStoryProviderDecorator } from "../error-dialog-provider.decorator"; - -export default { - title: "stories/components/Error Handling/Error Dialog/Automatic Graphql Error Dialog", - decorators: [apolloSwapiStoryDecorator(), errorDialogStoryProviderDecorator()], -}; - -export const ManualErrorDialog = () => { - const Story = () => { - const errorDialog = useErrorDialog(); - return ( -
- -
- ); - }; - return ; -}; diff --git a/storybook/src/docs/components/FileDropzone/FileDropzone.stories.mdx b/storybook/src/docs/components/FileDropzone/FileDropzone.mdx similarity index 72% rename from storybook/src/docs/components/FileDropzone/FileDropzone.stories.mdx rename to storybook/src/docs/components/FileDropzone/FileDropzone.mdx index 1d2d27949f..653037520e 100644 --- a/storybook/src/docs/components/FileDropzone/FileDropzone.stories.mdx +++ b/storybook/src/docs/components/FileDropzone/FileDropzone.mdx @@ -1,6 +1,8 @@ import { Meta, Canvas, Story } from "@storybook/addon-docs"; - +import * as FileDropzoneStories from "./FileDropzone.stories"; + + # FileDropzone @@ -13,11 +15,11 @@ A wrapper around [react-dropzone](https://www.npmjs.com/package/react-dropzone) - Use the `hideDroppableArea` and `hideButton` props to hide the droppable area and button, respectively. - + ### Example of disabled and error states - + diff --git a/storybook/src/docs/components/FileDropzone/FileDropzone.stories.tsx b/storybook/src/docs/components/FileDropzone/FileDropzone.stories.tsx index b8593006b2..f2634e7d81 100644 --- a/storybook/src/docs/components/FileDropzone/FileDropzone.stories.tsx +++ b/storybook/src/docs/components/FileDropzone/FileDropzone.stories.tsx @@ -4,8 +4,7 @@ import { Meta } from "@storybook/react"; import * as React from "react"; export default { - title: "stories/components/FileDropzone", - + title: "Docs/Components/FileDropzone", decorators: [ (story) => ( @@ -19,14 +18,16 @@ export default { ], } as Meta; -export const Default = () => { - return ( - { - // Handle what happens with the dropped files - }} - /> - ); +export const Default = { + render: () => { + return ( + { + // Handle what happens with the dropped files + }} + /> + ); + }, }; export const DisabledAndErrorStates = { @@ -48,6 +49,5 @@ export const DisabledAndErrorStates = { ); }, - name: "Disabled and error states", }; diff --git a/storybook/src/docs/components/FileSelect/FileSelect.stories.mdx b/storybook/src/docs/components/FileSelect/FileSelect.mdx similarity index 80% rename from storybook/src/docs/components/FileSelect/FileSelect.stories.mdx rename to storybook/src/docs/components/FileSelect/FileSelect.mdx index fd52d87c0a..591820d36c 100644 --- a/storybook/src/docs/components/FileSelect/FileSelect.stories.mdx +++ b/storybook/src/docs/components/FileSelect/FileSelect.mdx @@ -1,7 +1,9 @@ import { Meta, Canvas, Story } from "@storybook/addon-docs"; import { components } from "@storybook/components"; - +import * as FileSelectStories from "./FileSelect.stories"; + + # FileSelect @@ -16,17 +18,17 @@ Used to combine `FileDropzone` and `FileSelectListItem` to handle the user's sel - Limit the amount of files and the size of the individual files with the `maxFiles` and `maxFileSize` props. - + ### ReadOnly FileSelect - + ### ReadOnly FileSelect (Grid with preview) - + diff --git a/storybook/src/docs/components/FileSelect/FileSelect.stories.tsx b/storybook/src/docs/components/FileSelect/FileSelect.stories.tsx index 9e6cb912d4..5d9eb5bbf9 100644 --- a/storybook/src/docs/components/FileSelect/FileSelect.stories.tsx +++ b/storybook/src/docs/components/FileSelect/FileSelect.stories.tsx @@ -4,8 +4,7 @@ import { Meta } from "@storybook/react"; import * as React from "react"; export default { - title: "stories/components/FileSelect", - + title: "Docs/Components/FileSelect", decorators: [ (story) => ( @@ -15,7 +14,7 @@ export default { ], } as Meta; -export const _FileSelect = { +export const Basic = { render: () => { const value: FileSelectItem[] = [ { @@ -54,11 +53,10 @@ export const _FileSelect = { /> ); }, - name: "FileSelect", }; -export const ReadOnlyFileSelect = { +export const Readonly = { render: () => { const value: FileSelectItem[] = [ { @@ -81,7 +79,6 @@ export const ReadOnlyFileSelect = { /> ); }, - name: "ReadOnly FileSelect", }; @@ -125,6 +122,5 @@ export const GridWithPreview = { /> ); }, - name: "Grid with preview", }; diff --git a/storybook/src/docs/components/FileSelectListItem/FileSelectListItem.stories.mdx b/storybook/src/docs/components/FileSelectListItem/FileSelectListItem.mdx similarity index 82% rename from storybook/src/docs/components/FileSelectListItem/FileSelectListItem.stories.mdx rename to storybook/src/docs/components/FileSelectListItem/FileSelectListItem.mdx index aedebbc7b3..686f2a6be6 100644 --- a/storybook/src/docs/components/FileSelectListItem/FileSelectListItem.stories.mdx +++ b/storybook/src/docs/components/FileSelectListItem/FileSelectListItem.mdx @@ -1,6 +1,8 @@ import { Meta, Canvas, Story } from "@storybook/addon-docs"; - +import * as FileSelectListItemStories from "./FileSelectListItem.stories"; + + # FileSelectListItem @@ -17,11 +19,11 @@ Used to display a list of files, including loading, skeleton, and error states a - Set the `filePreview` prop to `true` or pass in a image url to display the item as a card with a preview. - + ### File preview card - + diff --git a/storybook/src/docs/components/FileSelectListItem/FileSelectListItem.stories.tsx b/storybook/src/docs/components/FileSelectListItem/FileSelectListItem.stories.tsx index fa7ea91e96..882afc6fdf 100644 --- a/storybook/src/docs/components/FileSelectListItem/FileSelectListItem.stories.tsx +++ b/storybook/src/docs/components/FileSelectListItem/FileSelectListItem.stories.tsx @@ -4,8 +4,7 @@ import { Meta } from "@storybook/react"; import * as React from "react"; export default { - title: "stories/components/FileSelectListItem", - + title: "Docs/Components/FileSelectListItem", decorators: [ (story) => ( @@ -15,7 +14,7 @@ export default { ], } as Meta; -export const _FileSelectListItem = { +export const Basic = { render: () => { return ( <> @@ -77,66 +76,68 @@ export const _FileSelectListItem = { name: "FileSelectListItem", }; -export const Preview = () => { - return ( - - - { - // Handle download - }} - onClickDelete={() => { - // Handle delete - }} - filePreview - /> - { - // Handle download - }} - onClickDelete={() => { - // Handle delete - }} - filePreview="https://picsum.photos/528/528" - /> - - - { - // Handle delete - }} - filePreview - /> - - ); +export const Preview = { + render: () => { + return ( + + + { + // Handle download + }} + onClickDelete={() => { + // Handle delete + }} + filePreview + /> + { + // Handle download + }} + onClickDelete={() => { + // Handle delete + }} + filePreview="https://picsum.photos/528/528" + /> + + + { + // Handle delete + }} + filePreview + /> + + ); + }, };