@kaitify/react 0.0.1-beta.1
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/LICENSE +21 -0
- package/README.md +3 -0
- package/docs/.vitepress/cache/deps/_metadata.json +52 -0
- package/docs/.vitepress/cache/deps/chunk-Q2AYPHVK.js +9719 -0
- package/docs/.vitepress/cache/deps/chunk-Q2AYPHVK.js.map +7 -0
- package/docs/.vitepress/cache/deps/chunk-QAXAIFA7.js +12705 -0
- package/docs/.vitepress/cache/deps/chunk-QAXAIFA7.js.map +7 -0
- package/docs/.vitepress/cache/deps/package.json +3 -0
- package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +4505 -0
- package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map +7 -0
- package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js +583 -0
- package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js.map +7 -0
- package/docs/.vitepress/cache/deps/vitepress___@vueuse_integrations_useFocusTrap.js +1145 -0
- package/docs/.vitepress/cache/deps/vitepress___@vueuse_integrations_useFocusTrap.js.map +7 -0
- package/docs/.vitepress/cache/deps/vitepress___mark__js_src_vanilla__js.js +1665 -0
- package/docs/.vitepress/cache/deps/vitepress___mark__js_src_vanilla__js.js.map +7 -0
- package/docs/.vitepress/cache/deps/vitepress___minisearch.js +1813 -0
- package/docs/.vitepress/cache/deps/vitepress___minisearch.js.map +7 -0
- package/docs/.vitepress/cache/deps/vue.js +343 -0
- package/docs/.vitepress/cache/deps/vue.js.map +7 -0
- package/docs/.vitepress/config.ts +185 -0
- package/docs/.vitepress/global.d.ts +1 -0
- package/docs/.vitepress/theme/index.ts +6 -0
- package/docs/.vitepress/theme/style.less +17 -0
- package/docs/.vitepress/tsconfig.json +12 -0
- package/docs/changelog.md +10 -0
- package/docs/guide/bubble.md +71 -0
- package/docs/guide/checkbox.md +38 -0
- package/docs/guide/divider.md +41 -0
- package/docs/guide/icon.md +34 -0
- package/docs/guide/install.md +70 -0
- package/docs/guide/introduction.md +28 -0
- package/docs/guide/locale.md +67 -0
- package/docs/guide/menu.md +112 -0
- package/docs/guide/quick-start.md +76 -0
- package/docs/guide/shortcut.md +77 -0
- package/docs/guide/tabs.md +42 -0
- package/docs/guide/wrapper.md +303 -0
- package/docs/index.md +41 -0
- package/docs/menus/built-in/align-center.md +29 -0
- package/docs/menus/built-in/align-justify.md +29 -0
- package/docs/menus/built-in/align-left.md +29 -0
- package/docs/menus/built-in/align-right.md +29 -0
- package/docs/menus/built-in/attachment.md +41 -0
- package/docs/menus/built-in/back-color.md +33 -0
- package/docs/menus/built-in/blockquote.md +29 -0
- package/docs/menus/built-in/bold.md +29 -0
- package/docs/menus/built-in/clear-format.md +29 -0
- package/docs/menus/built-in/code-block-languages.md +37 -0
- package/docs/menus/built-in/code-block.md +29 -0
- package/docs/menus/built-in/code.md +29 -0
- package/docs/menus/built-in/color.md +33 -0
- package/docs/menus/built-in/decrease-indent.md +29 -0
- package/docs/menus/built-in/emoji.md +35 -0
- package/docs/menus/built-in/font-family.md +44 -0
- package/docs/menus/built-in/font-size.md +44 -0
- package/docs/menus/built-in/full-screen.md +39 -0
- package/docs/menus/built-in/heading.md +66 -0
- package/docs/menus/built-in/horizontal.md +29 -0
- package/docs/menus/built-in/image.md +41 -0
- package/docs/menus/built-in/increase-indent.md +29 -0
- package/docs/menus/built-in/italic.md +29 -0
- package/docs/menus/built-in/line-height.md +44 -0
- package/docs/menus/built-in/link-unset.md +29 -0
- package/docs/menus/built-in/link.md +29 -0
- package/docs/menus/built-in/math.md +29 -0
- package/docs/menus/built-in/ordered-list.md +29 -0
- package/docs/menus/built-in/redo.md +25 -0
- package/docs/menus/built-in/strikethrough.md +29 -0
- package/docs/menus/built-in/subscript.md +29 -0
- package/docs/menus/built-in/superscript.md +29 -0
- package/docs/menus/built-in/table-add-column.md +33 -0
- package/docs/menus/built-in/table-add-row.md +33 -0
- package/docs/menus/built-in/table-delete-column.md +29 -0
- package/docs/menus/built-in/table-delete-row.md +29 -0
- package/docs/menus/built-in/table-merge-cell.md +33 -0
- package/docs/menus/built-in/table-unset.md +29 -0
- package/docs/menus/built-in/table.md +37 -0
- package/docs/menus/built-in/task.md +29 -0
- package/docs/menus/built-in/underline.md +29 -0
- package/docs/menus/built-in/undo.md +25 -0
- package/docs/menus/built-in/unordered-list.md +29 -0
- package/docs/menus/built-in/video-controls.md +29 -0
- package/docs/menus/built-in/video-loop.md +29 -0
- package/docs/menus/built-in/video-muted.md +29 -0
- package/docs/menus/built-in/video.md +41 -0
- package/docs/menus/built-in/wrap-down.md +33 -0
- package/docs/menus/built-in/wrap-up.md +33 -0
- package/docs/menus/introduction.md +27 -0
- package/examples/App.tsx +179 -0
- package/examples/main.tsx +9 -0
- package/examples/style.less +21 -0
- package/index.html +13 -0
- package/lib/core/button/button.d.ts +5 -0
- package/lib/core/button/index.d.ts +3 -0
- package/lib/core/button/props.d.ts +38 -0
- package/lib/core/checkbox/checkbox.d.ts +5 -0
- package/lib/core/checkbox/index.d.ts +3 -0
- package/lib/core/checkbox/props.d.ts +21 -0
- package/lib/core/divider/divider.d.ts +4 -0
- package/lib/core/divider/index.d.ts +2 -0
- package/lib/core/icon/icon.d.ts +5 -0
- package/lib/core/icon/index.d.ts +3 -0
- package/lib/core/icon/props.d.ts +22 -0
- package/lib/core/popover/index.d.ts +3 -0
- package/lib/core/popover/popover.d.ts +7 -0
- package/lib/core/popover/props.d.ts +94 -0
- package/lib/core/tabs/index.d.ts +3 -0
- package/lib/core/tabs/props.d.ts +21 -0
- package/lib/core/tabs/tabs.d.ts +2 -0
- package/lib/core/teleport/index.d.ts +3 -0
- package/lib/core/teleport/props.d.ts +11 -0
- package/lib/core/teleport/teleport.d.ts +5 -0
- package/lib/editor/bubble/bubble.d.ts +6 -0
- package/lib/editor/bubble/index.d.ts +3 -0
- package/lib/editor/bubble/props.d.ts +63 -0
- package/lib/editor/menu/built-in/align-center/align-center.d.ts +2 -0
- package/lib/editor/menu/built-in/align-center/index.d.ts +3 -0
- package/lib/editor/menu/built-in/align-center/props.d.ts +10 -0
- package/lib/editor/menu/built-in/align-justify/align-justify.d.ts +2 -0
- package/lib/editor/menu/built-in/align-justify/index.d.ts +3 -0
- package/lib/editor/menu/built-in/align-justify/props.d.ts +10 -0
- package/lib/editor/menu/built-in/align-left/align-left.d.ts +2 -0
- package/lib/editor/menu/built-in/align-left/index.d.ts +3 -0
- package/lib/editor/menu/built-in/align-left/props.d.ts +10 -0
- package/lib/editor/menu/built-in/align-right/align-right.d.ts +2 -0
- package/lib/editor/menu/built-in/align-right/index.d.ts +3 -0
- package/lib/editor/menu/built-in/align-right/props.d.ts +10 -0
- package/lib/editor/menu/built-in/attachment/attachment.d.ts +2 -0
- package/lib/editor/menu/built-in/attachment/index.d.ts +3 -0
- package/lib/editor/menu/built-in/attachment/props.d.ts +26 -0
- package/lib/editor/menu/built-in/back-color/back-color.d.ts +2 -0
- package/lib/editor/menu/built-in/back-color/index.d.ts +3 -0
- package/lib/editor/menu/built-in/back-color/props.d.ts +15 -0
- package/lib/editor/menu/built-in/blockquote/blockquote.d.ts +2 -0
- package/lib/editor/menu/built-in/blockquote/index.d.ts +3 -0
- package/lib/editor/menu/built-in/blockquote/props.d.ts +10 -0
- package/lib/editor/menu/built-in/bold/bold.d.ts +2 -0
- package/lib/editor/menu/built-in/bold/index.d.ts +3 -0
- package/lib/editor/menu/built-in/bold/props.d.ts +10 -0
- package/lib/editor/menu/built-in/clear-format/clear-format.d.ts +2 -0
- package/lib/editor/menu/built-in/clear-format/index.d.ts +3 -0
- package/lib/editor/menu/built-in/clear-format/props.d.ts +10 -0
- package/lib/editor/menu/built-in/code/code.d.ts +2 -0
- package/lib/editor/menu/built-in/code/index.d.ts +3 -0
- package/lib/editor/menu/built-in/code/props.d.ts +10 -0
- package/lib/editor/menu/built-in/code-block/code-block-languages.d.ts +2 -0
- package/lib/editor/menu/built-in/code-block/code-block.d.ts +2 -0
- package/lib/editor/menu/built-in/code-block/index.d.ts +4 -0
- package/lib/editor/menu/built-in/code-block/props.d.ts +32 -0
- package/lib/editor/menu/built-in/color/color.d.ts +2 -0
- package/lib/editor/menu/built-in/color/index.d.ts +3 -0
- package/lib/editor/menu/built-in/color/props.d.ts +15 -0
- package/lib/editor/menu/built-in/decrease-indent/decrease-indent.d.ts +2 -0
- package/lib/editor/menu/built-in/decrease-indent/index.d.ts +3 -0
- package/lib/editor/menu/built-in/decrease-indent/props.d.ts +10 -0
- package/lib/editor/menu/built-in/emoji/emoji.d.ts +2 -0
- package/lib/editor/menu/built-in/emoji/index.d.ts +3 -0
- package/lib/editor/menu/built-in/emoji/props.d.ts +15 -0
- package/lib/editor/menu/built-in/font-family/font-family.d.ts +2 -0
- package/lib/editor/menu/built-in/font-family/index.d.ts +3 -0
- package/lib/editor/menu/built-in/font-family/props.d.ts +21 -0
- package/lib/editor/menu/built-in/font-size/font-size.d.ts +2 -0
- package/lib/editor/menu/built-in/font-size/index.d.ts +3 -0
- package/lib/editor/menu/built-in/font-size/props.d.ts +21 -0
- package/lib/editor/menu/built-in/full-screen/full-screen.d.ts +2 -0
- package/lib/editor/menu/built-in/full-screen/index.d.ts +3 -0
- package/lib/editor/menu/built-in/full-screen/props.d.ts +18 -0
- package/lib/editor/menu/built-in/heading/heading.d.ts +2 -0
- package/lib/editor/menu/built-in/heading/index.d.ts +3 -0
- package/lib/editor/menu/built-in/heading/props.d.ts +21 -0
- package/lib/editor/menu/built-in/horizontal/horizontal.d.ts +2 -0
- package/lib/editor/menu/built-in/horizontal/index.d.ts +3 -0
- package/lib/editor/menu/built-in/horizontal/props.d.ts +10 -0
- package/lib/editor/menu/built-in/image/image.d.ts +2 -0
- package/lib/editor/menu/built-in/image/index.d.ts +3 -0
- package/lib/editor/menu/built-in/image/props.d.ts +26 -0
- package/lib/editor/menu/built-in/increase-indent/increase-indent.d.ts +2 -0
- package/lib/editor/menu/built-in/increase-indent/index.d.ts +3 -0
- package/lib/editor/menu/built-in/increase-indent/props.d.ts +10 -0
- package/lib/editor/menu/built-in/index.d.ts +38 -0
- package/lib/editor/menu/built-in/italic/index.d.ts +3 -0
- package/lib/editor/menu/built-in/italic/italic.d.ts +2 -0
- package/lib/editor/menu/built-in/italic/props.d.ts +10 -0
- package/lib/editor/menu/built-in/line-height/index.d.ts +3 -0
- package/lib/editor/menu/built-in/line-height/line-height.d.ts +2 -0
- package/lib/editor/menu/built-in/line-height/props.d.ts +21 -0
- package/lib/editor/menu/built-in/link/index.d.ts +4 -0
- package/lib/editor/menu/built-in/link/link-unset.d.ts +2 -0
- package/lib/editor/menu/built-in/link/link.d.ts +2 -0
- package/lib/editor/menu/built-in/link/props.d.ts +21 -0
- package/lib/editor/menu/built-in/math/index.d.ts +3 -0
- package/lib/editor/menu/built-in/math/math.d.ts +2 -0
- package/lib/editor/menu/built-in/math/props.d.ts +11 -0
- package/lib/editor/menu/built-in/ordered-list/index.d.ts +3 -0
- package/lib/editor/menu/built-in/ordered-list/ordered-list.d.ts +2 -0
- package/lib/editor/menu/built-in/ordered-list/props.d.ts +11 -0
- package/lib/editor/menu/built-in/redo/index.d.ts +3 -0
- package/lib/editor/menu/built-in/redo/props.d.ts +6 -0
- package/lib/editor/menu/built-in/redo/redo.d.ts +2 -0
- package/lib/editor/menu/built-in/strikethrough/index.d.ts +3 -0
- package/lib/editor/menu/built-in/strikethrough/props.d.ts +10 -0
- package/lib/editor/menu/built-in/strikethrough/strikethrough.d.ts +2 -0
- package/lib/editor/menu/built-in/subscript/index.d.ts +3 -0
- package/lib/editor/menu/built-in/subscript/props.d.ts +10 -0
- package/lib/editor/menu/built-in/subscript/subscript.d.ts +2 -0
- package/lib/editor/menu/built-in/superscript/index.d.ts +3 -0
- package/lib/editor/menu/built-in/superscript/props.d.ts +10 -0
- package/lib/editor/menu/built-in/superscript/superscript.d.ts +2 -0
- package/lib/editor/menu/built-in/table/index.d.ts +9 -0
- package/lib/editor/menu/built-in/table/props.d.ts +97 -0
- package/lib/editor/menu/built-in/table/table-add-column.d.ts +2 -0
- package/lib/editor/menu/built-in/table/table-add-row.d.ts +2 -0
- package/lib/editor/menu/built-in/table/table-delete-column.d.ts +2 -0
- package/lib/editor/menu/built-in/table/table-delete-row.d.ts +2 -0
- package/lib/editor/menu/built-in/table/table-merge-cell.d.ts +2 -0
- package/lib/editor/menu/built-in/table/table-unset.d.ts +2 -0
- package/lib/editor/menu/built-in/table/table.d.ts +2 -0
- package/lib/editor/menu/built-in/task/index.d.ts +3 -0
- package/lib/editor/menu/built-in/task/props.d.ts +10 -0
- package/lib/editor/menu/built-in/task/task.d.ts +2 -0
- package/lib/editor/menu/built-in/underline/index.d.ts +3 -0
- package/lib/editor/menu/built-in/underline/props.d.ts +10 -0
- package/lib/editor/menu/built-in/underline/underline.d.ts +2 -0
- package/lib/editor/menu/built-in/undo/index.d.ts +3 -0
- package/lib/editor/menu/built-in/undo/props.d.ts +6 -0
- package/lib/editor/menu/built-in/undo/undo.d.ts +2 -0
- package/lib/editor/menu/built-in/unordered-list/index.d.ts +3 -0
- package/lib/editor/menu/built-in/unordered-list/props.d.ts +11 -0
- package/lib/editor/menu/built-in/unordered-list/unordered-list.d.ts +2 -0
- package/lib/editor/menu/built-in/video/index.d.ts +6 -0
- package/lib/editor/menu/built-in/video/props.d.ts +56 -0
- package/lib/editor/menu/built-in/video/video-controls.d.ts +2 -0
- package/lib/editor/menu/built-in/video/video-loop.d.ts +2 -0
- package/lib/editor/menu/built-in/video/video-muted.d.ts +2 -0
- package/lib/editor/menu/built-in/video/video.d.ts +2 -0
- package/lib/editor/menu/built-in/wrap-down/index.d.ts +3 -0
- package/lib/editor/menu/built-in/wrap-down/props.d.ts +15 -0
- package/lib/editor/menu/built-in/wrap-down/wrap-down.d.ts +2 -0
- package/lib/editor/menu/built-in/wrap-up/index.d.ts +3 -0
- package/lib/editor/menu/built-in/wrap-up/props.d.ts +15 -0
- package/lib/editor/menu/built-in/wrap-up/wrap-up.d.ts +2 -0
- package/lib/editor/menu/index.d.ts +4 -0
- package/lib/editor/menu/menu.d.ts +6 -0
- package/lib/editor/menu/props.d.ts +89 -0
- package/lib/editor/wrapper/index.d.ts +3 -0
- package/lib/editor/wrapper/props.d.ts +206 -0
- package/lib/editor/wrapper/render.d.ts +18 -0
- package/lib/editor/wrapper/wrapper.d.ts +6 -0
- package/lib/hooks/index.d.ts +1 -0
- package/lib/hooks/use-editor.d.ts +32 -0
- package/lib/index.d.ts +9 -0
- package/lib/kaitify-react.es.js +47868 -0
- package/lib/kaitify-react.umd.js +30 -0
- package/lib/locale/en-us.d.ts +31 -0
- package/lib/locale/index.d.ts +2 -0
- package/lib/locale/ja-jp.d.ts +31 -0
- package/lib/locale/ko-kr.d.ts +31 -0
- package/package.json +56 -0
- package/src/core/button/button.tsx +29 -0
- package/src/core/button/index.ts +3 -0
- package/src/core/button/props.ts +39 -0
- package/src/core/button/style.module.less +57 -0
- package/src/core/checkbox/checkbox.tsx +39 -0
- package/src/core/checkbox/index.ts +3 -0
- package/src/core/checkbox/props.ts +21 -0
- package/src/core/checkbox/style.module.less +99 -0
- package/src/core/divider/divider.tsx +17 -0
- package/src/core/divider/index.ts +2 -0
- package/src/core/divider/style.module.less +12 -0
- package/src/core/icon/icon.tsx +14 -0
- package/src/core/icon/index.ts +3 -0
- package/src/core/icon/props.ts +23 -0
- package/src/core/icon/style.module.less +19 -0
- package/src/core/popover/index.ts +3 -0
- package/src/core/popover/popover.tsx +286 -0
- package/src/core/popover/props.ts +97 -0
- package/src/core/popover/style.module.less +247 -0
- package/src/core/tabs/index.ts +3 -0
- package/src/core/tabs/props.ts +19 -0
- package/src/core/tabs/style.module.less +62 -0
- package/src/core/tabs/tabs.tsx +35 -0
- package/src/core/teleport/index.ts +3 -0
- package/src/core/teleport/props.ts +12 -0
- package/src/core/teleport/teleport.tsx +23 -0
- package/src/editor/bubble/bubble.tsx +244 -0
- package/src/editor/bubble/index.ts +3 -0
- package/src/editor/bubble/props.ts +65 -0
- package/src/editor/bubble/style.module.less +33 -0
- package/src/editor/menu/built-in/align-center/align-center.tsx +37 -0
- package/src/editor/menu/built-in/align-center/index.ts +3 -0
- package/src/editor/menu/built-in/align-center/props.ts +10 -0
- package/src/editor/menu/built-in/align-justify/align-justify.tsx +37 -0
- package/src/editor/menu/built-in/align-justify/index.ts +3 -0
- package/src/editor/menu/built-in/align-justify/props.ts +10 -0
- package/src/editor/menu/built-in/align-left/align-left.tsx +37 -0
- package/src/editor/menu/built-in/align-left/index.ts +3 -0
- package/src/editor/menu/built-in/align-left/props.ts +10 -0
- package/src/editor/menu/built-in/align-right/align-right.tsx +37 -0
- package/src/editor/menu/built-in/align-right/index.ts +3 -0
- package/src/editor/menu/built-in/align-right/props.ts +10 -0
- package/src/editor/menu/built-in/attachment/attachment.tsx +190 -0
- package/src/editor/menu/built-in/attachment/index.ts +3 -0
- package/src/editor/menu/built-in/attachment/props.ts +27 -0
- package/src/editor/menu/built-in/attachment/style.module.less +138 -0
- package/src/editor/menu/built-in/back-color/back-color.tsx +97 -0
- package/src/editor/menu/built-in/back-color/index.ts +3 -0
- package/src/editor/menu/built-in/back-color/props.ts +16 -0
- package/src/editor/menu/built-in/back-color/style.module.less +62 -0
- package/src/editor/menu/built-in/blockquote/blockquote.tsx +36 -0
- package/src/editor/menu/built-in/blockquote/index.ts +3 -0
- package/src/editor/menu/built-in/blockquote/props.ts +10 -0
- package/src/editor/menu/built-in/bold/bold.tsx +45 -0
- package/src/editor/menu/built-in/bold/index.ts +3 -0
- package/src/editor/menu/built-in/bold/props.ts +10 -0
- package/src/editor/menu/built-in/clear-format/clear-format.tsx +28 -0
- package/src/editor/menu/built-in/clear-format/index.ts +3 -0
- package/src/editor/menu/built-in/clear-format/props.ts +10 -0
- package/src/editor/menu/built-in/code/code.tsx +49 -0
- package/src/editor/menu/built-in/code/index.ts +3 -0
- package/src/editor/menu/built-in/code/props.ts +10 -0
- package/src/editor/menu/built-in/code-block/code-block-languages.tsx +73 -0
- package/src/editor/menu/built-in/code-block/code-block.tsx +36 -0
- package/src/editor/menu/built-in/code-block/index.ts +4 -0
- package/src/editor/menu/built-in/code-block/props.ts +32 -0
- package/src/editor/menu/built-in/color/color.tsx +96 -0
- package/src/editor/menu/built-in/color/index.ts +3 -0
- package/src/editor/menu/built-in/color/props.ts +16 -0
- package/src/editor/menu/built-in/color/style.module.less +62 -0
- package/src/editor/menu/built-in/decrease-indent/decrease-indent.tsx +31 -0
- package/src/editor/menu/built-in/decrease-indent/index.ts +3 -0
- package/src/editor/menu/built-in/decrease-indent/props.ts +10 -0
- package/src/editor/menu/built-in/emoji/emoji.tsx +143 -0
- package/src/editor/menu/built-in/emoji/index.ts +3 -0
- package/src/editor/menu/built-in/emoji/props.ts +16 -0
- package/src/editor/menu/built-in/emoji/style.module.less +26 -0
- package/src/editor/menu/built-in/font-family/font-family.tsx +99 -0
- package/src/editor/menu/built-in/font-family/index.ts +3 -0
- package/src/editor/menu/built-in/font-family/props.ts +20 -0
- package/src/editor/menu/built-in/font-size/font-size.tsx +110 -0
- package/src/editor/menu/built-in/font-size/index.ts +3 -0
- package/src/editor/menu/built-in/font-size/props.ts +20 -0
- package/src/editor/menu/built-in/full-screen/full-screen.tsx +66 -0
- package/src/editor/menu/built-in/full-screen/index.ts +3 -0
- package/src/editor/menu/built-in/full-screen/props.ts +18 -0
- package/src/editor/menu/built-in/heading/heading.tsx +101 -0
- package/src/editor/menu/built-in/heading/index.ts +3 -0
- package/src/editor/menu/built-in/heading/props.ts +20 -0
- package/src/editor/menu/built-in/horizontal/horizontal.tsx +40 -0
- package/src/editor/menu/built-in/horizontal/index.ts +3 -0
- package/src/editor/menu/built-in/horizontal/props.ts +10 -0
- package/src/editor/menu/built-in/image/image.tsx +189 -0
- package/src/editor/menu/built-in/image/index.ts +3 -0
- package/src/editor/menu/built-in/image/props.ts +27 -0
- package/src/editor/menu/built-in/image/style.module.less +138 -0
- package/src/editor/menu/built-in/increase-indent/increase-indent.tsx +31 -0
- package/src/editor/menu/built-in/increase-indent/index.ts +3 -0
- package/src/editor/menu/built-in/increase-indent/props.ts +10 -0
- package/src/editor/menu/built-in/index.ts +38 -0
- package/src/editor/menu/built-in/italic/index.ts +3 -0
- package/src/editor/menu/built-in/italic/italic.tsx +45 -0
- package/src/editor/menu/built-in/italic/props.ts +10 -0
- package/src/editor/menu/built-in/line-height/index.ts +3 -0
- package/src/editor/menu/built-in/line-height/line-height.tsx +81 -0
- package/src/editor/menu/built-in/line-height/props.ts +20 -0
- package/src/editor/menu/built-in/link/index.ts +4 -0
- package/src/editor/menu/built-in/link/link-unset.tsx +30 -0
- package/src/editor/menu/built-in/link/link.tsx +147 -0
- package/src/editor/menu/built-in/link/props.ts +23 -0
- package/src/editor/menu/built-in/link/style.module.less +51 -0
- package/src/editor/menu/built-in/math/index.ts +3 -0
- package/src/editor/menu/built-in/math/math.tsx +98 -0
- package/src/editor/menu/built-in/math/props.ts +12 -0
- package/src/editor/menu/built-in/math/style.module.less +54 -0
- package/src/editor/menu/built-in/ordered-list/index.ts +3 -0
- package/src/editor/menu/built-in/ordered-list/ordered-list.tsx +85 -0
- package/src/editor/menu/built-in/ordered-list/props.ts +12 -0
- package/src/editor/menu/built-in/ordered-list/style.module.less +16 -0
- package/src/editor/menu/built-in/redo/index.ts +3 -0
- package/src/editor/menu/built-in/redo/props.ts +6 -0
- package/src/editor/menu/built-in/redo/redo.tsx +30 -0
- package/src/editor/menu/built-in/strikethrough/index.ts +3 -0
- package/src/editor/menu/built-in/strikethrough/props.ts +10 -0
- package/src/editor/menu/built-in/strikethrough/strikethrough.tsx +45 -0
- package/src/editor/menu/built-in/subscript/index.ts +3 -0
- package/src/editor/menu/built-in/subscript/props.ts +10 -0
- package/src/editor/menu/built-in/subscript/subscript.tsx +45 -0
- package/src/editor/menu/built-in/superscript/index.ts +3 -0
- package/src/editor/menu/built-in/superscript/props.ts +10 -0
- package/src/editor/menu/built-in/superscript/superscript.tsx +45 -0
- package/src/editor/menu/built-in/table/index.ts +9 -0
- package/src/editor/menu/built-in/table/props.ts +105 -0
- package/src/editor/menu/built-in/table/style.module.less +63 -0
- package/src/editor/menu/built-in/table/table-add-column.tsx +31 -0
- package/src/editor/menu/built-in/table/table-add-row.tsx +31 -0
- package/src/editor/menu/built-in/table/table-delete-column.tsx +31 -0
- package/src/editor/menu/built-in/table/table-delete-row.tsx +31 -0
- package/src/editor/menu/built-in/table/table-merge-cell.tsx +34 -0
- package/src/editor/menu/built-in/table/table-unset.tsx +31 -0
- package/src/editor/menu/built-in/table/table.tsx +144 -0
- package/src/editor/menu/built-in/task/index.ts +3 -0
- package/src/editor/menu/built-in/task/props.ts +10 -0
- package/src/editor/menu/built-in/task/task.tsx +36 -0
- package/src/editor/menu/built-in/underline/index.ts +3 -0
- package/src/editor/menu/built-in/underline/props.ts +10 -0
- package/src/editor/menu/built-in/underline/underline.tsx +46 -0
- package/src/editor/menu/built-in/undo/index.ts +3 -0
- package/src/editor/menu/built-in/undo/props.ts +6 -0
- package/src/editor/menu/built-in/undo/undo.tsx +31 -0
- package/src/editor/menu/built-in/unordered-list/index.ts +3 -0
- package/src/editor/menu/built-in/unordered-list/props.ts +12 -0
- package/src/editor/menu/built-in/unordered-list/style.module.less +16 -0
- package/src/editor/menu/built-in/unordered-list/unordered-list.tsx +85 -0
- package/src/editor/menu/built-in/video/index.ts +6 -0
- package/src/editor/menu/built-in/video/props.ts +60 -0
- package/src/editor/menu/built-in/video/style.module.less +92 -0
- package/src/editor/menu/built-in/video/video-controls.tsx +44 -0
- package/src/editor/menu/built-in/video/video-loop.tsx +47 -0
- package/src/editor/menu/built-in/video/video-muted.tsx +48 -0
- package/src/editor/menu/built-in/video/video.tsx +138 -0
- package/src/editor/menu/built-in/wrap-down/index.ts +3 -0
- package/src/editor/menu/built-in/wrap-down/props.ts +16 -0
- package/src/editor/menu/built-in/wrap-down/wrap-down.tsx +49 -0
- package/src/editor/menu/built-in/wrap-up/index.ts +3 -0
- package/src/editor/menu/built-in/wrap-up/props.ts +16 -0
- package/src/editor/menu/built-in/wrap-up/wrap-up.tsx +52 -0
- package/src/editor/menu/index.ts +4 -0
- package/src/editor/menu/menu.tsx +176 -0
- package/src/editor/menu/props.ts +90 -0
- package/src/editor/menu/style.module.less +80 -0
- package/src/editor/wrapper/index.ts +3 -0
- package/src/editor/wrapper/props.ts +209 -0
- package/src/editor/wrapper/render.ts +79 -0
- package/src/editor/wrapper/style.module.less +10 -0
- package/src/editor/wrapper/wrapper.tsx +220 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-editor.ts +47 -0
- package/src/iconfont/iconfont.css +247 -0
- package/src/iconfont/iconfont.ttf +0 -0
- package/src/iconfont/iconfont.woff +0 -0
- package/src/index.ts +20 -0
- package/src/locale/en-us.ts +30 -0
- package/src/locale/index.ts +18 -0
- package/src/locale/ja-jp.ts +30 -0
- package/src/locale/ko-kr.ts +30 -0
- package/src/var.less +19 -0
- package/tsconfig.json +32 -0
- package/tsconfig.node.json +11 -0
- package/vite-env.d.ts +5 -0
- package/vite.config.ts +58 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
本地上传: string;
|
|
3
|
+
远程地址: string;
|
|
4
|
+
附件名称: string;
|
|
5
|
+
附件地址: string;
|
|
6
|
+
附件: string;
|
|
7
|
+
插入: string;
|
|
8
|
+
更新: string;
|
|
9
|
+
默认颜色: string;
|
|
10
|
+
默认字体: string;
|
|
11
|
+
默认字号: string;
|
|
12
|
+
默认行高: string;
|
|
13
|
+
正文: string;
|
|
14
|
+
图片名称: string;
|
|
15
|
+
图片地址: string;
|
|
16
|
+
图片: string;
|
|
17
|
+
链接地址: string;
|
|
18
|
+
新窗口打开: string;
|
|
19
|
+
链接文字: string;
|
|
20
|
+
是否自动播放: string;
|
|
21
|
+
视频地址: string;
|
|
22
|
+
输入Latex数学公式: string;
|
|
23
|
+
一级标题: string;
|
|
24
|
+
二级标题: string;
|
|
25
|
+
三级标题: string;
|
|
26
|
+
四级标题: string;
|
|
27
|
+
五级标题: string;
|
|
28
|
+
六级标题: string;
|
|
29
|
+
自动识别: string;
|
|
30
|
+
};
|
|
31
|
+
export default _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
本地上传: string;
|
|
3
|
+
远程地址: string;
|
|
4
|
+
附件名称: string;
|
|
5
|
+
附件地址: string;
|
|
6
|
+
附件: string;
|
|
7
|
+
插入: string;
|
|
8
|
+
更新: string;
|
|
9
|
+
默认颜色: string;
|
|
10
|
+
默认字体: string;
|
|
11
|
+
默认字号: string;
|
|
12
|
+
默认行高: string;
|
|
13
|
+
正文: string;
|
|
14
|
+
图片名称: string;
|
|
15
|
+
图片地址: string;
|
|
16
|
+
图片: string;
|
|
17
|
+
链接地址: string;
|
|
18
|
+
新窗口打开: string;
|
|
19
|
+
链接文字: string;
|
|
20
|
+
是否自动播放: string;
|
|
21
|
+
视频地址: string;
|
|
22
|
+
输入Latex数学公式: string;
|
|
23
|
+
一级标题: string;
|
|
24
|
+
二级标题: string;
|
|
25
|
+
三级标题: string;
|
|
26
|
+
四级标题: string;
|
|
27
|
+
五级标题: string;
|
|
28
|
+
六级标题: string;
|
|
29
|
+
自动识别: string;
|
|
30
|
+
};
|
|
31
|
+
export default _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
本地上传: string;
|
|
3
|
+
远程地址: string;
|
|
4
|
+
附件名称: string;
|
|
5
|
+
附件地址: string;
|
|
6
|
+
附件: string;
|
|
7
|
+
插入: string;
|
|
8
|
+
更新: string;
|
|
9
|
+
默认颜色: string;
|
|
10
|
+
默认字体: string;
|
|
11
|
+
默认字号: string;
|
|
12
|
+
默认行高: string;
|
|
13
|
+
正文: string;
|
|
14
|
+
图片名称: string;
|
|
15
|
+
图片地址: string;
|
|
16
|
+
图片: string;
|
|
17
|
+
链接地址: string;
|
|
18
|
+
新窗口打开: string;
|
|
19
|
+
链接文字: string;
|
|
20
|
+
是否自动播放: string;
|
|
21
|
+
视频地址: string;
|
|
22
|
+
输入Latex数学公式: string;
|
|
23
|
+
一级标题: string;
|
|
24
|
+
二级标题: string;
|
|
25
|
+
三级标题: string;
|
|
26
|
+
四级标题: string;
|
|
27
|
+
五级标题: string;
|
|
28
|
+
六级标题: string;
|
|
29
|
+
自动识别: string;
|
|
30
|
+
};
|
|
31
|
+
export default _default;
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kaitify/react",
|
|
3
|
+
"version": "0.0.1-beta.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"author": "so-better",
|
|
7
|
+
"main": "lib/kaitify-react.umd.js",
|
|
8
|
+
"module": "lib/kaitify-react.es.js",
|
|
9
|
+
"types": "lib/index.d.ts",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"description": "基于@kaitify/core开发的react富文本编辑器核心库",
|
|
12
|
+
"scripts": {
|
|
13
|
+
"dev": "vite",
|
|
14
|
+
"lib": "tsc && vite build",
|
|
15
|
+
"docs:dev": "vitepress dev docs",
|
|
16
|
+
"docs:build": "vitepress build docs"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@iconify/react": "^6.0.2",
|
|
20
|
+
"@kaitify/core": "0.0.2-beta.8",
|
|
21
|
+
"@popperjs/core": "^2.11.8",
|
|
22
|
+
"classnames": "^2.5.1",
|
|
23
|
+
"dap-util": "^1.6.0",
|
|
24
|
+
"react": "^18.3.1",
|
|
25
|
+
"react-dom": "^18.3.1",
|
|
26
|
+
"react-transition-group": "^4.4.5"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "^24.6.0",
|
|
30
|
+
"@types/react": "^18.3.1",
|
|
31
|
+
"@types/react-dom": "^18.3.1",
|
|
32
|
+
"@types/react-transition-group": "^4.4.5",
|
|
33
|
+
"@vitejs/plugin-react": "^5.0.4",
|
|
34
|
+
"less": "^3.0.4",
|
|
35
|
+
"less-loader": "^5.0.0",
|
|
36
|
+
"terser": "^5.16.9",
|
|
37
|
+
"typescript": "~5.9.3",
|
|
38
|
+
"vite": "^5.4.10",
|
|
39
|
+
"vite-plugin-css-injected-by-js": "^3.5.1",
|
|
40
|
+
"vite-plugin-dts": "^4.3.0",
|
|
41
|
+
"vitepress": "^1.5.0"
|
|
42
|
+
},
|
|
43
|
+
"browserslist": [
|
|
44
|
+
"> 1%",
|
|
45
|
+
"last 2 versions",
|
|
46
|
+
"not dead"
|
|
47
|
+
],
|
|
48
|
+
"repository": {
|
|
49
|
+
"type": "git",
|
|
50
|
+
"url": "https://github.com/so-better/kaitify-react"
|
|
51
|
+
},
|
|
52
|
+
"publishConfig": {
|
|
53
|
+
"access": "public",
|
|
54
|
+
"registry": "https://registry.npmjs.org"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import classNames from 'classnames'
|
|
2
|
+
import { useEditor } from '@/hooks'
|
|
3
|
+
import { ButtonPropsType } from './props'
|
|
4
|
+
import styles from './style.module.less'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* 菜单按钮组件
|
|
8
|
+
*/
|
|
9
|
+
export default function Button(props: ButtonPropsType) {
|
|
10
|
+
const { dark } = useEditor()
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<button
|
|
14
|
+
className={classNames(styles['kaitify-button'], props.className, {
|
|
15
|
+
[styles['kaitify-button-active']]: props.active,
|
|
16
|
+
[styles['kaitify-button-block']]: props.block,
|
|
17
|
+
[styles['kaitify-button-large']]: props.large,
|
|
18
|
+
[styles['kaitify-dark']]: dark
|
|
19
|
+
})}
|
|
20
|
+
style={props.style}
|
|
21
|
+
disabled={props.disabled}
|
|
22
|
+
type='button'
|
|
23
|
+
role='button'
|
|
24
|
+
onClick={props.onClick}
|
|
25
|
+
>
|
|
26
|
+
{props.children}
|
|
27
|
+
</button>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 按钮组件的属性类型
|
|
5
|
+
*/
|
|
6
|
+
export type ButtonPropsType = {
|
|
7
|
+
/**
|
|
8
|
+
* 是否禁用
|
|
9
|
+
*/
|
|
10
|
+
disabled?: boolean
|
|
11
|
+
/**
|
|
12
|
+
* 是否激活
|
|
13
|
+
*/
|
|
14
|
+
active?: boolean
|
|
15
|
+
/**
|
|
16
|
+
* 是否块级展示
|
|
17
|
+
*/
|
|
18
|
+
block?: boolean
|
|
19
|
+
/**
|
|
20
|
+
* 是否更大的按钮
|
|
21
|
+
*/
|
|
22
|
+
large?: boolean
|
|
23
|
+
/**
|
|
24
|
+
* 默认插槽
|
|
25
|
+
*/
|
|
26
|
+
children?: ReactNode
|
|
27
|
+
/**
|
|
28
|
+
* 样式
|
|
29
|
+
*/
|
|
30
|
+
style?: CSSProperties
|
|
31
|
+
/**
|
|
32
|
+
* 样式类
|
|
33
|
+
*/
|
|
34
|
+
className?: string
|
|
35
|
+
/**
|
|
36
|
+
* 点击
|
|
37
|
+
*/
|
|
38
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>
|
|
39
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
.kaitify-button {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
justify-content: center;
|
|
4
|
+
align-items: center;
|
|
5
|
+
padding: 0 @padding;
|
|
6
|
+
height: 28px;
|
|
7
|
+
background: @background-color;
|
|
8
|
+
color: @font-color;
|
|
9
|
+
font-size: @font-size;
|
|
10
|
+
font-family: @font-family;
|
|
11
|
+
border: none;
|
|
12
|
+
border-radius: @border-radius;
|
|
13
|
+
transition: background 300ms, color 300ms;
|
|
14
|
+
|
|
15
|
+
&,
|
|
16
|
+
*,
|
|
17
|
+
*::before,
|
|
18
|
+
*::after {
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
outline: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&.kaitify-dark {
|
|
24
|
+
background: @background-color-dark;
|
|
25
|
+
color: @font-color-dark;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:not(:disabled):hover {
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
background: @lightest-theme;
|
|
31
|
+
color: @theme;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:not(:disabled):active {
|
|
35
|
+
background: @lighter-theme;
|
|
36
|
+
color: @theme;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:not(:disabled).kaitify-button-active {
|
|
40
|
+
background: @lighter-theme;
|
|
41
|
+
color: @theme;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:disabled {
|
|
45
|
+
opacity: 0.6;
|
|
46
|
+
cursor: not-allowed;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.kaitify-button-block {
|
|
50
|
+
display: flex;
|
|
51
|
+
width: 100%;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&.kaitify-button-large {
|
|
55
|
+
height: 32px;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import classNames from 'classnames'
|
|
3
|
+
import { useEditor } from '@/hooks'
|
|
4
|
+
import { CheckboxPropsType } from './props'
|
|
5
|
+
import styles from './style.module.less'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 复选框
|
|
9
|
+
*/
|
|
10
|
+
export default function Checkbox(props: CheckboxPropsType) {
|
|
11
|
+
const { dark } = useEditor()
|
|
12
|
+
|
|
13
|
+
//复选框变更
|
|
14
|
+
const onChange = (e: React.ChangeEvent) => {
|
|
15
|
+
if (props.disabled) {
|
|
16
|
+
return
|
|
17
|
+
}
|
|
18
|
+
const checked = (e.target as HTMLInputElement).checked
|
|
19
|
+
props.onChange?.(checked)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<label
|
|
24
|
+
className={classNames(styles['kaitify-checkbox'], {
|
|
25
|
+
[styles['kaitify-disabled']]: props.disabled,
|
|
26
|
+
[styles['kaitify-dark']]: dark
|
|
27
|
+
})}
|
|
28
|
+
>
|
|
29
|
+
<span
|
|
30
|
+
className={classNames(styles['kaitify-checkbox-el'], {
|
|
31
|
+
[styles['kaitify-checkbox-active']]: props.checked
|
|
32
|
+
})}
|
|
33
|
+
>
|
|
34
|
+
<input type='checkbox' onChange={onChange} disabled={props.disabled} />
|
|
35
|
+
</span>
|
|
36
|
+
<span className={styles['kaitify-checkbox-label']}>{props.label}</span>
|
|
37
|
+
</label>
|
|
38
|
+
)
|
|
39
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 复选框组件属性类型
|
|
3
|
+
*/
|
|
4
|
+
export type CheckboxPropsType = {
|
|
5
|
+
/**
|
|
6
|
+
* 是否选中
|
|
7
|
+
*/
|
|
8
|
+
checked?: boolean
|
|
9
|
+
/**
|
|
10
|
+
* 复选框选择事件
|
|
11
|
+
*/
|
|
12
|
+
onChange?: (checked: boolean) => void
|
|
13
|
+
/**
|
|
14
|
+
* 是否禁用
|
|
15
|
+
*/
|
|
16
|
+
disabled?: boolean
|
|
17
|
+
/**
|
|
18
|
+
* label文字
|
|
19
|
+
*/
|
|
20
|
+
label?: string
|
|
21
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
.kaitify-checkbox {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
justify-content: flex-start;
|
|
4
|
+
align-items: center;
|
|
5
|
+
font-size: @font-size;
|
|
6
|
+
color: @font-color;
|
|
7
|
+
line-height: 1;
|
|
8
|
+
opacity: 0.8;
|
|
9
|
+
transition: opacity 300ms;
|
|
10
|
+
|
|
11
|
+
&,
|
|
12
|
+
*,
|
|
13
|
+
*::before,
|
|
14
|
+
*::after {
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
outline: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.kaitify-checkbox-el {
|
|
20
|
+
display: inline-flex;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
align-items: center;
|
|
23
|
+
width: 15px;
|
|
24
|
+
height: 15px;
|
|
25
|
+
position: relative;
|
|
26
|
+
border: 1px solid @border-color;
|
|
27
|
+
border-radius: @border-radius;
|
|
28
|
+
user-select: none;
|
|
29
|
+
touch-action: none;
|
|
30
|
+
transition: all 300ms;
|
|
31
|
+
|
|
32
|
+
&::before {
|
|
33
|
+
content: '';
|
|
34
|
+
position: absolute;
|
|
35
|
+
left: 4px;
|
|
36
|
+
top: 1px;
|
|
37
|
+
width: 0px;
|
|
38
|
+
height: 0px;
|
|
39
|
+
margin-top: 5px;
|
|
40
|
+
border: solid @theme;
|
|
41
|
+
border-width: 0;
|
|
42
|
+
transform: rotate(45deg);
|
|
43
|
+
border-color: #fff;
|
|
44
|
+
user-select: none;
|
|
45
|
+
touch-action: none;
|
|
46
|
+
transition: width 100ms ease-in-out, height 200ms ease-in-out, margin-top 200ms ease-in-out;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.kaitify-checkbox-active {
|
|
50
|
+
background: @theme;
|
|
51
|
+
border-color: @theme;
|
|
52
|
+
|
|
53
|
+
&::before {
|
|
54
|
+
margin-top: 0;
|
|
55
|
+
width: 5px;
|
|
56
|
+
height: 10px;
|
|
57
|
+
border-width: 0 2px 2px 0;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
input[type='checkbox'] {
|
|
62
|
+
opacity: 0;
|
|
63
|
+
position: absolute;
|
|
64
|
+
left: 0;
|
|
65
|
+
top: 0;
|
|
66
|
+
z-index: 1;
|
|
67
|
+
width: 100%;
|
|
68
|
+
height: 100%;
|
|
69
|
+
margin: 0;
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.kaitify-checkbox-label {
|
|
75
|
+
margin-left: @small-margin;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&:not(.kaitify-disabled):hover {
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
opacity: 1;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&.kaitify-disabled {
|
|
84
|
+
opacity: 0.5;
|
|
85
|
+
cursor: not-allowed;
|
|
86
|
+
|
|
87
|
+
.kaitify-checkbox-el > input[type='checkbox'] {
|
|
88
|
+
cursor: not-allowed;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&.kaitify-dark {
|
|
93
|
+
color: @font-color-dark;
|
|
94
|
+
|
|
95
|
+
.kaitify-checkbox-el {
|
|
96
|
+
border-color: @border-color-dark;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import classNames from 'classnames'
|
|
2
|
+
import { useEditor } from '@/hooks'
|
|
3
|
+
import styles from './style.module.less'
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 分隔线
|
|
7
|
+
*/
|
|
8
|
+
export default function Divider() {
|
|
9
|
+
const { dark } = useEditor()
|
|
10
|
+
return (
|
|
11
|
+
<div
|
|
12
|
+
className={classNames(styles['kaitify-divider'], {
|
|
13
|
+
[styles['kaitify-dark']]: dark
|
|
14
|
+
})}
|
|
15
|
+
/>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import classNames from 'classnames'
|
|
2
|
+
import { Icon as IconifyIcon } from '@iconify/react'
|
|
3
|
+
import { IconPropsType } from './props'
|
|
4
|
+
import styles from './style.module.less'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* 图标组件
|
|
8
|
+
*/
|
|
9
|
+
export default function Icon(props: IconPropsType) {
|
|
10
|
+
if (props.name.startsWith('kaitify-icon-')) {
|
|
11
|
+
return <i className={classNames(styles['kaitify-icon'], props.name, props.className)} style={{ fontSize: props.size, ...props.style }} />
|
|
12
|
+
}
|
|
13
|
+
return <IconifyIcon mode='svg' icon={props.name} className={classNames(styles['kaitify-icon'], props.className)} style={{ fontSize: props.size, ...props.style }} />
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CSSProperties } from 'react'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 图标组件的属性类型
|
|
5
|
+
*/
|
|
6
|
+
export type IconPropsType = {
|
|
7
|
+
/**
|
|
8
|
+
* iconify的图标name
|
|
9
|
+
*/
|
|
10
|
+
name: string
|
|
11
|
+
/**
|
|
12
|
+
* 图标大小,如果是数值默认单位为px
|
|
13
|
+
*/
|
|
14
|
+
size?: string | number
|
|
15
|
+
/**
|
|
16
|
+
* 样式
|
|
17
|
+
*/
|
|
18
|
+
style?: CSSProperties
|
|
19
|
+
/**
|
|
20
|
+
* 样式类
|
|
21
|
+
*/
|
|
22
|
+
className?: string
|
|
23
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: 'kaitify-icon';
|
|
3
|
+
src: url('../../iconfont/iconfont.woff') format('woff'), url('../../iconfont/iconfont.ttf?t=2024051301') format('truetype');
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.kaitify-icon {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
align-items: center;
|
|
10
|
+
color: inherit;
|
|
11
|
+
font-family: 'kaitify-icon' !important;
|
|
12
|
+
font-size: inherit;
|
|
13
|
+
font-style: normal;
|
|
14
|
+
-webkit-font-smoothing: antialiased;
|
|
15
|
+
-moz-osx-font-smoothing: grayscale;
|
|
16
|
+
line-height: 1;
|
|
17
|
+
vertical-align: middle;
|
|
18
|
+
box-sizing: border-box;
|
|
19
|
+
}
|