From 6d3ce1e3481f6b7d89077031f5445b9ef29e40fe Mon Sep 17 00:00:00 2001 From: Agrim Jain Date: Fri, 3 May 2024 09:09:58 +0400 Subject: [PATCH] Quill-UU-Button-Heading-Text-TextField --- docusaurus.config.js | 1 + package-lock.json | 76 +++++++++++++++++-- package.json | 2 + plugins/custom-loaders/index.js | 19 +++++ plugins/custom-loaders/package.json | 5 ++ src/components/SwipeableBottomSheet/index.tsx | 6 +- .../AppDashboardContainer/index.tsx | 2 +- .../components/AppRegister/index.tsx | 10 +-- .../dashboard/components/AppsTable/index.tsx | 6 +- .../Modals/AppRegisterSuccessModal/index.tsx | 2 +- src/theme/Root.tsx | 4 +- 11 files changed, 110 insertions(+), 23 deletions(-) create mode 100644 plugins/custom-loaders/index.js create mode 100644 plugins/custom-loaders/package.json diff --git a/docusaurus.config.js b/docusaurus.config.js index 763a13a78..bf287ce9d 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -31,6 +31,7 @@ const config = { }, plugins: [ + 'custom-loaders', '@docusaurus/theme-live-codeblock', 'docusaurus-plugin-sass', [ diff --git a/package-lock.json b/package-lock.json index 400e4b69b..32ea2bf3b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "deriv-api-docs", "version": "0.0.0", "dependencies": { + "@deriv-com/quill-ui": "^1.9.6", "@deriv/deriv-api": "^1.0.11", "@deriv/quill-design": "^1.2.18", "@deriv/quill-icons": "^1.21.3", @@ -28,6 +29,7 @@ "@use-gesture/react": "^10.3.0", "babel-plugin-jsx-remove-data-test-id": "^3.0.0", "clsx": "^1.2.1", + "custom-loaders": "file:plugins/custom-loaders", "docusaurus-plugin-sass": "^0.2.2", "identity-obj-proxy": "^3.0.0", "install": "^0.13.0", @@ -2606,6 +2608,47 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@deriv-com/quill-ui": { + "version": "1.9.6", + "resolved": "https://registry.npmjs.org/@deriv-com/quill-ui/-/quill-ui-1.9.6.tgz", + "integrity": "sha512-y6+OvuEwIt57FSuRNF1Pa5qapCV6bx0WyMuA/h/rTOcWXgiaUW37RBbYFCTejCA6bWgWT16eVx6BLb2aLEwTcw==", + "dependencies": { + "@deriv/quill-icons": "^1.19.20", + "@headlessui/react": "^1.7.18", + "react-swipeable": "^6.2.1", + "usehooks-ts": "^3.0.2", + "uuid": "^9.0.1" + }, + "optionalDependencies": { + "@rollup/rollup-linux-x64-gnu": "^4.9.6" + } + }, + "node_modules/@deriv-com/quill-ui/node_modules/usehooks-ts": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/usehooks-ts/-/usehooks-ts-3.1.0.tgz", + "integrity": "sha512-bBIa7yUyPhE1BCc0GmR96VU/15l/9gP1Ch5mYdLcFBaFGQsdmXkvjV0TtOqW1yUd6VjIwDunm+flSciCQXujiw==", + "dependencies": { + "lodash.debounce": "^4.0.8" + }, + "engines": { + "node": ">=16.15.0" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17 || ^18" + } + }, + "node_modules/@deriv-com/quill-ui/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@deriv/api-types": { "version": "1.0.80", "resolved": "https://registry.npmjs.org/@deriv/api-types/-/api-types-1.0.80.tgz", @@ -3790,7 +3833,6 @@ "version": "1.7.18", "resolved": "https://registry.npmjs.org/@headlessui/react/-/react-1.7.18.tgz", "integrity": "sha512-4i5DOrzwN4qSgNsL4Si61VMkUcWbcSKueUV7sFhpHzQcSShdlHENE5+QBntMSRvHt8NyoFO2AGG8si9lq+w4zQ==", - "peer": true, "dependencies": { "@tanstack/react-virtual": "^3.0.0-beta.60", "client-only": "^0.0.1" @@ -6541,6 +6583,18 @@ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.17.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.17.2.tgz", + "integrity": "sha512-Hy7pLwByUOuyaFC6mAr7m+oMC+V7qyifzs/nW2OJfC8H4hbCzOX07Ov0VFk/zP3kBsELWNFi7rJtgbKYsav9QQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ] + }, "node_modules/@sideway/address": { "version": "4.1.4", "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.4.tgz", @@ -6868,7 +6922,6 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/@tanstack/react-virtual/-/react-virtual-3.1.3.tgz", "integrity": "sha512-YCzcbF/Ws/uZ0q3Z6fagH+JVhx4JLvbSflgldMgLsuvB8aXjZLLb3HvrEVxY480F9wFlBiXlvQxOyXb5ENPrNA==", - "peer": true, "dependencies": { "@tanstack/virtual-core": "3.1.3" }, @@ -6885,7 +6938,6 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.1.3.tgz", "integrity": "sha512-Y5B4EYyv1j9V8LzeAoOVeTg0LI7Fo5InYKgAjkY1Pu9GjtUwX/EKxNcU7ng3sKr99WEf+bPTcktAeybyMOYo+g==", - "peer": true, "funding": { "type": "github", "url": "https://github.com/sponsors/tannerlinsley" @@ -9840,8 +9892,7 @@ "node_modules/client-only": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz", - "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==", - "peer": true + "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==" }, "node_modules/cliui": { "version": "8.0.1", @@ -10801,6 +10852,10 @@ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz", "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw==" }, + "node_modules/custom-loaders": { + "resolved": "plugins/custom-loaders", + "link": true + }, "node_modules/dargs": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz", @@ -21675,6 +21730,14 @@ } } }, + "node_modules/react-swipeable": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/react-swipeable/-/react-swipeable-6.2.2.tgz", + "integrity": "sha512-Oz7nSFrssvq2yvy05aNL3F+yBUqSvLsK6x1mu+rQFOpMdQVnt4izKt1vyjvvTb70q6GQOaSpaB6qniROW2MAzQ==", + "peerDependencies": { + "react": "^16.8.3 || ^17 || ^18" + } + }, "node_modules/react-table": { "version": "7.8.0", "resolved": "https://registry.npmjs.org/react-table/-/react-table-7.8.0.tgz", @@ -26610,6 +26673,9 @@ "type": "github", "url": "https://github.com/sponsors/wooorm" } + }, + "plugins/custom-loaders": { + "version": "0.0.0" } } } diff --git a/package.json b/package.json index d52e6dada..955afa7f7 100644 --- a/package.json +++ b/package.json @@ -21,6 +21,7 @@ "format": "prettier --write 'src/**/*.{js,jsx,ts,tsx,md,json}' --config ./.prettierrc" }, "dependencies": { + "@deriv-com/quill-ui": "^1.9.6", "@deriv/deriv-api": "^1.0.11", "@deriv/quill-design": "^1.2.18", "@deriv/quill-icons": "^1.21.3", @@ -41,6 +42,7 @@ "@use-gesture/react": "^10.3.0", "babel-plugin-jsx-remove-data-test-id": "^3.0.0", "clsx": "^1.2.1", + "custom-loaders": "file:plugins/custom-loaders", "docusaurus-plugin-sass": "^0.2.2", "identity-obj-proxy": "^3.0.0", "install": "^0.13.0", diff --git a/plugins/custom-loaders/index.js b/plugins/custom-loaders/index.js new file mode 100644 index 000000000..78e3dfa74 --- /dev/null +++ b/plugins/custom-loaders/index.js @@ -0,0 +1,19 @@ +module.exports = function (context, options) { + return { + name: 'custom-loaders', + configureWebpack(config, isServer) { + return { + module: { + rules: [ + { + test: /\.m?js/, + resolve: { + fullySpecified: false, + }, + }, + ], + }, + }; + }, + }; +}; diff --git a/plugins/custom-loaders/package.json b/plugins/custom-loaders/package.json new file mode 100644 index 000000000..18ff8e627 --- /dev/null +++ b/plugins/custom-loaders/package.json @@ -0,0 +1,5 @@ +{ + "name": "custom-loaders", + "version": "0.0.0", + "private": true +} diff --git a/src/components/SwipeableBottomSheet/index.tsx b/src/components/SwipeableBottomSheet/index.tsx index b8bd943b0..1f4121587 100644 --- a/src/components/SwipeableBottomSheet/index.tsx +++ b/src/components/SwipeableBottomSheet/index.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useRef } from 'react'; import { useDrag } from '@use-gesture/react'; import { a, useSpring, config } from '@react-spring/web'; -import { Button } from '@deriv/quill-design'; +import { Button } from '@deriv-com/quill-ui'; import './swipeable-bottom-sheet.scss'; type SwipeableBottomSheetProps = { @@ -88,7 +88,7 @@ const SwipeableBottomSheet: React.FC = ({
{primary_action && (
-
diff --git a/src/features/dashboard/components/AppsTable/index.tsx b/src/features/dashboard/components/AppsTable/index.tsx index 8ba091907..2a25af6a6 100644 --- a/src/features/dashboard/components/AppsTable/index.tsx +++ b/src/features/dashboard/components/AppsTable/index.tsx @@ -1,7 +1,7 @@ import { ApplicationObject } from '@deriv/api-types'; import React, { HTMLAttributes, useCallback, useState } from 'react'; import { Cell, Column } from 'react-table'; -import { Button, Heading, Text } from '@deriv/quill-design'; +import { Button, Heading, Text } from '@deriv-com/quill-ui'; import { LabelPairedCirclePlusMdRegularIcon } from '@deriv/quill-icons'; import useAppManager from '@site/src/hooks/useAppManager'; @@ -73,12 +73,12 @@ const AppsTableHeader: React.FC<{ is_desktop: boolean }> = ({ is_desktop }) => {