quickblox-react-ui-kit 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -324
- package/dist/CommonTypes/CommonTypes.d.ts +1 -0
- package/dist/Data/source/remote/IRemoteDataSource.d.ts +3 -0
- package/dist/Data/source/remote/RemoteDataSource.d.ts +3 -0
- package/dist/Domain/use_cases/ai/AIAnswerAssistWithSDKUseCase.d.ts +11 -0
- package/dist/Domain/use_cases/ai/AITranslateWithSDKUseCase.d.ts +12 -0
- package/dist/Presentation/Views/Dialog/AIWidgets/UseDefaultAIAssistAnswerWidgetWithSDK.d.ts +3 -0
- package/dist/Presentation/Views/Dialog/AIWidgets/UseDefaultAITranslateWidgetWithSDK.d.ts +3 -0
- package/dist/Presentation/ui-components/TextField/TextField.d.ts +1 -1
- package/dist/index-ui.js +500 -3
- package/dist/index-ui.js.map +1 -1
- package/dist/qb-api-calls/index.d.ts +3 -1
- package/package.json +3 -5
- package/src/CommonTypes/CommonTypes.ts +1 -0
- package/src/Data/DefaultConfigurations.ts +3 -0
- package/src/Data/repository/ConnectionRepository.ts +2 -1
- package/src/Data/source/remote/IRemoteDataSource.ts +13 -0
- package/src/Data/source/remote/RemoteDataSource.ts +22 -0
- package/src/Domain/use_cases/ai/AIAnswerAssistWithSDKUseCase.ts +50 -0
- package/src/Domain/use_cases/ai/AITranslateWithSDKUseCase.ts +107 -0
- package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAIAssistAnswerWidgetWithSDK.tsx +74 -0
- package/src/Presentation/Views/Dialog/AIWidgets/UseDefaultAITranslateWidgetWithSDK.tsx +70 -0
- package/src/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx +14 -2
- package/src/QBconfig.ts +3 -0
- package/src/package_artan_react_ui.json +91 -0
- package/src/package_original.json +115 -0
- package/src/qb-api-calls/index.ts +49 -0
- package/storybook-static/{703.776b9f13.iframe.bundle.js → 703.f12f2e71.iframe.bundle.js} +2 -2
- package/storybook-static/{703.776b9f13.iframe.bundle.js.map → 703.f12f2e71.iframe.bundle.js.map} +1 -1
- package/storybook-static/docs-Introduction-mdx.9dc275f1.iframe.bundle.js +10 -0
- package/storybook-static/{docs-Introduction-mdx.bcb06844.iframe.bundle.js.map → docs-Introduction-mdx.9dc275f1.iframe.bundle.js.map} +1 -1
- package/storybook-static/docs-Styling-mdx.72149f36.iframe.bundle.js +10 -0
- package/storybook-static/{docs-Styling-mdx.1d6c1212.iframe.bundle.js.map → docs-Styling-mdx.72149f36.iframe.bundle.js.map} +1 -1
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/index.html +4 -8
- package/storybook-static/project.json +1 -1
- package/storybook-static/{runtime~main.3464b25a.iframe.bundle.js → runtime~main.72d6302b.iframe.bundle.js} +1 -1
- package/tsconfig.buildlib.json +33 -0
- package/storybook-static/docs-Introduction-mdx.bcb06844.iframe.bundle.js +0 -10
- package/storybook-static/docs-Styling-mdx.1d6c1212.iframe.bundle.js +0 -10
- package/storybook-static/sb-addons/onboarding-7/manager-bundle.js +0 -503
- package/storybook-static/sb-addons/onboarding-7/manager-bundle.js.LEGAL.txt +0 -48
- /package/storybook-static/sb-addons/{interactions-8 → interactions-7}/manager-bundle.js +0 -0
- /package/storybook-static/sb-addons/{interactions-8 → interactions-7}/manager-bundle.js.LEGAL.txt +0 -0
- /package/storybook-static/sb-addons/{viewport-9 → viewport-8}/manager-bundle.js +0 -0
- /package/storybook-static/sb-addons/{viewport-9 → viewport-8}/manager-bundle.js.LEGAL.txt +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
(self.webpackChunkquickblox_react_ui_kit=self.webpackChunkquickblox_react_ui_kit||[]).push([[715],{"./node_modules/@mdx-js/react/lib/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{NF:()=>withMDXComponents,Zo:()=>MDXProvider,ah:()=>useMDXComponents,pC:()=>MDXContext});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");let MDXContext=react__WEBPACK_IMPORTED_MODULE_0__.createContext({});function withMDXComponents(Component){return boundMDXComponent;function boundMDXComponent(props){let allComponents=useMDXComponents(props.components);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,{...props,allComponents})}}function useMDXComponents(components){let contextComponents=react__WEBPACK_IMPORTED_MODULE_0__.useContext(MDXContext);return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(()=>"function"==typeof components?components(contextComponents):{...contextComponents,...components},[contextComponents,components])}let emptyObject={};function MDXProvider({components,children,disableParentContext}){let allComponents;return allComponents=disableParentContext?"function"==typeof components?components({}):components||emptyObject:useMDXComponents(components),react__WEBPACK_IMPORTED_MODULE_0__.createElement(MDXContext.Provider,{value:allComponents},children)}},"./src/docs/Introduction.mdx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__}),__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),_Users_artemkoltunov_Desktop_01_react_ui_kit_private_node_modules_storybook_addon_docs_dist_shims_mdx_react_shim__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/blocks/dist/index.mjs");function _createMdxContent(props){let _components=Object.assign({h1:"h1",a:"a",p:"p",h3:"h3",pre:"pre",code:"code",h4:"h4",blockquote:"blockquote",strong:"strong",ul:"ul",li:"li",ol:"ol"},(0,_Users_artemkoltunov_Desktop_01_react_ui_kit_private_node_modules_storybook_addon_docs_dist_shims_mdx_react_shim__WEBPACK_IMPORTED_MODULE_2__.ah)(),props.components);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_blocks__WEBPACK_IMPORTED_MODULE_3__.h_,{title:"📕 Documentation/Introduction"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h1,{id:"introduction",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"https://docs.quickblox.com/docs/react-uikit-send-your-first-message#importing-dependencies-in-the-project",target:"_blank",rel:"nofollow noopener noreferrer",children:"Introduction"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The QuickBlox UIKit for React comprises a collection of pre-assembled UI components that enable effortless creation of an in-app chat equipped with all the necessary messaging functionalities. Our development kit encompasses light and dark themes, colors, and various other features. These components can be personalized to fashion an engaging messaging interface that reflects your brand's distinct identity."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The QuickBlox UIKit fully supports both private and group dialogs. To initiate the process of sending a message from the ground up using Java or Kotlin, please refer to the instructions provided in the guide below."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"installation",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"https://docs.quickblox.com/docs/react-uikit-send-your-first-message#step2-adding-dependencies-to-a-react-project",target:"_blank",rel:"nofollow noopener noreferrer",children:"Installation"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"To successfully integrate QuickBlox functionality into your React project, you need to add two main dependencies: quickblox and quickblox-react-ui-kit. By following the documentation, you can easily add these packages to your project."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-bash",children:"npm install quickblox --save\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-bash",children:"npm install quickblox-react-ui-kit --save\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"importing-dependencies-in-the-project",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"https://docs.quickblox.com/docs/react-uikit-send-your-first-message#importing-dependencies-in-the-project",target:"_blank",rel:"nofollow noopener noreferrer",children:"Importing Dependencies in the Project"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Open the file where you want to use QuickBlox functionality, such as App.tsx\nAdd the following lines at the beginning of the file to import the dependencies:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.blockquote,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Note: We are using // @ts-ignor in TypeScript because QuickBlox SDK doesn't share types."})}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-ts",children:"// @ts-ignore\nimport * as QB from 'quickblox/quickblox';\nimport 'quickblox-react-ui-kit';\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"adding-qbconfigts-file-to-your-react-application",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"https://docs.quickblox.com/docs/react-uikit-send-your-first-message#step-3-adding-qbconfigts-file-to-your-react-application",target:"_blank",rel:"nofollow noopener noreferrer",children:"Adding QBconfig.ts File to Your React Application"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"To ensure proper configuration and functionality of the QuickBlox UIKit in your React application, it is essential to add a QBconfig.ts file to the src folder. This file allows you to define the necessary parameters for the QuickBlox UIKit.\nThe QBconfig.ts file contains various configuration settings that determine how the QuickBlox UIKit interacts with the QuickBlox JavaScript SDK and the backend services. These settings include:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"appId: This parameter represents the unique identifier assigned to your QuickBlox application. It helps establish a connection between the frontend and backend components.\nauthKey and authSecret: These parameters are used for authentication purposes. They ensure secure communication between your application and the QuickBlox backend.\naccountKey: This parameter identifies your QuickBlox account and provides access to the associated services.\napiEndpoint and chatEndpoint: These parameters define the API and chat endpoints provided by QuickBlox. They specify the URLs to which the QuickBlox UIKit will send requests for various functionalities."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-ts",children:"export const QBConfig = {\n credentials: {\n appId: YOUR_APP_ID_FROM_ADMIN_PANEL,\n accountKey: 'YOUR_ACCOUNT_KEY_FROM_ADMIN_PANEL',\n authKey: 'YOUR_AUTH_KEY_FROM_ADMIN_PANEL',\n authSecret: 'YOUR_AUTH_SECRET_FROM_ADMIN_PANEL',\n sessionToken: '',\n },\n appConfig: {\n chatProtocol: {\n Active: 2,\n },\n debug: false,\n endpoints: {\n apiEndpoint: 'https://api.quickblox.com',\n chatEndpoint: 'chat.quickblox.com',\n },\n on: {\n async sessionExpired(handleResponse: any, retry: any) {\n console.log(`Test sessionExpired… ${handleResponse} ${retry}`);\n },\n },\n streamManagement: {\n Enable: true,\n },\n },\n};\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"In this example, make sure to replace the placeholder values (YOUR_APP_ID_FROM_ADMIN_PANEL, YOUR_ACCOUNT_KEY_FROM_ADMIN_PANEL, YOUR_AUTH_KEY_FROM_ADMIN_PANEL, YOUR_AUTH_SECRET_FROM_ADMIN_PANEL) with the actual values obtained from your QuickBlox application.\nBy adding the QBconfig.ts file to your React application, you ensure that the QuickBlox UIKit is properly configured and can interact seamlessly with the QuickBlox backend services."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.blockquote,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Note: If you initialize your SDK using a session token, you need to not only fill the sessionToken field in QBConfig but also fill other properties in the same way as when using the initWithAppId method. See the link initialize QuickBlox SDK without Authorization Key and Secret."})}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Now we can add dependecies in our code. (Open your App.tsx and add that lines.)"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-ts",children:"import * as QB from 'quickblox/quickblox';\nimport 'quickblox-react-ui-kit';\nimport { QBConfig } from './QBconfig'; // this line is new\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"updating-the-project-structure-according-to-your-needs",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"https://docs.quickblox.com/docs/react-uikit-send-your-first-message#step-4-updating-the-project-structure-according-to-your-needs",target:"_blank",rel:"nofollow noopener noreferrer",children:"Updating the project structure according to your needs"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:'In order to enhance the organization and maintainability of your project, it is recommended to make changes to the structure of the App.tsx in the src folder.\nYou need to add a constant called "currentUser" inside the App() function in the App.tsx file, which describes your user registered in the admin panel, and configure the QuickBloxUIKitProvider. Additionally, import the necessary entities from quickblox-react-ui-kit.\nAs a result, you should have the code like code below:'}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-ts",children:"import React from 'react';\nimport type { QBSession, QBUser } from 'quickblox/quickblox';\nimport {\n QuickBloxUIKitProvider,\n QuickBloxUIKitDesktopLayout,\n} from 'quickblox-react-ui-kit';\nimport { QBConfig } from '../../configs/QBconfig';\nimport Header from '../../components/Header';\nimport SettingModal from '../../components/modals/SettingModal';\nimport LogoutModal from '../../components/modals/LogoutModal';\n\ninterface AppProps {\n session: QBSession;\n logout: VoidFunction;\n}\n\nconst App = (props: AppProps) => {\n const { session, logout } = props;\n const [user, setUser] = useState<QBUser | null>(null);\n\n return (\n <QuickBloxUIKitProvider\n maxFileSize={100 * 1000000}\n accountData={{ ...QBConfig.credentials, sessionToken: session.token }}\n qbConfig={{ ...QBConfig }}\n >\n <Header\n avatarUrl={avatarUrl}\n options={options}\n handleChange={handleChange}\n user={user}\n regex={regex}\n />\n <QuickBloxUIKitDesktopLayout uikitHeightOffset={'40px'} />\n <SettingModal\n user={user}\n avatarUrl={avatarUrl}\n selectedValue={selectedValue}\n setSelectedValue={setSelectedValue}\n regex={regex}\n setUser={setUser}\n />\n <LogoutModal\n selectedValue={selectedValue}\n setSelectedValue={setSelectedValue}\n handleLogout={logout}\n />\n </QuickBloxUIKitProvider>\n );\n};\n\nexport default App;\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"QuickBloxUIKitProvider can accept up to three parameters:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"maxFileSize - controls the maximum size of uploaded files."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"accountData - information about the application's account data."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"loginData - information about the logged-in user."}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Let's add the QuickBlox UIKit chat layer - QuickBloxUIKitDesktopLayout - to the markup of the main component of the application."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"If we do not specify a sessionToken in accountData, it means that the login and session start process occurs within our application. In this case, it is necessary to perform the following fifth step in our instruction.\nHowever, if the session start and application login process is already performed in another application, such as on a server, and we already have a ready sessionToken, then we can skip the next step."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"configure-quickbloxuikitprovider",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"https://docs.quickblox.com/docs/react-uikit-send-your-first-message#step-5-configure-quickbloxuikitprovider",target:"_blank",rel:"nofollow noopener noreferrer",children:"Configure QuickBloxUIKitProvider"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"To configure QuickBloxUIKitProvider and use QuickBloxUIKit in your application, follow these steps:\nInitialize DataContext:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ol,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"To work with QuickBlox, it is necessary to initialize the UI Kit react DataContext. It contains important data and settings for using QuickBloxSDK. The DataContext connects various components of the application and provides them access to shared data."}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-ts",children:"const qbUIKitContext: QBDataContextType = React.useContext(qbDataContext);\n\nconst [isUserAuthorized, setUserAuthorized] = React.useState(false);\nconst [isSDKInitialized, setSDKInitialized] = React.useState(false);\n\nconst prepareSDK = async (): Promise<void> => {\n // check if we have installed SDK\n if ((window as any).QB === undefined) {\n if (QB !== undefined) {\n (window as any).QB = QB;\n } else {\n let QBLib = require('quickblox/quickblox.min');\n (window as any).QB = QBLib;\n }\n }\n\n const APPLICATION_ID = QBConfig.credentials.appId;\n const AUTH_KEY = QBConfig.credentials.authKey;\n const AUTH_SECRET = QBConfig.credentials.authSecret;\n const ACCOUNT_KEY = QBConfig.credentials.accountKey;\n const CONFIG = QBConfig.appConfig;\n\n QB.init(APPLICATION_ID, AUTH_KEY, AUTH_SECRET, ACCOUNT_KEY, CONFIG);\n};\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ol,{start:"2",children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"We need to add user authentication, so to do this, we will introduce two states and use the useEffect hook:"}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-ts",children:"const [authorized, setAuthorized] = React.useState(false);\nconst [initedSDK, setInitedSDK] = React.useState(false);\n\n......\n\n useEffect(() => {\n if (!isSDKInitialized) {\n prepareSDK().then(result => {\n\n QB.createSession(currentUser, async function (errorCreateSession: any, session: any) {\n if (errorCreateSession) {\n console.log('Create User Session has error:', JSON.stringify(errorCreateSession));\n } else {\n const userId: number = session.user_id;\n const password: string = session.token;\n const paramsConnect = { userId, password };\n\n QB.chat.connect(paramsConnect, async function (errorConnect: any, resultConnect: any) {\n if (errorConnect) {\n console.log('Can not connect to chat server: ', errorConnect);\n } else {\n const authData: AuthorizationData = {\n userId: userId,\n password: password,\n userName: currentUser.login,\n sessionToken: session.token\n };\n await qbUIKitContext.authorize(authData);\n setSDKInitialized(true);\n setUserAuthorized(true);\n }\n });\n }\n });\n }).catch(\n e => {\n console.log('init SDK has error: ', e)\n });\n }\n }, []);\n\n ......\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"After implementing all the steps, your App.tsx file should look like this. You can compare it this your code or copy it instead of."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-ts",children:"import React, { useEffect } from 'react';\n\n// @ts-ignore\nimport * as QB from 'quickblox/quickblox';\nimport {\n QuickBloxUIKitProvider,\n qbDataContext,\n QuickBloxUIKitDesktopLayout,\n LoginData,\n AuthorizationData,\n QBDataContextType,\n} from 'quickblox-react-ui-kit';\nimport { QBConfig } from './QBconfig';\nimport './App.css';\n\nfunction App() {\n const currentUser: LoginData = {\n login: '',\n password: '',\n };\n\n const qbUIKitContext: QBDataContextType = React.useContext(qbDataContext);\n\n const [isUserAuthorized, setUserAuthorized] = React.useState(false);\n const [isSDKInitialized, setSDKInitialized] = React.useState(false);\n\n const prepareSDK = async (): Promise<void> => {\n // check if we have installed SDK\n if ((window as any).QB === undefined) {\n if (QB !== undefined) {\n (window as any).QB = QB;\n } else {\n let QBLib = require('quickblox/quickblox.min');\n (window as any).QB = QBLib;\n }\n }\n\n const APPLICATION_ID = QBConfig.credentials.appId;\n const AUTH_KEY = QBConfig.credentials.authKey;\n const AUTH_SECRET = QBConfig.credentials.authSecret;\n const ACCOUNT_KEY = QBConfig.credentials.accountKey;\n const CONFIG = QBConfig.appConfig;\n\n QB.init(APPLICATION_ID, AUTH_KEY, AUTH_SECRET, ACCOUNT_KEY, CONFIG);\n };\n\n useEffect(() => {\n if (!isSDKInitialized) {\n prepareSDK()\n .then((result) => {\n QB.createSession(\n currentUser,\n async function (errorCreateSession: any, session: any) {\n if (errorCreateSession) {\n console.log(\n 'Create User Session has error:',\n JSON.stringify(errorCreateSession),\n );\n } else {\n const userId: number = session.user_id;\n const password: string = session.token;\n const paramsConnect = { userId, password };\n\n QB.chat.connect(\n paramsConnect,\n async function (errorConnect: any, resultConnect: any) {\n if (errorConnect) {\n console.log(\n 'Can not connect to chat server: ',\n errorConnect,\n );\n } else {\n const authData: AuthorizationData = {\n userId: userId,\n password: password,\n userName: currentUser.login,\n sessionToken: session.token,\n };\n await qbUIKitContext.authorize(authData);\n setSDKInitialized(true);\n setUserAuthorized(true);\n }\n },\n );\n }\n },\n );\n })\n .catch((e) => {\n console.log('init SDK has error: ', e);\n });\n }\n }, []);\n\n return (\n <div>\n <QuickBloxUIKitProvider\n maxFileSize={100 * 1000000}\n accountData={{ ...QBConfig.credentials }}\n loginData={{\n login: currentUser.login,\n password: currentUser.password,\n }}\n >\n <div className=\"App\">\n {\n // React states indicating the ability to render UI\n isSDKInitialized && isUserAuthorized ? (\n <QuickBloxUIKitDesktopLayout />\n ) : (\n <div>wait while SDK is initializing...</div>\n )\n }\n </div>\n </QuickBloxUIKitProvider>\n </div>\n );\n}\n\nexport default App;\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"You should run the application using the command:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-bash",children:"npm start\n"})})]})}let __WEBPACK_DEFAULT_EXPORT__=function(props={}){let{wrapper:MDXLayout}=Object.assign({},(0,_Users_artemkoltunov_Desktop_01_react_ui_kit_private_node_modules_storybook_addon_docs_dist_shims_mdx_react_shim__WEBPACK_IMPORTED_MODULE_2__.ah)(),props.components);return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,Object.assign({},props,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,props)})):_createMdxContent(props)}},"./node_modules/memoizerific sync recursive":module=>{function webpackEmptyContext(req){var e=Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id="./node_modules/memoizerific sync recursive",module.exports=webpackEmptyContext},"./node_modules/react/cjs/react-jsx-runtime.production.min.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var f=__webpack_require__("./node_modules/react/index.js"),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function q(c,a,g){var b,d={},e=null,h=null;for(b in void 0!==g&&(e=""+g),void 0!==a.key&&(e=""+a.key),void 0!==a.ref&&(h=a.ref),a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l,exports.jsx=q,exports.jsxs=q},"./node_modules/react/jsx-runtime.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module.exports=__webpack_require__("./node_modules/react/cjs/react-jsx-runtime.production.min.js")}}]);
|
|
10
|
+
//# sourceMappingURL=docs-Introduction-mdx.9dc275f1.iframe.bundle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-Introduction-mdx.
|
|
1
|
+
{"version":3,"file":"docs-Introduction-mdx.9dc275f1.iframe.bundle.js","mappings":";;;;;;;;AAQA","sources":["webpack://quickblox-react-ui-kit/./node_modules/react/cjs/react-jsx-runtime.production.min.js"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n"],"names":[],"sourceRoot":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
(self.webpackChunkquickblox_react_ui_kit=self.webpackChunkquickblox_react_ui_kit||[]).push([[229],{"./node_modules/@mdx-js/react/lib/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{NF:()=>withMDXComponents,Zo:()=>MDXProvider,ah:()=>useMDXComponents,pC:()=>MDXContext});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");let MDXContext=react__WEBPACK_IMPORTED_MODULE_0__.createContext({});function withMDXComponents(Component){return boundMDXComponent;function boundMDXComponent(props){let allComponents=useMDXComponents(props.components);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,{...props,allComponents})}}function useMDXComponents(components){let contextComponents=react__WEBPACK_IMPORTED_MODULE_0__.useContext(MDXContext);return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(()=>"function"==typeof components?components(contextComponents):{...contextComponents,...components},[contextComponents,components])}let emptyObject={};function MDXProvider({components,children,disableParentContext}){let allComponents;return allComponents=disableParentContext?"function"==typeof components?components({}):components||emptyObject:useMDXComponents(components),react__WEBPACK_IMPORTED_MODULE_0__.createElement(MDXContext.Provider,{value:allComponents},children)}},"./src/docs/Styling.mdx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__}),__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),_Users_artemkoltunov_Desktop_01_react_ui_kit_private_node_modules_storybook_addon_docs_dist_shims_mdx_react_shim__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/blocks/dist/index.mjs");function _createMdxContent(props){let _components=Object.assign({h1:"h1",a:"a",p:"p",h2:"h2",img:"img",pre:"pre",code:"code",ul:"ul",li:"li"},(0,_Users_artemkoltunov_Desktop_01_react_ui_kit_private_node_modules_storybook_addon_docs_dist_shims_mdx_react_shim__WEBPACK_IMPORTED_MODULE_2__.ah)(),props.components);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_blocks__WEBPACK_IMPORTED_MODULE_3__.h_,{title:"📕 Documentation/Styling"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h1,{id:"customization",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"https://docs.quickblox.com/docs/react-uikit-customization",target:"_blank",rel:"nofollow noopener noreferrer",children:"Customization"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The QuickBlox UIKit for React allows you to create your own unique view of the UIKit."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h2,{id:"default-themes",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"https://docs.quickblox.com/docs/react-uikit-customization#default-themes",target:"_blank",rel:"nofollow noopener noreferrer",children:"Default themes"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The QuickBlox UIKit for React has 2 built in themes: Dark and Light."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h2,{id:"color-theme",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"",children:"Color Theme"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.img,{src:"https://files.readme.io/393b8d6-ColorTheme.png",alt:"Image"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Default theme for UIKit is Light.\nTo set theme you need to set value 'dark' to key data-theme in global styles (html[data-theme=\"dark”]).\nFor example, you can use pure JavaScript:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-js",children:"document.documentElement.setAttribute('data-theme', 'dark');\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h2,{id:"use-your-own-theme",children:"Use your own theme"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"There are two options how you can create your own theme:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"Customize current theme using css"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"Create your own theme to customize selected components"}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"To customize the current theme you just need to set the new colors in css variables."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Or you can create your own theme. To do this you need to create a new class that implements the UiKitTheme interface."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"To use your own theme using css you need to create _theme_colors_scheme.scss and set colors"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-scss",children:"$background-overlay-light: rgba(19, 29, 40, 0.8);\n$background-overlay-dark: rgba(144, 151, 159, 0.8);\n$primary-50: #e7efff;\n$primary-100: #c4d7fe;\n$primary-200: #9cbcfe;\n$primary-300: #74a1fd;\n$primary-400: #578cfc;\n$primary-500: #3978fc;\n$primary-600: #3370fc;\n$primary-700: #2c65fb;\n$primary-800: #245bfb;\n$primary-900: #1748fa;\n$primary-a-100: #ffffff;\n$primary-a-200: #f7f9ff;\n$primary-a-400: #c4cfff;\n$primary-a-700: #abbaff;\n$secondary-50: #e4e6e8;\n$secondary-100: #bcc1c5;\n$secondary-200: #90979f;\n$secondary-300: #636d78;\n$secondary-400: #414e5b;\n$secondary-500: #202f3e;\n$secondary-600: #1c2a38;\n$secondary-700: #182330;\n$secondary-800: #131d28;\n$secondary-900: #0b121b;\n$secondary-a-100: #74a1fd;\n$secondary-a-200: #3978fc;\n$secondary-a-400: #245bfb;\n$secondary-a-700: #0050dc;\n$system-green-100: #c8f1d6;\n$system-green-200: #a4e7bb;\n$system-green-300: #80dda0;\n$system-green-400: #64d68b;\n$system-green-500: #49cf77;\n$error-100: #ffc4c1;\n$error-200: #ff9d98;\n$error-300: #ff766e;\n$error-400: #ff584f;\n$error-500: #ff3b30;\n$information: #fdb0ff;\n$highlight: #fffdc1;\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"To use your own new theme colors create _theme_dark.scss and _theme_light.scss files and set color variable."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-scss",children:"// _theme_dark.scss:\n\nhtml[data-theme='dark'] {\n --color-background-info: #{$primary-500};\n --tertiary-elements: #{$background-overlay-dark};\n --main-elements: #{$primary-300};\n --secondary-elements: #{$primary-a-100};\n --input-elements: #{$secondary-200};\n --disabled-elements: #{$secondary-300};\n --field-border: #{$secondary-200};\n --main-text: #{$primary-a-100};\n --secondary-text: #{$secondary-200};\n --caption: #{$secondary-100};\n --main-background: #{$secondary-500};\n --secondary-background: #{$secondary-800};\n --incoming-background: #{$secondary-400};\n --outgoing-background: #{$primary-500};\n --dropdown-background: #{$secondary-400};\n --chat-input: #{$secondary-800};\n --divider: #{$secondary-400};\n --error: #{$error-300};\n --hightlight: #{$highlight};\n}\n\n// _theme_light.scss:\n:root {\n --color-background-info: #{$primary-100};\n --tertiary-elements: #{$secondary-300};\n --main-elements: #{$primary-500};\n --secondary-elements: #{$secondary-500};\n --input-elements: #{$secondary-500};\n --disabled-elements: #{$secondary-100};\n --field-border: #{$secondary-200};\n --main-text: #{$secondary-900};\n --secondary-text: #{$secondary-300};\n --caption: #{$secondary-200};\n --main-background: #{$primary-a-100};\n --secondary-background: #{$primary-a-100};\n --secondary-background-modal: #{$background-overlay-light};\n --incoming-background: #{$secondary-50};\n --outgoing-background: #{$primary-50};\n --dropdown-background: #{$primary-a-100};\n --chat-input: #{$primary-a-200};\n --divider: #{$primary-50};\n --error: #{$error-500};\n --hightlight: #{$highlight};\n}\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"To create your own theme to customize selected components you need to create a new class that implements the UiKitTheme interface."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-ts",children:"//DefaultTheme implements UiKitTheme\nexport default class CustomTheme extends DefaultTheme {\n divider = (): string => 'var(--divider)';\n mainText = (): string => '#FFFFFF';\n fontFamily = (): string => 'Roboto';\n /*\n The DefaultTheme contains other theme methods :\n caption = (): string => 'var(--caption)';\n chatInput = (): string => 'var(--chat-input)';\n disabledElements = (): string => 'var(--disabled-elements)';\n dropdownBackground = (): string => 'var(--dropdown-background)';\n error = (): string => 'var(--error)';\n fieldBorder = (): string => 'var(--field-border)';\n hightlight = (): string => 'var(--hightlight)';\n incomingBackground = (): string => 'var(--incoming-background)';\n inputElements = (): string => 'var(--input-elements)';\n mainBackground = (): string => 'var(--main-background)';\n mainElements = (): string => 'var(--main-elements)';\n outgoingBackground = (): string => 'var(--outgoing-background)';\n secondaryBackground = (): string => 'var(--secondary-background)';\n secondaryElements = (): string => 'var(--secondary-elements)';\n secondaryText = (): string => 'var(--secondary-text)';\n */\n}\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"and specify selected components:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"desktop layout container"}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-ts",children:"<QuickBloxUIKitDesktopLayout theme={new CustomTheme()}>\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h1,{id:"custom-styling",children:"Custom styling"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"We have developed our components with the ability to be customized to individual needs, so each component accepts a prop called className, allowing the user to apply their own styles to the component."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-ts",children:"import { Button } from '../../ui-components';\nimport './style.scss';\n\n<Button className=\"button\">Button</Button>;\n"})})]})}let __WEBPACK_DEFAULT_EXPORT__=function(props={}){let{wrapper:MDXLayout}=Object.assign({},(0,_Users_artemkoltunov_Desktop_01_react_ui_kit_private_node_modules_storybook_addon_docs_dist_shims_mdx_react_shim__WEBPACK_IMPORTED_MODULE_2__.ah)(),props.components);return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,Object.assign({},props,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,props)})):_createMdxContent(props)}},"./node_modules/memoizerific sync recursive":module=>{function webpackEmptyContext(req){var e=Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id="./node_modules/memoizerific sync recursive",module.exports=webpackEmptyContext},"./node_modules/react/cjs/react-jsx-runtime.production.min.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var f=__webpack_require__("./node_modules/react/index.js"),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function q(c,a,g){var b,d={},e=null,h=null;for(b in void 0!==g&&(e=""+g),void 0!==a.key&&(e=""+a.key),void 0!==a.ref&&(h=a.ref),a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l,exports.jsx=q,exports.jsxs=q},"./node_modules/react/jsx-runtime.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module.exports=__webpack_require__("./node_modules/react/cjs/react-jsx-runtime.production.min.js")}}]);
|
|
10
|
+
//# sourceMappingURL=docs-Styling-mdx.72149f36.iframe.bundle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs-Styling-mdx.
|
|
1
|
+
{"version":3,"file":"docs-Styling-mdx.72149f36.iframe.bundle.js","mappings":";;;;;;;;AAQA","sources":["webpack://quickblox-react-ui-kit/./node_modules/react/cjs/react-jsx-runtime.production.min.js"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n"],"names":[],"sourceRoot":""}
|
|
@@ -348,7 +348,7 @@
|
|
|
348
348
|
window['DOCS_OPTIONS'] = {"defaultName":"Docs","autodocs":"tag"};</script><script type="module">import './sb-preview/runtime.js';
|
|
349
349
|
|
|
350
350
|
|
|
351
|
-
import './runtime~main.
|
|
351
|
+
import './runtime~main.72d6302b.iframe.bundle.js';
|
|
352
352
|
|
|
353
353
|
import './926.f5308089.iframe.bundle.js';
|
|
354
354
|
|
|
@@ -42,11 +42,9 @@
|
|
|
42
42
|
|
|
43
43
|
<link href="./sb-addons/essentials-outline-6/manager-bundle.js" rel="modulepreload" />
|
|
44
44
|
|
|
45
|
-
<link href="./sb-addons/
|
|
45
|
+
<link href="./sb-addons/interactions-7/manager-bundle.js" rel="modulepreload" />
|
|
46
46
|
|
|
47
|
-
<link href="./sb-addons/
|
|
48
|
-
|
|
49
|
-
<link href="./sb-addons/viewport-9/manager-bundle.js" rel="modulepreload" />
|
|
47
|
+
<link href="./sb-addons/viewport-8/manager-bundle.js" rel="modulepreload" />
|
|
50
48
|
|
|
51
49
|
|
|
52
50
|
<style>
|
|
@@ -118,11 +116,9 @@
|
|
|
118
116
|
|
|
119
117
|
import './sb-addons/essentials-outline-6/manager-bundle.js';
|
|
120
118
|
|
|
121
|
-
import './sb-addons/
|
|
122
|
-
|
|
123
|
-
import './sb-addons/interactions-8/manager-bundle.js';
|
|
119
|
+
import './sb-addons/interactions-7/manager-bundle.js';
|
|
124
120
|
|
|
125
|
-
import './sb-addons/viewport-
|
|
121
|
+
import './sb-addons/viewport-8/manager-bundle.js';
|
|
126
122
|
|
|
127
123
|
</script>
|
|
128
124
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"generatedAt":
|
|
1
|
+
{"generatedAt":1716388997977,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":true,"hasStorybookEslint":true,"refCount":0,"metaFramework":{"name":"CRA","packageName":"react-scripts","version":"5.0.1"},"packageManager":{"type":"npm","version":"10.2.4"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-webpack5","options":{"builder":{"useSWC":true}}},"builder":"@storybook/builder-webpack5","renderer":"@storybook/react","storybookVersion":"7.6.12","storybookVersionSpecifier":"^7.6.12","language":"typescript","storybookPackages":{"@storybook/blocks":{"version":"7.6.12"},"@storybook/react":{"version":"7.6.12"},"@storybook/react-webpack5":{"version":"7.6.12"},"@storybook/test":{"version":"7.6.12"},"eslint-plugin-storybook":{"version":"0.6.15"},"storybook":{"version":"7.6.12"}},"addons":{"@storybook/addon-links":{"version":"7.6.12"},"@storybook/addon-essentials":{"version":"7.6.12"},"@storybook/preset-create-react-app":{"version":"7.6.12"},"@storybook/addon-onboarding":{"version":null},"@storybook/addon-interactions":{"version":"7.6.12"},"@storybook/addon-viewport":{"version":"7.6.16"}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var __webpack_modules__={},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(void 0!==cachedModule)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,loaded:!1,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdO={},(()=>{var deferred=[];__webpack_require__.O=(result,chunkIds,fn,priority)=>{if(chunkIds){priority=priority||0;for(var i=deferred.length;i>0&&deferred[i-1][2]>priority;i--)deferred[i]=deferred[i-1];deferred[i]=[chunkIds,fn,priority];return}for(var notFulfilled=1/0,i=0;i<deferred.length;i++){for(var chunkIds=deferred[i][0],fn=deferred[i][1],priority=deferred[i][2],fulfilled=!0,j=0;j<chunkIds.length;j++)notFulfilled>=priority&&Object.keys(__webpack_require__.O).every(key=>__webpack_require__.O[key](chunkIds[j]))?chunkIds.splice(j--,1):(fulfilled=!1,priority<notFulfilled&&(notFulfilled=priority));if(fulfilled){deferred.splice(i--,1);var r=fn();void 0!==r&&(result=r)}}return result}})(),__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},(()=>{var leafPrototypes,getProto=Object.getPrototypeOf?obj=>Object.getPrototypeOf(obj):obj=>obj.__proto__;__webpack_require__.t=function(value,mode){if(1&mode&&(value=this(value)),8&mode||"object"==typeof value&&value&&(4&mode&&value.__esModule||16&mode&&"function"==typeof value.then))return value;var ns=Object.create(null);__webpack_require__.r(ns);var def={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var current=2&mode&&value;"object"==typeof current&&!~leafPrototypes.indexOf(current);current=getProto(current))Object.getOwnPropertyNames(current).forEach(key=>def[key]=()=>value[key]);return def.default=()=>value,__webpack_require__.d(ns,def),ns}})(),__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.f={},__webpack_require__.e=chunkId=>Promise.all(Object.keys(__webpack_require__.f).reduce((promises,key)=>(__webpack_require__.f[key](chunkId,promises),promises),[])),__webpack_require__.u=chunkId=>""+(({119:"Presentation-ui-components-MessageInput-MessageInput-stories",148:"Presentation-ui-components-Dropdown-Dropdown-stories",181:"Presentation-ui-components-Badge-Badge-stories",229:"docs-Styling-mdx",231:"Presentation-ui-components-SettingsItem-SettingsItem-stories",267:"Presentation-ui-components-Toast-Toast-stories",356:"Presentation-ui-components-Loader-Loader-stories",594:"Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories",626:"Presentation-ui-components-Button-Button-stories",658:"Presentation-ui-components-MessageSeparator-MessageSeparator-stories",665:"Presentation-ui-components-DialogWindow-DialogWindow-stories",687:"Presentation-ui-components-Message-Message-stories",715:"docs-Introduction-mdx",752:"Presentation-ui-components-Header-Header-stories",794:"Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories",874:"Presentation-ui-components-Placeholder-Placeholder-stories",909:"Presentation-ui-components-TextField-TextField-stories",944:"Presentation-ui-components-DialogBanner-DialogBanner-stories",949:"Presentation-ui-components-Avatar-avatar-stories",968:"Presentation-ui-components-UserListItem-UserListItem-stories"})[chunkId]||chunkId)+"."+({119:"0d1800d9",148:"141a3ae7",181:"9449e470",229:"1d6c1212",231:"429a72d5",267:"1b8758fc",356:"af01e15d",426:"be971fb5",433:"dffc897e",594:"a9f5cd67",603:"4cf0423b",607:"b04b9f0b",626:"84103f20",658:"a7d43c0b",665:"f81a8e38",687:"264d251d",703:"776b9f13",715:"bcb06844",729:"734b4ae4",752:"9f45c30e",768:"e44c05aa",794:"bf9005d3",797:"b3873e04",874:"97287936",909:"fd8caf6c",938:"56e9d83c",944:"fa91d2c7",949:"1b74ae55",968:"8781472b"})[chunkId]+".iframe.bundle.js",__webpack_require__.miniCssF=chunkId=>"static/css/"+({119:"Presentation-ui-components-MessageInput-MessageInput-stories",148:"Presentation-ui-components-Dropdown-Dropdown-stories",181:"Presentation-ui-components-Badge-Badge-stories",231:"Presentation-ui-components-SettingsItem-SettingsItem-stories",267:"Presentation-ui-components-Toast-Toast-stories",356:"Presentation-ui-components-Loader-Loader-stories",594:"Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories",626:"Presentation-ui-components-Button-Button-stories",658:"Presentation-ui-components-MessageSeparator-MessageSeparator-stories",665:"Presentation-ui-components-DialogWindow-DialogWindow-stories",687:"Presentation-ui-components-Message-Message-stories",752:"Presentation-ui-components-Header-Header-stories",794:"Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories",874:"Presentation-ui-components-Placeholder-Placeholder-stories",909:"Presentation-ui-components-TextField-TextField-stories",944:"Presentation-ui-components-DialogBanner-DialogBanner-stories",949:"Presentation-ui-components-Avatar-avatar-stories",968:"Presentation-ui-components-UserListItem-UserListItem-stories"})[chunkId]+"."+({119:"7eb916fc",148:"e37f549d",181:"7b8317f8",231:"b67b748b",267:"a5b284f4",356:"dab34da1",594:"31cd021e",626:"1b6e1c55",658:"34aa36b2",665:"4f813450",687:"4c915c89",752:"fb1001e7",794:"6d563072",874:"cb7fb80a",909:"412027f8",944:"bd07fad3",949:"7b228eb0",968:"655aa6c1"})[chunkId]+".chunk.css",__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),(()=>{var inProgress={},dataWebpackPrefix="quickblox-react-ui-kit:";__webpack_require__.l=(url,done,key,chunkId)=>{if(inProgress[url]){inProgress[url].push(done);return}if(void 0!==key)for(var script,needAttach,scripts=document.getElementsByTagName("script"),i=0;i<scripts.length;i++){var s=scripts[i];if(s.getAttribute("src")==url||s.getAttribute("data-webpack")==dataWebpackPrefix+key){script=s;break}}script||(needAttach=!0,(script=document.createElement("script")).charset="utf-8",script.timeout=120,__webpack_require__.nc&&script.setAttribute("nonce",__webpack_require__.nc),script.setAttribute("data-webpack",dataWebpackPrefix+key),script.src=url),inProgress[url]=[done];var onScriptComplete=(prev,event)=>{script.onerror=script.onload=null,clearTimeout(timeout);var doneFns=inProgress[url];if(delete inProgress[url],script.parentNode&&script.parentNode.removeChild(script),doneFns&&doneFns.forEach(fn=>fn(event)),prev)return prev(event)},timeout=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:script}),12e4);script.onerror=onScriptComplete.bind(null,script.onerror),script.onload=onScriptComplete.bind(null,script.onload),needAttach&&document.head.appendChild(script)}})(),__webpack_require__.r=exports=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.nmd=module=>(module.paths=[],module.children||(module.children=[]),module),__webpack_require__.p="",(()=>{if("undefined"!=typeof document){var createStylesheet=(chunkId,fullhref,oldTag,resolve,reject)=>{var linkTag=document.createElement("link");return linkTag.rel="stylesheet",linkTag.type="text/css",linkTag.onerror=linkTag.onload=event=>{if(linkTag.onerror=linkTag.onload=null,"load"===event.type)resolve();else{var errorType=event&&("load"===event.type?"missing":event.type),realHref=event&&event.target&&event.target.href||fullhref,err=Error("Loading CSS chunk "+chunkId+" failed.\n("+realHref+")");err.code="CSS_CHUNK_LOAD_FAILED",err.type=errorType,err.request=realHref,linkTag.parentNode.removeChild(linkTag),reject(err)}},linkTag.href=fullhref,oldTag?oldTag.parentNode.insertBefore(linkTag,oldTag.nextSibling):document.head.appendChild(linkTag),linkTag},findStylesheet=(href,fullhref)=>{for(var existingLinkTags=document.getElementsByTagName("link"),i=0;i<existingLinkTags.length;i++){var tag=existingLinkTags[i],dataHref=tag.getAttribute("data-href")||tag.getAttribute("href");if("stylesheet"===tag.rel&&(dataHref===href||dataHref===fullhref))return tag}for(var existingStyleTags=document.getElementsByTagName("style"),i=0;i<existingStyleTags.length;i++){var tag=existingStyleTags[i],dataHref=tag.getAttribute("data-href");if(dataHref===href||dataHref===fullhref)return tag}},loadStylesheet=chunkId=>new Promise((resolve,reject)=>{var href=__webpack_require__.miniCssF(chunkId),fullhref=__webpack_require__.p+href;if(findStylesheet(href,fullhref))return resolve();createStylesheet(chunkId,fullhref,null,resolve,reject)}),installedCssChunks={303:0};__webpack_require__.f.miniCss=(chunkId,promises)=>{installedCssChunks[chunkId]?promises.push(installedCssChunks[chunkId]):0!==installedCssChunks[chunkId]&&({119:1,148:1,181:1,231:1,267:1,356:1,594:1,626:1,658:1,665:1,687:1,752:1,794:1,874:1,909:1,944:1,949:1,968:1})[chunkId]&&promises.push(installedCssChunks[chunkId]=loadStylesheet(chunkId).then(()=>{installedCssChunks[chunkId]=0},e=>{throw delete installedCssChunks[chunkId],e}))}}})(),(()=>{var installedChunks={303:0};__webpack_require__.f.j=(chunkId,promises)=>{var installedChunkData=__webpack_require__.o(installedChunks,chunkId)?installedChunks[chunkId]:void 0;if(0!==installedChunkData){if(installedChunkData)promises.push(installedChunkData[2]);else if(303!=chunkId){var promise=new Promise((resolve,reject)=>installedChunkData=installedChunks[chunkId]=[resolve,reject]);promises.push(installedChunkData[2]=promise);var url=__webpack_require__.p+__webpack_require__.u(chunkId),error=Error();__webpack_require__.l(url,event=>{if(__webpack_require__.o(installedChunks,chunkId)&&(0!==(installedChunkData=installedChunks[chunkId])&&(installedChunks[chunkId]=void 0),installedChunkData)){var errorType=event&&("load"===event.type?"missing":event.type),realSrc=event&&event.target&&event.target.src;error.message="Loading chunk "+chunkId+" failed.\n("+errorType+": "+realSrc+")",error.name="ChunkLoadError",error.type=errorType,error.request=realSrc,installedChunkData[1](error)}},"chunk-"+chunkId,chunkId)}else installedChunks[chunkId]=0}},__webpack_require__.O.j=chunkId=>0===installedChunks[chunkId];var webpackJsonpCallback=(parentChunkLoadingFunction,data)=>{var moduleId,chunkId,chunkIds=data[0],moreModules=data[1],runtime=data[2],i=0;if(chunkIds.some(id=>0!==installedChunks[id])){for(moduleId in moreModules)__webpack_require__.o(moreModules,moduleId)&&(__webpack_require__.m[moduleId]=moreModules[moduleId]);if(runtime)var result=runtime(__webpack_require__)}for(parentChunkLoadingFunction&&parentChunkLoadingFunction(data);i<chunkIds.length;i++)chunkId=chunkIds[i],__webpack_require__.o(installedChunks,chunkId)&&installedChunks[chunkId]&&installedChunks[chunkId][0](),installedChunks[chunkId]=0;return __webpack_require__.O(result)},chunkLoadingGlobal=self.webpackChunkquickblox_react_ui_kit=self.webpackChunkquickblox_react_ui_kit||[];chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null,0)),chunkLoadingGlobal.push=webpackJsonpCallback.bind(null,chunkLoadingGlobal.push.bind(chunkLoadingGlobal))})(),__webpack_require__.nc=void 0})();
|
|
1
|
+
(()=>{"use strict";var __webpack_modules__={},__webpack_module_cache__={};function __webpack_require__(moduleId){var cachedModule=__webpack_module_cache__[moduleId];if(void 0!==cachedModule)return cachedModule.exports;var module=__webpack_module_cache__[moduleId]={id:moduleId,loaded:!1,exports:{}};return __webpack_modules__[moduleId].call(module.exports,module,module.exports,__webpack_require__),module.loaded=!0,module.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.amdO={},(()=>{var deferred=[];__webpack_require__.O=(result,chunkIds,fn,priority)=>{if(chunkIds){priority=priority||0;for(var i=deferred.length;i>0&&deferred[i-1][2]>priority;i--)deferred[i]=deferred[i-1];deferred[i]=[chunkIds,fn,priority];return}for(var notFulfilled=1/0,i=0;i<deferred.length;i++){for(var chunkIds=deferred[i][0],fn=deferred[i][1],priority=deferred[i][2],fulfilled=!0,j=0;j<chunkIds.length;j++)notFulfilled>=priority&&Object.keys(__webpack_require__.O).every(key=>__webpack_require__.O[key](chunkIds[j]))?chunkIds.splice(j--,1):(fulfilled=!1,priority<notFulfilled&&(notFulfilled=priority));if(fulfilled){deferred.splice(i--,1);var r=fn();void 0!==r&&(result=r)}}return result}})(),__webpack_require__.n=module=>{var getter=module&&module.__esModule?()=>module.default:()=>module;return __webpack_require__.d(getter,{a:getter}),getter},(()=>{var leafPrototypes,getProto=Object.getPrototypeOf?obj=>Object.getPrototypeOf(obj):obj=>obj.__proto__;__webpack_require__.t=function(value,mode){if(1&mode&&(value=this(value)),8&mode||"object"==typeof value&&value&&(4&mode&&value.__esModule||16&mode&&"function"==typeof value.then))return value;var ns=Object.create(null);__webpack_require__.r(ns);var def={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var current=2&mode&&value;"object"==typeof current&&!~leafPrototypes.indexOf(current);current=getProto(current))Object.getOwnPropertyNames(current).forEach(key=>def[key]=()=>value[key]);return def.default=()=>value,__webpack_require__.d(ns,def),ns}})(),__webpack_require__.d=(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})},__webpack_require__.f={},__webpack_require__.e=chunkId=>Promise.all(Object.keys(__webpack_require__.f).reduce((promises,key)=>(__webpack_require__.f[key](chunkId,promises),promises),[])),__webpack_require__.u=chunkId=>""+(({119:"Presentation-ui-components-MessageInput-MessageInput-stories",148:"Presentation-ui-components-Dropdown-Dropdown-stories",181:"Presentation-ui-components-Badge-Badge-stories",229:"docs-Styling-mdx",231:"Presentation-ui-components-SettingsItem-SettingsItem-stories",267:"Presentation-ui-components-Toast-Toast-stories",356:"Presentation-ui-components-Loader-Loader-stories",594:"Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories",626:"Presentation-ui-components-Button-Button-stories",658:"Presentation-ui-components-MessageSeparator-MessageSeparator-stories",665:"Presentation-ui-components-DialogWindow-DialogWindow-stories",687:"Presentation-ui-components-Message-Message-stories",715:"docs-Introduction-mdx",752:"Presentation-ui-components-Header-Header-stories",794:"Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories",874:"Presentation-ui-components-Placeholder-Placeholder-stories",909:"Presentation-ui-components-TextField-TextField-stories",944:"Presentation-ui-components-DialogBanner-DialogBanner-stories",949:"Presentation-ui-components-Avatar-avatar-stories",968:"Presentation-ui-components-UserListItem-UserListItem-stories"})[chunkId]||chunkId)+"."+({119:"0d1800d9",148:"141a3ae7",181:"9449e470",229:"72149f36",231:"429a72d5",267:"1b8758fc",356:"af01e15d",426:"be971fb5",433:"dffc897e",594:"a9f5cd67",603:"4cf0423b",607:"b04b9f0b",626:"84103f20",658:"a7d43c0b",665:"f81a8e38",687:"264d251d",703:"f12f2e71",715:"9dc275f1",729:"734b4ae4",752:"9f45c30e",768:"e44c05aa",794:"bf9005d3",797:"b3873e04",874:"97287936",909:"fd8caf6c",938:"56e9d83c",944:"fa91d2c7",949:"1b74ae55",968:"8781472b"})[chunkId]+".iframe.bundle.js",__webpack_require__.miniCssF=chunkId=>"static/css/"+({119:"Presentation-ui-components-MessageInput-MessageInput-stories",148:"Presentation-ui-components-Dropdown-Dropdown-stories",181:"Presentation-ui-components-Badge-Badge-stories",231:"Presentation-ui-components-SettingsItem-SettingsItem-stories",267:"Presentation-ui-components-Toast-Toast-stories",356:"Presentation-ui-components-Loader-Loader-stories",594:"Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories",626:"Presentation-ui-components-Button-Button-stories",658:"Presentation-ui-components-MessageSeparator-MessageSeparator-stories",665:"Presentation-ui-components-DialogWindow-DialogWindow-stories",687:"Presentation-ui-components-Message-Message-stories",752:"Presentation-ui-components-Header-Header-stories",794:"Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories",874:"Presentation-ui-components-Placeholder-Placeholder-stories",909:"Presentation-ui-components-TextField-TextField-stories",944:"Presentation-ui-components-DialogBanner-DialogBanner-stories",949:"Presentation-ui-components-Avatar-avatar-stories",968:"Presentation-ui-components-UserListItem-UserListItem-stories"})[chunkId]+"."+({119:"7eb916fc",148:"e37f549d",181:"7b8317f8",231:"b67b748b",267:"a5b284f4",356:"dab34da1",594:"31cd021e",626:"1b6e1c55",658:"34aa36b2",665:"4f813450",687:"4c915c89",752:"fb1001e7",794:"6d563072",874:"cb7fb80a",909:"412027f8",944:"bd07fad3",949:"7b228eb0",968:"655aa6c1"})[chunkId]+".chunk.css",__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),(()=>{var inProgress={},dataWebpackPrefix="quickblox-react-ui-kit:";__webpack_require__.l=(url,done,key,chunkId)=>{if(inProgress[url]){inProgress[url].push(done);return}if(void 0!==key)for(var script,needAttach,scripts=document.getElementsByTagName("script"),i=0;i<scripts.length;i++){var s=scripts[i];if(s.getAttribute("src")==url||s.getAttribute("data-webpack")==dataWebpackPrefix+key){script=s;break}}script||(needAttach=!0,(script=document.createElement("script")).charset="utf-8",script.timeout=120,__webpack_require__.nc&&script.setAttribute("nonce",__webpack_require__.nc),script.setAttribute("data-webpack",dataWebpackPrefix+key),script.src=url),inProgress[url]=[done];var onScriptComplete=(prev,event)=>{script.onerror=script.onload=null,clearTimeout(timeout);var doneFns=inProgress[url];if(delete inProgress[url],script.parentNode&&script.parentNode.removeChild(script),doneFns&&doneFns.forEach(fn=>fn(event)),prev)return prev(event)},timeout=setTimeout(onScriptComplete.bind(null,void 0,{type:"timeout",target:script}),12e4);script.onerror=onScriptComplete.bind(null,script.onerror),script.onload=onScriptComplete.bind(null,script.onload),needAttach&&document.head.appendChild(script)}})(),__webpack_require__.r=exports=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})},__webpack_require__.nmd=module=>(module.paths=[],module.children||(module.children=[]),module),__webpack_require__.p="",(()=>{if("undefined"!=typeof document){var createStylesheet=(chunkId,fullhref,oldTag,resolve,reject)=>{var linkTag=document.createElement("link");return linkTag.rel="stylesheet",linkTag.type="text/css",linkTag.onerror=linkTag.onload=event=>{if(linkTag.onerror=linkTag.onload=null,"load"===event.type)resolve();else{var errorType=event&&("load"===event.type?"missing":event.type),realHref=event&&event.target&&event.target.href||fullhref,err=Error("Loading CSS chunk "+chunkId+" failed.\n("+realHref+")");err.code="CSS_CHUNK_LOAD_FAILED",err.type=errorType,err.request=realHref,linkTag.parentNode.removeChild(linkTag),reject(err)}},linkTag.href=fullhref,oldTag?oldTag.parentNode.insertBefore(linkTag,oldTag.nextSibling):document.head.appendChild(linkTag),linkTag},findStylesheet=(href,fullhref)=>{for(var existingLinkTags=document.getElementsByTagName("link"),i=0;i<existingLinkTags.length;i++){var tag=existingLinkTags[i],dataHref=tag.getAttribute("data-href")||tag.getAttribute("href");if("stylesheet"===tag.rel&&(dataHref===href||dataHref===fullhref))return tag}for(var existingStyleTags=document.getElementsByTagName("style"),i=0;i<existingStyleTags.length;i++){var tag=existingStyleTags[i],dataHref=tag.getAttribute("data-href");if(dataHref===href||dataHref===fullhref)return tag}},loadStylesheet=chunkId=>new Promise((resolve,reject)=>{var href=__webpack_require__.miniCssF(chunkId),fullhref=__webpack_require__.p+href;if(findStylesheet(href,fullhref))return resolve();createStylesheet(chunkId,fullhref,null,resolve,reject)}),installedCssChunks={303:0};__webpack_require__.f.miniCss=(chunkId,promises)=>{installedCssChunks[chunkId]?promises.push(installedCssChunks[chunkId]):0!==installedCssChunks[chunkId]&&({119:1,148:1,181:1,231:1,267:1,356:1,594:1,626:1,658:1,665:1,687:1,752:1,794:1,874:1,909:1,944:1,949:1,968:1})[chunkId]&&promises.push(installedCssChunks[chunkId]=loadStylesheet(chunkId).then(()=>{installedCssChunks[chunkId]=0},e=>{throw delete installedCssChunks[chunkId],e}))}}})(),(()=>{var installedChunks={303:0};__webpack_require__.f.j=(chunkId,promises)=>{var installedChunkData=__webpack_require__.o(installedChunks,chunkId)?installedChunks[chunkId]:void 0;if(0!==installedChunkData){if(installedChunkData)promises.push(installedChunkData[2]);else if(303!=chunkId){var promise=new Promise((resolve,reject)=>installedChunkData=installedChunks[chunkId]=[resolve,reject]);promises.push(installedChunkData[2]=promise);var url=__webpack_require__.p+__webpack_require__.u(chunkId),error=Error();__webpack_require__.l(url,event=>{if(__webpack_require__.o(installedChunks,chunkId)&&(0!==(installedChunkData=installedChunks[chunkId])&&(installedChunks[chunkId]=void 0),installedChunkData)){var errorType=event&&("load"===event.type?"missing":event.type),realSrc=event&&event.target&&event.target.src;error.message="Loading chunk "+chunkId+" failed.\n("+errorType+": "+realSrc+")",error.name="ChunkLoadError",error.type=errorType,error.request=realSrc,installedChunkData[1](error)}},"chunk-"+chunkId,chunkId)}else installedChunks[chunkId]=0}},__webpack_require__.O.j=chunkId=>0===installedChunks[chunkId];var webpackJsonpCallback=(parentChunkLoadingFunction,data)=>{var moduleId,chunkId,chunkIds=data[0],moreModules=data[1],runtime=data[2],i=0;if(chunkIds.some(id=>0!==installedChunks[id])){for(moduleId in moreModules)__webpack_require__.o(moreModules,moduleId)&&(__webpack_require__.m[moduleId]=moreModules[moduleId]);if(runtime)var result=runtime(__webpack_require__)}for(parentChunkLoadingFunction&&parentChunkLoadingFunction(data);i<chunkIds.length;i++)chunkId=chunkIds[i],__webpack_require__.o(installedChunks,chunkId)&&installedChunks[chunkId]&&installedChunks[chunkId][0](),installedChunks[chunkId]=0;return __webpack_require__.O(result)},chunkLoadingGlobal=self.webpackChunkquickblox_react_ui_kit=self.webpackChunkquickblox_react_ui_kit||[];chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null,0)),chunkLoadingGlobal.push=webpackJsonpCallback.bind(null,chunkLoadingGlobal.push.bind(chunkLoadingGlobal))})(),__webpack_require__.nc=void 0})();
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"outDir": "./dist/",
|
|
4
|
+
"sourceMap": true,
|
|
5
|
+
"declaration": true,
|
|
6
|
+
"target": "es5",
|
|
7
|
+
"lib": [
|
|
8
|
+
"es2015",
|
|
9
|
+
"dom",
|
|
10
|
+
"dom.iterable",
|
|
11
|
+
"esnext"
|
|
12
|
+
],
|
|
13
|
+
"allowJs": true,
|
|
14
|
+
"skipLibCheck": true,
|
|
15
|
+
"esModuleInterop": true,
|
|
16
|
+
"allowSyntheticDefaultImports": true,
|
|
17
|
+
"strict": true,
|
|
18
|
+
"forceConsistentCasingInFileNames": true,
|
|
19
|
+
"noFallthroughCasesInSwitch": true,
|
|
20
|
+
"module": "commonjs",
|
|
21
|
+
"moduleResolution": "node",
|
|
22
|
+
"resolveJsonModule": true,
|
|
23
|
+
"isolatedModules": true,
|
|
24
|
+
"noEmit": false,
|
|
25
|
+
"jsx": "react-jsx",
|
|
26
|
+
},
|
|
27
|
+
"include": [
|
|
28
|
+
"src",
|
|
29
|
+
"global.d.ts"
|
|
30
|
+
],
|
|
31
|
+
"exclude": ["node_modules", "dist"]
|
|
32
|
+
|
|
33
|
+
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
(self.webpackChunkquickblox_react_ui_kit=self.webpackChunkquickblox_react_ui_kit||[]).push([[715],{"./node_modules/@mdx-js/react/lib/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{NF:()=>withMDXComponents,Zo:()=>MDXProvider,ah:()=>useMDXComponents,pC:()=>MDXContext});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");let MDXContext=react__WEBPACK_IMPORTED_MODULE_0__.createContext({});function withMDXComponents(Component){return boundMDXComponent;function boundMDXComponent(props){let allComponents=useMDXComponents(props.components);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,{...props,allComponents})}}function useMDXComponents(components){let contextComponents=react__WEBPACK_IMPORTED_MODULE_0__.useContext(MDXContext);return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(()=>"function"==typeof components?components(contextComponents):{...contextComponents,...components},[contextComponents,components])}let emptyObject={};function MDXProvider({components,children,disableParentContext}){let allComponents;return allComponents=disableParentContext?"function"==typeof components?components({}):components||emptyObject:useMDXComponents(components),react__WEBPACK_IMPORTED_MODULE_0__.createElement(MDXContext.Provider,{value:allComponents},children)}},"./src/docs/Introduction.mdx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__}),__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),_Users_artemkoltunov_Desktop_03_react_ui_kit_public_node_modules_storybook_addon_docs_dist_shims_mdx_react_shim__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/blocks/dist/index.mjs");function _createMdxContent(props){let _components=Object.assign({h1:"h1",a:"a",p:"p",h3:"h3",pre:"pre",code:"code",h4:"h4",blockquote:"blockquote",strong:"strong",ul:"ul",li:"li",ol:"ol"},(0,_Users_artemkoltunov_Desktop_03_react_ui_kit_public_node_modules_storybook_addon_docs_dist_shims_mdx_react_shim__WEBPACK_IMPORTED_MODULE_2__.ah)(),props.components);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_blocks__WEBPACK_IMPORTED_MODULE_3__.h_,{title:"📕 Documentation/Introduction"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h1,{id:"introduction",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"https://docs.quickblox.com/docs/react-uikit-send-your-first-message#importing-dependencies-in-the-project",target:"_blank",rel:"nofollow noopener noreferrer",children:"Introduction"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The QuickBlox UIKit for React comprises a collection of pre-assembled UI components that enable effortless creation of an in-app chat equipped with all the necessary messaging functionalities. Our development kit encompasses light and dark themes, colors, and various other features. These components can be personalized to fashion an engaging messaging interface that reflects your brand's distinct identity."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The QuickBlox UIKit fully supports both private and group dialogs. To initiate the process of sending a message from the ground up using Java or Kotlin, please refer to the instructions provided in the guide below."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"installation",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"https://docs.quickblox.com/docs/react-uikit-send-your-first-message#step2-adding-dependencies-to-a-react-project",target:"_blank",rel:"nofollow noopener noreferrer",children:"Installation"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"To successfully integrate QuickBlox functionality into your React project, you need to add two main dependencies: quickblox and quickblox-react-ui-kit. By following the documentation, you can easily add these packages to your project."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-bash",children:"npm install quickblox --save\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-bash",children:"npm install quickblox-react-ui-kit --save\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h4,{id:"importing-dependencies-in-the-project",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"https://docs.quickblox.com/docs/react-uikit-send-your-first-message#importing-dependencies-in-the-project",target:"_blank",rel:"nofollow noopener noreferrer",children:"Importing Dependencies in the Project"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Open the file where you want to use QuickBlox functionality, such as App.tsx\nAdd the following lines at the beginning of the file to import the dependencies:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.blockquote,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Note: We are using // @ts-ignor in TypeScript because QuickBlox SDK doesn't share types."})}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-ts",children:"// @ts-ignore\nimport * as QB from 'quickblox/quickblox';\nimport 'quickblox-react-ui-kit';\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"adding-qbconfigts-file-to-your-react-application",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"https://docs.quickblox.com/docs/react-uikit-send-your-first-message#step-3-adding-qbconfigts-file-to-your-react-application",target:"_blank",rel:"nofollow noopener noreferrer",children:"Adding QBconfig.ts File to Your React Application"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"To ensure proper configuration and functionality of the QuickBlox UIKit in your React application, it is essential to add a QBconfig.ts file to the src folder. This file allows you to define the necessary parameters for the QuickBlox UIKit.\nThe QBconfig.ts file contains various configuration settings that determine how the QuickBlox UIKit interacts with the QuickBlox JavaScript SDK and the backend services. These settings include:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"appId: This parameter represents the unique identifier assigned to your QuickBlox application. It helps establish a connection between the frontend and backend components.\nauthKey and authSecret: These parameters are used for authentication purposes. They ensure secure communication between your application and the QuickBlox backend.\naccountKey: This parameter identifies your QuickBlox account and provides access to the associated services.\napiEndpoint and chatEndpoint: These parameters define the API and chat endpoints provided by QuickBlox. They specify the URLs to which the QuickBlox UIKit will send requests for various functionalities."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-ts",children:"export const QBConfig = {\n credentials: {\n appId: YOUR_APP_ID_FROM_ADMIN_PANEL,\n accountKey: 'YOUR_ACCOUNT_KEY_FROM_ADMIN_PANEL',\n authKey: 'YOUR_AUTH_KEY_FROM_ADMIN_PANEL',\n authSecret: 'YOUR_AUTH_SECRET_FROM_ADMIN_PANEL',\n sessionToken: '',\n },\n appConfig: {\n chatProtocol: {\n Active: 2,\n },\n debug: false,\n endpoints: {\n apiEndpoint: 'https://api.quickblox.com',\n chatEndpoint: 'chat.quickblox.com',\n },\n on: {\n async sessionExpired(handleResponse: any, retry: any) {\n console.log(`Test sessionExpired… ${handleResponse} ${retry}`);\n },\n },\n streamManagement: {\n Enable: true,\n },\n },\n};\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"In this example, make sure to replace the placeholder values (YOUR_APP_ID_FROM_ADMIN_PANEL, YOUR_ACCOUNT_KEY_FROM_ADMIN_PANEL, YOUR_AUTH_KEY_FROM_ADMIN_PANEL, YOUR_AUTH_SECRET_FROM_ADMIN_PANEL) with the actual values obtained from your QuickBlox application.\nBy adding the QBconfig.ts file to your React application, you ensure that the QuickBlox UIKit is properly configured and can interact seamlessly with the QuickBlox backend services."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.blockquote,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.strong,{children:"Note: If you initialize your SDK using a session token, you need to not only fill the sessionToken field in QBConfig but also fill other properties in the same way as when using the initWithAppId method. See the link initialize QuickBlox SDK without Authorization Key and Secret."})}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Now we can add dependecies in our code. (Open your App.tsx and add that lines.)"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-ts",children:"import * as QB from 'quickblox/quickblox';\nimport 'quickblox-react-ui-kit';\nimport { QBConfig } from './QBconfig'; // this line is new\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"updating-the-project-structure-according-to-your-needs",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"https://docs.quickblox.com/docs/react-uikit-send-your-first-message#step-4-updating-the-project-structure-according-to-your-needs",target:"_blank",rel:"nofollow noopener noreferrer",children:"Updating the project structure according to your needs"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:'In order to enhance the organization and maintainability of your project, it is recommended to make changes to the structure of the App.tsx in the src folder.\nYou need to add a constant called "currentUser" inside the App() function in the App.tsx file, which describes your user registered in the admin panel, and configure the QuickBloxUIKitProvider. Additionally, import the necessary entities from quickblox-react-ui-kit.\nAs a result, you should have the code like code below:'}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-ts",children:"import React from 'react';\nimport type { QBSession, QBUser } from 'quickblox/quickblox';\nimport {\n QuickBloxUIKitProvider,\n QuickBloxUIKitDesktopLayout,\n} from 'quickblox-react-ui-kit';\nimport { QBConfig } from '../../configs/QBconfig';\nimport Header from '../../components/Header';\nimport SettingModal from '../../components/modals/SettingModal';\nimport LogoutModal from '../../components/modals/LogoutModal';\n\ninterface AppProps {\n session: QBSession;\n logout: VoidFunction;\n}\n\nconst App = (props: AppProps) => {\n const { session, logout } = props;\n const [user, setUser] = useState<QBUser | null>(null);\n\n return (\n <QuickBloxUIKitProvider\n maxFileSize={100 * 1000000}\n accountData={{ ...QBConfig.credentials, sessionToken: session.token }}\n qbConfig={{ ...QBConfig }}\n >\n <Header\n avatarUrl={avatarUrl}\n options={options}\n handleChange={handleChange}\n user={user}\n regex={regex}\n />\n <QuickBloxUIKitDesktopLayout uikitHeightOffset={'40px'} />\n <SettingModal\n user={user}\n avatarUrl={avatarUrl}\n selectedValue={selectedValue}\n setSelectedValue={setSelectedValue}\n regex={regex}\n setUser={setUser}\n />\n <LogoutModal\n selectedValue={selectedValue}\n setSelectedValue={setSelectedValue}\n handleLogout={logout}\n />\n </QuickBloxUIKitProvider>\n );\n};\n\nexport default App;\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"QuickBloxUIKitProvider can accept up to three parameters:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"maxFileSize - controls the maximum size of uploaded files."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"accountData - information about the application's account data."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"loginData - information about the logged-in user."}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Let's add the QuickBlox UIKit chat layer - QuickBloxUIKitDesktopLayout - to the markup of the main component of the application."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"If we do not specify a sessionToken in accountData, it means that the login and session start process occurs within our application. In this case, it is necessary to perform the following fifth step in our instruction.\nHowever, if the session start and application login process is already performed in another application, such as on a server, and we already have a ready sessionToken, then we can skip the next step."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h3,{id:"configure-quickbloxuikitprovider",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"https://docs.quickblox.com/docs/react-uikit-send-your-first-message#step-5-configure-quickbloxuikitprovider",target:"_blank",rel:"nofollow noopener noreferrer",children:"Configure QuickBloxUIKitProvider"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"To configure QuickBloxUIKitProvider and use QuickBloxUIKit in your application, follow these steps:\nInitialize DataContext:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ol,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"To work with QuickBlox, it is necessary to initialize the UI Kit react DataContext. It contains important data and settings for using QuickBloxSDK. The DataContext connects various components of the application and provides them access to shared data."}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-ts",children:"const qbUIKitContext: QBDataContextType = React.useContext(qbDataContext);\n\nconst [isUserAuthorized, setUserAuthorized] = React.useState(false);\nconst [isSDKInitialized, setSDKInitialized] = React.useState(false);\n\nconst prepareSDK = async (): Promise<void> => {\n // check if we have installed SDK\n if ((window as any).QB === undefined) {\n if (QB !== undefined) {\n (window as any).QB = QB;\n } else {\n let QBLib = require('quickblox/quickblox.min');\n (window as any).QB = QBLib;\n }\n }\n\n const APPLICATION_ID = QBConfig.credentials.appId;\n const AUTH_KEY = QBConfig.credentials.authKey;\n const AUTH_SECRET = QBConfig.credentials.authSecret;\n const ACCOUNT_KEY = QBConfig.credentials.accountKey;\n const CONFIG = QBConfig.appConfig;\n\n QB.init(APPLICATION_ID, AUTH_KEY, AUTH_SECRET, ACCOUNT_KEY, CONFIG);\n};\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ol,{start:"2",children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"We need to add user authentication, so to do this, we will introduce two states and use the useEffect hook:"}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-ts",children:"const [authorized, setAuthorized] = React.useState(false);\nconst [initedSDK, setInitedSDK] = React.useState(false);\n\n......\n\n useEffect(() => {\n if (!isSDKInitialized) {\n prepareSDK().then(result => {\n\n QB.createSession(currentUser, async function (errorCreateSession: any, session: any) {\n if (errorCreateSession) {\n console.log('Create User Session has error:', JSON.stringify(errorCreateSession));\n } else {\n const userId: number = session.user_id;\n const password: string = session.token;\n const paramsConnect = { userId, password };\n\n QB.chat.connect(paramsConnect, async function (errorConnect: any, resultConnect: any) {\n if (errorConnect) {\n console.log('Can not connect to chat server: ', errorConnect);\n } else {\n const authData: AuthorizationData = {\n userId: userId,\n password: password,\n userName: currentUser.login,\n sessionToken: session.token\n };\n await qbUIKitContext.authorize(authData);\n setSDKInitialized(true);\n setUserAuthorized(true);\n }\n });\n }\n });\n }).catch(\n e => {\n console.log('init SDK has error: ', e)\n });\n }\n }, []);\n\n ......\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"After implementing all the steps, your App.tsx file should look like this. You can compare it this your code or copy it instead of."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-ts",children:"import React, { useEffect } from 'react';\n\n// @ts-ignore\nimport * as QB from 'quickblox/quickblox';\nimport {\n QuickBloxUIKitProvider,\n qbDataContext,\n QuickBloxUIKitDesktopLayout,\n LoginData,\n AuthorizationData,\n QBDataContextType,\n} from 'quickblox-react-ui-kit';\nimport { QBConfig } from './QBconfig';\nimport './App.css';\n\nfunction App() {\n const currentUser: LoginData = {\n login: '',\n password: '',\n };\n\n const qbUIKitContext: QBDataContextType = React.useContext(qbDataContext);\n\n const [isUserAuthorized, setUserAuthorized] = React.useState(false);\n const [isSDKInitialized, setSDKInitialized] = React.useState(false);\n\n const prepareSDK = async (): Promise<void> => {\n // check if we have installed SDK\n if ((window as any).QB === undefined) {\n if (QB !== undefined) {\n (window as any).QB = QB;\n } else {\n let QBLib = require('quickblox/quickblox.min');\n (window as any).QB = QBLib;\n }\n }\n\n const APPLICATION_ID = QBConfig.credentials.appId;\n const AUTH_KEY = QBConfig.credentials.authKey;\n const AUTH_SECRET = QBConfig.credentials.authSecret;\n const ACCOUNT_KEY = QBConfig.credentials.accountKey;\n const CONFIG = QBConfig.appConfig;\n\n QB.init(APPLICATION_ID, AUTH_KEY, AUTH_SECRET, ACCOUNT_KEY, CONFIG);\n };\n\n useEffect(() => {\n if (!isSDKInitialized) {\n prepareSDK()\n .then((result) => {\n QB.createSession(\n currentUser,\n async function (errorCreateSession: any, session: any) {\n if (errorCreateSession) {\n console.log(\n 'Create User Session has error:',\n JSON.stringify(errorCreateSession),\n );\n } else {\n const userId: number = session.user_id;\n const password: string = session.token;\n const paramsConnect = { userId, password };\n\n QB.chat.connect(\n paramsConnect,\n async function (errorConnect: any, resultConnect: any) {\n if (errorConnect) {\n console.log(\n 'Can not connect to chat server: ',\n errorConnect,\n );\n } else {\n const authData: AuthorizationData = {\n userId: userId,\n password: password,\n userName: currentUser.login,\n sessionToken: session.token,\n };\n await qbUIKitContext.authorize(authData);\n setSDKInitialized(true);\n setUserAuthorized(true);\n }\n },\n );\n }\n },\n );\n })\n .catch((e) => {\n console.log('init SDK has error: ', e);\n });\n }\n }, []);\n\n return (\n <div>\n <QuickBloxUIKitProvider\n maxFileSize={100 * 1000000}\n accountData={{ ...QBConfig.credentials }}\n loginData={{\n login: currentUser.login,\n password: currentUser.password,\n }}\n >\n <div className=\"App\">\n {\n // React states indicating the ability to render UI\n isSDKInitialized && isUserAuthorized ? (\n <QuickBloxUIKitDesktopLayout />\n ) : (\n <div>wait while SDK is initializing...</div>\n )\n }\n </div>\n </QuickBloxUIKitProvider>\n </div>\n );\n}\n\nexport default App;\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"You should run the application using the command:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-bash",children:"npm start\n"})})]})}let __WEBPACK_DEFAULT_EXPORT__=function(props={}){let{wrapper:MDXLayout}=Object.assign({},(0,_Users_artemkoltunov_Desktop_03_react_ui_kit_public_node_modules_storybook_addon_docs_dist_shims_mdx_react_shim__WEBPACK_IMPORTED_MODULE_2__.ah)(),props.components);return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,Object.assign({},props,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,props)})):_createMdxContent(props)}},"./node_modules/memoizerific sync recursive":module=>{function webpackEmptyContext(req){var e=Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id="./node_modules/memoizerific sync recursive",module.exports=webpackEmptyContext},"./node_modules/react/cjs/react-jsx-runtime.production.min.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var f=__webpack_require__("./node_modules/react/index.js"),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function q(c,a,g){var b,d={},e=null,h=null;for(b in void 0!==g&&(e=""+g),void 0!==a.key&&(e=""+a.key),void 0!==a.ref&&(h=a.ref),a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l,exports.jsx=q,exports.jsxs=q},"./node_modules/react/jsx-runtime.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module.exports=__webpack_require__("./node_modules/react/cjs/react-jsx-runtime.production.min.js")}}]);
|
|
10
|
-
//# sourceMappingURL=docs-Introduction-mdx.bcb06844.iframe.bundle.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
(self.webpackChunkquickblox_react_ui_kit=self.webpackChunkquickblox_react_ui_kit||[]).push([[229],{"./node_modules/@mdx-js/react/lib/index.js":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{NF:()=>withMDXComponents,Zo:()=>MDXProvider,ah:()=>useMDXComponents,pC:()=>MDXContext});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/react/index.js");let MDXContext=react__WEBPACK_IMPORTED_MODULE_0__.createContext({});function withMDXComponents(Component){return boundMDXComponent;function boundMDXComponent(props){let allComponents=useMDXComponents(props.components);return react__WEBPACK_IMPORTED_MODULE_0__.createElement(Component,{...props,allComponents})}}function useMDXComponents(components){let contextComponents=react__WEBPACK_IMPORTED_MODULE_0__.useContext(MDXContext);return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(()=>"function"==typeof components?components(contextComponents):{...contextComponents,...components},[contextComponents,components])}let emptyObject={};function MDXProvider({components,children,disableParentContext}){let allComponents;return allComponents=disableParentContext?"function"==typeof components?components({}):components||emptyObject:useMDXComponents(components),react__WEBPACK_IMPORTED_MODULE_0__.createElement(MDXContext.Provider,{value:allComponents},children)}},"./src/docs/Styling.mdx":(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{default:()=>__WEBPACK_DEFAULT_EXPORT__}),__webpack_require__("./node_modules/react/index.js");var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__("./node_modules/react/jsx-runtime.js"),_Users_artemkoltunov_Desktop_03_react_ui_kit_public_node_modules_storybook_addon_docs_dist_shims_mdx_react_shim__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__("./node_modules/@mdx-js/react/lib/index.js"),_storybook_blocks__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__("./node_modules/@storybook/blocks/dist/index.mjs");function _createMdxContent(props){let _components=Object.assign({h1:"h1",a:"a",p:"p",h2:"h2",img:"img",pre:"pre",code:"code",ul:"ul",li:"li"},(0,_Users_artemkoltunov_Desktop_03_react_ui_kit_public_node_modules_storybook_addon_docs_dist_shims_mdx_react_shim__WEBPACK_IMPORTED_MODULE_2__.ah)(),props.components);return(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment,{children:[(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_storybook_blocks__WEBPACK_IMPORTED_MODULE_3__.h_,{title:"📕 Documentation/Styling"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h1,{id:"customization",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"https://docs.quickblox.com/docs/react-uikit-customization",target:"_blank",rel:"nofollow noopener noreferrer",children:"Customization"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The QuickBlox UIKit for React allows you to create your own unique view of the UIKit."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h2,{id:"default-themes",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"https://docs.quickblox.com/docs/react-uikit-customization#default-themes",target:"_blank",rel:"nofollow noopener noreferrer",children:"Default themes"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"The QuickBlox UIKit for React has 2 built in themes: Dark and Light."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h2,{id:"color-theme",children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.a,{href:"",children:"Color Theme"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.img,{src:"https://files.readme.io/393b8d6-ColorTheme.png",alt:"Image"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Default theme for UIKit is Light.\nTo set theme you need to set value 'dark' to key data-theme in global styles (html[data-theme=\"dark”]).\nFor example, you can use pure JavaScript:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-js",children:"document.documentElement.setAttribute('data-theme', 'dark');\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h2,{id:"use-your-own-theme",children:"Use your own theme"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"There are two options how you can create your own theme:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"Customize current theme using css"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"Create your own theme to customize selected components"}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"To customize the current theme you just need to set the new colors in css variables."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"Or you can create your own theme. To do this you need to create a new class that implements the UiKitTheme interface."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"To use your own theme using css you need to create _theme_colors_scheme.scss and set colors"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-scss",children:"$background-overlay-light: rgba(19, 29, 40, 0.8);\n$background-overlay-dark: rgba(144, 151, 159, 0.8);\n$primary-50: #e7efff;\n$primary-100: #c4d7fe;\n$primary-200: #9cbcfe;\n$primary-300: #74a1fd;\n$primary-400: #578cfc;\n$primary-500: #3978fc;\n$primary-600: #3370fc;\n$primary-700: #2c65fb;\n$primary-800: #245bfb;\n$primary-900: #1748fa;\n$primary-a-100: #ffffff;\n$primary-a-200: #f7f9ff;\n$primary-a-400: #c4cfff;\n$primary-a-700: #abbaff;\n$secondary-50: #e4e6e8;\n$secondary-100: #bcc1c5;\n$secondary-200: #90979f;\n$secondary-300: #636d78;\n$secondary-400: #414e5b;\n$secondary-500: #202f3e;\n$secondary-600: #1c2a38;\n$secondary-700: #182330;\n$secondary-800: #131d28;\n$secondary-900: #0b121b;\n$secondary-a-100: #74a1fd;\n$secondary-a-200: #3978fc;\n$secondary-a-400: #245bfb;\n$secondary-a-700: #0050dc;\n$system-green-100: #c8f1d6;\n$system-green-200: #a4e7bb;\n$system-green-300: #80dda0;\n$system-green-400: #64d68b;\n$system-green-500: #49cf77;\n$error-100: #ffc4c1;\n$error-200: #ff9d98;\n$error-300: #ff766e;\n$error-400: #ff584f;\n$error-500: #ff3b30;\n$information: #fdb0ff;\n$highlight: #fffdc1;\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"To use your own new theme colors create _theme_dark.scss and _theme_light.scss files and set color variable."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-scss",children:"// _theme_dark.scss:\n\nhtml[data-theme='dark'] {\n --color-background-info: #{$primary-500};\n --tertiary-elements: #{$background-overlay-dark};\n --main-elements: #{$primary-300};\n --secondary-elements: #{$primary-a-100};\n --input-elements: #{$secondary-200};\n --disabled-elements: #{$secondary-300};\n --field-border: #{$secondary-200};\n --main-text: #{$primary-a-100};\n --secondary-text: #{$secondary-200};\n --caption: #{$secondary-100};\n --main-background: #{$secondary-500};\n --secondary-background: #{$secondary-800};\n --incoming-background: #{$secondary-400};\n --outgoing-background: #{$primary-500};\n --dropdown-background: #{$secondary-400};\n --chat-input: #{$secondary-800};\n --divider: #{$secondary-400};\n --error: #{$error-300};\n --hightlight: #{$highlight};\n}\n\n// _theme_light.scss:\n:root {\n --color-background-info: #{$primary-100};\n --tertiary-elements: #{$secondary-300};\n --main-elements: #{$primary-500};\n --secondary-elements: #{$secondary-500};\n --input-elements: #{$secondary-500};\n --disabled-elements: #{$secondary-100};\n --field-border: #{$secondary-200};\n --main-text: #{$secondary-900};\n --secondary-text: #{$secondary-300};\n --caption: #{$secondary-200};\n --main-background: #{$primary-a-100};\n --secondary-background: #{$primary-a-100};\n --secondary-background-modal: #{$background-overlay-light};\n --incoming-background: #{$secondary-50};\n --outgoing-background: #{$primary-50};\n --dropdown-background: #{$primary-a-100};\n --chat-input: #{$primary-a-200};\n --divider: #{$primary-50};\n --error: #{$error-500};\n --hightlight: #{$highlight};\n}\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"To create your own theme to customize selected components you need to create a new class that implements the UiKitTheme interface."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-ts",children:"//DefaultTheme implements UiKitTheme\nexport default class CustomTheme extends DefaultTheme {\n divider = (): string => 'var(--divider)';\n mainText = (): string => '#FFFFFF';\n fontFamily = (): string => 'Roboto';\n /*\n The DefaultTheme contains other theme methods :\n caption = (): string => 'var(--caption)';\n chatInput = (): string => 'var(--chat-input)';\n disabledElements = (): string => 'var(--disabled-elements)';\n dropdownBackground = (): string => 'var(--dropdown-background)';\n error = (): string => 'var(--error)';\n fieldBorder = (): string => 'var(--field-border)';\n hightlight = (): string => 'var(--hightlight)';\n incomingBackground = (): string => 'var(--incoming-background)';\n inputElements = (): string => 'var(--input-elements)';\n mainBackground = (): string => 'var(--main-background)';\n mainElements = (): string => 'var(--main-elements)';\n outgoingBackground = (): string => 'var(--outgoing-background)';\n secondaryBackground = (): string => 'var(--secondary-background)';\n secondaryElements = (): string => 'var(--secondary-elements)';\n secondaryText = (): string => 'var(--secondary-text)';\n */\n}\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"and specify selected components:"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(_components.ul,{children:["\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.li,{children:"desktop layout container"}),"\n"]}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-ts",children:"<QuickBloxUIKitDesktopLayout theme={new CustomTheme()}>\n"})}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.h1,{id:"custom-styling",children:"Custom styling"}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.p,{children:"We have developed our components with the ability to be customized to individual needs, so each component accepts a prop called className, allowing the user to apply their own styles to the component."}),"\n",(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.pre,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_components.code,{className:"language-ts",children:"import { Button } from '../../ui-components';\nimport './style.scss';\n\n<Button className=\"button\">Button</Button>;\n"})})]})}let __WEBPACK_DEFAULT_EXPORT__=function(props={}){let{wrapper:MDXLayout}=Object.assign({},(0,_Users_artemkoltunov_Desktop_03_react_ui_kit_public_node_modules_storybook_addon_docs_dist_shims_mdx_react_shim__WEBPACK_IMPORTED_MODULE_2__.ah)(),props.components);return MDXLayout?(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MDXLayout,Object.assign({},props,{children:(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_createMdxContent,props)})):_createMdxContent(props)}},"./node_modules/memoizerific sync recursive":module=>{function webpackEmptyContext(req){var e=Error("Cannot find module '"+req+"'");throw e.code="MODULE_NOT_FOUND",e}webpackEmptyContext.keys=()=>[],webpackEmptyContext.resolve=webpackEmptyContext,webpackEmptyContext.id="./node_modules/memoizerific sync recursive",module.exports=webpackEmptyContext},"./node_modules/react/cjs/react-jsx-runtime.production.min.js":(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var f=__webpack_require__("./node_modules/react/index.js"),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};function q(c,a,g){var b,d={},e=null,h=null;for(b in void 0!==g&&(e=""+g),void 0!==a.key&&(e=""+a.key),void 0!==a.ref&&(h=a.ref),a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l,exports.jsx=q,exports.jsxs=q},"./node_modules/react/jsx-runtime.js":(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module.exports=__webpack_require__("./node_modules/react/cjs/react-jsx-runtime.production.min.js")}}]);
|
|
10
|
-
//# sourceMappingURL=docs-Styling-mdx.1d6c1212.iframe.bundle.js.map
|