@memori.ai/memori-react 1.0.1 → 1.1.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/CHANGELOG.md +28 -0
- package/README.md +0 -4
- package/dist/components/AttachmentLinkModal/AttachmentLinkModal.js +29 -43
- package/dist/components/AttachmentLinkModal/AttachmentLinkModal.js.map +1 -1
- package/dist/components/AttachmentLinkModal/AttachmentLinkModal.stories.js +2 -2
- package/dist/components/AttachmentLinkModal/AttachmentLinkModal.stories.js.map +1 -1
- package/dist/components/AttachmentLinkModal/AttachmentLinkModal.test.js +3 -3
- package/dist/components/AttachmentLinkModal/AttachmentLinkModal.test.js.map +1 -1
- package/dist/components/AttachmentMediaModal/AttachmentMediaModal.js +9 -11
- package/dist/components/AttachmentMediaModal/AttachmentMediaModal.js.map +1 -1
- package/dist/components/AttachmentMediaModal/AttachmentMediaModal.stories.js +2 -2
- package/dist/components/AttachmentMediaModal/AttachmentMediaModal.stories.js.map +1 -1
- package/dist/components/Auth/Auth.js +8 -29
- package/dist/components/Auth/Auth.js.map +1 -1
- package/dist/components/Auth/Auth.stories.js +4 -3
- package/dist/components/Auth/Auth.stories.js.map +1 -1
- package/dist/components/Auth/Auth.test.js +6 -6
- package/dist/components/Auth/Auth.test.js.map +1 -1
- package/dist/components/Avatar/Avatar.d.ts +3 -2
- package/dist/components/Avatar/Avatar.js +60 -56
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/Avatar.stories.js +7 -6
- package/dist/components/Avatar/Avatar.stories.js.map +1 -1
- package/dist/components/Avatar/Avatar.test.js +6 -6
- package/dist/components/Avatar/Avatar.test.js.map +1 -1
- package/dist/components/AvatarView/AvatarView.stories.d.ts +4 -0
- package/dist/components/AvatarView/AvatarView.stories.js +71 -5
- package/dist/components/AvatarView/AvatarView.stories.js.map +1 -1
- package/dist/components/AvatarView/components/avatar.js +6 -9
- package/dist/components/AvatarView/components/avatar.js.map +1 -1
- package/dist/components/AvatarView/components/fullbodyAvatar.d.ts +9 -0
- package/dist/components/AvatarView/components/fullbodyAvatar.js +57 -0
- package/dist/components/AvatarView/components/fullbodyAvatar.js.map +1 -0
- package/dist/components/AvatarView/components/loader.js +2 -7
- package/dist/components/AvatarView/components/loader.js.map +1 -1
- package/dist/components/AvatarView/index.d.ts +4 -1
- package/dist/components/AvatarView/index.js +19 -8
- package/dist/components/AvatarView/index.js.map +1 -1
- package/dist/components/Blob/Blob.js +2 -9
- package/dist/components/Blob/Blob.js.map +1 -1
- package/dist/components/Blob/Blob.stories.js +2 -3
- package/dist/components/Blob/Blob.stories.js.map +1 -1
- package/dist/components/Blob/Blob.test.js +5 -5
- package/dist/components/Blob/Blob.test.js.map +1 -1
- package/dist/components/BlockedMemoriBadge/BlockedMemoriBadge.js +17 -26
- package/dist/components/BlockedMemoriBadge/BlockedMemoriBadge.js.map +1 -1
- package/dist/components/BlockedMemoriBadge/BlockedMemoriBadge.stories.js +2 -2
- package/dist/components/BlockedMemoriBadge/BlockedMemoriBadge.stories.js.map +1 -1
- package/dist/components/BlockedMemoriBadge/BlockedMemoriBadge.test.js +6 -6
- package/dist/components/BlockedMemoriBadge/BlockedMemoriBadge.test.js.map +1 -1
- package/dist/components/ChangeMode/ChangeMode.js +3 -6
- package/dist/components/ChangeMode/ChangeMode.js.map +1 -1
- package/dist/components/ChangeMode/ChangeMode.stories.js +2 -1
- package/dist/components/ChangeMode/ChangeMode.stories.js.map +1 -1
- package/dist/components/ChangeMode/ChangeMode.test.js +5 -5
- package/dist/components/ChangeMode/ChangeMode.test.js.map +1 -1
- package/dist/components/Chat/Chat.js +45 -67
- package/dist/components/Chat/Chat.js.map +1 -1
- package/dist/components/Chat/Chat.stories.js +3 -2
- package/dist/components/Chat/Chat.stories.js.map +1 -1
- package/dist/components/Chat/Chat.test.js +11 -11
- package/dist/components/Chat/Chat.test.js.map +1 -1
- package/dist/components/ChatBubble/ChatBubble.js +36 -50
- package/dist/components/ChatBubble/ChatBubble.js.map +1 -1
- package/dist/components/ChatBubble/ChatBubble.stories.js +2 -2
- package/dist/components/ChatBubble/ChatBubble.stories.js.map +1 -1
- package/dist/components/ChatBubble/ChatBubble.test.js +6 -6
- package/dist/components/ChatBubble/ChatBubble.test.js.map +1 -1
- package/dist/components/ChatInputs/ChatInputs.js +18 -23
- package/dist/components/ChatInputs/ChatInputs.js.map +1 -1
- package/dist/components/ChatInputs/ChatInputs.stories.js +2 -2
- package/dist/components/ChatInputs/ChatInputs.stories.js.map +1 -1
- package/dist/components/ChatInputs/ChatInputs.test.js +8 -8
- package/dist/components/ChatInputs/ChatInputs.test.js.map +1 -1
- package/dist/components/ChatTextArea/ChatTextArea.js +10 -13
- package/dist/components/ChatTextArea/ChatTextArea.js.map +1 -1
- package/dist/components/ChatTextArea/ChatTextArea.stories.js +2 -2
- package/dist/components/ChatTextArea/ChatTextArea.stories.js.map +1 -1
- package/dist/components/ChatTextArea/ChatTextArea.test.js +8 -8
- package/dist/components/ChatTextArea/ChatTextArea.test.js.map +1 -1
- package/dist/components/CustomGLBModelViewer/ModelViewer.js +3 -4
- package/dist/components/CustomGLBModelViewer/ModelViewer.js.map +1 -1
- package/dist/components/CustomGLBModelViewer/ModelViewer.stories.js +6 -4
- package/dist/components/CustomGLBModelViewer/ModelViewer.stories.js.map +1 -1
- package/dist/components/CustomGLBModelViewer/ModelViewer.test.js +3 -3
- package/dist/components/CustomGLBModelViewer/ModelViewer.test.js.map +1 -1
- package/dist/components/ErrorBoundary/ErrorBoundary.js +5 -7
- package/dist/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/dist/components/ExportHistoryButton/ExportHistoryButton.js +8 -14
- package/dist/components/ExportHistoryButton/ExportHistoryButton.js.map +1 -1
- package/dist/components/ExportHistoryButton/ExportHistoryButton.stories.js +4 -6
- package/dist/components/ExportHistoryButton/ExportHistoryButton.stories.js.map +1 -1
- package/dist/components/ExportHistoryButton/ExportHistoryButton.test.js +9 -9
- package/dist/components/ExportHistoryButton/ExportHistoryButton.test.js.map +1 -1
- package/dist/components/FeedbackButtons/FeedbackButtons.js +25 -32
- package/dist/components/FeedbackButtons/FeedbackButtons.js.map +1 -1
- package/dist/components/FeedbackButtons/FeedbackButtons.stories.js +3 -4
- package/dist/components/FeedbackButtons/FeedbackButtons.stories.js.map +1 -1
- package/dist/components/FeedbackButtons/FeedbackButtons.test.js +3 -3
- package/dist/components/FeedbackButtons/FeedbackButtons.test.js.map +1 -1
- package/dist/components/Header/Header.d.ts +1 -0
- package/dist/components/Header/Header.js +3 -10
- package/dist/components/Header/Header.js.map +1 -1
- package/dist/components/Header/Header.stories.js +2 -1
- package/dist/components/Header/Header.stories.js.map +1 -1
- package/dist/components/Header/Header.test.js +8 -8
- package/dist/components/Header/Header.test.js.map +1 -1
- package/dist/components/ImageUpload/ImageUpload.js +55 -72
- package/dist/components/ImageUpload/ImageUpload.js.map +1 -1
- package/dist/components/ImageUpload/ImageUpload.stories.js +2 -2
- package/dist/components/ImageUpload/ImageUpload.stories.js.map +1 -1
- package/dist/components/MediaWidget/LinkItemWidget.js +5 -8
- package/dist/components/MediaWidget/LinkItemWidget.js.map +1 -1
- package/dist/components/MediaWidget/LinkItemWidget.stories.js +2 -2
- package/dist/components/MediaWidget/LinkItemWidget.stories.js.map +1 -1
- package/dist/components/MediaWidget/LinkItemWidget.test.js +6 -6
- package/dist/components/MediaWidget/LinkItemWidget.test.js.map +1 -1
- package/dist/components/MediaWidget/MediaItemWidget.js +108 -68
- package/dist/components/MediaWidget/MediaItemWidget.js.map +1 -1
- package/dist/components/MediaWidget/MediaItemWidget.stories.js +2 -2
- package/dist/components/MediaWidget/MediaItemWidget.stories.js.map +1 -1
- package/dist/components/MediaWidget/MediaItemWidget.test.js +10 -10
- package/dist/components/MediaWidget/MediaItemWidget.test.js.map +1 -1
- package/dist/components/MediaWidget/MediaWidget.js +9 -12
- package/dist/components/MediaWidget/MediaWidget.js.map +1 -1
- package/dist/components/MediaWidget/MediaWidget.stories.js +2 -2
- package/dist/components/MediaWidget/MediaWidget.stories.js.map +1 -1
- package/dist/components/MediaWidget/MediaWidget.test.js +6 -6
- package/dist/components/MediaWidget/MediaWidget.test.js.map +1 -1
- package/dist/components/MemoriWidget/MemoriWidget.js +113 -106
- package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/dist/components/MemoriWidget/MemoriWidget.stories.d.ts +1 -0
- package/dist/components/MemoriWidget/MemoriWidget.stories.js +19 -5
- package/dist/components/MemoriWidget/MemoriWidget.stories.js.map +1 -1
- package/dist/components/PositionDrawer/PositionDrawer.js +2 -4
- package/dist/components/PositionDrawer/PositionDrawer.js.map +1 -1
- package/dist/components/SendOnEnterMenu/SendOnEnterMenu.js +7 -16
- package/dist/components/SendOnEnterMenu/SendOnEnterMenu.js.map +1 -1
- package/dist/components/SendOnEnterMenu/SendOnEnterMenu.stories.js +3 -3
- package/dist/components/SendOnEnterMenu/SendOnEnterMenu.stories.js.map +1 -1
- package/dist/components/SendOnEnterMenu/SendOnEnterMenu.test.js +4 -4
- package/dist/components/SendOnEnterMenu/SendOnEnterMenu.test.js.map +1 -1
- package/dist/components/ShareButton/ShareButton.js +18 -32
- package/dist/components/ShareButton/ShareButton.js.map +1 -1
- package/dist/components/ShareButton/ShareButton.stories.js +3 -4
- package/dist/components/ShareButton/ShareButton.stories.js.map +1 -1
- package/dist/components/ShareButton/ShareButton.test.js +8 -8
- package/dist/components/ShareButton/ShareButton.test.js.map +1 -1
- package/dist/components/Snippet/Snippet.js +4 -8
- package/dist/components/Snippet/Snippet.js.map +1 -1
- package/dist/components/Snippet/Snippet.stories.js +2 -2
- package/dist/components/Snippet/Snippet.stories.js.map +1 -1
- package/dist/components/Snippet/Snippet.test.js +9 -9
- package/dist/components/Snippet/Snippet.test.js.map +1 -1
- package/dist/components/StartPanel/StartPanel.js +45 -69
- package/dist/components/StartPanel/StartPanel.js.map +1 -1
- package/dist/components/StartPanel/StartPanel.stories.js +2 -4
- package/dist/components/StartPanel/StartPanel.stories.js.map +1 -1
- package/dist/components/StartPanel/StartPanel.test.js +7 -7
- package/dist/components/StartPanel/StartPanel.test.js.map +1 -1
- package/dist/components/UploadMenu/UploadMenu.js +3 -11
- package/dist/components/UploadMenu/UploadMenu.js.map +1 -1
- package/dist/components/UploadMenu/UploadMenu.stories.js +4 -4
- package/dist/components/UploadMenu/UploadMenu.stories.js.map +1 -1
- package/dist/components/UploadMenu/UploadMenu.test.js +6 -6
- package/dist/components/UploadMenu/UploadMenu.test.js.map +1 -1
- package/dist/components/icons/AI.js +2 -7
- package/dist/components/icons/AI.js.map +1 -1
- package/dist/components/icons/Close.js +2 -4
- package/dist/components/icons/Close.js.map +1 -1
- package/dist/components/icons/Copy.js +2 -4
- package/dist/components/icons/Copy.js.map +1 -1
- package/dist/components/icons/Delete.js +2 -4
- package/dist/components/icons/Delete.js.map +1 -1
- package/dist/components/icons/Download.js +2 -4
- package/dist/components/icons/Download.js.map +1 -1
- package/dist/components/icons/Edit.js +2 -4
- package/dist/components/icons/Edit.js.map +1 -1
- package/dist/components/icons/Expand.js +2 -4
- package/dist/components/icons/Expand.js.map +1 -1
- package/dist/components/icons/Eye.js +2 -4
- package/dist/components/icons/Eye.js.map +1 -1
- package/dist/components/icons/EyeInvisible.js +2 -5
- package/dist/components/icons/EyeInvisible.js.map +1 -1
- package/dist/components/icons/Facebook.js +2 -4
- package/dist/components/icons/Facebook.js.map +1 -1
- package/dist/components/icons/Feedback.js +2 -5
- package/dist/components/icons/Feedback.js.map +1 -1
- package/dist/components/icons/File.js +2 -4
- package/dist/components/icons/File.js.map +1 -1
- package/dist/components/icons/FileExcel.js +2 -4
- package/dist/components/icons/FileExcel.js.map +1 -1
- package/dist/components/icons/FilePdf.js +2 -4
- package/dist/components/icons/FilePdf.js.map +1 -1
- package/dist/components/icons/FileWord.js +2 -4
- package/dist/components/icons/FileWord.js.map +1 -1
- package/dist/components/icons/Fullscreen.js +2 -4
- package/dist/components/icons/Fullscreen.js.map +1 -1
- package/dist/components/icons/FullscreenExit.js +2 -4
- package/dist/components/icons/FullscreenExit.js.map +1 -1
- package/dist/components/icons/Link.js +2 -4
- package/dist/components/icons/Link.js.map +1 -1
- package/dist/components/icons/Linkedin.js +2 -4
- package/dist/components/icons/Linkedin.js.map +1 -1
- package/dist/components/icons/Loading.js +3 -4
- package/dist/components/icons/Loading.js.map +1 -1
- package/dist/components/icons/Mail.js +2 -4
- package/dist/components/icons/Mail.js.map +1 -1
- package/dist/components/icons/MapMarker.js +2 -4
- package/dist/components/icons/MapMarker.js.map +1 -1
- package/dist/components/icons/Message.js +2 -4
- package/dist/components/icons/Message.js.map +1 -1
- package/dist/components/icons/Microphone.js +2 -4
- package/dist/components/icons/Microphone.js.map +1 -1
- package/dist/components/icons/Minus.js +2 -4
- package/dist/components/icons/Minus.js.map +1 -1
- package/dist/components/icons/MinusCircle.js +2 -5
- package/dist/components/icons/MinusCircle.js.map +1 -1
- package/dist/components/icons/PaperClip.js +2 -4
- package/dist/components/icons/PaperClip.js.map +1 -1
- package/dist/components/icons/Picture.js +2 -4
- package/dist/components/icons/Picture.js.map +1 -1
- package/dist/components/icons/Plus.js +2 -5
- package/dist/components/icons/Plus.js.map +1 -1
- package/dist/components/icons/Send.js +2 -4
- package/dist/components/icons/Send.js.map +1 -1
- package/dist/components/icons/Setting.js +2 -4
- package/dist/components/icons/Setting.js.map +1 -1
- package/dist/components/icons/Share.js +2 -4
- package/dist/components/icons/Share.js.map +1 -1
- package/dist/components/icons/Sound.js +2 -4
- package/dist/components/icons/Sound.js.map +1 -1
- package/dist/components/icons/SoundDeactivated.js +2 -4
- package/dist/components/icons/SoundDeactivated.js.map +1 -1
- package/dist/components/icons/Telegram.js +2 -4
- package/dist/components/icons/Telegram.js.map +1 -1
- package/dist/components/icons/ThumbDown.js +2 -4
- package/dist/components/icons/ThumbDown.js.map +1 -1
- package/dist/components/icons/ThumbUp.js +2 -4
- package/dist/components/icons/ThumbUp.js.map +1 -1
- package/dist/components/icons/Translation.js +2 -5
- package/dist/components/icons/Translation.js.map +1 -1
- package/dist/components/icons/Twitter.js +2 -4
- package/dist/components/icons/Twitter.js.map +1 -1
- package/dist/components/icons/User.js +2 -4
- package/dist/components/icons/User.js.map +1 -1
- package/dist/components/icons/Warning.js +2 -4
- package/dist/components/icons/Warning.js.map +1 -1
- package/dist/components/icons/WhatsApp.js +2 -5
- package/dist/components/icons/WhatsApp.js.map +1 -1
- package/dist/components/icons/icons.stories.js +7 -10
- package/dist/components/icons/icons.stories.js.map +1 -1
- package/dist/components/layouts/Default.js +2 -10
- package/dist/components/layouts/Default.js.map +1 -1
- package/dist/components/ui/Button.js +3 -7
- package/dist/components/ui/Button.js.map +1 -1
- package/dist/components/ui/Button.stories.js +4 -4
- package/dist/components/ui/Button.stories.js.map +1 -1
- package/dist/components/ui/Button.test.js +16 -16
- package/dist/components/ui/Button.test.js.map +1 -1
- package/dist/components/ui/Card.js +3 -9
- package/dist/components/ui/Card.js.map +1 -1
- package/dist/components/ui/Card.stories.js +4 -6
- package/dist/components/ui/Card.stories.js.map +1 -1
- package/dist/components/ui/Card.test.js +10 -11
- package/dist/components/ui/Card.test.js.map +1 -1
- package/dist/components/ui/Checkbox.js +3 -7
- package/dist/components/ui/Checkbox.js.map +1 -1
- package/dist/components/ui/Checkbox.stories.js +2 -2
- package/dist/components/ui/Checkbox.stories.js.map +1 -1
- package/dist/components/ui/Checkbox.test.js +6 -6
- package/dist/components/ui/Checkbox.test.js.map +1 -1
- package/dist/components/ui/Drawer.js +7 -21
- package/dist/components/ui/Drawer.js.map +1 -1
- package/dist/components/ui/Drawer.stories.js +5 -38
- package/dist/components/ui/Drawer.stories.js.map +1 -1
- package/dist/components/ui/Drawer.test.js +13 -23
- package/dist/components/ui/Drawer.test.js.map +1 -1
- package/dist/components/ui/Message.js +2 -3
- package/dist/components/ui/Message.js.map +1 -1
- package/dist/components/ui/Modal.js +4 -18
- package/dist/components/ui/Modal.js.map +1 -1
- package/dist/components/ui/Modal.stories.js +6 -24
- package/dist/components/ui/Modal.stories.js.map +1 -1
- package/dist/components/ui/Modal.test.js +12 -22
- package/dist/components/ui/Modal.test.js.map +1 -1
- package/dist/components/ui/Spin.js +3 -6
- package/dist/components/ui/Spin.js.map +1 -1
- package/dist/components/ui/Spin.stories.js +2 -10
- package/dist/components/ui/Spin.stories.js.map +1 -1
- package/dist/components/ui/Spin.test.js +7 -15
- package/dist/components/ui/Spin.test.js.map +1 -1
- package/dist/components/ui/Tooltip.js +3 -5
- package/dist/components/ui/Tooltip.js.map +1 -1
- package/dist/components/ui/Tooltip.stories.js +9 -14
- package/dist/components/ui/Tooltip.stories.js.map +1 -1
- package/dist/components/ui/Tooltip.test.js +6 -9
- package/dist/components/ui/Tooltip.test.js.map +1 -1
- package/dist/index.js +4 -6
- package/dist/index.js.map +1 -1
- package/dist/index.stories.js +2 -2
- package/dist/index.stories.js.map +1 -1
- package/esm/components/AttachmentLinkModal/AttachmentLinkModal.js +29 -43
- package/esm/components/AttachmentLinkModal/AttachmentLinkModal.js.map +1 -1
- package/esm/components/AttachmentLinkModal/AttachmentLinkModal.stories.js +2 -2
- package/esm/components/AttachmentLinkModal/AttachmentLinkModal.stories.js.map +1 -1
- package/esm/components/AttachmentLinkModal/AttachmentLinkModal.test.js +2 -2
- package/esm/components/AttachmentLinkModal/AttachmentLinkModal.test.js.map +1 -1
- package/esm/components/AttachmentMediaModal/AttachmentMediaModal.js +9 -11
- package/esm/components/AttachmentMediaModal/AttachmentMediaModal.js.map +1 -1
- package/esm/components/AttachmentMediaModal/AttachmentMediaModal.stories.js +2 -2
- package/esm/components/AttachmentMediaModal/AttachmentMediaModal.stories.js.map +1 -1
- package/esm/components/Auth/Auth.js +8 -29
- package/esm/components/Auth/Auth.js.map +1 -1
- package/esm/components/Auth/Auth.stories.js +4 -3
- package/esm/components/Auth/Auth.stories.js.map +1 -1
- package/esm/components/Auth/Auth.test.js +5 -5
- package/esm/components/Auth/Auth.test.js.map +1 -1
- package/esm/components/Avatar/Avatar.d.ts +3 -2
- package/esm/components/Avatar/Avatar.js +60 -56
- package/esm/components/Avatar/Avatar.js.map +1 -1
- package/esm/components/Avatar/Avatar.stories.js +5 -4
- package/esm/components/Avatar/Avatar.stories.js.map +1 -1
- package/esm/components/Avatar/Avatar.test.js +5 -5
- package/esm/components/Avatar/Avatar.test.js.map +1 -1
- package/esm/components/AvatarView/AvatarView.stories.d.ts +4 -0
- package/esm/components/AvatarView/AvatarView.stories.js +67 -1
- package/esm/components/AvatarView/AvatarView.stories.js.map +1 -1
- package/esm/components/AvatarView/components/avatar.js +6 -9
- package/esm/components/AvatarView/components/avatar.js.map +1 -1
- package/esm/components/AvatarView/components/fullbodyAvatar.d.ts +9 -0
- package/esm/components/AvatarView/components/fullbodyAvatar.js +53 -0
- package/esm/components/AvatarView/components/fullbodyAvatar.js.map +1 -0
- package/esm/components/AvatarView/components/loader.js +2 -6
- package/esm/components/AvatarView/components/loader.js.map +1 -1
- package/esm/components/AvatarView/index.d.ts +4 -1
- package/esm/components/AvatarView/index.js +19 -8
- package/esm/components/AvatarView/index.js.map +1 -1
- package/esm/components/Blob/Blob.js +2 -9
- package/esm/components/Blob/Blob.js.map +1 -1
- package/esm/components/Blob/Blob.stories.js +2 -3
- package/esm/components/Blob/Blob.stories.js.map +1 -1
- package/esm/components/Blob/Blob.test.js +4 -4
- package/esm/components/Blob/Blob.test.js.map +1 -1
- package/esm/components/BlockedMemoriBadge/BlockedMemoriBadge.js +17 -26
- package/esm/components/BlockedMemoriBadge/BlockedMemoriBadge.js.map +1 -1
- package/esm/components/BlockedMemoriBadge/BlockedMemoriBadge.stories.js +2 -2
- package/esm/components/BlockedMemoriBadge/BlockedMemoriBadge.stories.js.map +1 -1
- package/esm/components/BlockedMemoriBadge/BlockedMemoriBadge.test.js +5 -5
- package/esm/components/BlockedMemoriBadge/BlockedMemoriBadge.test.js.map +1 -1
- package/esm/components/ChangeMode/ChangeMode.js +2 -5
- package/esm/components/ChangeMode/ChangeMode.js.map +1 -1
- package/esm/components/ChangeMode/ChangeMode.stories.js +2 -1
- package/esm/components/ChangeMode/ChangeMode.stories.js.map +1 -1
- package/esm/components/ChangeMode/ChangeMode.test.js +4 -4
- package/esm/components/ChangeMode/ChangeMode.test.js.map +1 -1
- package/esm/components/Chat/Chat.js +45 -67
- package/esm/components/Chat/Chat.js.map +1 -1
- package/esm/components/Chat/Chat.stories.js +3 -2
- package/esm/components/Chat/Chat.stories.js.map +1 -1
- package/esm/components/Chat/Chat.test.js +10 -10
- package/esm/components/Chat/Chat.test.js.map +1 -1
- package/esm/components/ChatBubble/ChatBubble.js +35 -49
- package/esm/components/ChatBubble/ChatBubble.js.map +1 -1
- package/esm/components/ChatBubble/ChatBubble.stories.js +2 -2
- package/esm/components/ChatBubble/ChatBubble.stories.js.map +1 -1
- package/esm/components/ChatBubble/ChatBubble.test.js +5 -5
- package/esm/components/ChatBubble/ChatBubble.test.js.map +1 -1
- package/esm/components/ChatInputs/ChatInputs.js +18 -23
- package/esm/components/ChatInputs/ChatInputs.js.map +1 -1
- package/esm/components/ChatInputs/ChatInputs.stories.js +2 -2
- package/esm/components/ChatInputs/ChatInputs.stories.js.map +1 -1
- package/esm/components/ChatInputs/ChatInputs.test.js +7 -7
- package/esm/components/ChatInputs/ChatInputs.test.js.map +1 -1
- package/esm/components/ChatTextArea/ChatTextArea.js +10 -13
- package/esm/components/ChatTextArea/ChatTextArea.js.map +1 -1
- package/esm/components/ChatTextArea/ChatTextArea.stories.js +2 -2
- package/esm/components/ChatTextArea/ChatTextArea.stories.js.map +1 -1
- package/esm/components/ChatTextArea/ChatTextArea.test.js +5 -5
- package/esm/components/ChatTextArea/ChatTextArea.test.js.map +1 -1
- package/esm/components/CustomGLBModelViewer/ModelViewer.js +3 -3
- package/esm/components/CustomGLBModelViewer/ModelViewer.js.map +1 -1
- package/esm/components/CustomGLBModelViewer/ModelViewer.stories.js +3 -1
- package/esm/components/CustomGLBModelViewer/ModelViewer.stories.js.map +1 -1
- package/esm/components/CustomGLBModelViewer/ModelViewer.test.js +2 -2
- package/esm/components/CustomGLBModelViewer/ModelViewer.test.js.map +1 -1
- package/esm/components/ErrorBoundary/ErrorBoundary.js +3 -5
- package/esm/components/ErrorBoundary/ErrorBoundary.js.map +1 -1
- package/esm/components/ExportHistoryButton/ExportHistoryButton.js +7 -13
- package/esm/components/ExportHistoryButton/ExportHistoryButton.js.map +1 -1
- package/esm/components/ExportHistoryButton/ExportHistoryButton.stories.js +4 -6
- package/esm/components/ExportHistoryButton/ExportHistoryButton.stories.js.map +1 -1
- package/esm/components/ExportHistoryButton/ExportHistoryButton.test.js +8 -8
- package/esm/components/ExportHistoryButton/ExportHistoryButton.test.js.map +1 -1
- package/esm/components/FeedbackButtons/FeedbackButtons.js +25 -32
- package/esm/components/FeedbackButtons/FeedbackButtons.js.map +1 -1
- package/esm/components/FeedbackButtons/FeedbackButtons.stories.js +3 -4
- package/esm/components/FeedbackButtons/FeedbackButtons.stories.js.map +1 -1
- package/esm/components/FeedbackButtons/FeedbackButtons.test.js +2 -2
- package/esm/components/FeedbackButtons/FeedbackButtons.test.js.map +1 -1
- package/esm/components/Header/Header.d.ts +1 -0
- package/esm/components/Header/Header.js +3 -10
- package/esm/components/Header/Header.js.map +1 -1
- package/esm/components/Header/Header.stories.js +2 -1
- package/esm/components/Header/Header.stories.js.map +1 -1
- package/esm/components/Header/Header.test.js +7 -7
- package/esm/components/Header/Header.test.js.map +1 -1
- package/esm/components/ImageUpload/ImageUpload.js +55 -72
- package/esm/components/ImageUpload/ImageUpload.js.map +1 -1
- package/esm/components/ImageUpload/ImageUpload.stories.js +2 -2
- package/esm/components/ImageUpload/ImageUpload.stories.js.map +1 -1
- package/esm/components/MediaWidget/LinkItemWidget.js +5 -8
- package/esm/components/MediaWidget/LinkItemWidget.js.map +1 -1
- package/esm/components/MediaWidget/LinkItemWidget.stories.js +2 -2
- package/esm/components/MediaWidget/LinkItemWidget.stories.js.map +1 -1
- package/esm/components/MediaWidget/LinkItemWidget.test.js +5 -5
- package/esm/components/MediaWidget/LinkItemWidget.test.js.map +1 -1
- package/esm/components/MediaWidget/MediaItemWidget.js +108 -68
- package/esm/components/MediaWidget/MediaItemWidget.js.map +1 -1
- package/esm/components/MediaWidget/MediaItemWidget.stories.js +2 -2
- package/esm/components/MediaWidget/MediaItemWidget.stories.js.map +1 -1
- package/esm/components/MediaWidget/MediaItemWidget.test.js +9 -9
- package/esm/components/MediaWidget/MediaItemWidget.test.js.map +1 -1
- package/esm/components/MediaWidget/MediaWidget.js +9 -12
- package/esm/components/MediaWidget/MediaWidget.js.map +1 -1
- package/esm/components/MediaWidget/MediaWidget.stories.js +2 -2
- package/esm/components/MediaWidget/MediaWidget.stories.js.map +1 -1
- package/esm/components/MediaWidget/MediaWidget.test.js +5 -5
- package/esm/components/MediaWidget/MediaWidget.test.js.map +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.js +113 -106
- package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
- package/esm/components/MemoriWidget/MemoriWidget.stories.d.ts +1 -0
- package/esm/components/MemoriWidget/MemoriWidget.stories.js +18 -4
- package/esm/components/MemoriWidget/MemoriWidget.stories.js.map +1 -1
- package/esm/components/PositionDrawer/PositionDrawer.js +2 -3
- package/esm/components/PositionDrawer/PositionDrawer.js.map +1 -1
- package/esm/components/SendOnEnterMenu/SendOnEnterMenu.js +6 -15
- package/esm/components/SendOnEnterMenu/SendOnEnterMenu.js.map +1 -1
- package/esm/components/SendOnEnterMenu/SendOnEnterMenu.stories.js +3 -3
- package/esm/components/SendOnEnterMenu/SendOnEnterMenu.stories.js.map +1 -1
- package/esm/components/SendOnEnterMenu/SendOnEnterMenu.test.js +3 -3
- package/esm/components/SendOnEnterMenu/SendOnEnterMenu.test.js.map +1 -1
- package/esm/components/ShareButton/ShareButton.js +18 -32
- package/esm/components/ShareButton/ShareButton.js.map +1 -1
- package/esm/components/ShareButton/ShareButton.stories.js +3 -4
- package/esm/components/ShareButton/ShareButton.stories.js.map +1 -1
- package/esm/components/ShareButton/ShareButton.test.js +7 -7
- package/esm/components/ShareButton/ShareButton.test.js.map +1 -1
- package/esm/components/Snippet/Snippet.js +4 -8
- package/esm/components/Snippet/Snippet.js.map +1 -1
- package/esm/components/Snippet/Snippet.stories.js +2 -2
- package/esm/components/Snippet/Snippet.stories.js.map +1 -1
- package/esm/components/Snippet/Snippet.test.js +8 -8
- package/esm/components/Snippet/Snippet.test.js.map +1 -1
- package/esm/components/StartPanel/StartPanel.js +45 -69
- package/esm/components/StartPanel/StartPanel.js.map +1 -1
- package/esm/components/StartPanel/StartPanel.stories.js +2 -4
- package/esm/components/StartPanel/StartPanel.stories.js.map +1 -1
- package/esm/components/StartPanel/StartPanel.test.js +6 -6
- package/esm/components/StartPanel/StartPanel.test.js.map +1 -1
- package/esm/components/UploadMenu/UploadMenu.js +2 -10
- package/esm/components/UploadMenu/UploadMenu.js.map +1 -1
- package/esm/components/UploadMenu/UploadMenu.stories.js +4 -4
- package/esm/components/UploadMenu/UploadMenu.stories.js.map +1 -1
- package/esm/components/UploadMenu/UploadMenu.test.js +5 -5
- package/esm/components/UploadMenu/UploadMenu.test.js.map +1 -1
- package/esm/components/icons/AI.js +2 -6
- package/esm/components/icons/AI.js.map +1 -1
- package/esm/components/icons/Close.js +2 -3
- package/esm/components/icons/Close.js.map +1 -1
- package/esm/components/icons/Copy.js +2 -3
- package/esm/components/icons/Copy.js.map +1 -1
- package/esm/components/icons/Delete.js +2 -3
- package/esm/components/icons/Delete.js.map +1 -1
- package/esm/components/icons/Download.js +2 -3
- package/esm/components/icons/Download.js.map +1 -1
- package/esm/components/icons/Edit.js +2 -3
- package/esm/components/icons/Edit.js.map +1 -1
- package/esm/components/icons/Expand.js +2 -3
- package/esm/components/icons/Expand.js.map +1 -1
- package/esm/components/icons/Eye.js +2 -3
- package/esm/components/icons/Eye.js.map +1 -1
- package/esm/components/icons/EyeInvisible.js +2 -4
- package/esm/components/icons/EyeInvisible.js.map +1 -1
- package/esm/components/icons/Facebook.js +2 -3
- package/esm/components/icons/Facebook.js.map +1 -1
- package/esm/components/icons/Feedback.js +2 -4
- package/esm/components/icons/Feedback.js.map +1 -1
- package/esm/components/icons/File.js +2 -3
- package/esm/components/icons/File.js.map +1 -1
- package/esm/components/icons/FileExcel.js +2 -3
- package/esm/components/icons/FileExcel.js.map +1 -1
- package/esm/components/icons/FilePdf.js +2 -3
- package/esm/components/icons/FilePdf.js.map +1 -1
- package/esm/components/icons/FileWord.js +2 -3
- package/esm/components/icons/FileWord.js.map +1 -1
- package/esm/components/icons/Fullscreen.js +2 -3
- package/esm/components/icons/Fullscreen.js.map +1 -1
- package/esm/components/icons/FullscreenExit.js +2 -3
- package/esm/components/icons/FullscreenExit.js.map +1 -1
- package/esm/components/icons/Link.js +2 -3
- package/esm/components/icons/Link.js.map +1 -1
- package/esm/components/icons/Linkedin.js +2 -3
- package/esm/components/icons/Linkedin.js.map +1 -1
- package/esm/components/icons/Loading.js +3 -4
- package/esm/components/icons/Loading.js.map +1 -1
- package/esm/components/icons/Mail.js +2 -3
- package/esm/components/icons/Mail.js.map +1 -1
- package/esm/components/icons/MapMarker.js +2 -3
- package/esm/components/icons/MapMarker.js.map +1 -1
- package/esm/components/icons/Message.js +2 -3
- package/esm/components/icons/Message.js.map +1 -1
- package/esm/components/icons/Microphone.js +2 -3
- package/esm/components/icons/Microphone.js.map +1 -1
- package/esm/components/icons/Minus.js +2 -3
- package/esm/components/icons/Minus.js.map +1 -1
- package/esm/components/icons/MinusCircle.js +2 -4
- package/esm/components/icons/MinusCircle.js.map +1 -1
- package/esm/components/icons/PaperClip.js +2 -3
- package/esm/components/icons/PaperClip.js.map +1 -1
- package/esm/components/icons/Picture.js +2 -3
- package/esm/components/icons/Picture.js.map +1 -1
- package/esm/components/icons/Plus.js +2 -4
- package/esm/components/icons/Plus.js.map +1 -1
- package/esm/components/icons/Send.js +2 -3
- package/esm/components/icons/Send.js.map +1 -1
- package/esm/components/icons/Setting.js +2 -3
- package/esm/components/icons/Setting.js.map +1 -1
- package/esm/components/icons/Share.js +2 -3
- package/esm/components/icons/Share.js.map +1 -1
- package/esm/components/icons/Sound.js +2 -3
- package/esm/components/icons/Sound.js.map +1 -1
- package/esm/components/icons/SoundDeactivated.js +2 -3
- package/esm/components/icons/SoundDeactivated.js.map +1 -1
- package/esm/components/icons/Telegram.js +2 -3
- package/esm/components/icons/Telegram.js.map +1 -1
- package/esm/components/icons/ThumbDown.js +2 -3
- package/esm/components/icons/ThumbDown.js.map +1 -1
- package/esm/components/icons/ThumbUp.js +2 -3
- package/esm/components/icons/ThumbUp.js.map +1 -1
- package/esm/components/icons/Translation.js +2 -4
- package/esm/components/icons/Translation.js.map +1 -1
- package/esm/components/icons/Twitter.js +2 -3
- package/esm/components/icons/Twitter.js.map +1 -1
- package/esm/components/icons/User.js +2 -3
- package/esm/components/icons/User.js.map +1 -1
- package/esm/components/icons/Warning.js +2 -3
- package/esm/components/icons/Warning.js.map +1 -1
- package/esm/components/icons/WhatsApp.js +2 -4
- package/esm/components/icons/WhatsApp.js.map +1 -1
- package/esm/components/icons/icons.stories.js +7 -9
- package/esm/components/icons/icons.stories.js.map +1 -1
- package/esm/components/layouts/Default.js +2 -10
- package/esm/components/layouts/Default.js.map +1 -1
- package/esm/components/ui/Button.js +3 -7
- package/esm/components/ui/Button.js.map +1 -1
- package/esm/components/ui/Button.stories.js +4 -4
- package/esm/components/ui/Button.stories.js.map +1 -1
- package/esm/components/ui/Button.test.js +15 -15
- package/esm/components/ui/Button.test.js.map +1 -1
- package/esm/components/ui/Card.js +3 -9
- package/esm/components/ui/Card.js.map +1 -1
- package/esm/components/ui/Card.stories.js +4 -6
- package/esm/components/ui/Card.stories.js.map +1 -1
- package/esm/components/ui/Card.test.js +9 -10
- package/esm/components/ui/Card.test.js.map +1 -1
- package/esm/components/ui/Checkbox.js +3 -7
- package/esm/components/ui/Checkbox.js.map +1 -1
- package/esm/components/ui/Checkbox.stories.js +2 -2
- package/esm/components/ui/Checkbox.stories.js.map +1 -1
- package/esm/components/ui/Checkbox.test.js +5 -5
- package/esm/components/ui/Checkbox.test.js.map +1 -1
- package/esm/components/ui/Drawer.js +7 -21
- package/esm/components/ui/Drawer.js.map +1 -1
- package/esm/components/ui/Drawer.stories.js +5 -38
- package/esm/components/ui/Drawer.stories.js.map +1 -1
- package/esm/components/ui/Drawer.test.js +12 -22
- package/esm/components/ui/Drawer.test.js.map +1 -1
- package/esm/components/ui/Message.js +2 -2
- package/esm/components/ui/Message.js.map +1 -1
- package/esm/components/ui/Modal.js +4 -18
- package/esm/components/ui/Modal.js.map +1 -1
- package/esm/components/ui/Modal.stories.js +6 -24
- package/esm/components/ui/Modal.stories.js.map +1 -1
- package/esm/components/ui/Modal.test.js +11 -21
- package/esm/components/ui/Modal.test.js.map +1 -1
- package/esm/components/ui/Spin.js +3 -6
- package/esm/components/ui/Spin.js.map +1 -1
- package/esm/components/ui/Spin.stories.js +2 -10
- package/esm/components/ui/Spin.stories.js.map +1 -1
- package/esm/components/ui/Spin.test.js +6 -14
- package/esm/components/ui/Spin.test.js.map +1 -1
- package/esm/components/ui/Tooltip.js +3 -5
- package/esm/components/ui/Tooltip.js.map +1 -1
- package/esm/components/ui/Tooltip.stories.js +9 -14
- package/esm/components/ui/Tooltip.stories.js.map +1 -1
- package/esm/components/ui/Tooltip.test.js +5 -8
- package/esm/components/ui/Tooltip.test.js.map +1 -1
- package/esm/index.js +4 -6
- package/esm/index.js.map +1 -1
- package/esm/index.stories.js +2 -2
- package/esm/index.stories.js.map +1 -1
- package/package.json +17 -2
- package/src/components/Avatar/Avatar.tsx +81 -50
- package/src/components/AvatarView/AvatarView.stories.tsx +77 -10
- package/src/components/AvatarView/components/avatar.tsx +1 -3
- package/src/components/AvatarView/components/fullbodyAvatar.tsx +88 -0
- package/src/components/AvatarView/index.tsx +43 -10
- package/src/components/Chat/Chat.test.tsx +1 -1
- package/src/components/ChatInputs/ChatInputs.tsx +0 -2
- package/src/components/Header/Header.tsx +12 -8
- package/src/components/MediaWidget/MediaItemWidget.tsx +63 -9
- package/src/components/MemoriWidget/MemoriWidget.stories.tsx +17 -1
- package/src/components/MemoriWidget/MemoriWidget.tsx +19 -2
|
@@ -1,35 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { Dialog, Transition } from '@headlessui/react';
|
|
3
4
|
import Spin from './Spin';
|
|
4
5
|
import Button from './Button';
|
|
5
6
|
import Close from '../icons/Close';
|
|
6
7
|
import cx from 'classnames';
|
|
7
|
-
const Drawer = ({ open = false, onClose, className, title, description, children, footer, loading = false, side = 'right', closable = true, width = '100%', widthMd = '80%', widthLg = '60%', }) => (
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
React.createElement("div", { className: "memori-drawer--container-scrollable" },
|
|
13
|
-
React.createElement(Transition.Child, { as: React.Fragment, enter: "ease-out duration-300", enterFrom: "max-w-0 opacity-0", enterTo: "max-w-100 opacity-100", leave: "ease-in duration-200", leaveFrom: "max-w-100 opacity-100", leaveTo: "max-w-0 opacity-0" },
|
|
14
|
-
React.createElement(Dialog.Panel, { className: cx('memori-drawer--panel', {
|
|
15
|
-
'memori-drawer--panel-left': side === 'left',
|
|
16
|
-
'memori-drawer--with-footer': !!footer,
|
|
17
|
-
}) },
|
|
18
|
-
React.createElement("style", { dangerouslySetInnerHTML: {
|
|
19
|
-
__html: `
|
|
8
|
+
const Drawer = ({ open = false, onClose, className, title, description, children, footer, loading = false, side = 'right', closable = true, width = '100%', widthMd = '80%', widthLg = '60%', }) => (_jsx(Transition, { appear: true, show: open, as: React.Fragment, children: _jsxs(Dialog, { open: open, onClose: onClose, className: cx('memori-drawer', className), children: [_jsx(Transition.Child, { as: React.Fragment, enter: "ease-out duration-300", enterFrom: "opacity-0", enterTo: "opacity-100", leave: "ease-in duration-200", leaveFrom: "opacity-100", leaveTo: "opacity-0", children: _jsx("div", { className: "memori-drawer--backdrop" }) }), _jsx("div", { className: "memori-drawer--container", children: _jsx("div", { className: "memori-drawer--container-scrollable", children: _jsx(Transition.Child, { as: React.Fragment, enter: "ease-out duration-300", enterFrom: "max-w-0 opacity-0", enterTo: "max-w-100 opacity-100", leave: "ease-in duration-200", leaveFrom: "max-w-100 opacity-100", leaveTo: "max-w-0 opacity-0", children: _jsxs(Dialog.Panel, { className: cx('memori-drawer--panel', {
|
|
9
|
+
'memori-drawer--panel-left': side === 'left',
|
|
10
|
+
'memori-drawer--with-footer': !!footer,
|
|
11
|
+
}), children: [_jsx("style", { dangerouslySetInnerHTML: {
|
|
12
|
+
__html: `
|
|
20
13
|
.memori-drawer--panel {
|
|
21
14
|
--memori-drawer--width: ${width};
|
|
22
15
|
--memori-drawer--width-lg: ${widthLg};
|
|
23
16
|
--memori-drawer--width-md: ${widthMd};
|
|
24
17
|
}
|
|
25
18
|
`,
|
|
26
|
-
|
|
27
|
-
closable && (React.createElement("div", { className: "memori-drawer--close" },
|
|
28
|
-
React.createElement(Button, { shape: "circle", outlined: true, icon: React.createElement(Close, null), onClick: () => onClose(false) }))),
|
|
29
|
-
React.createElement(Spin, { spinning: loading },
|
|
30
|
-
title && (React.createElement(Dialog.Title, { className: "memori-drawer--title" }, title)),
|
|
31
|
-
description && (React.createElement(Dialog.Description, { className: "memori-drawer--description" }, description)),
|
|
32
|
-
children,
|
|
33
|
-
footer && (React.createElement("div", { className: "memori-drawer--footer" }, footer))))))))));
|
|
19
|
+
} }), closable && (_jsx("div", { className: "memori-drawer--close", children: _jsx(Button, { shape: "circle", outlined: true, icon: _jsx(Close, {}), onClick: () => onClose(false) }) })), _jsxs(Spin, { spinning: loading, children: [title && (_jsx(Dialog.Title, { className: "memori-drawer--title", children: title })), description && (_jsx(Dialog.Description, { className: "memori-drawer--description", children: description })), children, footer && (_jsx("div", { className: "memori-drawer--footer", children: footer }))] })] }) }) }) })] }) }));
|
|
34
20
|
export default Drawer;
|
|
35
21
|
//# sourceMappingURL=Drawer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","sourceRoot":"","sources":["../../../src/components/ui/Drawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,EAAE,MAAM,YAAY,CAAC;AAkB5B,MAAM,MAAM,GAAc,CAAC,EACzB,IAAI,GAAG,KAAK,EACZ,OAAO,EACP,SAAS,EACT,KAAK,EACL,WAAW,EACX,QAAQ,EACR,MAAM,EACN,OAAO,GAAG,KAAK,EACf,IAAI,GAAG,OAAO,EACd,QAAQ,GAAG,IAAI,EACf,KAAK,GAAG,MAAM,EACd,OAAO,GAAG,KAAK,EACf,OAAO,GAAG,KAAK,GACT,EAAE,EAAE,CAAC,CACX,
|
|
1
|
+
{"version":3,"file":"Drawer.js","sourceRoot":"","sources":["../../../src/components/ui/Drawer.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,EAAE,MAAM,YAAY,CAAC;AAkB5B,MAAM,MAAM,GAAc,CAAC,EACzB,IAAI,GAAG,KAAK,EACZ,OAAO,EACP,SAAS,EACT,KAAK,EACL,WAAW,EACX,QAAQ,EACR,MAAM,EACN,OAAO,GAAG,KAAK,EACf,IAAI,GAAG,OAAO,EACd,QAAQ,GAAG,IAAI,EACf,KAAK,GAAG,MAAM,EACd,OAAO,GAAG,KAAK,EACf,OA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EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAC7B,GACE,CACP,EACD,MAAC,IAAI,IAAC,QAAQ,EAAE,OAAO,aACpB,KAAK,IAAI,CACR,KAAC,MAAM,CAAC,KAAK,IAAC,SAAS,EAAC,sBAAsB,YAC3C,KAAK,GACO,CAChB,EACA,WAAW,IAAI,CACd,KAAC,MAAM,CAAC,WAAW,IAAC,SAAS,EAAC,4BAA4B,YACvD,WAAW,GACO,CACtB,EAEA,QAAQ,EAER,MAAM,IAAI,CACT,cAAK,SAAS,EAAC,uBAAuB,YAAE,MAAM,GAAO,CACtD,IACI,IACM,GACE,GACf,GACF,IACC,GACE,CACd,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import Drawer from './Drawer';
|
|
3
4
|
import Button from './Button';
|
|
@@ -43,49 +44,15 @@ const meta = {
|
|
|
43
44
|
},
|
|
44
45
|
};
|
|
45
46
|
export default meta;
|
|
46
|
-
const content = (
|
|
47
|
-
|
|
48
|
-
React.createElement("h3", null, "Suspendisse a sodales nulla, sed semper nisi."),
|
|
49
|
-
React.createElement("p", null, "Proin tincidunt enim in felis aliquet, a ultricies purus bibendum."),
|
|
50
|
-
React.createElement("ul", null,
|
|
51
|
-
React.createElement("li", null, "Quisque in ultrices lectus."),
|
|
52
|
-
React.createElement("li", null, "Quisque in ultrices lectus."),
|
|
53
|
-
React.createElement("li", null, "Quisque in ultrices lectus.")),
|
|
54
|
-
React.createElement("p", null, "Nulla at urna diam."),
|
|
55
|
-
React.createElement("h3", null, "Suspendisse a sodales nulla, sed semper nisi."),
|
|
56
|
-
React.createElement("p", null, "Proin tincidunt enim in felis aliquet, a ultricies purus bibendum."),
|
|
57
|
-
React.createElement("ul", null,
|
|
58
|
-
React.createElement("li", null, "Quisque in ultrices lectus."),
|
|
59
|
-
React.createElement("li", null, "Quisque in ultrices lectus."),
|
|
60
|
-
React.createElement("li", null, "Quisque in ultrices lectus.")),
|
|
61
|
-
React.createElement("p", null, "Nulla at urna diam."),
|
|
62
|
-
React.createElement("p", null, "Nulla at urna diam."),
|
|
63
|
-
React.createElement("h3", null, "Suspendisse a sodales nulla, sed semper nisi."),
|
|
64
|
-
React.createElement("p", null, "Proin tincidunt enim in felis aliquet, a ultricies purus bibendum."),
|
|
65
|
-
React.createElement("ul", null,
|
|
66
|
-
React.createElement("li", null, "Quisque in ultrices lectus."),
|
|
67
|
-
React.createElement("li", null, "Quisque in ultrices lectus."),
|
|
68
|
-
React.createElement("li", null, "Quisque in ultrices lectus.")),
|
|
69
|
-
React.createElement("p", null, "Nulla at urna diam.")));
|
|
70
|
-
const footer = (React.createElement(React.Fragment, null,
|
|
71
|
-
React.createElement(Button, { primary: true }, "OK"),
|
|
72
|
-
React.createElement(Button, null, "Cancel")));
|
|
47
|
+
const content = (_jsxs(_Fragment, { children: [_jsx("p", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }), _jsx("h3", { children: "Suspendisse a sodales nulla, sed semper nisi." }), _jsx("p", { children: "Proin tincidunt enim in felis aliquet, a ultricies purus bibendum." }), _jsxs("ul", { children: [_jsx("li", { children: "Quisque in ultrices lectus." }), _jsx("li", { children: "Quisque in ultrices lectus." }), _jsx("li", { children: "Quisque in ultrices lectus." })] }), _jsx("p", { children: "Nulla at urna diam." }), _jsx("h3", { children: "Suspendisse a sodales nulla, sed semper nisi." }), _jsx("p", { children: "Proin tincidunt enim in felis aliquet, a ultricies purus bibendum." }), _jsxs("ul", { children: [_jsx("li", { children: "Quisque in ultrices lectus." }), _jsx("li", { children: "Quisque in ultrices lectus." }), _jsx("li", { children: "Quisque in ultrices lectus." })] }), _jsx("p", { children: "Nulla at urna diam." }), _jsx("p", { children: "Nulla at urna diam." }), _jsx("h3", { children: "Suspendisse a sodales nulla, sed semper nisi." }), _jsx("p", { children: "Proin tincidunt enim in felis aliquet, a ultricies purus bibendum." }), _jsxs("ul", { children: [_jsx("li", { children: "Quisque in ultrices lectus." }), _jsx("li", { children: "Quisque in ultrices lectus." }), _jsx("li", { children: "Quisque in ultrices lectus." })] }), _jsx("p", { children: "Nulla at urna diam." })] }));
|
|
48
|
+
const footer = (_jsxs(_Fragment, { children: [_jsx(Button, { primary: true, children: "OK" }), _jsx(Button, { children: "Cancel" })] }));
|
|
73
49
|
const Template = args => {
|
|
74
50
|
const [isOpen, setIsOpen] = React.useState(!!args.open || false);
|
|
75
|
-
return (
|
|
76
|
-
React.createElement(Button, { onClick: () => setIsOpen(true) }, "Click me"),
|
|
77
|
-
React.createElement(Drawer, { ...args, open: isOpen, onClose: () => setIsOpen(false), footer: args.footer }, content)));
|
|
51
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { onClick: () => setIsOpen(true), children: "Click me" }), _jsx(Drawer, { ...args, open: isOpen, onClose: () => setIsOpen(false), footer: args.footer, children: content })] }));
|
|
78
52
|
};
|
|
79
53
|
const TemplateWithALotOfContent = args => {
|
|
80
54
|
const [isOpen, setIsOpen] = React.useState(!!args.open || false);
|
|
81
|
-
return (
|
|
82
|
-
React.createElement(Button, { onClick: () => setIsOpen(true) }, "Click me"),
|
|
83
|
-
React.createElement(Drawer, { ...args, open: isOpen, onClose: () => setIsOpen(false), footer: args.footer },
|
|
84
|
-
content,
|
|
85
|
-
content,
|
|
86
|
-
content,
|
|
87
|
-
content,
|
|
88
|
-
content)));
|
|
55
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { onClick: () => setIsOpen(true), children: "Click me" }), _jsxs(Drawer, { ...args, open: isOpen, onClose: () => setIsOpen(false), footer: args.footer, children: [content, content, content, content, content] })] }));
|
|
89
56
|
};
|
|
90
57
|
export const Default = Template.bind({});
|
|
91
58
|
Default.args = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.stories.js","sourceRoot":"","sources":["../../../src/components/ui/Drawer.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,MAAiB,MAAM,UAAU,CAAC;AACzC,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,OAAO,cAAc,CAAC;AAEtB,MAAM,IAAI,GAAS;IACjB,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;aACb;SACF;QACD,WAAW,EAAE;YACX,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;aACb;SACF;QACD,OAAO,EAAE;YACP,OAAO,EAAE;gBACP,IAAI,EAAE,SAAS;aAChB;SACF;QACD,IAAI,EAAE;YACJ,OAAO,EAAE;gBACP,IAAI,EAAE,SAAS;aAChB;SACF;QACD,SAAS,EAAE;YACT,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;aACb;SACF;QACD,IAAI,EAAE;YACJ,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;aAC3B;SACF;KACF;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC7B;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,MAAM,OAAO,GAAG,CACd
|
|
1
|
+
{"version":3,"file":"Drawer.stories.js","sourceRoot":"","sources":["../../../src/components/ui/Drawer.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,MAAiB,MAAM,UAAU,CAAC;AACzC,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,OAAO,cAAc,CAAC;AAEtB,MAAM,IAAI,GAAS;IACjB,KAAK,EAAE,WAAW;IAClB,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,OAAO,EAAE;gBACP,IA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tB,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzD,uBAAuB,CAAC,IAAI,GAAG;IAC7B,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,oBAAoB;CAClC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzC,OAAO,CAAC,IAAI,GAAG;IACb,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,oBAAoB;IACjC,OAAO,EAAE,IAAI;CACd,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5C,UAAU,CAAC,IAAI,GAAG;IAChB,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,oBAAoB;IACjC,MAAM;CACP,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1C,QAAQ,CAAC,IAAI,GAAG;IACd,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,MAAM;CACb,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,yBAAyB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpE,iBAAiB,CAAC,IAAI,GAAG;IACvB,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,oBAAoB;IACjC,MAAM;CACP,CAAC"}
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { render } from '@testing-library/react';
|
|
3
3
|
import Drawer from './Drawer';
|
|
4
4
|
import Button from './Button';
|
|
5
|
-
const content = (
|
|
6
|
-
|
|
7
|
-
React.createElement("h3", null, "Suspendisse a sodales nulla, sed semper nisi."),
|
|
8
|
-
React.createElement("p", null, "Proin tincidunt enim in felis aliquet, a ultricies purus bibendum."),
|
|
9
|
-
React.createElement("ul", null,
|
|
10
|
-
React.createElement("li", null, "Quisque in ultrices lectus."),
|
|
11
|
-
React.createElement("li", null, "Quisque in ultrices lectus."),
|
|
12
|
-
React.createElement("li", null, "Quisque in ultrices lectus.")),
|
|
13
|
-
React.createElement("p", null, "Nulla at urna diam.")));
|
|
14
|
-
const footer = (React.createElement(React.Fragment, null,
|
|
15
|
-
React.createElement(Button, { primary: true }, "Ok"),
|
|
16
|
-
React.createElement(Button, null, "Cancel")));
|
|
5
|
+
const content = (_jsxs(_Fragment, { children: [_jsx("p", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }), _jsx("h3", { children: "Suspendisse a sodales nulla, sed semper nisi." }), _jsx("p", { children: "Proin tincidunt enim in felis aliquet, a ultricies purus bibendum." }), _jsxs("ul", { children: [_jsx("li", { children: "Quisque in ultrices lectus." }), _jsx("li", { children: "Quisque in ultrices lectus." }), _jsx("li", { children: "Quisque in ultrices lectus." })] }), _jsx("p", { children: "Nulla at urna diam." })] }));
|
|
6
|
+
const footer = (_jsxs(_Fragment, { children: [_jsx(Button, { primary: true, children: "Ok" }), _jsx(Button, { children: "Cancel" })] }));
|
|
17
7
|
beforeEach(() => {
|
|
18
8
|
window.IntersectionObserver = jest.fn(() => ({
|
|
19
9
|
observe: jest.fn(),
|
|
@@ -23,39 +13,39 @@ beforeEach(() => {
|
|
|
23
13
|
}));
|
|
24
14
|
});
|
|
25
15
|
it('renders Drawer unchanged', () => {
|
|
26
|
-
const { container } = render(
|
|
16
|
+
const { container } = render(_jsx(Drawer, { open: false, onClose: jest.fn(), children: content }));
|
|
27
17
|
expect(container).toMatchSnapshot();
|
|
28
18
|
});
|
|
29
19
|
it('renders Drawer open unchanged', () => {
|
|
30
|
-
const { container } = render(
|
|
20
|
+
const { container } = render(_jsx(Drawer, { open: true, onClose: jest.fn(), children: content }));
|
|
31
21
|
expect(container).toMatchSnapshot();
|
|
32
22
|
});
|
|
33
23
|
it('renders Drawer with title unchanged', () => {
|
|
34
|
-
const { container } = render(
|
|
24
|
+
const { container } = render(_jsx(Drawer, { open: true, onClose: jest.fn(), title: "Lorem ipsum", children: content }));
|
|
35
25
|
expect(container).toMatchSnapshot();
|
|
36
26
|
});
|
|
37
27
|
it('renders Drawer with description unchanged', () => {
|
|
38
|
-
const { container } = render(
|
|
28
|
+
const { container } = render(_jsx(Drawer, { open: true, onClose: jest.fn(), description: "Lorem ipsum dolor sit amet", children: content }));
|
|
39
29
|
expect(container).toMatchSnapshot();
|
|
40
30
|
});
|
|
41
31
|
it('renders Drawer loading unchanged', () => {
|
|
42
|
-
const { container } = render(
|
|
32
|
+
const { container } = render(_jsx(Drawer, { open: true, onClose: jest.fn(), loading: true, children: content }));
|
|
43
33
|
expect(container).toMatchSnapshot();
|
|
44
34
|
});
|
|
45
35
|
it('renders Drawer with footer unchanged', () => {
|
|
46
|
-
const { container } = render(
|
|
36
|
+
const { container } = render(_jsx(Drawer, { open: true, onClose: jest.fn(), footer: footer, children: content }));
|
|
47
37
|
expect(container).toMatchSnapshot();
|
|
48
38
|
});
|
|
49
39
|
it('renders Drawer non closable unchanged', () => {
|
|
50
|
-
const { container } = render(
|
|
40
|
+
const { container } = render(_jsx(Drawer, { open: true, onClose: jest.fn(), closable: false, children: content }));
|
|
51
41
|
expect(container).toMatchSnapshot();
|
|
52
42
|
});
|
|
53
43
|
it('renders Drawer side left unchanged', () => {
|
|
54
|
-
const { container } = render(
|
|
44
|
+
const { container } = render(_jsx(Drawer, { open: true, onClose: jest.fn(), side: "left", children: content }));
|
|
55
45
|
expect(container).toMatchSnapshot();
|
|
56
46
|
});
|
|
57
47
|
it('renders Drawer with custom widths unchanged', () => {
|
|
58
|
-
const { container } = render(
|
|
48
|
+
const { container } = render(_jsx(Drawer, { open: true, onClose: jest.fn(), width: "100%", widthMd: "90%", widthLg: "80%", children: content }));
|
|
59
49
|
expect(container).toMatchSnapshot();
|
|
60
50
|
});
|
|
61
51
|
//# sourceMappingURL=Drawer.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.test.js","sourceRoot":"","sources":["../../../src/components/ui/Drawer.test.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Drawer.test.js","sourceRoot":"","sources":["../../../src/components/ui/Drawer.test.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,OAAO,GAAG,CACd,8BACE,mFAA+D,EAC/D,yEAAsD,EACtD,6FAAyE,EACzE,yBACE,uDAAoC,EACpC,uDAAoC,EACpC,uDAAoC,IACjC,EACL,8CAA0B,IACzB,CACJ,CAAC;AAEF,MAAM,MAAM,GAAG,CACb,8BACE,KAAC,MAAM,IAAC,OAAO,yBAAY,EAC3B,KAAC,MAAM,yBAAgB,IACtB,CACJ,CAAC;AAEF,UAAU,CAAC,GAAG,EAAE;IAEd,MAAM,CAAC,oBAAoB,GAAG,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;QAC3C,OAAO,EAAE,IAAI,CAAC,EAAE,EAAE;QAClB,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE;QACpB,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE;QACrB,WAAW,EAAE,IAAI,CAAC,EAAE,EAAE;KACvB,CAAC,CAAC,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;IAClC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAC1B,KAAC,MAAM,IAAC,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,EAAE,YACpC,OA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AAS,CAAC,CAAC,eAAe,EAAE,CAAC;AACtC,CAAC,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
const Message = () =>
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
const Message = () => _jsx("div", { children: "Message" });
|
|
3
3
|
const message = {
|
|
4
4
|
error: console.error,
|
|
5
5
|
info: console.info,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Message.js","sourceRoot":"","sources":["../../../src/components/ui/Message.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Message.js","sourceRoot":"","sources":["../../../src/components/ui/Message.tsx"],"names":[],"mappings":";AAEA,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,oCAAkB,CAAC;AAEzC,MAAM,OAAO,GAAG;IACd,KAAK,EAAE,OAAO,CAAC,KAAK;IACpB,IAAI,EAAE,OAAO,CAAC,IAAI;IAClB,OAAO,EAAE,OAAO,CAAC,GAAG;CACrB,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,CAAC;AACnB,eAAe,OAAO,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { Dialog, Transition } from '@headlessui/react';
|
|
3
4
|
import Spin from './Spin';
|
|
@@ -7,29 +8,14 @@ import { useTranslation } from 'react-i18next';
|
|
|
7
8
|
import cx from 'classnames';
|
|
8
9
|
const Modal = ({ open = false, onClose, className, title, description, children, footer, loading = false, closable = true, width = '100%', widthMd = '100%', }) => {
|
|
9
10
|
const { t } = useTranslation();
|
|
10
|
-
return (
|
|
11
|
-
|
|
12
|
-
React.createElement(Transition.Child, { as: React.Fragment, enter: "ease-out duration-300", enterFrom: "opacity-0", enterTo: "opacity-100", leave: "ease-in duration-200", leaveFrom: "opacity-100", leaveTo: "opacity-0" },
|
|
13
|
-
React.createElement("div", { className: "memori-modal--backdrop" })),
|
|
14
|
-
React.createElement("div", { className: "memori-modal--container" },
|
|
15
|
-
React.createElement("div", { className: "memori-modal--container-scrollable" },
|
|
16
|
-
React.createElement(Transition.Child, { as: React.Fragment, enter: "ease-out duration-300", enterFrom: "opacity-0 scale-95", enterTo: "opacity-100 scale-100", leave: "ease-in duration-200", leaveFrom: "opacity-100 scale-100", leaveTo: "opacity-0 scale-95" },
|
|
17
|
-
React.createElement(Dialog.Panel, { className: "memori-modal--panel" },
|
|
18
|
-
React.createElement("style", { dangerouslySetInnerHTML: {
|
|
19
|
-
__html: `
|
|
11
|
+
return (_jsx(Transition, { appear: true, show: open, as: React.Fragment, children: _jsxs(Dialog, { open: open, onClose: onClose, className: cx('memori-modal', className), children: [_jsx(Transition.Child, { as: React.Fragment, enter: "ease-out duration-300", enterFrom: "opacity-0", enterTo: "opacity-100", leave: "ease-in duration-200", leaveFrom: "opacity-100", leaveTo: "opacity-0", children: _jsx("div", { className: "memori-modal--backdrop" }) }), _jsx("div", { className: "memori-modal--container", children: _jsx("div", { className: "memori-modal--container-scrollable", children: _jsx(Transition.Child, { as: React.Fragment, enter: "ease-out duration-300", enterFrom: "opacity-0 scale-95", enterTo: "opacity-100 scale-100", leave: "ease-in duration-200", leaveFrom: "opacity-100 scale-100", leaveTo: "opacity-0 scale-95", children: _jsxs(Dialog.Panel, { className: "memori-modal--panel", children: [_jsx("style", { dangerouslySetInnerHTML: {
|
|
12
|
+
__html: `
|
|
20
13
|
.memori-modal--panel {
|
|
21
14
|
--memori-modal--width: ${width};
|
|
22
15
|
--memori-modal--width-md: ${widthMd};
|
|
23
16
|
}
|
|
24
17
|
`,
|
|
25
|
-
|
|
26
|
-
closable && (React.createElement("div", { className: "memori-modal--close" },
|
|
27
|
-
React.createElement(Button, { ghost: true, padded: true, shape: "circle", icon: React.createElement(Close, null), title: t('close') || 'Close', onClick: () => onClose(false) }))),
|
|
28
|
-
React.createElement(Spin, { spinning: loading },
|
|
29
|
-
title && (React.createElement(Dialog.Title, { className: "memori-modal--title" }, title)),
|
|
30
|
-
description && (React.createElement(Dialog.Description, { className: "memori-modal--description" }, description)),
|
|
31
|
-
children,
|
|
32
|
-
footer && (React.createElement("div", { className: "memori-modal--footer" }, footer))))))))));
|
|
18
|
+
} }), closable && (_jsx("div", { className: "memori-modal--close", children: _jsx(Button, { ghost: true, padded: true, shape: "circle", icon: _jsx(Close, {}), title: t('close') || 'Close', onClick: () => onClose(false) }) })), _jsxs(Spin, { spinning: loading, children: [title && (_jsx(Dialog.Title, { className: "memori-modal--title", children: title })), description && (_jsx(Dialog.Description, { className: "memori-modal--description", children: description })), children, footer && (_jsx("div", { className: "memori-modal--footer", children: footer }))] })] }) }) }) })] }) }));
|
|
33
19
|
};
|
|
34
20
|
export default Modal;
|
|
35
21
|
//# sourceMappingURL=Modal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../../src/components/ui/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,KAAK,MAAM,gBAAgB,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,MAAM,YAAY,CAAC;AAgB5B,MAAM,KAAK,GAAc,CAAC,EACxB,IAAI,GAAG,KAAK,EACZ,OAAO,EACP,SAAS,EACT,KAAK,EACL,WAAW,EACX,QAAQ,EACR,MAAM,EACN,OAAO,GAAG,KAAK,EACf,QAAQ,GAAG,IAAI,EACf,KAAK,GAAG,MAAM,EACd,OAAO,GAAG,MAAM,GACV,EAAE,EAAE;IACV,MAAM,EAAE,CAAC,EAAE,GAAG,cAAc,EAAE,CAAC;IAE/B,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ACjD,KAAC,UAAU,CAAC,KAAK,IACf,EAAE,EAAE,KAAK,CAAC,QAAQ,EAClB,KAAK,EAAC,uBAAuB,EAC7B,SAAS,EAAC,oBAAoB,EAC9B,OAAO,EAAC,uBAAuB,EAC/B,KAAK,EAAC,sBAAsB,EAC5B,SAAS,EAAC,uBAAuB,EACjC,OAAO,EAAC,oBAAoB,YAE5B,MAAC,MAAM,CAAC,KAAK,IAAC,SAAS,EAAC,qBAAqB,aAC3C,gBACE,uBAAuB,EAAE;4CACvB,MAAM,EAAE;;+CAEmB,KAAK;kDACF,OAAO;;mBAEtC;yCACA,GACD,EACD,QAAQ,IAAI,CACX,cAAK,SAAS,EAAC,qBAAqB,YAClC,KAAC,MAAM,IACL,KAAK,QACL,MAAM,QACN,KAAK,EAAC,QAAQ,EACd,IAAI,EAAE,KAAC,KAAK,KAAG,EACf,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,OAAO,EAC5B,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAC7B,GACE,CACP,EACD,MAAC,IAAI,IAAC,QAAQ,EAAE,OAAO,aACpB,KAAK,IAAI,CACR,KAAC,MAAM,CAAC,KAAK,IAAC,SAAS,EAAC,qBAAqB,YAC1C,KAAK,GACO,CAChB,EACA,WAAW,IAAI,CACd,KAAC,MAAM,CAAC,WAAW,IAAC,SAAS,EAAC,2BAA2B,YACtD,WAAW,GACO,CACtB,EAEA,QAAQ,EAER,MAAM,IAAI,CACT,cAAK,SAAS,EAAC,sBAAsB,YAAE,MAAM,GAAO,CACrD,IACI,IACM,GACE,GACf,GACF,IACC,GACE,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import Modal from './Modal';
|
|
3
4
|
import Button from './Button';
|
|
@@ -37,35 +38,16 @@ const meta = {
|
|
|
37
38
|
},
|
|
38
39
|
};
|
|
39
40
|
export default meta;
|
|
40
|
-
const content = (
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
React.createElement("p", null, "Proin tincidunt enim in felis aliquet, a ultricies purus bibendum."),
|
|
44
|
-
React.createElement("ul", null,
|
|
45
|
-
React.createElement("li", null, "Quisque in ultrices lectus."),
|
|
46
|
-
React.createElement("li", null, "Quisque in ultrices lectus."),
|
|
47
|
-
React.createElement("li", null, "Quisque in ultrices lectus.")),
|
|
48
|
-
React.createElement("p", null, "Nulla at urna diam.")));
|
|
49
|
-
const footer = (React.createElement(React.Fragment, null,
|
|
50
|
-
React.createElement(Button, { primary: true }, "OK"),
|
|
51
|
-
React.createElement(Button, null, "Cancel")));
|
|
52
|
-
const footerNonClosableModal = React.createElement(Button, { primary: true }, "OK");
|
|
41
|
+
const content = (_jsxs(_Fragment, { children: [_jsx("p", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }), _jsx("h3", { children: "Suspendisse a sodales nulla, sed semper nisi." }), _jsx("p", { children: "Proin tincidunt enim in felis aliquet, a ultricies purus bibendum." }), _jsxs("ul", { children: [_jsx("li", { children: "Quisque in ultrices lectus." }), _jsx("li", { children: "Quisque in ultrices lectus." }), _jsx("li", { children: "Quisque in ultrices lectus." })] }), _jsx("p", { children: "Nulla at urna diam." })] }));
|
|
42
|
+
const footer = (_jsxs(_Fragment, { children: [_jsx(Button, { primary: true, children: "OK" }), _jsx(Button, { children: "Cancel" })] }));
|
|
43
|
+
const footerNonClosableModal = _jsx(Button, { primary: true, children: "OK" });
|
|
53
44
|
const Template = args => {
|
|
54
45
|
const [isOpen, setIsOpen] = React.useState(!!args.open || false);
|
|
55
|
-
return (
|
|
56
|
-
React.createElement(Button, { onClick: () => setIsOpen(true) }, "Click me"),
|
|
57
|
-
React.createElement(Modal, { ...args, open: isOpen, onClose: args.closable ? () => setIsOpen(false) : () => { }, footer: args.footer }, content)));
|
|
46
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { onClick: () => setIsOpen(true), children: "Click me" }), _jsx(Modal, { ...args, open: isOpen, onClose: args.closable ? () => setIsOpen(false) : () => { }, footer: args.footer, children: content })] }));
|
|
58
47
|
};
|
|
59
48
|
const TemplateWithALotOfContent = args => {
|
|
60
49
|
const [isOpen, setIsOpen] = React.useState(!!args.open || false);
|
|
61
|
-
return (
|
|
62
|
-
React.createElement(Button, { onClick: () => setIsOpen(true) }, "Click me"),
|
|
63
|
-
React.createElement(Modal, { ...args, open: isOpen, onClose: args.closable ? () => setIsOpen(false) : () => { }, footer: args.footer },
|
|
64
|
-
content,
|
|
65
|
-
content,
|
|
66
|
-
content,
|
|
67
|
-
content,
|
|
68
|
-
content)));
|
|
50
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { onClick: () => setIsOpen(true), children: "Click me" }), _jsxs(Modal, { ...args, open: isOpen, onClose: args.closable ? () => setIsOpen(false) : () => { }, footer: args.footer, children: [content, content, content, content, content] })] }));
|
|
69
51
|
};
|
|
70
52
|
export const Default = Template.bind({});
|
|
71
53
|
Default.args = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.stories.js","sourceRoot":"","sources":["../../../src/components/ui/Modal.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAgB,MAAM,SAAS,CAAC;AACvC,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,OAAO,aAAa,CAAC;AAErB,MAAM,IAAI,GAAS;IACjB,KAAK,EAAE,UAAU;IACjB,SAAS,EAAE,KAAK;IAChB,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;aACb;SACF;QACD,WAAW,EAAE;YACX,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;aACb;SACF;QACD,OAAO,EAAE;YACP,OAAO,EAAE;gBACP,IAAI,EAAE,SAAS;aAChB;SACF;QACD,IAAI,EAAE;YACJ,OAAO,EAAE;gBACP,IAAI,EAAE,SAAS;aAChB;SACF;QACD,SAAS,EAAE;YACT,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC7B;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,MAAM,OAAO,GAAG,CACd
|
|
1
|
+
{"version":3,"file":"Modal.stories.js","sourceRoot":"","sources":["../../../src/components/ui/Modal.stories.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAgB,MAAM,SAAS,CAAC;AACvC,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,OAAO,aAAa,CAAC;AAErB,MAAM,IAAI,GAAS;IACjB,KAAK,EAAE,UAAU;IACjB,SAAS,EAAE,KAAK;IAChB,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;aACb;SACF;QACD,WAAW,EAAE;YACX,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;aACb;SACF;QACD,OAAO,EAAE;YACP,OAAO,EAAE;gBACP,IAAI,EAAE,SAAS;aAChB;SACF;QACD,IAAI,EAAE;YACJ,OAAO,EAAE;gBACP,IAAI,EAAE,SAAS;aAChB;SACF;QACD,SAAS,EAAE;YACT,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC7B;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,MAAM,OAAO,GAAG,CACd,8BACE,mFAA+D,EAC/D,yEAAsD,EACtD,6FAAyE,EACzE,yBACE,uDAAoC,EACpC,uDAAoC,EACpC,uDAAoC,IACjC,EACL,8CAA0B,IACzB,CACJ,CAAC;A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V,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,mBAAmB;IAChC,MAAM;CACP,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC7C,WAAW,CAAC,IAAI,GAAG;IACjB,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,mBAAmB;IAChC,MAAM,EAAE,sBAAsB;IAC9B,QAAQ,EAAE,KAAK;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,yBAAyB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpE,iBAAiB,CAAC,IAAI,GAAG;IACvB,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,aAAa;IACpB,WAAW,EAAE,mBAAmB;IAChC,MAAM;CACP,CAAC"}
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { render } from '@testing-library/react';
|
|
3
3
|
import Modal from './Modal';
|
|
4
4
|
import Button from './Button';
|
|
5
|
-
const content = (
|
|
6
|
-
|
|
7
|
-
React.createElement("h3", null, "Suspendisse a sodales nulla, sed semper nisi."),
|
|
8
|
-
React.createElement("p", null, "Proin tincidunt enim in felis aliquet, a ultricies purus bibendum."),
|
|
9
|
-
React.createElement("ul", null,
|
|
10
|
-
React.createElement("li", null, "Quisque in ultrices lectus."),
|
|
11
|
-
React.createElement("li", null, "Quisque in ultrices lectus."),
|
|
12
|
-
React.createElement("li", null, "Quisque in ultrices lectus.")),
|
|
13
|
-
React.createElement("p", null, "Nulla at urna diam.")));
|
|
14
|
-
const footer = (React.createElement(React.Fragment, null,
|
|
15
|
-
React.createElement(Button, { primary: true }, "Ok"),
|
|
16
|
-
React.createElement(Button, null, "Cancel")));
|
|
5
|
+
const content = (_jsxs(_Fragment, { children: [_jsx("p", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }), _jsx("h3", { children: "Suspendisse a sodales nulla, sed semper nisi." }), _jsx("p", { children: "Proin tincidunt enim in felis aliquet, a ultricies purus bibendum." }), _jsxs("ul", { children: [_jsx("li", { children: "Quisque in ultrices lectus." }), _jsx("li", { children: "Quisque in ultrices lectus." }), _jsx("li", { children: "Quisque in ultrices lectus." })] }), _jsx("p", { children: "Nulla at urna diam." })] }));
|
|
6
|
+
const footer = (_jsxs(_Fragment, { children: [_jsx(Button, { primary: true, children: "Ok" }), _jsx(Button, { children: "Cancel" })] }));
|
|
17
7
|
beforeEach(() => {
|
|
18
8
|
window.IntersectionObserver = jest.fn(() => ({
|
|
19
9
|
observe: jest.fn(),
|
|
@@ -23,35 +13,35 @@ beforeEach(() => {
|
|
|
23
13
|
}));
|
|
24
14
|
});
|
|
25
15
|
it('renders Modal unchanged', () => {
|
|
26
|
-
const { container } = render(
|
|
16
|
+
const { container } = render(_jsx(Modal, { open: false, onClose: jest.fn(), children: content }));
|
|
27
17
|
expect(container).toMatchSnapshot();
|
|
28
18
|
});
|
|
29
19
|
it('renders Modal open unchanged', () => {
|
|
30
|
-
const { container } = render(
|
|
20
|
+
const { container } = render(_jsx(Modal, { open: true, onClose: jest.fn(), children: content }));
|
|
31
21
|
expect(container).toMatchSnapshot();
|
|
32
22
|
});
|
|
33
23
|
it('renders Modal with title unchanged', () => {
|
|
34
|
-
const { container } = render(
|
|
24
|
+
const { container } = render(_jsx(Modal, { open: true, onClose: jest.fn(), title: "Lorem ipsum", children: content }));
|
|
35
25
|
expect(container).toMatchSnapshot();
|
|
36
26
|
});
|
|
37
27
|
it('renders Modal with description unchanged', () => {
|
|
38
|
-
const { container } = render(
|
|
28
|
+
const { container } = render(_jsx(Modal, { open: true, onClose: jest.fn(), description: "Lorem ipsum dolor sit amet", children: content }));
|
|
39
29
|
expect(container).toMatchSnapshot();
|
|
40
30
|
});
|
|
41
31
|
it('renders Modal loading unchanged', () => {
|
|
42
|
-
const { container } = render(
|
|
32
|
+
const { container } = render(_jsx(Modal, { open: true, onClose: jest.fn(), loading: true, children: content }));
|
|
43
33
|
expect(container).toMatchSnapshot();
|
|
44
34
|
});
|
|
45
35
|
it('renders Modal with footer unchanged', () => {
|
|
46
|
-
const { container } = render(
|
|
36
|
+
const { container } = render(_jsx(Modal, { open: true, onClose: jest.fn(), footer: footer, children: content }));
|
|
47
37
|
expect(container).toMatchSnapshot();
|
|
48
38
|
});
|
|
49
39
|
it('renders Modal non closable unchanged', () => {
|
|
50
|
-
const { container } = render(
|
|
40
|
+
const { container } = render(_jsx(Modal, { open: true, onClose: jest.fn(), closable: false, children: content }));
|
|
51
41
|
expect(container).toMatchSnapshot();
|
|
52
42
|
});
|
|
53
43
|
it('renders Modal with custom widths unchanged', () => {
|
|
54
|
-
const { container } = render(
|
|
44
|
+
const { container } = render(_jsx(Modal, { open: true, onClose: jest.fn(), width: "100%", widthMd: "90%", children: content }));
|
|
55
45
|
expect(container).toMatchSnapshot();
|
|
56
46
|
});
|
|
57
47
|
//# sourceMappingURL=Modal.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.test.js","sourceRoot":"","sources":["../../../src/components/ui/Modal.test.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Modal.test.js","sourceRoot":"","sources":["../../../src/components/ui/Modal.test.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,OAAO,GAAG,CACd,8BACE,mFAA+D,EAC/D,yEAAsD,EACtD,6FAAyE,EACzE,yBACE,uDAAoC,EACpC,uDAAoC,EACpC,uDAAoC,IACjC,EACL,8CAA0B,IACzB,CACJ,CAAC;AAEF,MAAM,MAAM,GAAG,CACb,8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AAEH,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;IACpD,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAC1B,KAAC,KAAK,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,EAAC,MAAM,EAAC,OAAO,EAAC,KAAK,YAC9D,OAAO,GACF,CACT,CAAC;IACF,MAAM,CAAC,SAAS,CAAC,CAAC,eAAe,EAAE,CAAC;AACtC,CAAC,CAAC,CAAC"}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
import Loading from '../icons/Loading';
|
|
4
|
-
const Spin = ({ spinning = false, primary = false, className, children, }) => (
|
|
4
|
+
const Spin = ({ spinning = false, primary = false, className, children, }) => (_jsxs("div", { className: cx('memori-spin', className, {
|
|
5
5
|
'memori-spin--spinning': spinning,
|
|
6
6
|
'memori-spin--primary': primary,
|
|
7
|
-
}) }
|
|
8
|
-
children,
|
|
9
|
-
React.createElement("div", { className: "memori-spin--spinner" },
|
|
10
|
-
React.createElement(Loading, { loading: true }))));
|
|
7
|
+
}), children: [children, _jsx("div", { className: "memori-spin--spinner", children: _jsx(Loading, { loading: true }) })] }));
|
|
11
8
|
export default Spin;
|
|
12
9
|
//# sourceMappingURL=Spin.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spin.js","sourceRoot":"","sources":["../../../src/components/ui/Spin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Spin.js","sourceRoot":"","sources":["../../../src/components/ui/Spin.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,OAAO,MAAM,kBAAkB,CAAC;AASvC,MAAM,IAAI,GAAc,CAAC,EACvB,QAAQ,GAAG,KAAK,EAChB,OAAO,GAAG,KAAK,EACf,SAAS,EACT,QAAQ,GACF,EAAE,EAAE,CAAC,CACX,eACE,SAAS,EAAE,EAAE,CAAC,aAAa,EAAE,SAAS,EAAE;QACtC,uBAAuB,EAAE,QAAQ;QACjC,sBAAsB,EAAE,OAAO;KAChC,CAAC,aAED,QAAQ,EACT,cAAK,SAAS,EAAC,sBAAsB,YACnC,KAAC,OAAO,IAAC,OAAO,SAAG,GACf,IACF,CACP,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Spin from './Spin';
|
|
3
3
|
import './Spin.css';
|
|
4
4
|
const meta = {
|
|
@@ -26,15 +26,7 @@ const meta = {
|
|
|
26
26
|
},
|
|
27
27
|
};
|
|
28
28
|
export default meta;
|
|
29
|
-
const Template = args => (
|
|
30
|
-
React.createElement("p", null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit."),
|
|
31
|
-
React.createElement("h2", null, "Suspendisse a sodales nulla, sed semper nisi."),
|
|
32
|
-
React.createElement("p", null, "Proin tincidunt enim in felis aliquet, a ultricies purus bibendum."),
|
|
33
|
-
React.createElement("ul", null,
|
|
34
|
-
React.createElement("li", null, "Quisque in ultrices lectus."),
|
|
35
|
-
React.createElement("li", null, "Quisque in ultrices lectus."),
|
|
36
|
-
React.createElement("li", null, "Quisque in ultrices lectus.")),
|
|
37
|
-
React.createElement("p", null, "Nulla at urna diam.")));
|
|
29
|
+
const Template = args => (_jsxs(Spin, { ...args, children: [_jsx("p", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }), _jsx("h2", { children: "Suspendisse a sodales nulla, sed semper nisi." }), _jsx("p", { children: "Proin tincidunt enim in felis aliquet, a ultricies purus bibendum." }), _jsxs("ul", { children: [_jsx("li", { children: "Quisque in ultrices lectus." }), _jsx("li", { children: "Quisque in ultrices lectus." }), _jsx("li", { children: "Quisque in ultrices lectus." })] }), _jsx("p", { children: "Nulla at urna diam." })] }));
|
|
38
30
|
export const Default = Template.bind({});
|
|
39
31
|
Default.args = {
|
|
40
32
|
spinning: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spin.stories.js","sourceRoot":"","sources":["../../../src/components/ui/Spin.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Spin.stories.js","sourceRoot":"","sources":["../../../src/components/ui/Spin.stories.tsx"],"names":[],"mappings":";AAEA,OAAO,IAAe,MAAM,QAAQ,CAAC;AAErC,OAAO,YAAY,CAAC;AAEpB,MAAM,IAAI,GAAS;IACjB,KAAK,EAAE,SAAS;IAChB,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE;QACR,QAAQ,EAAE;YACR,OAAO,EAAE;gBACP,IAAI,EAAE,SAAS;aAChB;SACF;QACD,OAAO,EAAE;YACP,OAAO,EAAE;gBACP,IAAI,EAAE,SAAS;aAChB;SACF;QACD,SAAS,EAAE;YACT,OAAO,EAAE;gBACP,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;KAC7B;CACF,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,MAAM,QAAQ,GAAiB,IAAI,CAAC,EAAE,CAAC,CACrC,MAAC,IAAI,OAAK,IAAI,aACZ,mFAA+D,EAC/D,yEAAsD,EACtD,6FAAyE,EACzE,yBACE,uDAAoC,EACpC,uDAAoC,EACpC,uDAAoC,IACjC,EACL,8CAA0B,IACrB,CACR,CAAC;AAIF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzC,OAAO,CAAC,IAAI,GAAG;IACb,QAAQ,EAAE,KAAK;CAChB,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC1C,QAAQ,CAAC,IAAI,GAAG;IACd,QAAQ,EAAE,IAAI;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzC,OAAO,CAAC,IAAI,GAAG;IACb,QAAQ,EAAE,IAAI;IACd,OAAO,EAAE,IAAI;CACd,CAAC"}
|
|
@@ -1,29 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { render } from '@testing-library/react';
|
|
3
3
|
import Spin from './Spin';
|
|
4
|
-
const content = (
|
|
5
|
-
React.createElement("p", null, "Lorem ipsum dolor sit amet, consectetur adipiscing elit."),
|
|
6
|
-
React.createElement("h2", null, "Suspendisse a sodales nulla, sed semper nisi."),
|
|
7
|
-
React.createElement("p", null, "Proin tincidunt enim in felis aliquet, a ultricies purus bibendum."),
|
|
8
|
-
React.createElement("ul", null,
|
|
9
|
-
React.createElement("li", null, "Quisque in ultrices lectus."),
|
|
10
|
-
React.createElement("li", null, "Quisque in ultrices lectus."),
|
|
11
|
-
React.createElement("li", null, "Quisque in ultrices lectus.")),
|
|
12
|
-
React.createElement("p", null, "Nulla at urna diam.")));
|
|
4
|
+
const content = (_jsxs(_Fragment, { children: [_jsx("p", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit." }), _jsx("h2", { children: "Suspendisse a sodales nulla, sed semper nisi." }), _jsx("p", { children: "Proin tincidunt enim in felis aliquet, a ultricies purus bibendum." }), _jsxs("ul", { children: [_jsx("li", { children: "Quisque in ultrices lectus." }), _jsx("li", { children: "Quisque in ultrices lectus." }), _jsx("li", { children: "Quisque in ultrices lectus." })] }), _jsx("p", { children: "Nulla at urna diam." })] }));
|
|
13
5
|
it('renders Spin unchanged', () => {
|
|
14
|
-
const { container } = render(
|
|
6
|
+
const { container } = render(_jsx(Spin, { children: content }));
|
|
15
7
|
expect(container).toMatchSnapshot();
|
|
16
8
|
});
|
|
17
9
|
it('renders Spin spinning unchanged', () => {
|
|
18
|
-
const { container } = render(
|
|
10
|
+
const { container } = render(_jsx(Spin, { spinning: true, children: content }));
|
|
19
11
|
expect(container).toMatchSnapshot();
|
|
20
12
|
});
|
|
21
13
|
it('renders Spin with custom className unchanged', () => {
|
|
22
|
-
const { container } = render(
|
|
14
|
+
const { container } = render(_jsx(Spin, { className: "lorem-ipsum", children: content }));
|
|
23
15
|
expect(container).toMatchSnapshot();
|
|
24
16
|
});
|
|
25
17
|
it('renders Spin spinning primary unchanged', () => {
|
|
26
|
-
const { container } = render(
|
|
18
|
+
const { container } = render(_jsx(Spin, { spinning: true, primary: true, children: content }));
|
|
27
19
|
expect(container).toMatchSnapshot();
|
|
28
20
|
});
|
|
29
21
|
//# sourceMappingURL=Spin.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spin.test.js","sourceRoot":"","sources":["../../../src/components/ui/Spin.test.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Spin.test.js","sourceRoot":"","sources":["../../../src/components/ui/Spin.test.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,MAAM,OAAO,GAAG,CACd,8BACE,mFAA+D,EAC/D,yEAAsD,EACtD,6FAAyE,EACzE,yBACE,uDAAoC,EACpC,uDAAoC,EACpC,uDAAoC,IACjC,EACL,8CAA0B,IACzB,CACJ,CAAC;AAEF,EAAE,CAAC,wBAAwB,EAAE,GAAG,EAAE;IAChC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC,KAAC,IAAI,cAAE,OAAO,GAAQ,CAAC,CAAC;IACrD,MAAM,CAAC,SAAS,CAAC,CAAC,eAAe,EAAE,CAAC;AACtC,CAAC,CAAC,CAAC;AAEH,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;IACz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