mtxuilib 0.1.569 → 0.1.571
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/dist/common/DeleteComfirm.js +5 -5
- package/dist/common/MtErrorBoundary.js +3 -2
- package/dist/common/index.d.ts +3 -0
- package/dist/common/index.js +3 -0
- package/dist/common/pip/PipExamplePage.js +1 -1
- package/dist/common/table/data-table-pagination.js +2 -2
- package/dist/common/table/data-table-view-options.js +2 -2
- package/dist/common/tiptap/TiptapEditor.js +3 -3
- package/dist/common/tiptap/examples/Demo-Default.js +29 -29
- package/dist/components/ShowError.js +2 -2
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +6 -0
- package/dist/form/EditFormToolbar.js +5 -5
- package/dist/form/deleteConform.js +5 -6
- package/dist/hooks/use-can-back.d.ts +1 -1
- package/dist/hooks/use-can-back.js +1 -1
- package/dist/hooks/use-mounted.d.ts +2 -0
- package/dist/hooks/use-mounted.js +5 -0
- package/dist/hooks/use-scroll-to-bottom.d.ts +5 -0
- package/dist/hooks/use-scroll-to-bottom.js +22 -0
- package/dist/hooks/useLeaveConfirm.d.ts +1 -0
- package/dist/hooks/useLeaveConfirm.js +26 -0
- package/dist/icons/LoaderI3con.d.ts +3 -0
- package/dist/icons/LoaderI3con.js +4 -0
- package/dist/icons/icons-ai.d.ts +29 -29
- package/dist/icons/icons-ai.js +31 -31
- package/dist/icons/icons.d.ts +3 -1
- package/dist/icons/icons.js +3 -0
- package/dist/icons/index.d.ts +1 -4
- package/dist/icons/index.js +1 -4
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/layouts/dash/DashLayout.d.ts +3 -0
- package/dist/layouts/dash/DashLayout.js +14 -0
- package/dist/layouts/dash/MainHeader.d.ts +1 -0
- package/dist/layouts/dash/MainHeader.js +11 -0
- package/dist/layouts/dash/nav.d.ts +1 -0
- package/dist/layouts/dash/nav.js +7 -0
- package/dist/layouts/web/WebLayout.d.ts +3 -0
- package/dist/layouts/web/WebLayout.js +6 -0
- package/dist/layouts/web/WebLayoutHeader.d.ts +1 -0
- package/dist/layouts/web/WebLayoutHeader.js +9 -0
- package/dist/lib/copyText.d.ts +1 -0
- package/dist/lib/copyText.js +22 -0
- package/dist/lib/htmlparse/components/ItemActionButton.js +2 -2
- package/dist/lib/htmlparse/htmlParse.js +1 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +1 -0
- package/dist/lib/service-worker/ServiceWorkerMain.js +1 -1
- package/dist/lib/timeFormat.d.ts +3 -0
- package/dist/lib/timeFormat.js +19 -0
- package/dist/motion/mtmotion-variants.d.ts +16 -0
- package/dist/motion/mtmotion-variants.js +18 -0
- package/dist/{ui/mt → mt}/Button.d.ts +1 -1
- package/dist/{ui/mt → mt}/Button.js +1 -1
- package/dist/{ui/mt → mt}/DropdownMenuItemLink.d.ts +1 -1
- package/dist/{ui/mt → mt}/DropdownMenuItemLink.js +1 -1
- package/dist/mt/GoBackButton.d.ts +5 -0
- package/dist/mt/GoBackButton.js +19 -0
- package/dist/{ui/mt → mt}/IconButton.js +1 -1
- package/dist/{ui/mt → mt}/MtScrollArea copy.js +1 -1
- package/dist/{ui/mt → mt}/MtScrollArea.js +1 -1
- package/dist/{ui/mt → mt}/MtSlider.js +2 -2
- package/dist/{ui/mt → mt}/NavTag.js +4 -4
- package/dist/{ui/mt → mt}/ScreenPanel.d.ts +1 -1
- package/dist/{ui/mt → mt}/ScreenPanel.js +3 -3
- package/dist/{ui/mt → mt}/Separator.js +1 -1
- package/dist/{ui/mt → mt}/Slider.js +2 -2
- package/dist/{ui/mt → mt}/Tree.js +1 -1
- package/dist/mt/WithLinkIf.d.ts +4 -0
- package/dist/{ui/mt → mt}/dialog/MtDialog.d.ts +2 -2
- package/dist/{ui/mt → mt}/dialog/MtDialog.js +3 -3
- package/dist/mt/index.d.ts +1 -0
- package/dist/mt/index.js +1 -0
- package/dist/{ui/mt → mt}/input-field/InputField.js +3 -3
- package/dist/{ui/mt → mt}/input-field/TextArea.js +3 -3
- package/dist/{ui/mt → mt}/input-field/select/InputSelect.js +2 -2
- package/dist/{ui/mt → mt}/inputs/SearchInput.js +1 -1
- package/dist/{ui/mt → mt}/inputs/TagsInput.d.ts +1 -1
- package/dist/{ui/mt → mt}/inputs/TagsInput.js +1 -1
- package/dist/{ui/mt → mt}/inputs/TaskStatusInput.d.ts +1 -1
- package/dist/{ui/mt → mt}/inputs/UrlsInput.d.ts +1 -1
- package/dist/{ui/mt → mt}/inputs/UrlsInput.js +1 -1
- package/dist/mt/inputs/input.d.ts +1 -0
- package/dist/mt/inputs/input.js +2 -0
- package/dist/{ui/mt → mt}/mtlink.d.ts +1 -1
- package/dist/{ui/mt → mt}/mtlink.js +1 -1
- package/dist/{ui/mt → mt}/multi-select.d.ts +1 -1
- package/dist/{ui/mt → mt}/multi-select.js +6 -7
- package/dist/{ui/mt → mt}/skeleton/NewLoading.js +1 -1
- package/dist/{ui/mt → mt}/skeleton/SkeletonInput.d.ts +1 -1
- package/dist/{ui/mt → mt}/skeleton/SkeletonInput.js +1 -1
- package/dist/{ui/mt → mt}/skeleton/SkeletonLayout.js +1 -1
- package/dist/{ui/mt → mt}/skeleton/SkeletonLoading.js +1 -1
- package/dist/{ui/mt → mt}/skeleton/skeleton-card.js +1 -1
- package/dist/{ui/mt → mt}/skeleton/skeletons.js +2 -2
- package/dist/{ui/mt → mt}/skeleton.js +1 -1
- package/dist/mt/submit-button.d.ts +4 -0
- package/dist/mt/submit-button.js +9 -0
- package/dist/styles/globals.css +144 -144
- package/dist/ui/alert.d.ts +1 -1
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/button.d.ts +2 -2
- package/dist/ui/codeblock.js +1 -1
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +1 -0
- package/dist/ui/resizable.d.ts +1 -1
- package/dist/ui/sidebar.d.ts +1 -1
- package/dist/ui/toast.d.ts +1 -1
- package/dist/ui/toggle.d.ts +2 -2
- package/dist/ui/tooltip.d.ts +4 -0
- package/dist/ui/tooltip.js +4 -1
- package/package.json +24 -31
- package/src/common/DebugFormState.tsx +16 -0
- package/src/common/DeleteComfirm.tsx +124 -0
- package/src/common/FullCenter.tsx +16 -0
- package/src/common/GlobalSearch.tsx +43 -0
- package/src/common/HtmlChangesObserver.tsx +71 -0
- package/src/common/MtErrorBoundary.tsx +52 -0
- package/src/common/MtImage.tsx +42 -0
- package/src/common/MtProgressBar.tsx +6 -0
- package/src/common/NotFoundGoBack.tsx +19 -0
- package/src/common/SlntTree/Slnt.z.tsx +19 -0
- package/src/common/SlntTree/SlntTreeNode.tsx +104 -0
- package/src/common/index.tsx +3 -0
- package/src/common/markdown.tsx +9 -0
- package/src/common/mtlink.tsx +61 -0
- package/src/common/pip/PipExamplePage.tsx +84 -0
- package/src/common/pip/ReactDocumentPictureInPicture.tsx +248 -0
- package/src/common/pip/globals.d.ts +8 -0
- package/src/common/react-markdown/Code.tsx +23 -0
- package/src/common/react-markdown/MarkdownToolbar.tsx +35 -0
- package/src/common/react-markdown/ReactMarkdownExample.tsx +42 -0
- package/src/common/schema-form/SchemaFormFieldsRender.tsx +38 -0
- package/src/common/schema-form/SchemaFormView.tsx +48 -0
- package/src/common/schema-form/schema-form.z.ts +25 -0
- package/src/common/table/SimpleTable.tsx +45 -0
- package/src/common/table/cells/ExpenderCell.tsx +20 -0
- package/src/common/table/cells/SelectCell.tsx +53 -0
- package/src/common/table/cells/SortOrderCell.tsx-- +29 -0
- package/src/common/table/cells/Text.tsx +29 -0
- package/src/common/table/cells/ViewLink.tsx +54 -0
- package/src/common/table/cells/container/cellWrapper.tsx +12 -0
- package/src/common/table/cells/number.tsx +15 -0
- package/src/common/table/cells/string.tsx +75 -0
- package/src/common/table/columns/columns-example.tsx-- +83 -0
- package/src/common/table/data-table-pagination.tsx +97 -0
- package/src/common/table/data-table-view-options.tsx +57 -0
- package/src/common/table/datatable-view-options.tsx +21 -0
- package/src/common/table/example/ExampleTable.tsx +149 -0
- package/src/common/table/header/SimpleHeader.tsx +77 -0
- package/src/common/table/header/header.tsx +29 -0
- package/src/common/table/index.ts +21 -0
- package/src/common/table/row/CommonRow.tsx-- +27 -0
- package/src/common/table/row/DraggableRow.tsx-- +56 -0
- package/src/common/table/table.z.ts +56 -0
- package/src/common/tailwind-indicator.tsx +16 -0
- package/src/common/tiptap/MenuBar.tsx +175 -0
- package/src/common/tiptap/TiptapEditor.tsx +99 -0
- package/src/common/tiptap/examples/Demo-Default.tsx +240 -0
- package/src/common/tiptap/examples/Demo-Tiptap.tsx +14 -0
- package/src/components/AutoResizingTextarea.tsx +51 -0
- package/src/components/ChatMessageBubble.tsx +55 -0
- package/src/components/ClipboardCopy.tsx +47 -0
- package/src/components/InlineCode.tsx +19 -0
- package/src/components/IntermediateStep.tsx +53 -0
- package/src/components/ShowError.tsx +21 -0
- package/src/components/button-scroll-to-bottom.tsx +35 -0
- package/src/components/confirm/ConfirmProvider.tsx +145 -0
- package/src/components/confirm/Confrom.tsx +52 -0
- package/src/components/devtools/DebugValue.tsx +57 -0
- package/src/components/devtools/DevTools.tsx +48 -0
- package/src/components/empty-screen.tsx +21 -0
- package/src/components/external-link.tsx +30 -0
- package/src/components/hidden-copyable-input.tsx +45 -0
- package/src/components/index.ts +8 -0
- package/src/components/skeletons/SkeletonListView.tsx +16 -0
- package/src/components/skeletons/SkeletonLoading.tsx +16 -0
- package/src/components/spinner.tsx +17 -0
- package/src/components/theme-toggle.tsx +42 -0
- package/src/components/themes/ThemeProvider.tsx +11 -0
- package/src/components/themes/theme-toggle.tsx +26 -0
- package/src/fonts.ts +62 -0
- package/src/form/EditFormToolbar.tsx +143 -0
- package/src/form/PopupFormV2.tsx +184 -0
- package/src/form/SchemaFormFieldRender.tsx +79 -0
- package/src/form/ZodForm.tsx +92 -0
- package/src/form/deleteConform.tsx +95 -0
- package/src/hooks/use-block-stream.tsx-- +95 -0
- package/src/hooks/use-can-back.ts +15 -0
- package/src/hooks/use-config.ts +21 -0
- package/src/hooks/use-copy-to-clipboard.tsx +33 -0
- package/src/hooks/use-enter-submit.tsx +17 -0
- package/src/hooks/use-local-storage.ts +21 -0
- package/src/hooks/use-lock-body.ts +12 -0
- package/src/hooks/use-media-query.ts +39 -0
- package/src/hooks/use-mobile.tsx +21 -0
- package/src/hooks/use-mounted.ts +18 -0
- package/src/hooks/use-mutation-observer.ts +20 -0
- package/src/hooks/use-router.ts +112 -0
- package/src/hooks/use-router.ts.backup +69 -0
- package/src/hooks/use-scroll-anchor.tsx +85 -0
- package/src/hooks/use-scroll-to-bottom.ts +31 -0
- package/src/hooks/use-streamable-text.ts +25 -0
- package/src/hooks/useAgentEventStream.ts +60 -0
- package/src/hooks/useHighlighter.tsx +34 -0
- package/src/hooks/useIsIntersecting.tsx +24 -0
- package/src/hooks/useLayoutPath.ts-- +27 -0
- package/src/hooks/useLeaveConfirm.ts +38 -0
- package/src/hooks/useScript.ts +107 -0
- package/src/hooks/useSnapScroll.ts +57 -0
- package/src/i18n/I18nProvider.tsx +12 -0
- package/src/i18n/i18n.tsx +60 -0
- package/src/icons/Auth0.tsx +14 -0
- package/src/icons/Cognito.tsx +44 -0
- package/src/icons/CopliotIcon.tsx +21 -0
- package/src/icons/Cross2Icon.tsx +1 -0
- package/src/icons/Descope.tsx +328 -0
- package/src/icons/GarbageIcon.tsx +26 -0
- package/src/icons/Gitlab.tsx +27 -0
- package/src/icons/IconSpinner.tsx +18 -0
- package/src/icons/Image.tsx-- +24 -0
- package/src/icons/LoaderI3con.tsx +74 -0
- package/src/icons/MessageCircle.tsx-- +21 -0
- package/src/icons/Okta.tsx +17 -0
- package/src/icons/SaveIcon.tsx +22 -0
- package/src/icons/Telegram.tsx +22 -0
- package/src/icons/attachment.tsx-- +21 -0
- package/src/icons/copy.tsx-- +22 -0
- package/src/icons/crazy-spinner.tsx +11 -0
- package/src/icons/font-default.tsx +20 -0
- package/src/icons/font-mono.tsx +21 -0
- package/src/icons/font-serif.tsx +21 -0
- package/src/icons/github.tsx +15 -0
- package/src/icons/icons-ai.tsx +507 -0
- package/src/icons/icons.tsx +495 -0
- package/src/icons/index.ts +1 -0
- package/src/icons/index.tsx +4 -0
- package/src/icons/loading-circle.tsx +22 -0
- package/src/icons/magic.tsx +30 -0
- package/src/icons/messageBubble.tsx-- +21 -0
- package/src/icons/microphone.tsx-- +23 -0
- package/src/icons/minimize.tsx-- +24 -0
- package/src/icons/pencil.tsx-- +22 -0
- package/src/icons/squarePen.tsx +21 -0
- package/src/icons/thumbs.tsx-- +73 -0
- package/src/icons/user.tsx-- +22 -0
- package/src/index.ts +4 -0
- package/src/layouts/dash/DashLayout.tsx +76 -0
- package/src/layouts/dash/MainHeader.tsx +104 -0
- package/src/layouts/dash/nav.tsx +46 -0
- package/src/layouts/dash5/DashBreadcrumb.tsx +78 -0
- package/src/layouts/dash5/DetailViewExample.tsx +9 -0
- package/src/layouts/dash5/ListViewExample.tsx +9 -0
- package/src/layouts/dash5/MainHeader.tsx +130 -0
- package/src/layouts/dash5/SiderDebug.tsx +9 -0
- package/src/layouts/dash5/SiderNavItem.tsx +104 -0
- package/src/layouts/dash5/SiderToggleButton.tsx +52 -0
- package/src/layouts/dash5/dash5.store.tsx +137 -0
- package/src/layouts/dash5/index.tsx +155 -0
- package/src/layouts/dash5/main-nav.tsx-- +51 -0
- package/src/layouts/dash5/nav.tsx-- +137 -0
- package/src/layouts/types.tsx +25 -0
- package/src/layouts/web/WebLayout.tsx +15 -0
- package/src/layouts/web/WebLayoutHeader.tsx +57 -0
- package/src/layouts//345/270/203/345/261/200/350/256/276/350/256/241/345/217/202/350/200/203.md +3 -0
- package/src/lib/clientlib.ts +57 -0
- package/src/lib/componentHelper.ts +79 -0
- package/src/lib/copyText.ts +26 -0
- package/src/lib/debounce.ts +21 -0
- package/src/lib/domutils.ts +29 -0
- package/src/lib/errors.ts +9 -0
- package/src/lib/highlight-code.ts +33 -0
- package/src/lib/htmlparse/components/ItemActionButton.tsx +103 -0
- package/src/lib/htmlparse/htmlParse.tsx +112 -0
- package/src/lib/index.ts +1 -0
- package/src/lib/logger.ts +120 -0
- package/src/lib/react-query/ReactQueryProvider.tsx +81 -0
- package/src/lib/react.ts +14 -0
- package/src/lib/render.tsx +55 -0
- package/src/lib/service-worker/ServiceWorkerMain.tsx +57 -0
- package/src/lib/service-worker/sw.ts +49 -0
- package/src/lib/service-worker.js-- +36 -0
- package/src/lib/timeFormat.ts +22 -0
- package/src/lib/types.ts +25 -0
- package/src/lib/utils.ts +425 -0
- package/src/lib/zustand.ts +45 -0
- package/src/motion/mtmotion-variants.tsx +21 -0
- package/src/mt/Boundary.tsx +37 -0
- package/src/mt/Button.tsx +7 -0
- package/src/mt/Dialog.tsx +154 -0
- package/src/mt/DropdownMenuItemLink.tsx +21 -0
- package/src/mt/ErrorMessage.tsx +12 -0
- package/src/mt/ExampleTree.tsx +100 -0
- package/src/mt/GoBackButton.tsx +46 -0
- package/src/mt/IconButton.tsx +100 -0
- package/src/mt/LoadingDots.tsx +27 -0
- package/src/mt/MtCollapse.tsx +15 -0
- package/src/mt/MtScrollArea copy.tsx +130 -0
- package/src/mt/MtScrollArea.tsx +142 -0
- package/src/mt/MtSlider.tsx +83 -0
- package/src/mt/NavTag.tsx +87 -0
- package/src/mt/ScreenPanel.tsx +65 -0
- package/src/mt/Separator.tsx +4 -0
- package/src/mt/SimpleTag.tsx +16 -0
- package/src/mt/Slider.tsx +91 -0
- package/src/mt/Tree.tsx +279 -0
- package/src/mt/WithLinkIf.tsx +14 -0
- package/src/mt/dialog/MtDialog.tsx +35 -0
- package/src/mt/headline.tsx +16 -0
- package/src/mt/index.ts +1 -0
- package/src/mt/input-field/InputField.tsx +85 -0
- package/src/mt/input-field/SingleUploadForm.tsx +151 -0
- package/src/mt/input-field/TextArea.tsx +67 -0
- package/src/mt/input-field/TextFileInput.tsx +89 -0
- package/src/mt/input-field/select/InputSelect.tsx +114 -0
- package/src/mt/inputs/SearchInput.tsx +28 -0
- package/src/mt/inputs/TagsInput.tsx +80 -0
- package/src/mt/inputs/TaskStatusInput.tsx +62 -0
- package/src/mt/inputs/UrlsInput.tsx +21 -0
- package/src/mt/inputs/input.tsx +3 -0
- package/src/mt/inputs/mui-chips-input.tsx +64 -0
- package/src/mt/mt-tree-view/mt-tree-view-api.tsx-- +398 -0
- package/src/mt/mt-tree-view/mt-treeview.tsx-- +135 -0
- package/src/mt/mtlink.tsx +63 -0
- package/src/mt/multi-select.tsx +361 -0
- package/src/mt/pagination.tsx +98 -0
- package/src/mt/skeleton/NewLoading.tsx +35 -0
- package/src/mt/skeleton/SkeletonInput.tsx +14 -0
- package/src/mt/skeleton/SkeletonLayout.tsx +38 -0
- package/src/mt/skeleton/SkeletonLoading.tsx +12 -0
- package/src/mt/skeleton/skeleton-card.tsx +13 -0
- package/src/mt/skeleton/skeleton2.tsx +10 -0
- package/src/mt/skeleton/skeletons.tsx +73 -0
- package/src/mt/skeleton.tsx +25 -0
- package/src/mt/spinner/Spinner1.tsx +32 -0
- package/src/mt/submit-button.tsx +40 -0
- package/src/mt/types.tsx +4 -0
- package/src/mt/utils/easings.ts +3 -0
- package/src/styles/CalSans-SemiBold.otf +0 -0
- package/src/styles/globals.css +144 -0
- package/src/tailwind.ts +76 -0
- package/src/types/common.ts +13 -0
- package/src/types/index.d.ts +312 -0
- package/src/ui/accordion.tsx +60 -0
- package/src/ui/alert-dialog.tsx +132 -0
- package/src/ui/alert.tsx +59 -0
- package/src/ui/aspect-ratio.tsx +7 -0
- package/src/ui/avatar.tsx +50 -0
- package/src/ui/badge.tsx +36 -0
- package/src/ui/breadcrumb.tsx +111 -0
- package/src/ui/button.tsx +59 -0
- package/src/ui/calendar.tsx +71 -0
- package/src/ui/card.tsx +76 -0
- package/src/ui/checkbox.tsx +31 -0
- package/src/ui/codeblock.tsx +144 -0
- package/src/ui/collapsible.tsx +11 -0
- package/src/ui/command.tsx +153 -0
- package/src/ui/context-menu.tsx +193 -0
- package/src/ui/dialog.tsx +97 -0
- package/src/ui/drawer.tsx +139 -0
- package/src/ui/dropdown-menu.tsx +194 -0
- package/src/ui/form.tsx +172 -0
- package/src/ui/hover-card.tsx +29 -0
- package/src/ui/index.ts +1 -0
- package/src/ui/input.tsx +25 -0
- package/src/ui/label.tsx +26 -0
- package/src/ui/menubar.tsx +240 -0
- package/src/ui/navigation-menu.tsx +122 -0
- package/src/ui/pagination.tsx +120 -0
- package/src/ui/popover.tsx +31 -0
- package/src/ui/progress.tsx +28 -0
- package/src/ui/radio-group.tsx +44 -0
- package/src/ui/resizable.tsx +43 -0
- package/src/ui/scroll-area.tsx +90 -0
- package/src/ui/select.tsx +151 -0
- package/src/ui/separator.tsx +31 -0
- package/src/ui/sheet.tsx +140 -0
- package/src/ui/sidebar.tsx +774 -0
- package/src/ui/skeleton.tsx +15 -0
- package/src/ui/slider.tsx +28 -0
- package/src/ui/sonner.tsx +44 -0
- package/src/ui/switch.tsx +29 -0
- package/src/ui/table.tsx +111 -0
- package/src/ui/tabs.tsx +55 -0
- package/src/ui/textarea.tsx +24 -0
- package/src/ui/toast.tsx +131 -0
- package/src/ui/toaster.tsx +41 -0
- package/src/ui/toggle.tsx +45 -0
- package/src/ui/tooltip.tsx +49 -0
- package/src/ui/use-toast.ts +203 -0
- package/src/video-player/video-player2/modal-video-player.tsx-- +128 -0
- package/dist/components/themes/useTheme.d.ts +0 -0
- package/dist/components/themes/useTheme.js +0 -1
- package/dist/hooks/useMounted.d.ts +0 -1
- package/dist/hooks/useMounted.js +0 -8
- package/dist/layouts/dash5/Dash5Debug.d.ts +0 -1
- package/dist/layouts/dash5/Dash5Debug.js +0 -6
- package/dist/ui/mt/MtForm.d.ts +0 -2
- package/dist/ui/mt/MtForm.js +0 -5
- package/dist/ui/mt/WithLinkIf.d.ts +0 -4
- package/dist/ui/mt/inputs/input.d.ts +0 -1
- package/dist/ui/mt/inputs/input.js +0 -2
- /package/dist/{ui/mt → mt}/Boundary.d.ts +0 -0
- /package/dist/{ui/mt → mt}/Boundary.js +0 -0
- /package/dist/{ui/mt → mt}/Dialog.d.ts +0 -0
- /package/dist/{ui/mt → mt}/Dialog.js +0 -0
- /package/dist/{ui/mt → mt}/ErrorMessage.d.ts +0 -0
- /package/dist/{ui/mt → mt}/ErrorMessage.js +0 -0
- /package/dist/{ui/mt → mt}/ExampleTree.d.ts +0 -0
- /package/dist/{ui/mt → mt}/ExampleTree.js +0 -0
- /package/dist/{ui/mt → mt}/IconButton.d.ts +0 -0
- /package/dist/{ui/mt → mt}/LoadingDots.d.ts +0 -0
- /package/dist/{ui/mt → mt}/LoadingDots.js +0 -0
- /package/dist/{ui/mt → mt}/MtCollapse.d.ts +0 -0
- /package/dist/{ui/mt → mt}/MtCollapse.js +0 -0
- /package/dist/{ui/mt → mt}/MtScrollArea copy.d.ts +0 -0
- /package/dist/{ui/mt → mt}/MtScrollArea.d.ts +0 -0
- /package/dist/{ui/mt → mt}/MtSlider.d.ts +0 -0
- /package/dist/{ui/mt → mt}/NavTag.d.ts +0 -0
- /package/dist/{ui/mt → mt}/Separator.d.ts +0 -0
- /package/dist/{ui/mt → mt}/SimpleTag.d.ts +0 -0
- /package/dist/{ui/mt → mt}/SimpleTag.js +0 -0
- /package/dist/{ui/mt → mt}/Slider.d.ts +0 -0
- /package/dist/{ui/mt → mt}/Tree.d.ts +0 -0
- /package/dist/{ui/mt → mt}/WithLinkIf.js +0 -0
- /package/dist/{ui/mt → mt}/headline.d.ts +0 -0
- /package/dist/{ui/mt → mt}/headline.js +0 -0
- /package/dist/{ui/mt → mt}/input-field/InputField.d.ts +0 -0
- /package/dist/{ui/mt → mt}/input-field/SingleUploadForm.d.ts +0 -0
- /package/dist/{ui/mt → mt}/input-field/SingleUploadForm.js +0 -0
- /package/dist/{ui/mt → mt}/input-field/TextArea.d.ts +0 -0
- /package/dist/{ui/mt → mt}/input-field/TextFileInput.d.ts +0 -0
- /package/dist/{ui/mt → mt}/input-field/TextFileInput.js +0 -0
- /package/dist/{ui/mt → mt}/input-field/select/InputSelect.d.ts +0 -0
- /package/dist/{ui/mt → mt}/inputs/SearchInput.d.ts +0 -0
- /package/dist/{ui/mt → mt}/inputs/TaskStatusInput.js +0 -0
- /package/dist/{ui/mt → mt}/inputs/mui-chips-input.d.ts +0 -0
- /package/dist/{ui/mt → mt}/inputs/mui-chips-input.js +0 -0
- /package/dist/{ui/mt → mt}/pagination.d.ts +0 -0
- /package/dist/{ui/mt → mt}/pagination.js +0 -0
- /package/dist/{ui/mt → mt}/skeleton/NewLoading.d.ts +0 -0
- /package/dist/{ui/mt → mt}/skeleton/SkeletonLayout.d.ts +0 -0
- /package/dist/{ui/mt → mt}/skeleton/SkeletonLoading.d.ts +0 -0
- /package/dist/{ui/mt → mt}/skeleton/skeleton-card.d.ts +0 -0
- /package/dist/{ui/mt → mt}/skeleton/skeleton2.d.ts +0 -0
- /package/dist/{ui/mt → mt}/skeleton/skeleton2.js +0 -0
- /package/dist/{ui/mt → mt}/skeleton/skeletons.d.ts +0 -0
- /package/dist/{ui/mt → mt}/skeleton.d.ts +0 -0
- /package/dist/{ui/mt → mt}/spinner/Spinner1.d.ts +0 -0
- /package/dist/{ui/mt → mt}/spinner/Spinner1.js +0 -0
- /package/dist/{ui/mt → mt}/types.d.ts +0 -0
- /package/dist/{ui/mt → mt}/types.js +0 -0
- /package/dist/{ui/mt → mt}/utils/easings.d.ts +0 -0
- /package/dist/{ui/mt → mt}/utils/easings.js +0 -0
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { createContext, useCallback, useContext, useMemo, } from "react";
|
|
4
4
|
import { createStore, useStore } from "zustand";
|
|
5
5
|
import { immer } from "zustand/middleware/immer";
|
|
6
|
-
import {
|
|
6
|
+
import { Button } from "../ui";
|
|
7
7
|
import { Dialog, DialogContent, DialogDescription, DialogTitle, } from "../ui/dialog";
|
|
8
8
|
export const createFormSlice = (set, get) => ({
|
|
9
9
|
setOpen: (open) => set({ open }),
|
|
@@ -42,11 +42,11 @@ export const DeleteConfirmDlg = () => {
|
|
|
42
42
|
const open = useDeleteConfirmStore((x) => x.open);
|
|
43
43
|
const setOpen = useDeleteConfirmStore((x) => x.setOpen);
|
|
44
44
|
const confirmCallback = useDeleteConfirmStore((x) => x.confirmCallback);
|
|
45
|
-
return (_jsx(Dialog, { open: open, onOpenChange: setOpen, children: _jsxs(DialogContent, { children: [_jsx(DialogTitle, { children: "delete confirm" }), _jsx(DialogDescription, { children: "will delete item, continue?" }), _jsx(
|
|
45
|
+
return (_jsx(Dialog, { open: open, onOpenChange: setOpen, children: _jsxs(DialogContent, { children: [_jsx(DialogTitle, { children: "delete confirm" }), _jsx(DialogDescription, { children: "will delete item, continue?" }), _jsx(Button, { variant: "destructive", onClick: async () => {
|
|
46
46
|
setOpen(false);
|
|
47
|
-
confirmCallback
|
|
48
|
-
}, children: "Continue" }), _jsx(
|
|
47
|
+
confirmCallback?.();
|
|
48
|
+
}, children: "Continue" }), _jsx(Button, { variant: "outline", onClick: () => {
|
|
49
49
|
setOpen(false);
|
|
50
|
-
confirmCallback
|
|
50
|
+
confirmCallback?.();
|
|
51
51
|
}, children: "Cancel" })] }) }));
|
|
52
52
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ErrorBoundary } from "react-error-boundary";
|
|
3
|
-
import { MtButton } from "../
|
|
3
|
+
import { MtButton } from "../mt";
|
|
4
|
+
import { Button } from "../ui";
|
|
4
5
|
export const MtErrorBoundary = (props) => {
|
|
5
6
|
const { children } = props;
|
|
6
7
|
return (_jsx(ErrorBoundary, { fallbackRender: ({ error, resetErrorBoundary }) => {
|
|
7
8
|
console.log("💥💥💥", error);
|
|
8
|
-
return (_jsx("div", { className: "flex items-center justify-center h-full w-full", children: _jsx(
|
|
9
|
+
return (_jsx("div", { className: "flex items-center justify-center h-full w-full", children: _jsx(Button, { onClick: () => resetErrorBoundary(), className: "min-w-24 p-4", children: "\u91CD\u8BD5" }) }));
|
|
9
10
|
}, onReset: () => { }, children: children }));
|
|
10
11
|
};
|
|
11
12
|
const CustomErrorRetry = (props) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import ReactDocumentPictureInPicture from "mtxuilib/common/pip/ReactDocumentPictureInPicture";
|
|
4
|
-
import { MtButton } from "mtxuilib/
|
|
4
|
+
import { MtButton } from "mtxuilib/mt/Button";
|
|
5
5
|
import { useRef, useState } from "react";
|
|
6
6
|
export default function PipExamplePage() {
|
|
7
7
|
const pipWindowRef = useRef(null);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { ChevronLeftIcon, ChevronRightIcon, DoubleArrowLeftIcon, DoubleArrowRightIcon, } from "@radix-ui/react-icons";
|
|
4
|
-
import { MtButton } from "../../ui/mt/Button";
|
|
5
4
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "../../ui/select";
|
|
5
|
+
import { Button } from "../../ui";
|
|
6
6
|
export function DataTablePagination({ table, }) {
|
|
7
7
|
return (_jsxs("div", { className: "flex items-center justify-between px-2", children: [_jsxs("div", { className: "text-muted-foreground flex-1 text-sm", children: [table.getFilteredSelectedRowModel().rows.length, " of", " ", table.getFilteredRowModel().rows.length, " row(s) selected."] }), _jsxs("div", { className: "flex items-center space-x-6 lg:space-x-8", children: [_jsxs("div", { className: "flex items-center space-x-2", children: [_jsx("p", { className: "text-sm font-medium", children: "Rows per page" }), _jsxs(Select, { value: `${table.getState().pagination.pageSize}`, onValueChange: (value) => {
|
|
8
8
|
table.setPageSize(Number(value));
|
|
9
|
-
}, children: [_jsx(SelectTrigger, { className: "h-8 w-[70px]", children: _jsx(SelectValue, { placeholder: table.getState().pagination.pageSize }) }), _jsx(SelectContent, { side: "top", children: [10, 20, 30, 40, 50].map((pageSize) => (_jsx(SelectItem, { value: `${pageSize}`, children: pageSize }, pageSize))) })] })] }), _jsxs("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: ["Page ", table.getState().pagination.pageIndex + 1, " of", " ", table.getPageCount()] }), _jsxs("div", { className: "flex items-center space-x-2", children: [_jsxs(
|
|
9
|
+
}, children: [_jsx(SelectTrigger, { className: "h-8 w-[70px]", children: _jsx(SelectValue, { placeholder: table.getState().pagination.pageSize }) }), _jsx(SelectContent, { side: "top", children: [10, 20, 30, 40, 50].map((pageSize) => (_jsx(SelectItem, { value: `${pageSize}`, children: pageSize }, pageSize))) })] })] }), _jsxs("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: ["Page ", table.getState().pagination.pageIndex + 1, " of", " ", table.getPageCount()] }), _jsxs("div", { className: "flex items-center space-x-2", children: [_jsxs(Button, { variant: "outline", className: "hidden h-8 w-8 p-0 lg:flex", onClick: () => table.setPageIndex(0), disabled: !table.getCanPreviousPage(), children: [_jsx("span", { className: "sr-only", children: "Go to first page" }), _jsx(DoubleArrowLeftIcon, { className: "h-4 w-4" })] }), _jsxs(Button, { variant: "outline", className: "h-8 w-8 p-0", onClick: () => table.previousPage(), disabled: !table.getCanPreviousPage(), children: [_jsx("span", { className: "sr-only", children: "Go to previous page" }), _jsx(ChevronLeftIcon, { className: "h-4 w-4" })] }), _jsxs(Button, { variant: "outline", className: "h-8 w-8 p-0", onClick: () => table.nextPage(), disabled: !table.getCanNextPage(), children: [_jsx("span", { className: "sr-only", children: "Go to next page" }), _jsx(ChevronRightIcon, { className: "h-4 w-4" })] }), _jsxs(Button, { variant: "outline", className: "hidden h-8 w-8 p-0 lg:flex", onClick: () => table.setPageIndex(table.getPageCount() - 1), disabled: !table.getCanNextPage(), children: [_jsx("span", { className: "sr-only", children: "Go to last page" }), _jsx(DoubleArrowRightIcon, { className: "h-4 w-4" })] })] })] })] }));
|
|
10
10
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { MixerHorizontalIcon } from "@radix-ui/react-icons";
|
|
4
|
-
import { MtButton } from "../../ui/mt/Button";
|
|
5
4
|
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from "../../ui/dropdown-menu";
|
|
5
|
+
import { Button } from "../../ui";
|
|
6
6
|
export function DataTableViewOptions({ table, }) {
|
|
7
|
-
return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(
|
|
7
|
+
return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { variant: "outline", size: "sm", className: "ml-auto hidden h-8 lg:flex", children: [_jsx(MixerHorizontalIcon, { className: "mr-2 h-4 w-4" }), "View"] }) }), _jsxs(DropdownMenuContent, { align: "end", className: "w-[150px]", children: [_jsx(DropdownMenuLabel, { children: "Toggle columns" }), _jsx(DropdownMenuSeparator, {}), table
|
|
8
8
|
.getAllColumns()
|
|
9
9
|
.filter((column) => typeof column.accessorFn !== "undefined" && column.getCanHide())
|
|
10
10
|
.map((column) => {
|
|
@@ -6,8 +6,8 @@ import TextStyle from "@tiptap/extension-text-style";
|
|
|
6
6
|
import { EditorProvider, useCurrentEditor, } from "@tiptap/react";
|
|
7
7
|
import StarterKit from "@tiptap/starter-kit";
|
|
8
8
|
import { cn } from "../../lib/utils";
|
|
9
|
-
import { MtButton } from "../../ui/mt/Button";
|
|
10
9
|
import { MenuBar } from "./MenuBar";
|
|
10
|
+
import { Button } from "../../ui";
|
|
11
11
|
const SaveButton = (props) => {
|
|
12
12
|
const { onSave } = props;
|
|
13
13
|
const { editor } = useCurrentEditor();
|
|
@@ -18,10 +18,10 @@ const SaveButton = (props) => {
|
|
|
18
18
|
const html = editor?.getHTML();
|
|
19
19
|
console.log("html", html);
|
|
20
20
|
if (html) {
|
|
21
|
-
onSave
|
|
21
|
+
onSave?.(html);
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
|
-
return (_jsx(_Fragment, { children: _jsx("div", { children: _jsx(
|
|
24
|
+
return (_jsx(_Fragment, { children: _jsx("div", { children: _jsx(Button, { onClick: handleSave, children: "Save" }) }) }));
|
|
25
25
|
};
|
|
26
26
|
const extensions = [
|
|
27
27
|
Color.configure({ types: [TextStyle.name, ListItem.name] }),
|
|
@@ -49,35 +49,35 @@ const extensions = [
|
|
|
49
49
|
},
|
|
50
50
|
}),
|
|
51
51
|
];
|
|
52
|
-
const content = `
|
|
53
|
-
<h2>
|
|
54
|
-
Hi there,
|
|
55
|
-
</h2>
|
|
56
|
-
<p>
|
|
57
|
-
this is a <em>basic</em> example of <strong>tiptap</strong>. Sure, there are all kind of basic text styles you’d probably expect from a text editor. But wait until you see the lists:
|
|
58
|
-
</p>
|
|
59
|
-
<ul>
|
|
60
|
-
<li>
|
|
61
|
-
That’s a bullet list with one …
|
|
62
|
-
</li>
|
|
63
|
-
<li>
|
|
64
|
-
… or two list items.
|
|
65
|
-
</li>
|
|
66
|
-
</ul>
|
|
67
|
-
<p>
|
|
68
|
-
Isn’t that great? And all of that is editable. But wait, there’s more. Let’s try a code block:
|
|
69
|
-
</p>
|
|
70
|
-
<pre><code class="language-css">body {
|
|
71
|
-
display: none;
|
|
72
|
-
}</code></pre>
|
|
73
|
-
<p>
|
|
74
|
-
I know, I know, this is impressive. It’s only the tip of the iceberg though. Give it a try and click a little bit around. Don’t forget to check the other examples too.
|
|
75
|
-
</p>
|
|
76
|
-
<blockquote>
|
|
77
|
-
Wow, that’s amazing. Good work, boy! 👏
|
|
78
|
-
<br />
|
|
79
|
-
— Mom
|
|
80
|
-
</blockquote>
|
|
52
|
+
const content = `
|
|
53
|
+
<h2>
|
|
54
|
+
Hi there,
|
|
55
|
+
</h2>
|
|
56
|
+
<p>
|
|
57
|
+
this is a <em>basic</em> example of <strong>tiptap</strong>. Sure, there are all kind of basic text styles you’d probably expect from a text editor. But wait until you see the lists:
|
|
58
|
+
</p>
|
|
59
|
+
<ul>
|
|
60
|
+
<li>
|
|
61
|
+
That’s a bullet list with one …
|
|
62
|
+
</li>
|
|
63
|
+
<li>
|
|
64
|
+
… or two list items.
|
|
65
|
+
</li>
|
|
66
|
+
</ul>
|
|
67
|
+
<p>
|
|
68
|
+
Isn’t that great? And all of that is editable. But wait, there’s more. Let’s try a code block:
|
|
69
|
+
</p>
|
|
70
|
+
<pre><code class="language-css">body {
|
|
71
|
+
display: none;
|
|
72
|
+
}</code></pre>
|
|
73
|
+
<p>
|
|
74
|
+
I know, I know, this is impressive. It’s only the tip of the iceberg though. Give it a try and click a little bit around. Don’t forget to check the other examples too.
|
|
75
|
+
</p>
|
|
76
|
+
<blockquote>
|
|
77
|
+
Wow, that’s amazing. Good work, boy! 👏
|
|
78
|
+
<br />
|
|
79
|
+
— Mom
|
|
80
|
+
</blockquote>
|
|
81
81
|
`;
|
|
82
82
|
export default function TiptapDemo1() {
|
|
83
83
|
return (_jsx(EditorProvider, { slotBefore: _jsx(MenuBar, {}), extensions: extensions, content: content, children: _jsx(_Fragment, {}) }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { Button } from "../ui";
|
|
4
4
|
export const ShowError = (props) => {
|
|
5
|
-
return (_jsxs("div", { className: "bg-orange-400 p-4 flex items-center justify-center flex-col", children: [_jsx("h3", { children: "\u5185\u90E8\u51FA\u9519" }), _jsx(
|
|
5
|
+
return (_jsxs("div", { className: "bg-orange-400 p-4 flex items-center justify-center flex-col", children: [_jsx("h3", { children: "\u5185\u90E8\u51FA\u9519" }), _jsx(Button, { type: "button", onClick: () => props.reset(), children: "\u91CD\u8BD5" })] }));
|
|
6
6
|
};
|
|
@@ -3,8 +3,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { forwardRef, useMemo, useState } from "react";
|
|
4
4
|
import { useFormContext } from "react-hook-form";
|
|
5
5
|
import { cn } from "../lib/utils";
|
|
6
|
-
import { MtButton } from "../ui/mt/Button";
|
|
7
6
|
import { ConformDeleteBtn } from "./deleteConform";
|
|
7
|
+
import { Button } from "../ui";
|
|
8
8
|
export const EditFormToolbar = forwardRef((props, forwardedRef) => {
|
|
9
9
|
const { submitText, onSubmit, onCancel, children, enableCancelConform, enableDeleteButton, onDelete, } = props;
|
|
10
10
|
const [openConform, setOpenConform] = useState(false);
|
|
@@ -22,7 +22,7 @@ export const EditFormToolbar = forwardRef((props, forwardedRef) => {
|
|
|
22
22
|
if (!form) {
|
|
23
23
|
throw new Error("SubmitButton must be used within a Form or have a form prop");
|
|
24
24
|
}
|
|
25
|
-
return (_jsxs("div", { className: "flex w-full flex-col p-1", children: [!openConform && (_jsxs("div", { className: "flex justify-end gap-2", children: [_jsx(
|
|
25
|
+
return (_jsxs("div", { className: "flex w-full flex-col p-1", children: [!openConform && (_jsxs("div", { className: "flex justify-end gap-2", children: [_jsx(Button, { variant: "outline", className: " min-w-24", onClick: (e) => {
|
|
26
26
|
e.preventDefault();
|
|
27
27
|
if (enableCancelConform && form?.formState?.isDirty) {
|
|
28
28
|
setOpenConform(true);
|
|
@@ -30,7 +30,7 @@ export const EditFormToolbar = forwardRef((props, forwardedRef) => {
|
|
|
30
30
|
else {
|
|
31
31
|
onCancel?.();
|
|
32
32
|
}
|
|
33
|
-
}, children: "\u53D6\u6D88" }), _jsx(
|
|
33
|
+
}, children: "\u53D6\u6D88" }), _jsx(Button, { form: props.form?.id, type: "submit", disabled: formState.isSubmitting, className: "min-w-24", children: formState.isSubmitting ? "Loading" : submitText || "确定" }), enableDeleteButton && (_jsx(ConformDeleteBtn, { callback: async () => {
|
|
34
34
|
onDelete?.();
|
|
35
35
|
}, disabled: form.formState.isSubmitting, variant: "destructive", children: "\u5220\u9664" }))] })), openConform && (_jsx(ComformCancel, { onBack: () => {
|
|
36
36
|
setOpenConform(false);
|
|
@@ -41,10 +41,10 @@ export const EditFormToolbar = forwardRef((props, forwardedRef) => {
|
|
|
41
41
|
EditFormToolbar.displayName = "EditFormToolbar";
|
|
42
42
|
const ComformCancel = (props) => {
|
|
43
43
|
const { onContinue, onBack } = props;
|
|
44
|
-
return (_jsxs("div", { className: "flex gap-2", children: ["\u672A\u4FDD\u5B58\u66F4\u6539\uFF0C\u786E\u5B9A\u7EE7\u7EED\u5417\uFF1F", _jsx(
|
|
44
|
+
return (_jsxs("div", { className: "flex gap-2", children: ["\u672A\u4FDD\u5B58\u66F4\u6539\uFF0C\u786E\u5B9A\u7EE7\u7EED\u5417\uFF1F", _jsx(Button, { onClick: (e) => {
|
|
45
45
|
e.preventDefault();
|
|
46
46
|
onBack();
|
|
47
|
-
}, children: "\u7EE7\u7EED\u7F16\u8F91" }), _jsx(
|
|
47
|
+
}, children: "\u7EE7\u7EED\u7F16\u8F91" }), _jsx(Button, { variant: "destructive", className: cn(""), onClick: (e) => {
|
|
48
48
|
e.preventDefault();
|
|
49
49
|
onContinue();
|
|
50
50
|
}, children: "\u5173\u95ED" })] }));
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Dialog, DialogContent, DialogDescription, DialogTitle, } from "@radix-ui/react-dialog";
|
|
3
2
|
import { Slot } from "@radix-ui/react-slot";
|
|
4
3
|
import React, { useState } from "react";
|
|
5
4
|
import { cn } from "../lib/utils";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { Button, buttonVariants } from "../ui/button";
|
|
6
|
+
import { Dialog, DialogContent, DialogDescription, DialogTitle, DialogTrigger } from "../ui/dialog";
|
|
7
|
+
import { MtButton } from "../mt";
|
|
9
8
|
export const DeleteConformDlg = (props) => {
|
|
10
9
|
const { handleOk } = props;
|
|
11
10
|
const [open, setOpen] = useState(false);
|
|
12
11
|
return (_jsxs(Dialog, { open: open, onOpenChange: setOpen, children: [_jsx(DialogTrigger, { asChild: true, onClick: (e) => {
|
|
13
12
|
e.preventDefault();
|
|
14
13
|
setOpen(true);
|
|
15
|
-
}, children: _jsx(
|
|
14
|
+
}, children: _jsx(Button, { children: "\u5220\u9664" }) }), _jsx(DialogContent, { children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Button, { onClick: (e) => {
|
|
16
15
|
e.preventDefault();
|
|
17
16
|
handleOk && handleOk();
|
|
18
|
-
}, children: "\u786E\u5B9A\u5220\u9664" }), _jsx(
|
|
17
|
+
}, children: "\u786E\u5B9A\u5220\u9664" }), _jsx(Button, { onClick: (e) => {
|
|
19
18
|
e.preventDefault();
|
|
20
19
|
setOpen(false);
|
|
21
20
|
}, children: "cancel" })] }) })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function
|
|
1
|
+
export declare function useCanGoBack(): boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { useEffect } from "react";
|
|
2
3
|
export function useMounted() {
|
|
3
4
|
const [mounted, setMounted] = React.useState(false);
|
|
4
5
|
React.useEffect(() => {
|
|
@@ -6,3 +7,7 @@ export function useMounted() {
|
|
|
6
7
|
}, []);
|
|
7
8
|
return mounted;
|
|
8
9
|
}
|
|
10
|
+
export function useMountedEffect(effect) {
|
|
11
|
+
const mounted = useMounted();
|
|
12
|
+
useEffect(effect, [mounted]);
|
|
13
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useEffect, useRef } from "react";
|
|
2
|
+
export function useScrollToBottom() {
|
|
3
|
+
const containerRef = useRef(null);
|
|
4
|
+
const endRef = useRef(null);
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
const container = containerRef.current;
|
|
7
|
+
const end = endRef.current;
|
|
8
|
+
if (container && end) {
|
|
9
|
+
const observer = new MutationObserver(() => {
|
|
10
|
+
end.scrollIntoView({ behavior: "instant", block: "end" });
|
|
11
|
+
});
|
|
12
|
+
observer.observe(container, {
|
|
13
|
+
childList: true,
|
|
14
|
+
subtree: true,
|
|
15
|
+
attributes: true,
|
|
16
|
+
characterData: true,
|
|
17
|
+
});
|
|
18
|
+
return () => observer.disconnect();
|
|
19
|
+
}
|
|
20
|
+
}, []);
|
|
21
|
+
return [containerRef, endRef];
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useLeaveConfirm: (shouldPreventLeave: boolean) => void;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
export const useLeaveConfirm = (shouldPreventLeave) => {
|
|
4
|
+
useEffect(() => {
|
|
5
|
+
const handleWindowClose = (e) => {
|
|
6
|
+
if (!shouldPreventLeave)
|
|
7
|
+
return;
|
|
8
|
+
e.preventDefault();
|
|
9
|
+
return (e.returnValue = "");
|
|
10
|
+
};
|
|
11
|
+
const handleBrowseAway = () => {
|
|
12
|
+
if (!shouldPreventLeave)
|
|
13
|
+
return;
|
|
14
|
+
if (window.confirm("You have unsaved changes. Are you sure you want to leave?")) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
throw new Error("Route change was aborted");
|
|
18
|
+
};
|
|
19
|
+
window.addEventListener("beforeunload", handleWindowClose);
|
|
20
|
+
window.addEventListener("popstate", handleBrowseAway);
|
|
21
|
+
return () => {
|
|
22
|
+
window.removeEventListener("beforeunload", handleWindowClose);
|
|
23
|
+
window.removeEventListener("popstate", handleBrowseAway);
|
|
24
|
+
};
|
|
25
|
+
}, [shouldPreventLeave]);
|
|
26
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export const LoaderI3con = ({ size = 16 }) => {
|
|
3
|
+
return (_jsxs("svg", { height: size, strokeLinejoin: "round", viewBox: "0 0 16 16", width: size, style: { color: "currentcolor" }, children: [_jsxs("g", { clipPath: "url(#clip0_2393_1490)", children: [_jsx("path", { d: "M8 0V4", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { opacity: "0.5", d: "M8 16V12", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { opacity: "0.9", d: "M3.29773 1.52783L5.64887 4.7639", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { opacity: "0.1", d: "M12.7023 1.52783L10.3511 4.7639", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { opacity: "0.4", d: "M12.7023 14.472L10.3511 11.236", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { opacity: "0.6", d: "M3.29773 14.472L5.64887 11.236", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { opacity: "0.2", d: "M15.6085 5.52783L11.8043 6.7639", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { opacity: "0.7", d: "M0.391602 10.472L4.19583 9.23598", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { opacity: "0.3", d: "M15.6085 10.4722L11.8043 9.2361", stroke: "currentColor", strokeWidth: "1.5" }), _jsx("path", { opacity: "0.8", d: "M0.391602 5.52783L4.19583 6.7639", stroke: "currentColor", strokeWidth: "1.5" })] }), _jsx("defs", { children: _jsx("clipPath", { id: "clip0_2393_1490", children: _jsx("rect", { width: "16", height: "16", fill: "white" }) }) })] }));
|
|
4
|
+
};
|
package/dist/icons/icons-ai.d.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
declare function IconNextChat({ className, inverted, ...props }: React.ComponentProps<
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function IconNextChat({ className, inverted, ...props }: React.ComponentProps<"svg"> & {
|
|
3
3
|
inverted?: boolean;
|
|
4
4
|
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
declare function IconOpenAI({ className, ...props }: React.ComponentProps<
|
|
6
|
-
declare function IconVercel({ className, ...props }: React.ComponentProps<
|
|
7
|
-
declare function IconGitHub({ className, ...props }: React.ComponentProps<
|
|
8
|
-
declare function IconSeparator({ className, ...props }: React.ComponentProps<
|
|
9
|
-
declare function IconArrowDown({ className, ...props }: React.ComponentProps<
|
|
10
|
-
declare function IconArrowRight({ className, ...props }: React.ComponentProps<
|
|
11
|
-
declare function IconUser({ className, ...props }: React.ComponentProps<
|
|
12
|
-
declare function IconPlus({ className, ...props }: React.ComponentProps<
|
|
13
|
-
declare function IconArrowElbow({ className, ...props }: React.ComponentProps<
|
|
14
|
-
declare function IconSpinner({ className, ...props }: React.ComponentProps<
|
|
15
|
-
declare function IconMessage({ className, ...props }: React.ComponentProps<
|
|
16
|
-
declare function IconTrash({ className, ...props }: React.ComponentProps<
|
|
17
|
-
declare function IconRefresh({ className, ...props }: React.ComponentProps<
|
|
18
|
-
declare function IconStop({ className, ...props }: React.ComponentProps<
|
|
19
|
-
declare function IconSidebar({ className, ...props }: React.ComponentProps<
|
|
20
|
-
declare function IconMoon({ className, ...props }: React.ComponentProps<
|
|
21
|
-
declare function IconSun({ className, ...props }: React.ComponentProps<
|
|
22
|
-
declare function IconCopy({ className, ...props }: React.ComponentProps<
|
|
23
|
-
declare function IconCheck({ className, ...props }: React.ComponentProps<
|
|
24
|
-
declare function IconDownload({ className, ...props }: React.ComponentProps<
|
|
25
|
-
declare function IconClose({ className, ...props }: React.ComponentProps<
|
|
26
|
-
declare function IconEdit({ className, ...props }: React.ComponentProps<
|
|
27
|
-
declare function IconShare({ className, ...props }: React.ComponentProps<
|
|
28
|
-
declare function IconUsers({ className, ...props }: React.ComponentProps<
|
|
29
|
-
declare function IconExternalLink({ className, ...props }: React.ComponentProps<
|
|
30
|
-
declare function IconChevronUpDown({ className, ...props }: React.ComponentProps<
|
|
31
|
-
export { IconEdit, IconNextChat, IconOpenAI, IconVercel, IconGitHub, IconSeparator, IconArrowDown, IconArrowRight, IconUser, IconPlus, IconArrowElbow, IconSpinner, IconMessage, IconTrash, IconRefresh, IconStop, IconSidebar, IconMoon, IconSun, IconCopy, IconCheck, IconDownload, IconClose, IconShare, IconUsers, IconExternalLink, IconChevronUpDown };
|
|
5
|
+
declare function IconOpenAI({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function IconVercel({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function IconGitHub({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function IconSeparator({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function IconArrowDown({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function IconArrowRight({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function IconUser({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function IconPlus({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function IconArrowElbow({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function IconSpinner({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function IconMessage({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function IconTrash({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function IconRefresh({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
declare function IconStop({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function IconSidebar({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function IconMoon({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function IconSun({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function IconCopy({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function IconCheck({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
declare function IconDownload({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
declare function IconClose({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
declare function IconEdit({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
declare function IconShare({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
declare function IconUsers({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
declare function IconExternalLink({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
declare function IconChevronUpDown({ className, ...props }: React.ComponentProps<"svg">): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export { IconEdit, IconNextChat, IconOpenAI, IconVercel, IconGitHub, IconSeparator, IconArrowDown, IconArrowRight, IconUser, IconPlus, IconArrowElbow, IconSpinner, IconMessage, IconTrash, IconRefresh, IconStop, IconSidebar, IconMoon, IconSun, IconCopy, IconCheck, IconDownload, IconClose, IconShare, IconUsers, IconExternalLink, IconChevronUpDown, };
|