quickblox-react-ui-kit 0.3.0-beta.1 → 0.3.0-beta.3
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/.storybook/main.ts +26 -0
- package/.storybook/preview.ts +16 -0
- package/README.md +5 -1
- package/dist/Data/repository/DialogsRepository.d.ts +1 -0
- package/dist/Data/source/remote/IRemoteDataSource.d.ts +1 -0
- package/dist/Data/source/remote/RemoteDataSource.d.ts +2 -0
- package/dist/Domain/entity/DialogEventInfo.d.ts +4 -0
- package/dist/Domain/use_cases/GetAllMessagesForDialog.d.ts +3 -3
- package/dist/Domain/use_cases/UpdateCurrentDialogInDataSourceUseCase.d.ts +10 -0
- package/dist/Presentation/Views/Dialog/AIComponents/AIAssist/AIAssist.d.ts +16 -0
- package/dist/Presentation/Views/Dialog/AIComponents/AITranslate/AITranslate.d.ts +20 -0
- package/dist/Presentation/Views/Dialog/DialogViewModel.d.ts +2 -0
- package/dist/Presentation/Views/Dialog/MessageItem/MessageItem.d.ts +22 -0
- package/dist/Presentation/Views/DialogInfo/DialogInfo.d.ts +1 -2
- package/dist/Presentation/Views/DialogList/DialogList.d.ts +5 -3
- package/dist/Presentation/Views/Flow/CreateDialogFlow/CreateNewDialogFlow.d.ts +3 -0
- package/dist/Presentation/Views/YesNoQuestion/YesNoQuestion.d.ts +0 -1
- package/dist/Presentation/ui-components/Message/Message.d.ts +3 -3
- package/dist/Presentation/ui-components/Message/Message.stories.d.ts +0 -1
- package/dist/Presentation/ui-components/MessageInput/MessageInput.stories.d.ts +4 -4
- package/dist/Presentation/ui-components/Placeholder/Placeholder.d.ts +2 -2
- package/dist/Presentation/ui-components/UserListItem/UserListItem.d.ts +11 -0
- package/dist/Presentation/ui-components/UserListItem/UserListItem.stories.d.ts +86 -0
- package/dist/Presentation/ui-components/index.d.ts +6 -0
- package/dist/hooks/useModal.d.ts +5 -0
- package/dist/index-ui.js +1924 -2183
- package/dist/index-ui.js.map +1 -1
- package/dist/qb-api-calls/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/App.tsx +2 -2
- package/src/Data/DefaultConfigurations.ts +4 -4
- package/src/Data/repository/DialogsRepository.ts +16 -0
- package/src/Data/source/remote/IRemoteDataSource.ts +2 -0
- package/src/Data/source/remote/RemoteDataSource.ts +89 -10
- package/src/Domain/entity/DialogEventInfo.ts +4 -0
- package/src/Domain/use_cases/GetAllMessagesForDialog.ts +3 -3
- package/src/Domain/use_cases/GetDialogByIdUseCase.ts +5 -1
- package/src/Domain/use_cases/UpdateCurrentDialogInDataSourceUseCase.ts +31 -0
- package/src/Presentation/Views/Dialog/AIComponents/AIAssist/AIAssist.tsx +64 -0
- package/src/Presentation/Views/Dialog/AIComponents/AITranslate/AITranslate.tsx +117 -0
- package/src/Presentation/Views/Dialog/Dialog.tsx +0 -22
- package/src/Presentation/Views/Dialog/DialogViewModel.ts +2 -0
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/DialogsWithSearch.scss +10 -0
- package/src/Presentation/Views/Dialog/ForwardMessageFlow/DialogsWithSearch/DialogsWithSearch.tsx +12 -13
- package/src/Presentation/{ui-components/Message → Views/Dialog}/MessageContextMenu/MessageContextMenu.tsx +2 -2
- package/src/Presentation/{ui-components → Views/Dialog}/MessageItem/MessageItem.scss +1 -2
- package/src/Presentation/Views/Dialog/MessageItem/MessageItem.tsx +372 -0
- package/src/Presentation/Views/Dialog/useDialogViewModel.ts +65 -32
- package/src/Presentation/Views/DialogInfo/DialogInfo.scss +17 -11
- package/src/Presentation/Views/DialogInfo/DialogInfo.tsx +115 -120
- package/src/Presentation/Views/DialogInfo/MembersList/MembersList.scss +8 -99
- package/src/Presentation/Views/DialogInfo/MembersList/MembersList.tsx +9 -29
- package/src/Presentation/Views/DialogInfo/UsersList/UsersList.tsx +8 -6
- package/src/Presentation/Views/DialogInfo/UsersList/useUsersListViewModel.ts +3 -1
- package/src/Presentation/Views/DialogList/DialogList.scss +19 -5
- package/src/Presentation/Views/DialogList/DialogList.tsx +91 -56
- package/src/Presentation/Views/DialogList/useDialogListViewModel.ts +111 -27
- package/src/Presentation/Views/EditDialog/EditDialog.scss +7 -46
- package/src/Presentation/Views/EditDialog/EditDialog.tsx +50 -67
- package/src/Presentation/Views/Flow/CreateDialogFlow/CreateNewDialogFlow.tsx +10 -19
- package/src/Presentation/Views/Flow/LeaveDialogFlow/LeaveDialogFlow.tsx +0 -11
- package/src/Presentation/Views/InviteMembers/InviteMembers.scss +61 -16
- package/src/Presentation/Views/InviteMembers/InviteMembers.tsx +53 -78
- package/src/Presentation/Views/PreviewDialog/PreviewDialog.scss +5 -1
- package/src/Presentation/Views/PreviewDialog/PreviewDialog.tsx +1 -0
- package/src/Presentation/Views/YesNoQuestion/YesNoQuestion.tsx +6 -18
- package/src/Presentation/icons/media/video-file.svg +2 -2
- package/src/Presentation/layouts/Desktop/DesktopLayout.scss +24 -8
- package/src/Presentation/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx +233 -200
- package/src/Presentation/providers/QuickBloxUIKitProvider/QuickBloxUIKitProvider.tsx +1 -2
- package/src/Presentation/ui-components/Avatar/avatar.stories.tsx +1 -1
- package/src/Presentation/ui-components/Badge/Badge.stories.ts +1 -1
- package/src/Presentation/ui-components/Button/Button.stories.ts +1 -1
- package/src/Presentation/ui-components/DialogBanner/DialogBanner.stories.ts +2 -1
- package/src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.stories.tsx +29 -1
- package/src/Presentation/ui-components/DialogItemPreview/DialogItemPreview.tsx +4 -1
- package/src/Presentation/ui-components/DialogWindow/DialogWindow.scss +5 -0
- package/src/Presentation/ui-components/DialogWindow/DialogWindow.stories.tsx +2 -1
- package/src/Presentation/ui-components/Dropdown/Dropdown.stories.tsx +6 -4
- package/src/Presentation/ui-components/Dropdown/Dropdown.tsx +10 -2
- package/src/Presentation/ui-components/Header/Header.stories.tsx +2 -1
- package/src/Presentation/ui-components/Loader/Loader.stories.ts +2 -2
- package/src/Presentation/ui-components/Loader/Loader.tsx +1 -1
- package/src/Presentation/ui-components/Message/Bubble/AttachmentBubble/AttachmentBubble.tsx +13 -2
- package/src/Presentation/ui-components/Message/Bubble/AudioBubble/AudioBubble.scss +13 -0
- package/src/Presentation/ui-components/Message/Bubble/AudioBubble/AudioBubble.tsx +16 -2
- package/src/Presentation/ui-components/Message/Bubble/VideoBubble/VideoBubble.scss +9 -0
- package/src/Presentation/ui-components/Message/Bubble/VideoBubble/VideoBubble.tsx +15 -17
- package/src/Presentation/ui-components/Message/Message.scss +0 -7
- package/src/Presentation/ui-components/Message/Message.stories.tsx +103 -36
- package/src/Presentation/ui-components/Message/Message.tsx +5 -5
- package/src/Presentation/ui-components/Message/TimeAndStatus/TimeAndStatus.scss +1 -4
- package/src/Presentation/ui-components/MessageInput/MessageInput.stories.tsx +16 -8
- package/src/Presentation/ui-components/MessageSeparator/MessageSeparator.scss +0 -1
- package/src/Presentation/ui-components/MessageSeparator/MessageSeparator.stories.ts +3 -1
- package/src/Presentation/ui-components/Placeholder/Placeholder.scss +1 -1
- package/src/Presentation/ui-components/Placeholder/Placeholder.stories.tsx +4 -8
- package/src/Presentation/ui-components/Placeholder/Placeholder.tsx +10 -4
- package/src/Presentation/ui-components/PreviewFileMessage/PreviewFileMessage.stories.ts +12 -1
- package/src/Presentation/ui-components/SettingsItem/SettingsItem.stories.tsx +5 -1
- package/src/Presentation/ui-components/TextField/TextField.scss +1 -0
- package/src/Presentation/ui-components/TextField/TextField.stories.ts +7 -2
- package/src/Presentation/ui-components/Toast/Toast.scss +2 -3
- package/src/Presentation/ui-components/Toast/Toast.stories.tsx +1 -1
- package/src/Presentation/ui-components/Toast/ToastProvider.tsx +0 -1
- package/src/Presentation/ui-components/UserListItem/UserListItem.scss +33 -0
- package/src/Presentation/ui-components/UserListItem/UserListItem.stories.tsx +130 -0
- package/src/Presentation/ui-components/UserListItem/UserListItem.tsx +43 -0
- package/src/Presentation/ui-components/index.ts +6 -0
- package/src/QBconfig.ts +4 -4
- package/src/hooks/useModal.ts +13 -0
- package/src/index.scss +0 -2
- package/src/qb-api-calls/index.ts +1 -0
- package/storybook-static/426.be971fb5.iframe.bundle.js +157 -0
- package/storybook-static/426.be971fb5.iframe.bundle.js.map +1 -0
- package/storybook-static/433.dffc897e.iframe.bundle.js +1 -0
- package/storybook-static/603.4cf0423b.iframe.bundle.js +1 -0
- package/storybook-static/607.b04b9f0b.iframe.bundle.js +1 -0
- package/storybook-static/729.734b4ae4.iframe.bundle.js +1 -0
- package/storybook-static/758.e75a5a47.iframe.bundle.js +14 -0
- package/storybook-static/758.e75a5a47.iframe.bundle.js.map +1 -0
- package/storybook-static/768.e44c05aa.iframe.bundle.js +351 -0
- package/storybook-static/768.e44c05aa.iframe.bundle.js.map +1 -0
- package/storybook-static/797.b3873e04.iframe.bundle.js +1 -0
- package/storybook-static/926.f5308089.iframe.bundle.js +508 -0
- package/storybook-static/926.f5308089.iframe.bundle.js.map +1 -0
- package/storybook-static/Presentation-ui-components-Avatar-avatar-stories.cf806856.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-Badge-Badge-stories.9449e470.iframe.bundle.js +14 -0
- package/storybook-static/Presentation-ui-components-Badge-Badge-stories.9449e470.iframe.bundle.js.map +1 -0
- package/storybook-static/Presentation-ui-components-Button-Button-stories.4fac7996.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-DialogBanner-DialogBanner-stories.fa91d2c7.iframe.bundle.js +10 -0
- package/storybook-static/Presentation-ui-components-DialogBanner-DialogBanner-stories.fa91d2c7.iframe.bundle.js.map +1 -0
- package/storybook-static/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.90aa44c5.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-DialogWindow-DialogWindow-stories.3523a670.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-Dropdown-Dropdown-stories.aacf2ec2.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-Header-Header-stories.073c4507.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-Loader-Loader-stories.9bf3fb63.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-Message-Message-stories.343dfae0.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-MessageInput-MessageInput-stories.262a0cf2.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-MessageSeparator-MessageSeparator-stories.a7d43c0b.iframe.bundle.js +10 -0
- package/storybook-static/Presentation-ui-components-MessageSeparator-MessageSeparator-stories.a7d43c0b.iframe.bundle.js.map +1 -0
- package/storybook-static/Presentation-ui-components-Placeholder-Placeholder-stories.871f508c.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.1661d95b.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-SettingsItem-SettingsItem-stories.8f6fca84.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-TextField-TextField-stories.4a2eef3e.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-Toast-Toast-stories.55e63162.iframe.bundle.js +1 -0
- package/storybook-static/Presentation-ui-components-UserListItem-UserListItem-stories.04d3eefe.iframe.bundle.js +1 -0
- package/storybook-static/docs-Introduction-mdx.ac401482.iframe.bundle.js +10 -0
- package/storybook-static/docs-Introduction-mdx.ac401482.iframe.bundle.js.map +1 -0
- package/storybook-static/docs-Styling-mdx.1d6c1212.iframe.bundle.js +10 -0
- package/storybook-static/docs-Styling-mdx.1d6c1212.iframe.bundle.js.map +1 -0
- package/storybook-static/favicon.ico +0 -0
- package/storybook-static/favicon.svg +7 -0
- package/storybook-static/iframe.html +355 -0
- package/storybook-static/index.html +131 -0
- package/storybook-static/index.json +1 -0
- package/storybook-static/logo192.png +0 -0
- package/storybook-static/logo512.png +0 -0
- package/storybook-static/main.597d432b.iframe.bundle.js +1 -0
- package/storybook-static/manifest.json +25 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/quickblox.js +54609 -0
- package/storybook-static/robots.txt +3 -0
- package/storybook-static/runtime~main.e945879b.iframe.bundle.js +1 -0
- package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js +12 -0
- package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +63 -0
- package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js.LEGAL.txt +18 -0
- package/storybook-static/sb-addons/essentials-measure-5/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-measure-5/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-outline-6/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-outline-6/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-toolbars-4/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-toolbars-4/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/interactions-8/manager-bundle.js +12 -0
- package/storybook-static/sb-addons/interactions-8/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/links-0/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/links-0/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/onboarding-7/manager-bundle.js +503 -0
- package/storybook-static/sb-addons/onboarding-7/manager-bundle.js.LEGAL.txt +48 -0
- package/storybook-static/sb-addons/viewport-9/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/viewport-9/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-common-assets/fonts.css +31 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/sb-manager/WithTooltip-V3YHNWJZ-LVYLGZW2.js +1 -0
- package/storybook-static/sb-manager/chunk-2IXBUOFS.js +7 -0
- package/storybook-static/sb-manager/chunk-INSKDKQB.js +348 -0
- package/storybook-static/sb-manager/chunk-NGTUFCUO.js +9 -0
- package/storybook-static/sb-manager/chunk-NMB3SATH.js +406 -0
- package/storybook-static/sb-manager/chunk-ZEU7PDD3.js +1 -0
- package/storybook-static/sb-manager/formatter-SWP5E3XI-7BGIK6BL.js +156 -0
- package/storybook-static/sb-manager/globals-module-info.js +1 -0
- package/storybook-static/sb-manager/globals.js +1 -0
- package/storybook-static/sb-manager/index.js +1 -0
- package/storybook-static/sb-manager/runtime.js +1 -0
- package/storybook-static/sb-manager/syntaxhighlighter-V7JZZA35-DXZCI2WR.js +1 -0
- package/storybook-static/sb-preview/globals.js +1 -0
- package/storybook-static/sb-preview/runtime.js +112 -0
- package/storybook-static/static/css/Presentation-ui-components-Avatar-avatar-stories.807573c8.chunk.css +3 -0
- package/storybook-static/static/css/Presentation-ui-components-Avatar-avatar-stories.807573c8.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-Badge-Badge-stories.7b8317f8.chunk.css +3 -0
- package/storybook-static/static/css/Presentation-ui-components-Badge-Badge-stories.7b8317f8.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-Button-Button-stories.1b6e1c55.chunk.css +4 -0
- package/storybook-static/static/css/Presentation-ui-components-Button-Button-stories.1b6e1c55.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-DialogBanner-DialogBanner-stories.bd07fad3.chunk.css +3 -0
- package/storybook-static/static/css/Presentation-ui-components-DialogBanner-DialogBanner-stories.bd07fad3.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.e720ff21.chunk.css +7 -0
- package/storybook-static/static/css/Presentation-ui-components-DialogItemPreview-DialogItemPreview-stories.e720ff21.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-DialogWindow-DialogWindow-stories.6fb3af8d.chunk.css +6 -0
- package/storybook-static/static/css/Presentation-ui-components-DialogWindow-DialogWindow-stories.6fb3af8d.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-Dropdown-Dropdown-stories.66965d64.chunk.css +5 -0
- package/storybook-static/static/css/Presentation-ui-components-Dropdown-Dropdown-stories.66965d64.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-Header-Header-stories.cdc47631.chunk.css +4 -0
- package/storybook-static/static/css/Presentation-ui-components-Header-Header-stories.cdc47631.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-Loader-Loader-stories.dab34da1.chunk.css +3 -0
- package/storybook-static/static/css/Presentation-ui-components-Loader-Loader-stories.dab34da1.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-Message-Message-stories.0e129b10.chunk.css +14 -0
- package/storybook-static/static/css/Presentation-ui-components-Message-Message-stories.0e129b10.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-MessageInput-MessageInput-stories.0e99d80b.chunk.css +7 -0
- package/storybook-static/static/css/Presentation-ui-components-MessageInput-MessageInput-stories.0e99d80b.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-MessageSeparator-MessageSeparator-stories.34aa36b2.chunk.css +3 -0
- package/storybook-static/static/css/Presentation-ui-components-MessageSeparator-MessageSeparator-stories.34aa36b2.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-Placeholder-Placeholder-stories.cb7fb80a.chunk.css +3 -0
- package/storybook-static/static/css/Presentation-ui-components-Placeholder-Placeholder-stories.cb7fb80a.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.015ac417.chunk.css +3 -0
- package/storybook-static/static/css/Presentation-ui-components-PreviewFileMessage-PreviewFileMessage-stories.015ac417.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-SettingsItem-SettingsItem-stories.7b98a5d4.chunk.css +5 -0
- package/storybook-static/static/css/Presentation-ui-components-SettingsItem-SettingsItem-stories.7b98a5d4.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-TextField-TextField-stories.412027f8.chunk.css +4 -0
- package/storybook-static/static/css/Presentation-ui-components-TextField-TextField-stories.412027f8.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-Toast-Toast-stories.11d83296.chunk.css +754 -0
- package/storybook-static/static/css/Presentation-ui-components-Toast-Toast-stories.11d83296.chunk.css.map +1 -0
- package/storybook-static/static/css/Presentation-ui-components-UserListItem-UserListItem-stories.4d072348.chunk.css +7 -0
- package/storybook-static/static/css/Presentation-ui-components-UserListItem-UserListItem-stories.4d072348.chunk.css.map +1 -0
- package/storybook-static/static/css/main.6fa55a2c.css +5 -0
- package/storybook-static/static/css/main.6fa55a2c.css.map +1 -0
- package/storybook-static/static/media/add-contact.e7e7b8b15edebe99cae9c46963126e7c.svg +3 -0
- package/storybook-static/static/media/add.5cbe1f2c489b81396863f7128e3d26e7.svg +3 -0
- package/storybook-static/static/media/admin.476c2854d7ad23f2afdedac2d9bd6815.svg +3 -0
- package/storybook-static/static/media/archive.d0a72898f3c47a4194d18f560a54e109.svg +3 -0
- package/storybook-static/static/media/arrow-left.5005351d4fa6a7c074dd9780fb49dcc8.svg +3 -0
- package/storybook-static/static/media/arrow-right.1be3b599e21158807fdf72f4976179a2.svg +3 -0
- package/storybook-static/static/media/attachment.a58b8549f46ae5bbe93be779cd9f2037.svg +3 -0
- package/storybook-static/static/media/audio-file.40179c472f715fc74d4da607da96aa5e.svg +3 -0
- package/storybook-static/static/media/back.b541e72fe05542e145575c8851558998.svg +3 -0
- package/storybook-static/static/media/banned.c7c74bfa1c833263f3ab42d0529132d1.svg +3 -0
- package/storybook-static/static/media/broadcast.55273926379e5f486ccfdfab1a310b2d.svg +7 -0
- package/storybook-static/static/media/broken-file.bc084278a0d284b7901b47f24001caa6.svg +3 -0
- package/storybook-static/static/media/camera-off.8e01960815ce7620a1039d0fc5f758b2.svg +3 -0
- package/storybook-static/static/media/camera-on.ddd56e36fa505d618ab772e23c8381e6.svg +3 -0
- package/storybook-static/static/media/camera.a5a215695fba60146e649094188f37e2.svg +3 -0
- package/storybook-static/static/media/chat-filled.aaf0b778d198e7b8f632a68299a8fd13.svg +3 -0
- package/storybook-static/static/media/chat.59cd437f21fe7043682dd04cbe6377be.svg +3 -0
- package/storybook-static/static/media/check-off.0c0256f00eeb75770ffc2fbd2b59eab0.svg +3 -0
- package/storybook-static/static/media/check-on.80442753ef6922df1913453f50099315.svg +3 -0
- package/storybook-static/static/media/close.c145af996de81b25f3930bf36d88b161.svg +3 -0
- package/storybook-static/static/media/conference.ffbdf37c0510c796138f18e6c1205204.svg +3 -0
- package/storybook-static/static/media/contact-filled.f04f56ba3f98ade5d7ced7814d8a5fa8.svg +3 -0
- package/storybook-static/static/media/contact.40a8b8104c3a448b81108ffede850963.svg +3 -0
- package/storybook-static/static/media/copy.100bd0fff933cbde8ad4bc2ac281c845.svg +3 -0
- package/storybook-static/static/media/delete.287c9b4b3b0e58cb081c6e388e68b409.svg +3 -0
- package/storybook-static/static/media/down.7a43a3d78885f40616ce111c86c108a4.svg +3 -0
- package/storybook-static/static/media/download.43c26d404dd023e42aaacc52151f7a59.svg +3 -0
- package/storybook-static/static/media/edit.8d813af82ecab84303ee3c97bd7bc562.svg +3 -0
- package/storybook-static/static/media/emoji.9a202cbb16735f3c83ba8772f0218aa4.svg +3 -0
- package/storybook-static/static/media/error.ec60e2052661b82f27b7ce270ae133a7.svg +3 -0
- package/storybook-static/static/media/favorite.194d78057be6cd7968c85e7b5822f82a.svg +3 -0
- package/storybook-static/static/media/file.e537292693b3c89c023fd383c70bd221.svg +3 -0
- package/storybook-static/static/media/forward-filled.43120a68057427c89c88b28d9b20dd90.svg +3 -0
- package/storybook-static/static/media/freeze.35619771e645b649c38e0427d9b39a25.svg +3 -0
- package/storybook-static/static/media/full-screen.6b01c93e069421c69bda2bbde5d01336.svg +3 -0
- package/storybook-static/static/media/gif-file.2c46a5df6c8397f5b9088e66aee3fd44.svg +3 -0
- package/storybook-static/static/media/group-chat.19d5305cab6017d494ac35ecb285a9fe.svg +3 -0
- package/storybook-static/static/media/help.786f48518c96c8e7098296d68245c339.svg +3 -0
- package/storybook-static/static/media/hide.2785264246d70868717984a5ad44d4c9.svg +3 -0
- package/storybook-static/static/media/hungup.e5d2289a9e8cd755bd1ee36b738305a2.svg +3 -0
- package/storybook-static/static/media/image-filled.8afb62b142d786e90102f1cac73a9c13.svg +3 -0
- package/storybook-static/static/media/image.64092dadd5215c8d3ba99ccac753d743.svg +3 -0
- package/storybook-static/static/media/income-call.60ca2d367a00d582f4b6f4a5f2047e27.svg +3 -0
- package/storybook-static/static/media/information.8217e163c334852f143e7199c97fab1d.svg +3 -0
- package/storybook-static/static/media/leave.ae5422a12edec1b61484ff2932819c77.svg +3 -0
- package/storybook-static/static/media/like.45662989373aa524cd580fb42432e0bc.svg +3 -0
- package/storybook-static/static/media/link.74f567c3ee4366d79fb81d73eb8c0919.svg +3 -0
- package/storybook-static/static/media/loader.2eb72391c5267453edb4106528c075ad.svg +3 -0
- package/storybook-static/static/media/location.cab52453404524c345ec7efdd86fa66b.svg +4 -0
- package/storybook-static/static/media/louder.133519141541a9cd2f0e898534b39732.svg +3 -0
- package/storybook-static/static/media/mention.6c4885bb0ea5ca85c8962f6f51ac1cb4.svg +3 -0
- package/storybook-static/static/media/mic-off.43e60427600bcf7fd78fb840ff50d804.svg +3 -0
- package/storybook-static/static/media/mic-on.5a52100de3770550b3a57a76827843c2.svg +4 -0
- package/storybook-static/static/media/minimize.a849dd3a36ece08b992a773d135a0c3f.svg +3 -0
- package/storybook-static/static/media/moderations.07c8d1fe96b0b8bb5911f6cc37f764c6.svg +3 -0
- package/storybook-static/static/media/more.4ed9ad54ae110d9760b6e9698d821960.svg +3 -0
- package/storybook-static/static/media/muted.cb37ac3c577c87c800466aa7aee65af2.svg +3 -0
- package/storybook-static/static/media/new-chat.124e0351bd0e19ff4c5fdbabbe5c6027.svg +3 -0
- package/storybook-static/static/media/next.97a0eeea1f8daa2d31c8452f29908bf1.svg +3 -0
- package/storybook-static/static/media/notifications.ab8e847ae04e2bec9209dbdd1054b0f2.svg +3 -0
- package/storybook-static/static/media/notify-off.4a669a3a8cbd38b3309dbc4c909f6089.svg +3 -0
- package/storybook-static/static/media/notify-on.ea9ffc856ad6cdbe87184af558c78eec.svg +3 -0
- package/storybook-static/static/media/outcome-call.9f5fec07823796ad78963a06cdcf629e.svg +3 -0
- package/storybook-static/static/media/pause.27eb8c32999f10d05d6a200165d798a9.svg +3 -0
- package/storybook-static/static/media/phone-filled.e969511d74935af26ef366f575929f68.svg +3 -0
- package/storybook-static/static/media/phone.6355580a064a488b6317372d71f84c00.svg +3 -0
- package/storybook-static/static/media/play.00bfe0e9c94dc6dfb230262e45b2f860.svg +3 -0
- package/storybook-static/static/media/plus.d3953cb1cf830bcfc41c8cc6133b13b1.svg +3 -0
- package/storybook-static/static/media/private-chat.c68f36baf025b9d20ad1f801a2396e7a.svg +3 -0
- package/storybook-static/static/media/public-channel.7a6ada7f30c44fb4a99021df0eb0e996.svg +7 -0
- package/storybook-static/static/media/quite.9f45e2152fe6c499a776cb387ee4859f.svg +3 -0
- package/storybook-static/static/media/record.e49ee7da793b2ce446a4e7128970c0cc.svg +3 -0
- package/storybook-static/static/media/refresh.6e955728d9ec086f34e9adaaaafacf3e.svg +3 -0
- package/storybook-static/static/media/remove-2.8a7700757f02c941f03c37c7e495bf63.svg +3 -0
- package/storybook-static/static/media/remove.831e69b70db1b3eb72a49444b8aa1e16.svg +3 -0
- package/storybook-static/static/media/rephrase.551171aa8903b31746a58a95528b1f68.svg +6 -0
- package/storybook-static/static/media/reply-filled.17ed65506e902f17bb22e87ffac93314.svg +3 -0
- package/storybook-static/static/media/screenshare.c2f94264a7640ea1bbb2a22f7d570038.svg +3 -0
- package/storybook-static/static/media/search.25663e60d71e01c64fdfc83df7460ab0.svg +3 -0
- package/storybook-static/static/media/send.d298db52aafdb846a46c9d180ad45946.svg +3 -0
- package/storybook-static/static/media/sent.f427753e5502fd7783a08e5f0e0d2f35.svg +3 -0
- package/storybook-static/static/media/settings-filled.bd9b60ff4e9eae911e4e2bc69e8e79ca.svg +3 -0
- package/storybook-static/static/media/share.7ce8283aa267fb065c568d65b482e211.svg +3 -0
- package/storybook-static/static/media/show.de1782527c4a7fa14101dffbfba8aea6.svg +3 -0
- package/storybook-static/static/media/speaker-off.fe84597c4b68f4f761e12f789dc58718.svg +3 -0
- package/storybook-static/static/media/speaker.e7ff48a73ca43188703b36dfecd932b5.svg +3 -0
- package/storybook-static/static/media/stop-record.a2e9d50a0930c24af43d7f357093be81.svg +3 -0
- package/storybook-static/static/media/stop-share.d1be236e01dd924ba711e1e17f41054c.svg +3 -0
- package/storybook-static/static/media/stream-filled.c40bae61fea25455602a61db5e77fa71.svg +3 -0
- package/storybook-static/static/media/stream.700f4f8ce0cee0ae1ef56132867427fe.svg +3 -0
- package/storybook-static/static/media/swap-camera.bc3a4652106f5c57d14b4dcbffff08a5.svg +3 -0
- package/storybook-static/static/media/text-document.cad7e87368501b96de2a939d08852dcd.svg +3 -0
- package/storybook-static/static/media/unarchive.1b1a7438cd8eb6fee80e6ac89baa195b.svg +3 -0
- package/storybook-static/static/media/user.911c7ae778615185b285ce0ae4068486.svg +3 -0
- package/storybook-static/static/media/video-file.dc2971be489b2af7b1c04dcc55bfe881.svg +3 -0
- package/storybook-static/static/media/video.bbcc2109285c18eea02ede86920de0dd.svg +3 -0
- package/storybook-static/static/media/viewed-delivered.f43360dc87235a6cf574ff53f73dd777.svg +3 -0
- package/storybook-static/static/media/voice.b937c8a1f744050bec2cd389ad2a1f3a.svg +3 -0
- package/storybook-static/stories.json +1 -0
- package/dist/Presentation/providers/ModalContextProvider/Modal.d.ts +0 -14
- package/dist/Presentation/providers/ModalContextProvider/ModalContextProvider.d.ts +0 -4
- package/dist/Presentation/providers/ModalContextProvider/useModal.d.ts +0 -11
- package/dist/Presentation/ui-components/Message/AIAssist/AIAssist.d.ts +0 -9
- package/dist/Presentation/ui-components/Message/AITranslate/AITranslate.d.ts +0 -13
- package/dist/Presentation/ui-components/MessageItem/MessageItem.d.ts +0 -25
- package/src/Presentation/providers/ModalContextProvider/Modal.scss +0 -76
- package/src/Presentation/providers/ModalContextProvider/Modal.tsx +0 -80
- package/src/Presentation/providers/ModalContextProvider/ModalContextProvider.tsx +0 -38
- package/src/Presentation/providers/ModalContextProvider/useModal.ts +0 -39
- package/src/Presentation/ui-components/Message/AIAssist/AIAssist.tsx +0 -25
- package/src/Presentation/ui-components/Message/AITranslate/AITranslate.tsx +0 -79
- package/src/Presentation/ui-components/MessageItem/MessageItem.tsx +0 -332
- /package/dist/Presentation/{ui-components/Message → Views/Dialog}/MessageContextMenu/MessageContextMenu.d.ts +0 -0
- /package/src/Presentation/{ui-components/Message → Views/Dialog/AIComponents}/AIAssist/AIAssist.scss +0 -0
- /package/src/Presentation/{ui-components/Message → Views/Dialog/AIComponents}/AITranslate/AITranslate.scss +0 -0
- /package/src/Presentation/{ui-components/Message → Views/Dialog}/MessageContextMenu/MessageContextMenu.scss +0 -0
|
@@ -12,9 +12,9 @@ export type MessageProps = {
|
|
|
12
12
|
type: 'outgoing' | 'incoming';
|
|
13
13
|
subtype?: 'reply' | 'forward';
|
|
14
14
|
status?: 'sent' | 'delivered' | 'viewed' | 'error';
|
|
15
|
-
enableSelect
|
|
16
|
-
isSelect
|
|
17
|
-
disabled
|
|
15
|
+
enableSelect?: boolean;
|
|
16
|
+
isSelect?: boolean;
|
|
17
|
+
disabled?: boolean;
|
|
18
18
|
onSelect?: (isSelected: boolean) => void;
|
|
19
19
|
bottomPart?: ReactElement;
|
|
20
20
|
additionalPart?: ReactElement;
|
|
@@ -29,7 +29,7 @@ export default function Message({
|
|
|
29
29
|
type,
|
|
30
30
|
status,
|
|
31
31
|
subtype,
|
|
32
|
-
enableSelect =
|
|
32
|
+
enableSelect = false,
|
|
33
33
|
isSelect = false,
|
|
34
34
|
disabled = false,
|
|
35
35
|
onSelect,
|
|
@@ -74,7 +74,7 @@ export default function Message({
|
|
|
74
74
|
{bottomPart}
|
|
75
75
|
</div>
|
|
76
76
|
{additionalPart}
|
|
77
|
-
<TimeAndStatus
|
|
77
|
+
<TimeAndStatus time={time} />
|
|
78
78
|
</div>
|
|
79
79
|
</div>
|
|
80
80
|
</div>
|
|
@@ -5,12 +5,16 @@ import ReplyMessagePreview from './ReplyMessagePreview/ReplyMessagePreview';
|
|
|
5
5
|
import { Stubs } from '../../../Data/Stubs';
|
|
6
6
|
|
|
7
7
|
const meta: Meta<typeof MessageInput> = {
|
|
8
|
-
title: 'MessageInput',
|
|
8
|
+
title: '@quickblox-react-ui-kit/Presentation/ui-components/MessageInput',
|
|
9
9
|
component: MessageInput,
|
|
10
|
+
tags: ['autodocs'],
|
|
10
11
|
parameters: {
|
|
11
12
|
layout: 'centered',
|
|
12
13
|
},
|
|
13
14
|
argTypes: {
|
|
15
|
+
rephrase: {
|
|
16
|
+
control: false,
|
|
17
|
+
},
|
|
14
18
|
value: {
|
|
15
19
|
control: 'text',
|
|
16
20
|
description: 'Input value',
|
|
@@ -96,7 +100,8 @@ const meta: Meta<typeof MessageInput> = {
|
|
|
96
100
|
|
|
97
101
|
export default meta;
|
|
98
102
|
|
|
99
|
-
export const
|
|
103
|
+
export const MessageInputDefault: StoryObj<typeof MessageInput> = {
|
|
104
|
+
name: 'MessageInput Default',
|
|
100
105
|
args: {
|
|
101
106
|
value: '',
|
|
102
107
|
enableVoice: false,
|
|
@@ -105,16 +110,18 @@ export const Default: StoryObj<typeof MessageInput> = {
|
|
|
105
110
|
},
|
|
106
111
|
};
|
|
107
112
|
|
|
108
|
-
export const
|
|
113
|
+
export const MessageInputWithVoiceMessage: StoryObj<typeof MessageInput> = {
|
|
114
|
+
name: 'MessageInput With Voice Message',
|
|
109
115
|
args: {
|
|
110
|
-
...
|
|
116
|
+
...MessageInputDefault.args,
|
|
111
117
|
enableVoice: true,
|
|
112
118
|
},
|
|
113
119
|
};
|
|
114
120
|
|
|
115
|
-
export const
|
|
121
|
+
export const MessageInputWithPreview: StoryObj<typeof MessageInput> = {
|
|
122
|
+
name: 'MessageInput With Preview',
|
|
116
123
|
args: {
|
|
117
|
-
...
|
|
124
|
+
...MessageInputDefault.args,
|
|
118
125
|
previewMessage: (
|
|
119
126
|
<ReplyMessagePreview
|
|
120
127
|
messages={[Stubs.initializeMessagesWithMockData()[0]]}
|
|
@@ -127,9 +134,10 @@ export const WithPreview: StoryObj<typeof MessageInput> = {
|
|
|
127
134
|
},
|
|
128
135
|
};
|
|
129
136
|
|
|
130
|
-
export const
|
|
137
|
+
export const MessageInputLoadingState: StoryObj<typeof MessageInput> = {
|
|
138
|
+
name: 'MessageInput Loading State',
|
|
131
139
|
args: {
|
|
132
|
-
...
|
|
140
|
+
...MessageInputDefault.args,
|
|
133
141
|
loading: true,
|
|
134
142
|
},
|
|
135
143
|
};
|
|
@@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/react';
|
|
|
3
3
|
import MessageSeparator from './MessageSeparator';
|
|
4
4
|
|
|
5
5
|
const meta = {
|
|
6
|
-
title: 'MessageSeparator',
|
|
6
|
+
title: '@quickblox-react-ui-kit/Presentation/ui-components/MessageSeparator',
|
|
7
7
|
component: MessageSeparator,
|
|
8
8
|
tags: ['autodocs'],
|
|
9
9
|
parameters: {
|
|
@@ -38,6 +38,7 @@ export default meta;
|
|
|
38
38
|
type Story = StoryObj<typeof meta>;
|
|
39
39
|
|
|
40
40
|
export const MessageSeparatorDate: Story = {
|
|
41
|
+
name: 'MessageSeparator Date',
|
|
41
42
|
args: {
|
|
42
43
|
text: '2024-01-26T00:00:00.000Z',
|
|
43
44
|
type: 'date',
|
|
@@ -45,6 +46,7 @@ export const MessageSeparatorDate: Story = {
|
|
|
45
46
|
};
|
|
46
47
|
|
|
47
48
|
export const MessageSeparatorSystem: Story = {
|
|
49
|
+
name: 'MessageSeparator System',
|
|
48
50
|
args: {
|
|
49
51
|
text: 'User created chat',
|
|
50
52
|
type: 'system',
|
|
@@ -10,16 +10,16 @@ import {
|
|
|
10
10
|
BannedSvg,
|
|
11
11
|
SearchSvg,
|
|
12
12
|
} from '../../icons';
|
|
13
|
-
import Loader from '../Loader/Loader';
|
|
14
13
|
|
|
15
14
|
const meta: Meta<typeof Placeholder> = {
|
|
16
|
-
title: 'Placeholder',
|
|
15
|
+
title: '@quickblox-react-ui-kit/Presentation/ui-components/Placeholder',
|
|
17
16
|
component: Placeholder,
|
|
18
17
|
tags: ['autodocs'],
|
|
19
18
|
parameters: {
|
|
20
19
|
layout: 'centered',
|
|
21
20
|
},
|
|
22
21
|
args: {
|
|
22
|
+
text: ['Text for placeholder'],
|
|
23
23
|
className: '',
|
|
24
24
|
onRetry: undefined,
|
|
25
25
|
icon: undefined,
|
|
@@ -33,7 +33,6 @@ const meta: Meta<typeof Placeholder> = {
|
|
|
33
33
|
'Muted',
|
|
34
34
|
'Banned',
|
|
35
35
|
'Search',
|
|
36
|
-
'Loader',
|
|
37
36
|
'Error',
|
|
38
37
|
],
|
|
39
38
|
control: 'select',
|
|
@@ -44,7 +43,6 @@ const meta: Meta<typeof Placeholder> = {
|
|
|
44
43
|
Muted: <MutedSvg />,
|
|
45
44
|
Banned: <BannedSvg />,
|
|
46
45
|
Search: <SearchSvg />,
|
|
47
|
-
Loader: <Loader size="lg" />,
|
|
48
46
|
Error: <ErrorSvg />,
|
|
49
47
|
},
|
|
50
48
|
table: {
|
|
@@ -60,10 +58,10 @@ const meta: Meta<typeof Placeholder> = {
|
|
|
60
58
|
},
|
|
61
59
|
text: {
|
|
62
60
|
defaultValue: {
|
|
63
|
-
summary: '',
|
|
61
|
+
summary: [''],
|
|
64
62
|
},
|
|
65
63
|
table: {
|
|
66
|
-
type: { summary: '
|
|
64
|
+
type: { summary: 'array' },
|
|
67
65
|
},
|
|
68
66
|
description: 'Placeholder text',
|
|
69
67
|
},
|
|
@@ -81,14 +79,12 @@ type StoryDefault = StoryObj<typeof meta>;
|
|
|
81
79
|
|
|
82
80
|
export const PlaceholderDefault: StoryDefault = {
|
|
83
81
|
args: {
|
|
84
|
-
text: 'The are no massage',
|
|
85
82
|
icon: <PublicChannelSvg />,
|
|
86
83
|
},
|
|
87
84
|
};
|
|
88
85
|
|
|
89
86
|
export const PlaceholderError: StoryDefault = {
|
|
90
87
|
args: {
|
|
91
|
-
text: 'Something wrong',
|
|
92
88
|
icon: <ErrorSvg />,
|
|
93
89
|
onRetry: () => undefined,
|
|
94
90
|
},
|
|
@@ -5,8 +5,8 @@ import { RefreshSvg } from '../../icons';
|
|
|
5
5
|
import './Placeholder.scss';
|
|
6
6
|
|
|
7
7
|
interface PlaceholderProps {
|
|
8
|
-
icon
|
|
9
|
-
text: string;
|
|
8
|
+
icon?: ReactElement;
|
|
9
|
+
text: string | string[];
|
|
10
10
|
onRetry?: VoidFunction;
|
|
11
11
|
className?: string;
|
|
12
12
|
}
|
|
@@ -17,10 +17,16 @@ export default function Placeholder({
|
|
|
17
17
|
onRetry,
|
|
18
18
|
className,
|
|
19
19
|
}: PlaceholderProps) {
|
|
20
|
+
const renderText = (content: string, index?: number) => (
|
|
21
|
+
<span key={index} className="placeholder__text">
|
|
22
|
+
{content}
|
|
23
|
+
</span>
|
|
24
|
+
);
|
|
25
|
+
|
|
20
26
|
return (
|
|
21
27
|
<div className={cn('placeholder', className)}>
|
|
22
|
-
<div className="placeholder__icon">{icon}</div>
|
|
23
|
-
|
|
28
|
+
{icon && <div className="placeholder__icon">{icon}</div>}
|
|
29
|
+
{Array.isArray(text) ? text.map(renderText) : renderText(text)}
|
|
24
30
|
{onRetry && (
|
|
25
31
|
<div className="placeholder__retry">
|
|
26
32
|
<RefreshSvg className="placeholder__retry-icon" onClick={onRetry} />
|
|
@@ -2,7 +2,8 @@ import type { Meta, StoryObj } from '@storybook/react';
|
|
|
2
2
|
import PreviewFileMessage from './PreviewFileMessage';
|
|
3
3
|
|
|
4
4
|
const meta: Meta<typeof PreviewFileMessage> = {
|
|
5
|
-
title:
|
|
5
|
+
title:
|
|
6
|
+
'@quickblox-react-ui-kit/Presentation/ui-components/PreviewFileMessage',
|
|
6
7
|
tags: ['autodocs'],
|
|
7
8
|
component: PreviewFileMessage,
|
|
8
9
|
parameters: {
|
|
@@ -32,6 +33,12 @@ const meta: Meta<typeof PreviewFileMessage> = {
|
|
|
32
33
|
},
|
|
33
34
|
description: 'Additional classes',
|
|
34
35
|
},
|
|
36
|
+
src: {
|
|
37
|
+
table: {
|
|
38
|
+
type: { summary: 'string' },
|
|
39
|
+
},
|
|
40
|
+
description: 'Source file',
|
|
41
|
+
},
|
|
35
42
|
},
|
|
36
43
|
};
|
|
37
44
|
|
|
@@ -39,12 +46,14 @@ export default meta;
|
|
|
39
46
|
type StoryDefault = StoryObj<typeof meta>;
|
|
40
47
|
|
|
41
48
|
export const PreviewFileMessageDefault: StoryDefault = {
|
|
49
|
+
name: 'PreviewFileMessage Default',
|
|
42
50
|
args: {
|
|
43
51
|
name: 'text document.txt',
|
|
44
52
|
},
|
|
45
53
|
};
|
|
46
54
|
|
|
47
55
|
export const PreviewFileMessageAudio: StoryDefault = {
|
|
56
|
+
name: 'PreviewFileMessage Audio',
|
|
48
57
|
args: {
|
|
49
58
|
type: 'audio',
|
|
50
59
|
name: 'audio.mp3',
|
|
@@ -52,6 +61,7 @@ export const PreviewFileMessageAudio: StoryDefault = {
|
|
|
52
61
|
};
|
|
53
62
|
|
|
54
63
|
export const PreviewFileMessageVideo: StoryDefault = {
|
|
64
|
+
name: 'PreviewFileMessage Video',
|
|
55
65
|
args: {
|
|
56
66
|
type: 'video',
|
|
57
67
|
name: 'video.mp4',
|
|
@@ -59,6 +69,7 @@ export const PreviewFileMessageVideo: StoryDefault = {
|
|
|
59
69
|
};
|
|
60
70
|
|
|
61
71
|
export const PreviewFileMessageImage: StoryDefault = {
|
|
72
|
+
name: 'PreviewFileMessage Image',
|
|
62
73
|
args: {
|
|
63
74
|
src: 'https://quickblox.com/wp-content/themes/QuickbloxTheme2021/img/chat-messaging.svg',
|
|
64
75
|
name: 'screenshot.jpg',
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from '../../icons';
|
|
12
12
|
|
|
13
13
|
const meta: Meta<typeof SettingsItem> = {
|
|
14
|
-
title: '
|
|
14
|
+
title: '@quickblox-react-ui-kit/Presentation/ui-components/SettingsItem',
|
|
15
15
|
component: SettingsItem,
|
|
16
16
|
tags: ['autodocs'],
|
|
17
17
|
parameters: {
|
|
@@ -46,6 +46,7 @@ const meta: Meta<typeof SettingsItem> = {
|
|
|
46
46
|
description: 'Format plug svg or React element ',
|
|
47
47
|
},
|
|
48
48
|
rightSection: {
|
|
49
|
+
control: false,
|
|
49
50
|
table: {
|
|
50
51
|
defaultValue: {
|
|
51
52
|
summary: 'ReactElement | ReactElement[]',
|
|
@@ -79,6 +80,7 @@ export default meta;
|
|
|
79
80
|
type StoryDefault = StoryObj<typeof meta>;
|
|
80
81
|
|
|
81
82
|
export const SettingsItemDefault: StoryDefault = {
|
|
83
|
+
name: 'SettingsItem Default',
|
|
82
84
|
args: {
|
|
83
85
|
title: 'Search in dialog',
|
|
84
86
|
icon: (
|
|
@@ -92,6 +94,7 @@ export const SettingsItemDefault: StoryDefault = {
|
|
|
92
94
|
};
|
|
93
95
|
|
|
94
96
|
export const SettingsItemNotification: StoryDefault = {
|
|
97
|
+
name: 'SettingsItem Notification',
|
|
95
98
|
args: {
|
|
96
99
|
title: 'Notification',
|
|
97
100
|
icon: (
|
|
@@ -112,6 +115,7 @@ export const SettingsItemNotification: StoryDefault = {
|
|
|
112
115
|
};
|
|
113
116
|
|
|
114
117
|
export const SettingsItemMembers: StoryDefault = {
|
|
118
|
+
name: 'SettingsItem Members',
|
|
115
119
|
args: {
|
|
116
120
|
title: 'Notification',
|
|
117
121
|
icon: (
|
|
@@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/react';
|
|
|
3
3
|
import TextField from './TextField';
|
|
4
4
|
|
|
5
5
|
const meta: Meta<typeof TextField> = {
|
|
6
|
-
title: 'TextField',
|
|
6
|
+
title: '@quickblox-react-ui-kit/Presentation/ui-components/TextField',
|
|
7
7
|
component: TextField,
|
|
8
8
|
tags: ['autodocs'],
|
|
9
9
|
parameters: {
|
|
@@ -50,6 +50,7 @@ const meta: Meta<typeof TextField> = {
|
|
|
50
50
|
description: 'Text field label',
|
|
51
51
|
},
|
|
52
52
|
icon: {
|
|
53
|
+
control: false,
|
|
53
54
|
table: {
|
|
54
55
|
type: { summary: 'svg' },
|
|
55
56
|
},
|
|
@@ -84,9 +85,12 @@ const meta: Meta<typeof TextField> = {
|
|
|
84
85
|
export default meta;
|
|
85
86
|
type StoryDefault = StoryObj<typeof meta>;
|
|
86
87
|
|
|
87
|
-
export const TextFieldDefault: StoryDefault = {
|
|
88
|
+
export const TextFieldDefault: StoryDefault = {
|
|
89
|
+
name: 'TextField Default',
|
|
90
|
+
};
|
|
88
91
|
|
|
89
92
|
export const TextFieldDisabled: StoryDefault = {
|
|
93
|
+
name: 'TextField Disabled',
|
|
90
94
|
args: {
|
|
91
95
|
disabled: true,
|
|
92
96
|
label: 'Text Label',
|
|
@@ -95,6 +99,7 @@ export const TextFieldDisabled: StoryDefault = {
|
|
|
95
99
|
};
|
|
96
100
|
|
|
97
101
|
export const TextFieldReset: StoryDefault = {
|
|
102
|
+
name: 'TextField Reset',
|
|
98
103
|
args: {
|
|
99
104
|
label: 'Text Label',
|
|
100
105
|
placeholder: 'Placeholder',
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
.toast {
|
|
2
2
|
min-height: 24px;
|
|
3
3
|
padding: 4px 12px;
|
|
4
|
-
opacity: 60
|
|
4
|
+
opacity: 60% !important;
|
|
5
5
|
border-radius: 4px;
|
|
6
6
|
background-color: var(--toast-color);
|
|
7
7
|
|
|
8
8
|
&__body {
|
|
9
|
-
padding:
|
|
10
|
-
|
|
9
|
+
padding: 0;
|
|
11
10
|
font-family: 'Roboto';
|
|
12
11
|
font-weight: 500;
|
|
13
12
|
font-size: 12px;
|
|
@@ -5,7 +5,7 @@ import ToastProvider from './ToastProvider';
|
|
|
5
5
|
import Button from '../Button/Button';
|
|
6
6
|
|
|
7
7
|
const meta: Meta<typeof ToastProvider> = {
|
|
8
|
-
title: 'Toast',
|
|
8
|
+
title: '@quickblox-react-ui-kit/Presentation/ui-components/Toast',
|
|
9
9
|
component: ToastProvider,
|
|
10
10
|
tags: ['autodocs'],
|
|
11
11
|
parameters: {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
.user-list-item {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: space-between;
|
|
5
|
+
|
|
6
|
+
height: 56px;
|
|
7
|
+
padding: 8px 19px 8px 16px;
|
|
8
|
+
gap: 16px;
|
|
9
|
+
background-color: var(--color-background);
|
|
10
|
+
|
|
11
|
+
&--disabled {
|
|
12
|
+
cursor: not-allowed;
|
|
13
|
+
color: var(--disabled-elements);
|
|
14
|
+
fill: var(--disabled-elements);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&__avatar {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&__name {
|
|
24
|
+
margin-left: 16px;
|
|
25
|
+
|
|
26
|
+
font-family: 'Roboto';
|
|
27
|
+
font-weight: 400;
|
|
28
|
+
font-size: 16px;
|
|
29
|
+
line-height: 24px;
|
|
30
|
+
letter-spacing: 0.15px;
|
|
31
|
+
color: var(--main-text);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
|
|
4
|
+
import UserListItem from './UserListItem';
|
|
5
|
+
import ScrollableContainer from '../../components/containers/ScrollableContainer/ScrollableContainer';
|
|
6
|
+
|
|
7
|
+
const meta = {
|
|
8
|
+
title: '@quickblox-react-ui-kit/Presentation/ui-components/UserListItem',
|
|
9
|
+
component: UserListItem,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: 'centered',
|
|
13
|
+
},
|
|
14
|
+
args: {
|
|
15
|
+
className: '',
|
|
16
|
+
disabled: false,
|
|
17
|
+
checked: false,
|
|
18
|
+
userName: '',
|
|
19
|
+
avatarUrl: '',
|
|
20
|
+
},
|
|
21
|
+
argTypes: {
|
|
22
|
+
avatarUrl: {
|
|
23
|
+
table: {
|
|
24
|
+
type: { summary: 'url' },
|
|
25
|
+
},
|
|
26
|
+
description: 'Avatar image source',
|
|
27
|
+
},
|
|
28
|
+
userName: {
|
|
29
|
+
table: {
|
|
30
|
+
type: { summary: 'string' },
|
|
31
|
+
defaultValue: {
|
|
32
|
+
summary: '',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
description: 'User name',
|
|
36
|
+
},
|
|
37
|
+
disabled: {
|
|
38
|
+
table: {
|
|
39
|
+
type: { summary: 'boolean' },
|
|
40
|
+
defaultValue: {
|
|
41
|
+
summary: false,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
description: 'Active',
|
|
45
|
+
},
|
|
46
|
+
checked: {
|
|
47
|
+
table: {
|
|
48
|
+
type: { summary: 'boolean' },
|
|
49
|
+
defaultValue: {
|
|
50
|
+
summary: false,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
description: 'Checkbox',
|
|
54
|
+
},
|
|
55
|
+
onChange: {
|
|
56
|
+
table: {
|
|
57
|
+
defaultValue: {
|
|
58
|
+
summary: '(checked: boolean) => void',
|
|
59
|
+
},
|
|
60
|
+
type: { summary: 'function' },
|
|
61
|
+
},
|
|
62
|
+
description: 'Checkbox control',
|
|
63
|
+
},
|
|
64
|
+
className: {
|
|
65
|
+
table: {
|
|
66
|
+
defaultValue: {
|
|
67
|
+
summary: 'string',
|
|
68
|
+
},
|
|
69
|
+
type: { summary: 'string' },
|
|
70
|
+
},
|
|
71
|
+
description: 'Additional classes',
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
} satisfies Meta<typeof UserListItem>;
|
|
75
|
+
|
|
76
|
+
export default meta;
|
|
77
|
+
type StoryDefault = StoryObj<typeof meta>;
|
|
78
|
+
|
|
79
|
+
function UserListExample() {
|
|
80
|
+
const [users, setUser] = useState([
|
|
81
|
+
{ name: 'User 1', id: 0, checked: true },
|
|
82
|
+
{ name: 'User 2', id: 1, checked: false },
|
|
83
|
+
{ name: 'User 3', id: 2, checked: false },
|
|
84
|
+
{ name: 'User 4', id: 3, checked: true },
|
|
85
|
+
{ name: 'User 5', id: 4, checked: true },
|
|
86
|
+
]);
|
|
87
|
+
|
|
88
|
+
const handleRenderUserListItem = (user: {
|
|
89
|
+
name: string;
|
|
90
|
+
id: number;
|
|
91
|
+
checked: boolean;
|
|
92
|
+
}) => {
|
|
93
|
+
return (
|
|
94
|
+
<UserListItem
|
|
95
|
+
userName={user.name}
|
|
96
|
+
checked={user.checked}
|
|
97
|
+
onChange={(value: boolean) => {
|
|
98
|
+
setUser((prevUsers) =>
|
|
99
|
+
prevUsers.map((prevUser) =>
|
|
100
|
+
prevUser.id === user.id
|
|
101
|
+
? { ...prevUser, checked: value }
|
|
102
|
+
: prevUser,
|
|
103
|
+
),
|
|
104
|
+
);
|
|
105
|
+
}}
|
|
106
|
+
/>
|
|
107
|
+
);
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
return (
|
|
111
|
+
<ScrollableContainer
|
|
112
|
+
data={users}
|
|
113
|
+
renderItem={handleRenderUserListItem}
|
|
114
|
+
onEndReachedThreshold={0.8}
|
|
115
|
+
refreshing={false}
|
|
116
|
+
/>
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export const UserListItemDefault: StoryDefault = {
|
|
121
|
+
name: 'UserListItem Default',
|
|
122
|
+
args: {
|
|
123
|
+
userName: 'User name',
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
export const UserList: StoryDefault = {
|
|
128
|
+
name: 'UserListItem Multiple',
|
|
129
|
+
render: () => <UserListExample />,
|
|
130
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import cn from 'classnames';
|
|
2
|
+
|
|
3
|
+
import Avatar from '../Avatar/Avatar';
|
|
4
|
+
import CheckBox from '../CheckBox/CheckBox';
|
|
5
|
+
import './UserListItem.scss';
|
|
6
|
+
|
|
7
|
+
export interface UserListItemProps {
|
|
8
|
+
userName: string;
|
|
9
|
+
avatarUrl?: string;
|
|
10
|
+
checked?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
onChange?: (checked: boolean) => void;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default function UserListItem({
|
|
17
|
+
avatarUrl,
|
|
18
|
+
userName,
|
|
19
|
+
checked = false,
|
|
20
|
+
disabled = false,
|
|
21
|
+
onChange,
|
|
22
|
+
className,
|
|
23
|
+
}: UserListItemProps) {
|
|
24
|
+
return (
|
|
25
|
+
<div
|
|
26
|
+
className={cn(
|
|
27
|
+
'user-list-item',
|
|
28
|
+
{
|
|
29
|
+
'user-list-item--disabled': disabled,
|
|
30
|
+
},
|
|
31
|
+
className,
|
|
32
|
+
)}
|
|
33
|
+
>
|
|
34
|
+
<div className="user-list-item__avatar">
|
|
35
|
+
<Avatar src={avatarUrl} />
|
|
36
|
+
<span className="user-list-item__name">{userName}</span>
|
|
37
|
+
</div>
|
|
38
|
+
{onChange && (
|
|
39
|
+
<CheckBox onChange={onChange} disabled={disabled} checked={checked} />
|
|
40
|
+
)}
|
|
41
|
+
</div>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
export { default as Avatar } from './Avatar/Avatar';
|
|
2
2
|
export { default as Badge } from './Badge/Badge';
|
|
3
3
|
export { default as Button } from './Button/Button';
|
|
4
|
+
export { default as CheckBox } from './CheckBox/CheckBox';
|
|
4
5
|
export { default as DialogBanner } from './DialogBanner/DialogBanner';
|
|
5
6
|
export { default as DialogItemPreview } from './DialogItemPreview/DialogItemPreview';
|
|
7
|
+
export { default as DialogWindow } from './DialogWindow/DialogWindow';
|
|
6
8
|
export { default as Dropdown } from './Dropdown/Dropdown';
|
|
7
9
|
export { default as Header } from './Header/Header';
|
|
8
10
|
export { default as Loader } from './Loader/Loader';
|
|
11
|
+
export { default as Message } from './Message/Message';
|
|
12
|
+
export { default as MessageInput } from './MessageInput/MessageInput';
|
|
9
13
|
export { default as MessageSeparator } from './MessageSeparator/MessageSeparator';
|
|
10
14
|
export { default as Placeholder } from './Placeholder/Placeholder';
|
|
11
15
|
export { default as PreviewFileMessage } from './PreviewFileMessage/PreviewFileMessage';
|
|
12
16
|
export { default as SettingsItem } from './SettingsItem/SettingsItem';
|
|
13
17
|
export { default as TextField } from './TextField/TextField';
|
|
18
|
+
export { default as ToastProvider } from './Toast/ToastProvider';
|
|
19
|
+
export { default as UserListItem } from './UserListItem/UserListItem';
|
package/src/QBconfig.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export const QBConfig = {
|
|
2
2
|
credentials: {
|
|
3
|
-
appId:
|
|
4
|
-
accountKey: '
|
|
5
|
-
authKey: '
|
|
6
|
-
authSecret: '
|
|
3
|
+
appId: -1,
|
|
4
|
+
accountKey: '',
|
|
5
|
+
authKey: '',
|
|
6
|
+
authSecret: '',
|
|
7
7
|
sessionToken: '',
|
|
8
8
|
},
|
|
9
9
|
configAIApi: {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
const useModal = () => {
|
|
4
|
+
const [isOpen, setIsOpen] = useState<boolean>(false);
|
|
5
|
+
|
|
6
|
+
const toggleModal = () => {
|
|
7
|
+
setIsOpen((state) => !state);
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
return { isOpen, toggleModal };
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export default useModal;
|