├── .browserslistrc ├── .commitlintrc.js ├── .dockerignore ├── .editorconfig ├── .gitattributes ├── .gitconfig ├── .gitignore ├── .lintstagedrc.mjs ├── .node-version ├── .npmrc ├── .prettierignore ├── .prettierrc.mjs ├── .stylelintignore ├── Dockerfile ├── LICENSE ├── README.md ├── apps └── web-antd │ ├── .env │ ├── .env.analyze │ ├── .env.development │ ├── .env.production │ ├── index.html │ ├── package.json │ ├── postcss.config.mjs │ ├── public │ └── favicon.ico │ ├── src │ ├── adapter │ │ ├── component │ │ │ └── index.ts │ │ ├── form.ts │ │ └── vxe-table.ts │ ├── api │ │ ├── core │ │ │ ├── auth.ts │ │ │ ├── index.ts │ │ │ ├── menu.ts │ │ │ └── user.ts │ │ ├── data-permission.ts │ │ ├── dept.ts │ │ ├── index.ts │ │ ├── log.ts │ │ ├── monitor.ts │ │ ├── oauth2.ts │ │ ├── plugin.ts │ │ ├── request.ts │ │ └── role.ts │ ├── app.vue │ ├── bootstrap.ts │ ├── layouts │ │ ├── auth.vue │ │ ├── basic.vue │ │ └── index.ts │ ├── locales │ │ ├── README.md │ │ ├── index.ts │ │ └── langs │ │ │ ├── en-US │ │ │ └── page.json │ │ │ └── zh-CN │ │ │ └── page.json │ ├── main.ts │ ├── preferences.ts │ ├── router │ │ ├── access.ts │ │ ├── guard.ts │ │ ├── index.ts │ │ └── routes │ │ │ ├── core.ts │ │ │ ├── index.ts │ │ │ └── modules │ │ │ ├── automation.ts │ │ │ ├── dashboard.ts │ │ │ ├── log.ts │ │ │ ├── monitor.ts │ │ │ ├── profile.ts │ │ │ ├── system.ts │ │ │ └── vben.ts │ ├── store │ │ ├── auth.ts │ │ ├── index.ts │ │ └── websocket.ts │ ├── types │ │ ├── index.ts │ │ └── pagination.ts │ └── views │ │ ├── _core │ │ ├── README.md │ │ ├── about │ │ │ └── index.vue │ │ ├── authentication │ │ │ ├── code-login.vue │ │ │ ├── forget-password.vue │ │ │ ├── login.vue │ │ │ ├── oauth2-login.vue │ │ │ ├── qrcode-login.vue │ │ │ └── register.vue │ │ ├── fallback │ │ │ ├── coming-soon.vue │ │ │ ├── forbidden.vue │ │ │ ├── internal-error.vue │ │ │ ├── not-found.vue │ │ │ └── offline.vue │ │ └── profile │ │ │ ├── basic-info.vue │ │ │ ├── data.ts │ │ │ ├── index.vue │ │ │ ├── online-device.vue │ │ │ └── reset-password.vue │ │ ├── automation │ │ └── code-generator │ │ │ └── index.vue │ │ ├── dashboard │ │ ├── analytics │ │ │ ├── analytics-trends.vue │ │ │ ├── analytics-visits-data.vue │ │ │ ├── analytics-visits-sales.vue │ │ │ ├── analytics-visits-source.vue │ │ │ ├── analytics-visits.vue │ │ │ └── index.vue │ │ └── workspace │ │ │ └── index.vue │ │ ├── log │ │ ├── login │ │ │ ├── data.ts │ │ │ └── index.vue │ │ └── opera │ │ │ ├── data.ts │ │ │ └── index.vue │ │ ├── monitor │ │ ├── online │ │ │ ├── data.ts │ │ │ └── index.vue │ │ ├── redis │ │ │ ├── components │ │ │ │ ├── active-series.vue │ │ │ │ └── commands-series.vue │ │ │ └── index.vue │ │ └── server │ │ │ └── index.vue │ │ ├── oauth2 │ │ └── index.vue │ │ └── system │ │ ├── data-permission │ │ ├── rule │ │ │ ├── data.ts │ │ │ └── index.vue │ │ └── scope │ │ │ ├── data.ts │ │ │ └── index.vue │ │ ├── dept │ │ ├── data.ts │ │ └── index.vue │ │ ├── menu │ │ ├── data.ts │ │ └── index.vue │ │ ├── plugin │ │ ├── data.ts │ │ └── index.vue │ │ ├── role │ │ ├── data-rule-drawer.vue │ │ ├── data.ts │ │ ├── index.vue │ │ └── perm-drawer.vue │ │ └── user │ │ ├── data.ts │ │ └── index.vue │ ├── tailwind.config.mjs │ ├── tsconfig.json │ ├── tsconfig.node.json │ └── vite.config.mts ├── cspell.json ├── docker-compose.yml ├── eslint.config.mjs ├── internal ├── lint-configs │ ├── commitlint-config │ │ ├── index.mjs │ │ └── package.json │ ├── eslint-config │ │ ├── build.config.ts │ │ ├── package.json │ │ ├── src │ │ │ ├── configs │ │ │ │ ├── command.ts │ │ │ │ ├── comments.ts │ │ │ │ ├── disableds.ts │ │ │ │ ├── ignores.ts │ │ │ │ ├── import.ts │ │ │ │ ├── index.ts │ │ │ │ ├── javascript.ts │ │ │ │ ├── jsdoc.ts │ │ │ │ ├── jsonc.ts │ │ │ │ ├── node.ts │ │ │ │ ├── perfectionist.ts │ │ │ │ ├── prettier.ts │ │ │ │ ├── regexp.ts │ │ │ │ ├── test.ts │ │ │ │ ├── turbo.ts │ │ │ │ ├── typescript.ts │ │ │ │ ├── unicorn.ts │ │ │ │ └── vue.ts │ │ │ ├── custom-config.ts │ │ │ ├── index.ts │ │ │ └── util.ts │ │ └── tsconfig.json │ ├── prettier-config │ │ ├── index.mjs │ │ └── package.json │ └── stylelint-config │ │ ├── index.mjs │ │ └── package.json ├── node-utils │ ├── build.config.ts │ ├── package.json │ ├── src │ │ ├── __tests__ │ │ │ ├── hash.test.ts │ │ │ └── path.test.ts │ │ ├── constants.ts │ │ ├── date.ts │ │ ├── fs.ts │ │ ├── git.ts │ │ ├── hash.ts │ │ ├── index.ts │ │ ├── monorepo.ts │ │ ├── path.ts │ │ ├── prettier.ts │ │ └── spinner.ts │ └── tsconfig.json ├── tailwind-config │ ├── build.config.ts │ ├── package.json │ ├── src │ │ ├── index.ts │ │ ├── module.d.ts │ │ ├── plugins │ │ │ └── entry.ts │ │ └── postcss.config.ts │ └── tsconfig.json ├── tsconfig │ ├── base.json │ ├── library.json │ ├── node.json │ ├── package.json │ ├── web-app.json │ └── web.json └── vite-config │ ├── build.config.ts │ ├── package.json │ ├── src │ ├── config │ │ ├── application.ts │ │ ├── common.ts │ │ ├── index.ts │ │ └── library.ts │ ├── index.ts │ ├── options.ts │ ├── plugins │ │ ├── archiver.ts │ │ ├── extra-app-config.ts │ │ ├── importmap.ts │ │ ├── index.ts │ │ ├── inject-app-loading │ │ │ ├── README.md │ │ │ ├── default-loading-antd.html │ │ │ ├── default-loading.html │ │ │ └── index.ts │ │ ├── inject-metadata.ts │ │ ├── license.ts │ │ ├── nitro-mock.ts │ │ ├── print.ts │ │ └── vxe-table.ts │ ├── typing.ts │ └── utils │ │ └── env.ts │ └── tsconfig.json ├── lefthook.yml ├── package.json ├── packages ├── @core │ ├── README.md │ ├── base │ │ ├── README.md │ │ ├── design │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ ├── css │ │ │ │ │ ├── global.css │ │ │ │ │ ├── nprogress.css │ │ │ │ │ ├── transition.css │ │ │ │ │ └── ui.css │ │ │ │ ├── design-tokens │ │ │ │ │ ├── dark.css │ │ │ │ │ ├── default.css │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ └── scss-bem │ │ │ │ │ ├── bem.scss │ │ │ │ │ └── constants.scss │ │ │ ├── tsconfig.json │ │ │ └── vite.config.mts │ │ ├── icons │ │ │ ├── build.config.ts │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ ├── create-icon.ts │ │ │ │ ├── index.ts │ │ │ │ └── lucide.ts │ │ │ └── tsconfig.json │ │ ├── shared │ │ │ ├── build.config.ts │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ ├── cache │ │ │ │ │ ├── __tests__ │ │ │ │ │ │ └── storage-manager.test.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── storage-manager.ts │ │ │ │ │ └── types.ts │ │ │ │ ├── color │ │ │ │ │ ├── __tests__ │ │ │ │ │ │ └── convert.test.ts │ │ │ │ │ ├── color.ts │ │ │ │ │ ├── convert.ts │ │ │ │ │ ├── generator.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── constants │ │ │ │ │ ├── globals.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── vben.ts │ │ │ │ ├── global-state.ts │ │ │ │ ├── store.ts │ │ │ │ └── utils │ │ │ │ │ ├── __tests__ │ │ │ │ │ ├── diff.test.ts │ │ │ │ │ ├── dom.test.ts │ │ │ │ │ ├── inference.test.ts │ │ │ │ │ ├── letter.test.ts │ │ │ │ │ ├── state-handler.test.ts │ │ │ │ │ ├── tree.test.ts │ │ │ │ │ ├── unique.test.ts │ │ │ │ │ ├── update-css-variables.test.ts │ │ │ │ │ ├── util.test.ts │ │ │ │ │ └── window.test.ts │ │ │ │ │ ├── cn.ts │ │ │ │ │ ├── date.ts │ │ │ │ │ ├── diff.ts │ │ │ │ │ ├── dom.ts │ │ │ │ │ ├── download.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── inference.ts │ │ │ │ │ ├── letter.ts │ │ │ │ │ ├── merge.ts │ │ │ │ │ ├── nprogress.ts │ │ │ │ │ ├── state-handler.ts │ │ │ │ │ ├── to.ts │ │ │ │ │ ├── tree.ts │ │ │ │ │ ├── unique.ts │ │ │ │ │ ├── update-css-variables.ts │ │ │ │ │ ├── util.ts │ │ │ │ │ └── window.ts │ │ │ └── tsconfig.json │ │ └── typings │ │ │ ├── build.config.ts │ │ │ ├── package.json │ │ │ ├── src │ │ │ ├── app.d.ts │ │ │ ├── basic.d.ts │ │ │ ├── helper.d.ts │ │ │ ├── index.ts │ │ │ ├── menu-record.ts │ │ │ ├── tabs.ts │ │ │ └── vue-router.d.ts │ │ │ ├── tsconfig.json │ │ │ └── vue-router.d.ts │ ├── composables │ │ ├── build.config.ts │ │ ├── package.json │ │ ├── src │ │ │ ├── __tests__ │ │ │ │ └── use-sortable.test.ts │ │ │ ├── index.ts │ │ │ ├── use-is-mobile.ts │ │ │ ├── use-layout-style.ts │ │ │ ├── use-namespace.ts │ │ │ ├── use-priority-value.ts │ │ │ ├── use-scroll-lock.ts │ │ │ ├── use-simple-locale │ │ │ │ ├── README.md │ │ │ │ ├── index.ts │ │ │ │ └── messages.ts │ │ │ └── use-sortable.ts │ │ └── tsconfig.json │ ├── preferences │ │ ├── __tests__ │ │ │ ├── __snapshots__ │ │ │ │ └── config.test.ts.snap │ │ │ ├── config.test.ts │ │ │ └── preferences.test.ts │ │ ├── build.config.ts │ │ ├── package.json │ │ ├── src │ │ │ ├── config.ts │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── preferences.ts │ │ │ ├── types.ts │ │ │ ├── update-css-variables.ts │ │ │ └── use-preferences.ts │ │ └── tsconfig.json │ └── ui-kit │ │ ├── README.md │ │ ├── form-ui │ │ ├── __tests__ │ │ │ └── form-api.test.ts │ │ ├── build.config.ts │ │ ├── package.json │ │ ├── postcss.config.mjs │ │ ├── src │ │ │ ├── components │ │ │ │ └── form-actions.vue │ │ │ ├── config.ts │ │ │ ├── form-api.ts │ │ │ ├── form-render │ │ │ │ ├── context.ts │ │ │ │ ├── dependencies.ts │ │ │ │ ├── expandable.ts │ │ │ │ ├── form-field.vue │ │ │ │ ├── form-label.vue │ │ │ │ ├── form.vue │ │ │ │ ├── helper.ts │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── types.ts │ │ │ ├── use-form-context.ts │ │ │ ├── use-vben-form.ts │ │ │ ├── vben-form.vue │ │ │ └── vben-use-form.vue │ │ ├── tailwind.config.mjs │ │ └── tsconfig.json │ │ ├── layout-ui │ │ ├── build.config.ts │ │ ├── package.json │ │ ├── postcss.config.mjs │ │ ├── src │ │ │ ├── components │ │ │ │ ├── index.ts │ │ │ │ ├── layout-content.vue │ │ │ │ ├── layout-footer.vue │ │ │ │ ├── layout-header.vue │ │ │ │ ├── layout-sidebar.vue │ │ │ │ ├── layout-tabbar.vue │ │ │ │ └── widgets │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── sidebar-collapse-button.vue │ │ │ │ │ └── sidebar-fixed-button.vue │ │ │ ├── hooks │ │ │ │ └── use-layout.ts │ │ │ ├── index.ts │ │ │ ├── vben-layout.ts │ │ │ └── vben-layout.vue │ │ ├── tailwind.config.mjs │ │ └── tsconfig.json │ │ ├── menu-ui │ │ ├── README.md │ │ ├── build.config.ts │ │ ├── package.json │ │ ├── postcss.config.mjs │ │ ├── src │ │ │ ├── components │ │ │ │ ├── collapse-transition.vue │ │ │ │ ├── index.ts │ │ │ │ ├── menu-badge-dot.vue │ │ │ │ ├── menu-badge.vue │ │ │ │ ├── menu-item.vue │ │ │ │ ├── menu.vue │ │ │ │ ├── normal-menu │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── normal-menu.ts │ │ │ │ │ └── normal-menu.vue │ │ │ │ ├── sub-menu-content.vue │ │ │ │ └── sub-menu.vue │ │ │ ├── hooks │ │ │ │ ├── index.ts │ │ │ │ ├── use-menu-context.ts │ │ │ │ ├── use-menu-scroll.ts │ │ │ │ └── use-menu.ts │ │ │ ├── index.ts │ │ │ ├── menu.vue │ │ │ ├── sub-menu.vue │ │ │ ├── types.ts │ │ │ └── utils │ │ │ │ └── index.ts │ │ ├── tailwind.config.mjs │ │ └── tsconfig.json │ │ ├── popup-ui │ │ ├── build.config.ts │ │ ├── package.json │ │ ├── postcss.config.mjs │ │ ├── src │ │ │ ├── alert │ │ │ │ ├── AlertBuilder.ts │ │ │ │ ├── alert.ts │ │ │ │ ├── alert.vue │ │ │ │ └── index.ts │ │ │ ├── drawer │ │ │ │ ├── __tests__ │ │ │ │ │ └── drawer-api.test.ts │ │ │ │ ├── drawer-api.ts │ │ │ │ ├── drawer.ts │ │ │ │ ├── drawer.vue │ │ │ │ ├── index.ts │ │ │ │ └── use-drawer.ts │ │ │ ├── index.ts │ │ │ └── modal │ │ │ │ ├── __tests__ │ │ │ │ └── modal-api.test.ts │ │ │ │ ├── index.ts │ │ │ │ ├── modal-api.ts │ │ │ │ ├── modal.ts │ │ │ │ ├── modal.vue │ │ │ │ ├── use-modal-draggable.ts │ │ │ │ └── use-modal.ts │ │ ├── tailwind.config.mjs │ │ └── tsconfig.json │ │ ├── shadcn-ui │ │ ├── build.config.ts │ │ ├── components.json │ │ ├── package.json │ │ ├── postcss.config.mjs │ │ ├── src │ │ │ ├── components │ │ │ │ ├── avatar │ │ │ │ │ ├── avatar.vue │ │ │ │ │ └── index.ts │ │ │ │ ├── back-top │ │ │ │ │ ├── back-top.vue │ │ │ │ │ ├── backtop.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ └── use-backtop.ts │ │ │ │ ├── breadcrumb │ │ │ │ │ ├── breadcrumb-background.vue │ │ │ │ │ ├── breadcrumb-view.vue │ │ │ │ │ ├── breadcrumb.vue │ │ │ │ │ ├── index.ts │ │ │ │ │ └── types.ts │ │ │ │ ├── button │ │ │ │ │ ├── button-group.vue │ │ │ │ │ ├── button.ts │ │ │ │ │ ├── button.vue │ │ │ │ │ ├── check-button-group.vue │ │ │ │ │ ├── icon-button.vue │ │ │ │ │ └── index.ts │ │ │ │ ├── checkbox │ │ │ │ │ ├── checkbox.vue │ │ │ │ │ └── index.ts │ │ │ │ ├── context-menu │ │ │ │ │ ├── context-menu.vue │ │ │ │ │ ├── index.ts │ │ │ │ │ └── interface.ts │ │ │ │ ├── count-to-animator │ │ │ │ │ ├── count-to-animator.vue │ │ │ │ │ └── index.ts │ │ │ │ ├── dropdown-menu │ │ │ │ │ ├── dropdown-menu.vue │ │ │ │ │ ├── dropdown-radio-menu.vue │ │ │ │ │ ├── index.ts │ │ │ │ │ └── interface.ts │ │ │ │ ├── expandable-arrow │ │ │ │ │ ├── expandable-arrow.vue │ │ │ │ │ └── index.ts │ │ │ │ ├── full-screen │ │ │ │ │ ├── full-screen.vue │ │ │ │ │ └── index.ts │ │ │ │ ├── hover-card │ │ │ │ │ ├── hover-card.vue │ │ │ │ │ └── index.ts │ │ │ │ ├── icon │ │ │ │ │ ├── icon.vue │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ ├── input-password │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── input-password.vue │ │ │ │ │ └── password-strength.vue │ │ │ │ ├── logo │ │ │ │ │ ├── index.ts │ │ │ │ │ └── logo.vue │ │ │ │ ├── pin-input │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── input.vue │ │ │ │ │ └── types.ts │ │ │ │ ├── popover │ │ │ │ │ ├── index.ts │ │ │ │ │ └── popover.vue │ │ │ │ ├── render-content │ │ │ │ │ ├── index.ts │ │ │ │ │ └── render-content.vue │ │ │ │ ├── scrollbar │ │ │ │ │ ├── index.ts │ │ │ │ │ └── scrollbar.vue │ │ │ │ ├── segmented │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── segmented.vue │ │ │ │ │ ├── tabs-indicator.vue │ │ │ │ │ └── types.ts │ │ │ │ ├── select │ │ │ │ │ ├── index.ts │ │ │ │ │ └── select.vue │ │ │ │ ├── spine-text │ │ │ │ │ ├── index.ts │ │ │ │ │ └── spine-text.vue │ │ │ │ ├── spinner │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── loading.vue │ │ │ │ │ └── spinner.vue │ │ │ │ └── tooltip │ │ │ │ │ ├── help-tooltip.vue │ │ │ │ │ ├── index.ts │ │ │ │ │ └── tooltip.vue │ │ │ ├── index.ts │ │ │ └── ui │ │ │ │ ├── accordion │ │ │ │ ├── Accordion.vue │ │ │ │ ├── AccordionContent.vue │ │ │ │ ├── AccordionItem.vue │ │ │ │ ├── AccordionTrigger.vue │ │ │ │ └── index.ts │ │ │ │ ├── alert-dialog │ │ │ │ ├── AlertDialog.vue │ │ │ │ ├── AlertDialogAction.vue │ │ │ │ ├── AlertDialogCancel.vue │ │ │ │ ├── AlertDialogContent.vue │ │ │ │ ├── AlertDialogDescription.vue │ │ │ │ ├── AlertDialogOverlay.vue │ │ │ │ ├── AlertDialogTitle.vue │ │ │ │ └── index.ts │ │ │ │ ├── avatar │ │ │ │ ├── Avatar.vue │ │ │ │ ├── AvatarFallback.vue │ │ │ │ ├── AvatarImage.vue │ │ │ │ ├── avatar.ts │ │ │ │ └── index.ts │ │ │ │ ├── badge │ │ │ │ ├── Badge.vue │ │ │ │ ├── badge.ts │ │ │ │ └── index.ts │ │ │ │ ├── breadcrumb │ │ │ │ ├── Breadcrumb.vue │ │ │ │ ├── BreadcrumbEllipsis.vue │ │ │ │ ├── BreadcrumbItem.vue │ │ │ │ ├── BreadcrumbLink.vue │ │ │ │ ├── BreadcrumbList.vue │ │ │ │ ├── BreadcrumbPage.vue │ │ │ │ ├── BreadcrumbSeparator.vue │ │ │ │ └── index.ts │ │ │ │ ├── button │ │ │ │ ├── Button.vue │ │ │ │ ├── button.ts │ │ │ │ ├── index.ts │ │ │ │ └── types.ts │ │ │ │ ├── card │ │ │ │ ├── Card.vue │ │ │ │ ├── CardContent.vue │ │ │ │ ├── CardDescription.vue │ │ │ │ ├── CardFooter.vue │ │ │ │ ├── CardHeader.vue │ │ │ │ ├── CardTitle.vue │ │ │ │ └── index.ts │ │ │ │ ├── checkbox │ │ │ │ ├── Checkbox.vue │ │ │ │ └── index.ts │ │ │ │ ├── context-menu │ │ │ │ ├── ContextMenu.vue │ │ │ │ ├── ContextMenuCheckboxItem.vue │ │ │ │ ├── ContextMenuContent.vue │ │ │ │ ├── ContextMenuGroup.vue │ │ │ │ ├── ContextMenuItem.vue │ │ │ │ ├── ContextMenuLabel.vue │ │ │ │ ├── ContextMenuPortal.vue │ │ │ │ ├── ContextMenuRadioGroup.vue │ │ │ │ ├── ContextMenuRadioItem.vue │ │ │ │ ├── ContextMenuSeparator.vue │ │ │ │ ├── ContextMenuShortcut.vue │ │ │ │ ├── ContextMenuSub.vue │ │ │ │ ├── ContextMenuSubContent.vue │ │ │ │ ├── ContextMenuSubTrigger.vue │ │ │ │ ├── ContextMenuTrigger.vue │ │ │ │ └── index.ts │ │ │ │ ├── dialog │ │ │ │ ├── Dialog.vue │ │ │ │ ├── DialogClose.vue │ │ │ │ ├── DialogContent.vue │ │ │ │ ├── DialogDescription.vue │ │ │ │ ├── DialogFooter.vue │ │ │ │ ├── DialogHeader.vue │ │ │ │ ├── DialogOverlay.vue │ │ │ │ ├── DialogScrollContent.vue │ │ │ │ ├── DialogTitle.vue │ │ │ │ ├── DialogTrigger.vue │ │ │ │ └── index.ts │ │ │ │ ├── dropdown-menu │ │ │ │ ├── DropdownMenu.vue │ │ │ │ ├── DropdownMenuCheckboxItem.vue │ │ │ │ ├── DropdownMenuContent.vue │ │ │ │ ├── DropdownMenuGroup.vue │ │ │ │ ├── DropdownMenuItem.vue │ │ │ │ ├── DropdownMenuLabel.vue │ │ │ │ ├── DropdownMenuRadioGroup.vue │ │ │ │ ├── DropdownMenuRadioItem.vue │ │ │ │ ├── DropdownMenuSeparator.vue │ │ │ │ ├── DropdownMenuShortcut.vue │ │ │ │ ├── DropdownMenuSub.vue │ │ │ │ ├── DropdownMenuSubContent.vue │ │ │ │ ├── DropdownMenuSubTrigger.vue │ │ │ │ ├── DropdownMenuTrigger.vue │ │ │ │ └── index.ts │ │ │ │ ├── form │ │ │ │ ├── FormControl.vue │ │ │ │ ├── FormDescription.vue │ │ │ │ ├── FormItem.vue │ │ │ │ ├── FormLabel.vue │ │ │ │ ├── FormMessage.vue │ │ │ │ ├── index.ts │ │ │ │ ├── injectionKeys.ts │ │ │ │ └── useFormField.ts │ │ │ │ ├── hover-card │ │ │ │ ├── HoverCard.vue │ │ │ │ ├── HoverCardContent.vue │ │ │ │ ├── HoverCardTrigger.vue │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ ├── input │ │ │ │ ├── Input.vue │ │ │ │ └── index.ts │ │ │ │ ├── label │ │ │ │ ├── Label.vue │ │ │ │ └── index.ts │ │ │ │ ├── number-field │ │ │ │ ├── NumberField.vue │ │ │ │ ├── NumberFieldContent.vue │ │ │ │ ├── NumberFieldDecrement.vue │ │ │ │ ├── NumberFieldIncrement.vue │ │ │ │ ├── NumberFieldInput.vue │ │ │ │ └── index.ts │ │ │ │ ├── pagination │ │ │ │ ├── PaginationEllipsis.vue │ │ │ │ ├── PaginationFirst.vue │ │ │ │ ├── PaginationLast.vue │ │ │ │ ├── PaginationNext.vue │ │ │ │ ├── PaginationPrev.vue │ │ │ │ └── index.ts │ │ │ │ ├── pin-input │ │ │ │ ├── PinInput.vue │ │ │ │ ├── PinInputGroup.vue │ │ │ │ ├── PinInputInput.vue │ │ │ │ ├── PinInputSeparator.vue │ │ │ │ └── index.ts │ │ │ │ ├── popover │ │ │ │ ├── Popover.vue │ │ │ │ ├── PopoverContent.vue │ │ │ │ ├── PopoverTrigger.vue │ │ │ │ └── index.ts │ │ │ │ ├── radio-group │ │ │ │ ├── RadioGroup.vue │ │ │ │ ├── RadioGroupItem.vue │ │ │ │ └── index.ts │ │ │ │ ├── resizable │ │ │ │ ├── ResizableHandle.vue │ │ │ │ ├── ResizablePanelGroup.vue │ │ │ │ └── index.ts │ │ │ │ ├── scroll-area │ │ │ │ ├── ScrollArea.vue │ │ │ │ ├── ScrollBar.vue │ │ │ │ └── index.ts │ │ │ │ ├── select │ │ │ │ ├── Select.vue │ │ │ │ ├── SelectContent.vue │ │ │ │ ├── SelectGroup.vue │ │ │ │ ├── SelectItem.vue │ │ │ │ ├── SelectItemText.vue │ │ │ │ ├── SelectLabel.vue │ │ │ │ ├── SelectScrollDownButton.vue │ │ │ │ ├── SelectScrollUpButton.vue │ │ │ │ ├── SelectSeparator.vue │ │ │ │ ├── SelectTrigger.vue │ │ │ │ ├── SelectValue.vue │ │ │ │ └── index.ts │ │ │ │ ├── separator │ │ │ │ ├── Separator.vue │ │ │ │ └── index.ts │ │ │ │ ├── sheet │ │ │ │ ├── Sheet.vue │ │ │ │ ├── SheetClose.vue │ │ │ │ ├── SheetContent.vue │ │ │ │ ├── SheetDescription.vue │ │ │ │ ├── SheetFooter.vue │ │ │ │ ├── SheetHeader.vue │ │ │ │ ├── SheetOverlay.vue │ │ │ │ ├── SheetTitle.vue │ │ │ │ ├── SheetTrigger.vue │ │ │ │ ├── index.ts │ │ │ │ └── sheet.ts │ │ │ │ ├── switch │ │ │ │ ├── Switch.vue │ │ │ │ └── index.ts │ │ │ │ ├── tabs │ │ │ │ ├── Tabs.vue │ │ │ │ ├── TabsContent.vue │ │ │ │ ├── TabsList.vue │ │ │ │ ├── TabsTrigger.vue │ │ │ │ └── index.ts │ │ │ │ ├── textarea │ │ │ │ ├── Textarea.vue │ │ │ │ └── index.ts │ │ │ │ ├── toggle-group │ │ │ │ ├── ToggleGroup.vue │ │ │ │ ├── ToggleGroupItem.vue │ │ │ │ └── index.ts │ │ │ │ ├── toggle │ │ │ │ ├── Toggle.vue │ │ │ │ ├── index.ts │ │ │ │ └── toggle.ts │ │ │ │ ├── tooltip │ │ │ │ ├── Tooltip.vue │ │ │ │ ├── TooltipContent.vue │ │ │ │ ├── TooltipProvider.vue │ │ │ │ ├── TooltipTrigger.vue │ │ │ │ └── index.ts │ │ │ │ └── tree │ │ │ │ ├── index.ts │ │ │ │ ├── tree.vue │ │ │ │ └── types.ts │ │ ├── tailwind.config.mjs │ │ └── tsconfig.json │ │ └── tabs-ui │ │ ├── build.config.ts │ │ ├── package.json │ │ ├── postcss.config.mjs │ │ ├── src │ │ ├── components │ │ │ ├── index.ts │ │ │ ├── tabs-chrome │ │ │ │ └── tabs.vue │ │ │ ├── tabs │ │ │ │ └── tabs.vue │ │ │ └── widgets │ │ │ │ ├── index.ts │ │ │ │ ├── tool-more.vue │ │ │ │ └── tool-screen.vue │ │ ├── index.ts │ │ ├── tabs-view.vue │ │ ├── types.ts │ │ ├── use-tabs-drag.ts │ │ └── use-tabs-view-scroll.ts │ │ ├── tailwind.config.mjs │ │ └── tsconfig.json ├── constants │ ├── README.md │ ├── package.json │ ├── src │ │ ├── core.ts │ │ └── index.ts │ └── tsconfig.json ├── effects │ ├── README.md │ ├── access │ │ ├── package.json │ │ ├── src │ │ │ ├── access-control.vue │ │ │ ├── accessible.ts │ │ │ ├── directive.ts │ │ │ ├── index.ts │ │ │ └── use-access.ts │ │ └── tsconfig.json │ ├── common-ui │ │ ├── package.json │ │ ├── src │ │ │ ├── components │ │ │ │ ├── api-component │ │ │ │ │ ├── api-component.vue │ │ │ │ │ └── index.ts │ │ │ │ ├── captcha │ │ │ │ │ ├── hooks │ │ │ │ │ │ └── useCaptchaPoints.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── point-selection-captcha │ │ │ │ │ │ ├── index.vue │ │ │ │ │ │ └── point-selection-captcha-card.vue │ │ │ │ │ ├── slider-captcha │ │ │ │ │ │ ├── index.vue │ │ │ │ │ │ ├── slider-captcha-action.vue │ │ │ │ │ │ ├── slider-captcha-bar.vue │ │ │ │ │ │ └── slider-captcha-content.vue │ │ │ │ │ ├── slider-rotate-captcha │ │ │ │ │ │ └── index.vue │ │ │ │ │ └── types.ts │ │ │ │ ├── col-page │ │ │ │ │ ├── col-page.vue │ │ │ │ │ ├── index.ts │ │ │ │ │ └── types.ts │ │ │ │ ├── count-to │ │ │ │ │ ├── count-to.vue │ │ │ │ │ ├── index.ts │ │ │ │ │ └── types.ts │ │ │ │ ├── ellipsis-text │ │ │ │ │ ├── ellipsis-text.vue │ │ │ │ │ └── index.ts │ │ │ │ ├── icon-picker │ │ │ │ │ ├── icon-picker.vue │ │ │ │ │ ├── icons.ts │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ ├── json-viewer │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── index.vue │ │ │ │ │ ├── style.scss │ │ │ │ │ └── types.ts │ │ │ │ ├── loading │ │ │ │ │ ├── directive.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── loading.vue │ │ │ │ │ └── spinner.vue │ │ │ │ ├── page │ │ │ │ │ ├── __tests__ │ │ │ │ │ │ └── page.test.ts │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── page.vue │ │ │ │ │ └── types.ts │ │ │ │ ├── resize │ │ │ │ │ ├── index.ts │ │ │ │ │ └── resize.vue │ │ │ │ └── tippy │ │ │ │ │ ├── directive.ts │ │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ └── ui │ │ │ │ ├── about │ │ │ │ ├── about.ts │ │ │ │ ├── about.vue │ │ │ │ └── index.ts │ │ │ │ ├── authentication │ │ │ │ ├── auth-title.vue │ │ │ │ ├── code-login.vue │ │ │ │ ├── forget-password.vue │ │ │ │ ├── index.ts │ │ │ │ ├── login-expired-modal.vue │ │ │ │ ├── login.vue │ │ │ │ ├── qrcode-login.vue │ │ │ │ ├── register.vue │ │ │ │ ├── third-party-login.vue │ │ │ │ └── types.ts │ │ │ │ ├── dashboard │ │ │ │ ├── analysis │ │ │ │ │ ├── analysis-chart-card.vue │ │ │ │ │ ├── analysis-charts-tabs.vue │ │ │ │ │ ├── analysis-overview.vue │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ ├── typing.ts │ │ │ │ └── workbench │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── workbench-header.vue │ │ │ │ │ ├── workbench-project.vue │ │ │ │ │ ├── workbench-quick-nav.vue │ │ │ │ │ ├── workbench-todo.vue │ │ │ │ │ └── workbench-trends.vue │ │ │ │ ├── fallback │ │ │ │ ├── fallback.ts │ │ │ │ ├── fallback.vue │ │ │ │ ├── icons │ │ │ │ │ ├── icon-403.vue │ │ │ │ │ ├── icon-404.vue │ │ │ │ │ ├── icon-500.vue │ │ │ │ │ ├── icon-coming-soon.vue │ │ │ │ │ ├── icon-offline.vue │ │ │ │ │ └── warning.svg │ │ │ │ └── index.ts │ │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── hooks │ │ ├── README.md │ │ ├── package.json │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── use-app-config.ts │ │ │ ├── use-content-maximize.ts │ │ │ ├── use-design-tokens.ts │ │ │ ├── use-hover-toggle.ts │ │ │ ├── use-pagination.ts │ │ │ ├── use-refresh.ts │ │ │ ├── use-tabs.ts │ │ │ └── use-watermark.ts │ │ └── tsconfig.json │ ├── layouts │ │ ├── package.json │ │ ├── src │ │ │ ├── authentication │ │ │ │ ├── authentication.vue │ │ │ │ ├── form.vue │ │ │ │ ├── icons │ │ │ │ │ └── slogan.vue │ │ │ │ ├── index.ts │ │ │ │ ├── toolbar.vue │ │ │ │ └── types.ts │ │ │ ├── basic │ │ │ │ ├── README.md │ │ │ │ ├── content │ │ │ │ │ ├── content-spinner.vue │ │ │ │ │ ├── content.vue │ │ │ │ │ ├── index.ts │ │ │ │ │ └── use-content-spinner.ts │ │ │ │ ├── copyright │ │ │ │ │ ├── copyright.vue │ │ │ │ │ └── index.ts │ │ │ │ ├── footer │ │ │ │ │ ├── footer.vue │ │ │ │ │ └── index.ts │ │ │ │ ├── header │ │ │ │ │ ├── header.vue │ │ │ │ │ └── index.ts │ │ │ │ ├── index.ts │ │ │ │ ├── layout.vue │ │ │ │ ├── menu │ │ │ │ │ ├── extra-menu.vue │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── menu.vue │ │ │ │ │ ├── mixed-menu.vue │ │ │ │ │ ├── use-extra-menu.ts │ │ │ │ │ ├── use-mixed-menu.ts │ │ │ │ │ └── use-navigation.ts │ │ │ │ └── tabbar │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── tabbar.vue │ │ │ │ │ └── use-tabbar.ts │ │ │ ├── iframe │ │ │ │ ├── iframe-router-view.vue │ │ │ │ ├── iframe-view.vue │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ └── widgets │ │ │ │ ├── breadcrumb.vue │ │ │ │ ├── check-updates │ │ │ │ ├── check-updates.vue │ │ │ │ └── index.ts │ │ │ │ ├── color-toggle.vue │ │ │ │ ├── global-search │ │ │ │ ├── global-search.vue │ │ │ │ ├── index.ts │ │ │ │ └── search-panel.vue │ │ │ │ ├── index.ts │ │ │ │ ├── language-toggle.vue │ │ │ │ ├── layout-toggle.vue │ │ │ │ ├── lock-screen │ │ │ │ ├── index.ts │ │ │ │ ├── lock-screen-modal.vue │ │ │ │ └── lock-screen.vue │ │ │ │ ├── notification │ │ │ │ ├── index.ts │ │ │ │ ├── notification.vue │ │ │ │ └── types.ts │ │ │ │ ├── preferences │ │ │ │ ├── blocks │ │ │ │ │ ├── block.vue │ │ │ │ │ ├── checkbox-item.vue │ │ │ │ │ ├── general │ │ │ │ │ │ ├── animation.vue │ │ │ │ │ │ └── general.vue │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── input-item.vue │ │ │ │ │ ├── layout │ │ │ │ │ │ ├── breadcrumb.vue │ │ │ │ │ │ ├── content.vue │ │ │ │ │ │ ├── copyright.vue │ │ │ │ │ │ ├── footer.vue │ │ │ │ │ │ ├── header.vue │ │ │ │ │ │ ├── layout.vue │ │ │ │ │ │ ├── navigation.vue │ │ │ │ │ │ ├── sidebar.vue │ │ │ │ │ │ ├── tabbar.vue │ │ │ │ │ │ └── widget.vue │ │ │ │ │ ├── number-field-item.vue │ │ │ │ │ ├── select-item.vue │ │ │ │ │ ├── shortcut-keys │ │ │ │ │ │ └── global.vue │ │ │ │ │ ├── switch-item.vue │ │ │ │ │ ├── theme │ │ │ │ │ │ ├── builtin.vue │ │ │ │ │ │ ├── color-mode.vue │ │ │ │ │ │ ├── radius.vue │ │ │ │ │ │ └── theme.vue │ │ │ │ │ └── toggle-item.vue │ │ │ │ ├── icons │ │ │ │ │ ├── content-compact.vue │ │ │ │ │ ├── full-content.vue │ │ │ │ │ ├── header-mixed-nav.vue │ │ │ │ │ ├── header-nav.vue │ │ │ │ │ ├── header-sidebar-nav.vue │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── mixed-nav.vue │ │ │ │ │ ├── setting.vue │ │ │ │ │ ├── sidebar-mixed-nav.vue │ │ │ │ │ └── sidebar-nav.vue │ │ │ │ ├── index.ts │ │ │ │ ├── preferences-button.vue │ │ │ │ ├── preferences-drawer.vue │ │ │ │ ├── preferences.vue │ │ │ │ └── use-open-preferences.ts │ │ │ │ ├── theme-toggle │ │ │ │ ├── index.ts │ │ │ │ ├── theme-button.vue │ │ │ │ └── theme-toggle.vue │ │ │ │ └── user-dropdown │ │ │ │ ├── index.ts │ │ │ │ └── user-dropdown.vue │ │ └── tsconfig.json │ ├── plugins │ │ ├── README.md │ │ ├── package.json │ │ ├── src │ │ │ ├── echarts │ │ │ │ ├── echarts-ui.vue │ │ │ │ ├── echarts.ts │ │ │ │ ├── index.ts │ │ │ │ └── use-echarts.ts │ │ │ ├── motion │ │ │ │ ├── index.ts │ │ │ │ └── types.ts │ │ │ └── vxe-table │ │ │ │ ├── api.ts │ │ │ │ ├── extends.ts │ │ │ │ ├── index.ts │ │ │ │ ├── init.ts │ │ │ │ ├── style.css │ │ │ │ ├── types.ts │ │ │ │ ├── use-vxe-grid.ts │ │ │ │ └── use-vxe-grid.vue │ │ └── tsconfig.json │ └── request │ │ ├── package.json │ │ ├── src │ │ ├── index.ts │ │ └── request-client │ │ │ ├── index.ts │ │ │ ├── modules │ │ │ ├── downloader.test.ts │ │ │ ├── downloader.ts │ │ │ ├── interceptor.ts │ │ │ ├── uploader.test.ts │ │ │ └── uploader.ts │ │ │ ├── preset-interceptors.ts │ │ │ ├── request-client.test.ts │ │ │ ├── request-client.ts │ │ │ └── types.ts │ │ └── tsconfig.json ├── icons │ ├── README.md │ ├── package.json │ ├── src │ │ ├── iconify │ │ │ └── index.ts │ │ ├── icons │ │ │ └── empty-icon.vue │ │ ├── index.ts │ │ └── svg │ │ │ ├── icons │ │ │ ├── antdv-logo.svg │ │ │ ├── avatar-1.svg │ │ │ ├── avatar-2.svg │ │ │ ├── avatar-3.svg │ │ │ ├── avatar-4.svg │ │ │ ├── bell.svg │ │ │ ├── cake.svg │ │ │ ├── card.svg │ │ │ └── download.svg │ │ │ ├── index.ts │ │ │ └── load.ts │ └── tsconfig.json ├── locales │ ├── package.json │ ├── src │ │ ├── i18n.ts │ │ ├── index.ts │ │ ├── langs │ │ │ ├── en-US │ │ │ │ ├── authentication.json │ │ │ │ ├── common.json │ │ │ │ ├── preferences.json │ │ │ │ └── ui.json │ │ │ └── zh-CN │ │ │ │ ├── authentication.json │ │ │ │ ├── common.json │ │ │ │ ├── preferences.json │ │ │ │ └── ui.json │ │ └── typing.ts │ └── tsconfig.json ├── preferences │ ├── package.json │ ├── src │ │ └── index.ts │ └── tsconfig.json ├── stores │ ├── package.json │ ├── shim-pinia.d.ts │ ├── src │ │ ├── index.ts │ │ ├── modules │ │ │ ├── access.test.ts │ │ │ ├── access.ts │ │ │ ├── index.ts │ │ │ ├── lock.test.ts │ │ │ ├── lock.ts │ │ │ ├── tabbar.test.ts │ │ │ ├── tabbar.ts │ │ │ ├── user.test.ts │ │ │ └── user.ts │ │ └── setup.ts │ └── tsconfig.json ├── styles │ ├── README.md │ ├── package.json │ ├── src │ │ ├── antd │ │ │ └── index.css │ │ ├── ele │ │ │ └── index.css │ │ ├── global │ │ │ └── index.scss │ │ ├── index.ts │ │ └── naive │ │ │ └── index.css │ └── tsconfig.json ├── types │ ├── README.md │ ├── global.d.ts │ ├── package.json │ ├── src │ │ ├── index.ts │ │ └── user.ts │ └── tsconfig.json └── utils │ ├── README.md │ ├── package.json │ ├── src │ ├── helpers │ │ ├── __tests__ │ │ │ ├── find-menu-by-path.test.ts │ │ │ ├── generate-menus.test.ts │ │ │ ├── generate-routes-frontend.test.ts │ │ │ └── merge-route-modules.test.ts │ │ ├── find-menu-by-path.ts │ │ ├── generate-menus.ts │ │ ├── generate-routes-backend.ts │ │ ├── generate-routes-frontend.ts │ │ ├── get-popup-container.ts │ │ ├── index.ts │ │ ├── merge-route-modules.ts │ │ ├── reset-routes.ts │ │ └── unmount-global-loading.ts │ └── index.ts │ └── tsconfig.json ├── pnpm-lock.yaml ├── pnpm-workspace.yaml ├── scripts ├── clean.mjs ├── deploy │ └── nginx.conf ├── turbo-run │ ├── README.md │ ├── bin │ │ └── turbo-run.mjs │ ├── build.config.ts │ ├── package.json │ ├── src │ │ ├── index.ts │ │ └── run.ts │ └── tsconfig.json └── vsh │ ├── README.md │ ├── bin │ └── vsh.mjs │ ├── build.config.ts │ ├── package.json │ ├── src │ ├── check-circular │ │ └── index.ts │ ├── check-dep │ │ └── index.ts │ ├── code-workspace │ │ └── index.ts │ ├── index.ts │ ├── lint │ │ └── index.ts │ └── publint │ │ └── index.ts │ └── tsconfig.json ├── stylelint.config.mjs ├── turbo.json ├── vitest.config.ts └── vitest.workspace.ts /.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | not ie 11 5 | -------------------------------------------------------------------------------- /.commitlintrc.js: -------------------------------------------------------------------------------- 1 | export { default } from '@vben/commitlint-config'; 2 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | **/node_modules 2 | .git 3 | .gitignore 4 | *.md 5 | dist 6 | .turbo 7 | dist.zip 8 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset=utf-8 5 | end_of_line=lf 6 | insert_final_newline=true 7 | indent_style=space 8 | indent_size=2 9 | max_line_length = 100 10 | trim_trailing_whitespace = true 11 | quote_type = single 12 | 13 | [*.{yml,yaml,json}] 14 | indent_style = space 15 | indent_size = 2 16 | 17 | [*.md] 18 | trim_trailing_whitespace = false 19 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # https://docs.github.com/cn/get-started/getting-started-with-git/configuring-git-to-handle-line-endings 2 | 3 | # Automatically normalize line endings (to LF) for all text-based files. 4 | * text=auto eol=lf 5 | 6 | # Declare files that will always have CRLF line endings on checkout. 7 | *.{cmd,[cC][mM][dD]} text eol=crlf 8 | *.{bat,[bB][aA][tT]} text eol=crlf 9 | 10 | # Denote all files that are truly binary and should not be modified. 11 | *.{ico,png,jpg,jpeg,gif,webp,svg,woff,woff2} binary -------------------------------------------------------------------------------- /.gitconfig: -------------------------------------------------------------------------------- 1 | [core] 2 | ignorecase = false 3 | -------------------------------------------------------------------------------- /.lintstagedrc.mjs: -------------------------------------------------------------------------------- 1 | export default { 2 | '*.md': ['prettier --cache --ignore-unknown --write'], 3 | '*.vue': [ 4 | 'prettier --write', 5 | 'eslint --cache --fix', 6 | 'stylelint --fix --allow-empty-input', 7 | ], 8 | '*.{js,jsx,ts,tsx}': [ 9 | 'prettier --cache --ignore-unknown --write', 10 | 'eslint --cache --fix', 11 | ], 12 | '*.{scss,less,styl,html,vue,css}': [ 13 | 'prettier --cache --ignore-unknown --write', 14 | 'stylelint --fix --allow-empty-input', 15 | ], 16 | 'package.json': ['prettier --cache --write'], 17 | '{!(package)*.json,*.code-snippets,.!(browserslist)*rc}': [ 18 | 'prettier --cache --write--parser json', 19 | ], 20 | }; 21 | -------------------------------------------------------------------------------- /.node-version: -------------------------------------------------------------------------------- 1 | 22.1.0 2 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | registry = "https://registry.npmmirror.com" 2 | public-hoist-pattern[]=lefthook 3 | public-hoist-pattern[]=eslint 4 | public-hoist-pattern[]=prettier 5 | public-hoist-pattern[]=prettier-plugin-tailwindcss 6 | public-hoist-pattern[]=stylelint 7 | public-hoist-pattern[]=*postcss* 8 | public-hoist-pattern[]=@commitlint/* 9 | public-hoist-pattern[]=czg 10 | 11 | strict-peer-dependencies=false 12 | auto-install-peers=true 13 | dedupe-peer-dependents=true 14 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | dist 2 | dev-dist 3 | .local 4 | .output.js 5 | node_modules 6 | .nvmrc 7 | coverage 8 | CODEOWNERS 9 | .nitro 10 | .output 11 | 12 | 13 | **/*.svg 14 | **/*.sh 15 | 16 | public 17 | .npmrc 18 | *-lock.yaml 19 | -------------------------------------------------------------------------------- /.prettierrc.mjs: -------------------------------------------------------------------------------- 1 | export { default } from '@vben/prettier-config'; 2 | -------------------------------------------------------------------------------- /.stylelintignore: -------------------------------------------------------------------------------- 1 | dist 2 | public 3 | __tests__ 4 | coverage 5 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM guergeiro/pnpm:lts-latest-slim AS build 2 | 3 | WORKDIR /fba_ui 4 | 5 | COPY . . 6 | 7 | RUN pnpm install \ 8 | && pnpm build 9 | 10 | FROM nginx 11 | 12 | COPY scripts/deploy/nginx.conf /etc/nginx/nginx.conf 13 | 14 | COPY --from=build /fba_ui/apps/web-antd/dist /var/www/fba_ui 15 | 16 | EXPOSE 80 17 | 18 | CMD ["nginx", "-g", "daemon off;"] -------------------------------------------------------------------------------- /apps/web-antd/.env: -------------------------------------------------------------------------------- 1 | # 应用标题 2 | VITE_APP_TITLE=FBA UI 3 | 4 | # 应用命名空间,用于缓存、store等功能的前缀,确保隔离 5 | VITE_APP_NAMESPACE=fba-ui 6 | 7 | # 对store进行加密的密钥,在将store持久化到localStorage时会使用该密钥进行加密 8 | VITE_APP_STORE_SECURE_KEY=please-replace-me-with-your-own-key 9 | -------------------------------------------------------------------------------- /apps/web-antd/.env.analyze: -------------------------------------------------------------------------------- 1 | # public path 2 | VITE_BASE=/ 3 | 4 | # Basic interface address SPA 5 | VITE_GLOB_API_URL=/api 6 | 7 | VITE_VISUALIZER=true 8 | -------------------------------------------------------------------------------- /apps/web-antd/.env.development: -------------------------------------------------------------------------------- 1 | # 端口号 2 | VITE_PORT=5173 3 | 4 | VITE_BASE=/ 5 | 6 | # 接口地址 7 | VITE_GLOB_API_URL=http://localhost:8000 8 | 9 | # 是否开启 Nitro Mock服务,true 为开启,false 为关闭 10 | VITE_NITRO_MOCK=true 11 | 12 | # 是否打开 devtools,true 为打开,false 为关闭 13 | VITE_DEVTOOLS=false 14 | 15 | # 是否注入全局loading 16 | VITE_INJECT_APP_LOADING=true 17 | -------------------------------------------------------------------------------- /apps/web-antd/.env.production: -------------------------------------------------------------------------------- 1 | VITE_BASE=/ 2 | 3 | # 接口地址 4 | VITE_GLOB_API_URL=https://mock-napi.vben.pro/api 5 | 6 | # 是否开启压缩,可以设置为 none, brotli, gzip 7 | VITE_COMPRESS=none 8 | 9 | # 是否开启 PWA 10 | VITE_PWA=false 11 | 12 | # vue-router 的模式 13 | VITE_ROUTER_HISTORY=hash 14 | 15 | # 是否注入全局loading 16 | VITE_INJECT_APP_LOADING=true 17 | 18 | # 打包后是否生成dist.zip 19 | VITE_ARCHIVER=true 20 | -------------------------------------------------------------------------------- /apps/web-antd/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | export { default } from '@vben/tailwind-config/postcss'; 2 | -------------------------------------------------------------------------------- /apps/web-antd/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fastapi-practices/fastapi_best_architecture_ui/4eede6f3a1773b8d5cadd9a671be754379e9adba/apps/web-antd/public/favicon.ico -------------------------------------------------------------------------------- /apps/web-antd/src/api/core/index.ts: -------------------------------------------------------------------------------- 1 | export * from './auth'; 2 | export * from './menu'; 3 | export * from './user'; 4 | -------------------------------------------------------------------------------- /apps/web-antd/src/api/index.ts: -------------------------------------------------------------------------------- 1 | export * from './core'; 2 | export * from './dept'; 3 | export * from './log'; 4 | export * from './monitor'; 5 | export * from './role'; 6 | -------------------------------------------------------------------------------- /apps/web-antd/src/api/oauth2.ts: -------------------------------------------------------------------------------- 1 | import { requestClient } from '#/api/request'; 2 | 3 | export interface OAuth2CallBackParams { 4 | code: string; 5 | state?: string; 6 | code_verifier?: string; 7 | } 8 | 9 | export async function getOAuth2LinuxDo() { 10 | return requestClient.get('/api/v1/oauth2/linux-do'); 11 | } 12 | 13 | export async function getOAuth2LinuxDoCallback(params: OAuth2CallBackParams) { 14 | return requestClient.get('/api/v1/oauth2/linux-do/callback', { params }); 15 | } 16 | -------------------------------------------------------------------------------- /apps/web-antd/src/layouts/auth.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 24 | -------------------------------------------------------------------------------- /apps/web-antd/src/layouts/index.ts: -------------------------------------------------------------------------------- 1 | const BasicLayout = () => import('./basic.vue'); 2 | const AuthPageLayout = () => import('./auth.vue'); 3 | 4 | const IFrameView = () => import('@vben/layouts').then((m) => m.IFrameView); 5 | 6 | export { AuthPageLayout, BasicLayout, IFrameView }; 7 | -------------------------------------------------------------------------------- /apps/web-antd/src/locales/README.md: -------------------------------------------------------------------------------- 1 | # locale 2 | 3 | 每个app使用的国际化可能不同,这里用于扩展国际化的功能,例如扩展 dayjs、antd组件库的多语言切换,以及app本身的国际化文件。 4 | -------------------------------------------------------------------------------- /apps/web-antd/src/preferences.ts: -------------------------------------------------------------------------------- 1 | import { defineOverridesPreferences } from '@vben/preferences'; 2 | 3 | /** 4 | * @description 项目配置文件 5 | * 只需要覆盖项目中的一部分配置,不需要的配置不用覆盖,会自动使用默认配置 6 | * !!! 更改配置后请清空缓存,否则可能不生效 7 | */ 8 | export const overridesPreferences = defineOverridesPreferences({ 9 | // overrides 10 | app: { 11 | accessMode: 'frontend', 12 | name: import.meta.env.VITE_APP_TITLE, 13 | enableRefreshToken: true, 14 | }, 15 | footer: { 16 | enable: false, 17 | }, 18 | logo: { 19 | source: 'https://wu-clan.github.io/picx-images-hosting/logo/fba.png', 20 | }, 21 | theme: { 22 | mode: 'auto', 23 | }, 24 | }); 25 | -------------------------------------------------------------------------------- /apps/web-antd/src/router/routes/modules/automation.ts: -------------------------------------------------------------------------------- 1 | import type { RouteRecordRaw } from 'vue-router'; 2 | 3 | import { $t } from '#/locales'; 4 | 5 | const routes: RouteRecordRaw[] = [ 6 | { 7 | name: 'Automation', 8 | path: '/automation', 9 | meta: { 10 | title: $t('page.menu.automation'), 11 | icon: 'material-symbols:automation', 12 | order: 2, 13 | }, 14 | children: [ 15 | { 16 | name: 'CodeGenerator', 17 | path: 'code-generator', 18 | component: () => import('#/views/automation/code-generator/index.vue'), 19 | meta: { 20 | title: $t('page.menu.codeGenerator'), 21 | }, 22 | }, 23 | ], 24 | }, 25 | ]; 26 | 27 | export default routes; 28 | -------------------------------------------------------------------------------- /apps/web-antd/src/router/routes/modules/profile.ts: -------------------------------------------------------------------------------- 1 | import type { RouteRecordRaw } from 'vue-router'; 2 | 3 | const routes: RouteRecordRaw[] = [ 4 | { 5 | name: 'Profile', 6 | path: '/profile', 7 | component: () => import('#/views/_core/profile/index.vue'), 8 | meta: { 9 | icon: 'mingcute:profile-line', 10 | title: '个人中心', 11 | hideInMenu: true, 12 | }, 13 | }, 14 | ]; 15 | 16 | export default routes; 17 | -------------------------------------------------------------------------------- /apps/web-antd/src/store/index.ts: -------------------------------------------------------------------------------- 1 | export * from './auth'; 2 | export * from './websocket'; 3 | -------------------------------------------------------------------------------- /apps/web-antd/src/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from './pagination'; 2 | -------------------------------------------------------------------------------- /apps/web-antd/src/types/pagination.ts: -------------------------------------------------------------------------------- 1 | interface PaginationResult { 2 | items: Array; 3 | page: number; 4 | size: number; 5 | total: number; 6 | total_pages: number; 7 | links: any; 8 | } 9 | 10 | export type { PaginationResult }; 11 | -------------------------------------------------------------------------------- /apps/web-antd/src/views/_core/README.md: -------------------------------------------------------------------------------- 1 | # \_core 2 | 3 | 此目录包含应用程序正常运行所需的基本视图。这些视图是应用程序布局中使用的视图。 4 | -------------------------------------------------------------------------------- /apps/web-antd/src/views/_core/about/index.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /apps/web-antd/src/views/_core/authentication/qrcode-login.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 11 | -------------------------------------------------------------------------------- /apps/web-antd/src/views/_core/fallback/coming-soon.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /apps/web-antd/src/views/_core/fallback/forbidden.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /apps/web-antd/src/views/_core/fallback/internal-error.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /apps/web-antd/src/views/_core/fallback/not-found.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /apps/web-antd/src/views/_core/fallback/offline.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /apps/web-antd/src/views/automation/code-generator/index.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 8 | -------------------------------------------------------------------------------- /apps/web-antd/src/views/oauth2/index.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /apps/web-antd/tailwind.config.mjs: -------------------------------------------------------------------------------- 1 | export { default } from '@vben/tailwind-config'; 2 | -------------------------------------------------------------------------------- /apps/web-antd/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/web-app.json", 4 | "compilerOptions": { 5 | "baseUrl": ".", 6 | "paths": { 7 | "#/*": ["./src/*"] 8 | } 9 | }, 10 | "references": [{ "path": "./tsconfig.node.json" }], 11 | "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"] 12 | } 13 | -------------------------------------------------------------------------------- /apps/web-antd/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/node.json", 4 | "compilerOptions": { 5 | "composite": true, 6 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", 7 | "noEmit": false 8 | }, 9 | "include": ["vite.config.mts"] 10 | } 11 | -------------------------------------------------------------------------------- /apps/web-antd/vite.config.mts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from '@vben/vite-config'; 2 | 3 | export default defineConfig(async () => { 4 | return { 5 | application: {}, 6 | vite: { 7 | server: { 8 | proxy: { 9 | '/api': { 10 | changeOrigin: true, 11 | rewrite: (path) => path.replace(/^\/api/, ''), 12 | // mock代理目标地址 13 | target: 'http://localhost:5320/api', 14 | ws: true, 15 | }, 16 | }, 17 | }, 18 | }, 19 | }; 20 | }); 21 | -------------------------------------------------------------------------------- /eslint.config.mjs: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | 3 | import { defineConfig } from '@vben/eslint-config'; 4 | 5 | export default defineConfig(); 6 | -------------------------------------------------------------------------------- /internal/lint-configs/eslint-config/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild'; 2 | 3 | export default defineBuildConfig({ 4 | clean: true, 5 | declaration: true, 6 | entries: ['src/index'], 7 | }); 8 | -------------------------------------------------------------------------------- /internal/lint-configs/eslint-config/src/configs/command.ts: -------------------------------------------------------------------------------- 1 | import createCommand from 'eslint-plugin-command/config'; 2 | 3 | export async function command() { 4 | return [ 5 | { 6 | // @ts-expect-error - no types 7 | ...createCommand(), 8 | }, 9 | ]; 10 | } 11 | -------------------------------------------------------------------------------- /internal/lint-configs/eslint-config/src/configs/comments.ts: -------------------------------------------------------------------------------- 1 | import type { Linter } from 'eslint'; 2 | 3 | import { interopDefault } from '../util'; 4 | 5 | export async function comments(): Promise { 6 | const [pluginComments] = await Promise.all([ 7 | // @ts-expect-error - no types 8 | interopDefault(import('eslint-plugin-eslint-comments')), 9 | ] as const); 10 | 11 | return [ 12 | { 13 | plugins: { 14 | 'eslint-comments': pluginComments, 15 | }, 16 | rules: { 17 | 'eslint-comments/no-aggregating-enable': 'error', 18 | 'eslint-comments/no-duplicate-disable': 'error', 19 | 'eslint-comments/no-unlimited-disable': 'error', 20 | 'eslint-comments/no-unused-enable': 'error', 21 | }, 22 | }, 23 | ]; 24 | } 25 | -------------------------------------------------------------------------------- /internal/lint-configs/eslint-config/src/configs/disableds.ts: -------------------------------------------------------------------------------- 1 | import type { Linter } from 'eslint'; 2 | 3 | export async function disableds(): Promise { 4 | return [ 5 | { 6 | files: ['**/__tests__/**/*.?([cm])[jt]s?(x)'], 7 | name: 'disables/test', 8 | rules: { 9 | '@typescript-eslint/ban-ts-comment': 'off', 10 | 'no-console': 'off', 11 | }, 12 | }, 13 | { 14 | files: ['**/*.d.ts'], 15 | name: 'disables/dts', 16 | rules: { 17 | '@typescript-eslint/triple-slash-reference': 'off', 18 | }, 19 | }, 20 | { 21 | files: ['**/*.js', '**/*.mjs', '**/*.cjs'], 22 | name: 'disables/js', 23 | rules: { 24 | '@typescript-eslint/explicit-module-boundary-types': 'off', 25 | }, 26 | }, 27 | ]; 28 | } 29 | -------------------------------------------------------------------------------- /internal/lint-configs/eslint-config/src/configs/index.ts: -------------------------------------------------------------------------------- 1 | export * from './command'; 2 | export * from './comments'; 3 | export * from './disableds'; 4 | export * from './ignores'; 5 | export * from './import'; 6 | export * from './javascript'; 7 | export * from './jsdoc'; 8 | export * from './jsonc'; 9 | export * from './node'; 10 | export * from './perfectionist'; 11 | export * from './prettier'; 12 | export * from './regexp'; 13 | export * from './test'; 14 | export * from './turbo'; 15 | export * from './typescript'; 16 | export * from './unicorn'; 17 | export * from './vue'; 18 | -------------------------------------------------------------------------------- /internal/lint-configs/eslint-config/src/configs/prettier.ts: -------------------------------------------------------------------------------- 1 | import type { Linter } from 'eslint'; 2 | 3 | import { interopDefault } from '../util'; 4 | 5 | export async function prettier(): Promise { 6 | const [pluginPrettier] = await Promise.all([ 7 | interopDefault(import('eslint-plugin-prettier')), 8 | ] as const); 9 | return [ 10 | { 11 | plugins: { 12 | prettier: pluginPrettier, 13 | }, 14 | rules: { 15 | 'prettier/prettier': 'error', 16 | }, 17 | }, 18 | ]; 19 | } 20 | -------------------------------------------------------------------------------- /internal/lint-configs/eslint-config/src/configs/regexp.ts: -------------------------------------------------------------------------------- 1 | import type { Linter } from 'eslint'; 2 | 3 | import { interopDefault } from '../util'; 4 | 5 | export async function regexp(): Promise { 6 | const [pluginRegexp] = await Promise.all([ 7 | interopDefault(import('eslint-plugin-regexp')), 8 | ] as const); 9 | 10 | return [ 11 | { 12 | plugins: { 13 | regexp: pluginRegexp, 14 | }, 15 | rules: { 16 | ...pluginRegexp.configs.recommended.rules, 17 | }, 18 | }, 19 | ]; 20 | } 21 | -------------------------------------------------------------------------------- /internal/lint-configs/eslint-config/src/configs/turbo.ts: -------------------------------------------------------------------------------- 1 | import type { Linter } from 'eslint'; 2 | 3 | import { interopDefault } from '../util'; 4 | 5 | export async function turbo(): Promise { 6 | const [pluginTurbo] = await Promise.all([ 7 | // @ts-expect-error - no types 8 | interopDefault(import('eslint-config-turbo')), 9 | ] as const); 10 | 11 | return [ 12 | { 13 | plugins: { 14 | turbo: pluginTurbo, 15 | }, 16 | }, 17 | ]; 18 | } 19 | -------------------------------------------------------------------------------- /internal/lint-configs/eslint-config/src/util.ts: -------------------------------------------------------------------------------- 1 | export type Awaitable = Promise | T; 2 | 3 | export async function interopDefault( 4 | m: Awaitable, 5 | ): Promise { 6 | const resolved = await m; 7 | return (resolved as any).default || resolved; 8 | } 9 | -------------------------------------------------------------------------------- /internal/lint-configs/eslint-config/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/node.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /internal/lint-configs/prettier-config/index.mjs: -------------------------------------------------------------------------------- 1 | export default { 2 | endOfLine: 'auto', 3 | overrides: [ 4 | { 5 | files: ['*.json5'], 6 | options: { 7 | quoteProps: 'preserve', 8 | singleQuote: false, 9 | }, 10 | }, 11 | ], 12 | plugins: ['prettier-plugin-tailwindcss'], 13 | printWidth: 80, 14 | proseWrap: 'never', 15 | semi: true, 16 | singleQuote: true, 17 | trailingComma: 'all', 18 | }; 19 | -------------------------------------------------------------------------------- /internal/lint-configs/prettier-config/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vben/prettier-config", 3 | "version": "5.0.0", 4 | "private": true, 5 | "homepage": "https://github.com/vbenjs/vue-vben-admin", 6 | "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", 7 | "repository": { 8 | "type": "git", 9 | "url": "git+https://github.com/vbenjs/vue-vben-admin.git", 10 | "directory": "internal/lint-configs/prettier-config" 11 | }, 12 | "license": "MIT", 13 | "type": "module", 14 | "files": [ 15 | "dist" 16 | ], 17 | "main": "./index.mjs", 18 | "module": "./index.mjs", 19 | "exports": { 20 | ".": { 21 | "default": "./index.mjs" 22 | } 23 | }, 24 | "dependencies": { 25 | "prettier": "catalog:", 26 | "prettier-plugin-tailwindcss": "catalog:" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /internal/node-utils/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild'; 2 | 3 | export default defineBuildConfig({ 4 | clean: true, 5 | declaration: true, 6 | entries: ['src/index'], 7 | }); 8 | -------------------------------------------------------------------------------- /internal/node-utils/src/constants.ts: -------------------------------------------------------------------------------- 1 | enum UNICODE { 2 | FAILURE = '\u2716', // ✖ 3 | SUCCESS = '\u2714', // ✔ 4 | } 5 | 6 | export { UNICODE }; 7 | -------------------------------------------------------------------------------- /internal/node-utils/src/date.ts: -------------------------------------------------------------------------------- 1 | import dayjs from 'dayjs'; 2 | import timezone from 'dayjs/plugin/timezone'; 3 | import utc from 'dayjs/plugin/utc'; 4 | 5 | dayjs.extend(utc); 6 | dayjs.extend(timezone); 7 | 8 | dayjs.tz.setDefault('Asia/Shanghai'); 9 | 10 | const dateUtil = dayjs; 11 | 12 | export { dateUtil }; 13 | -------------------------------------------------------------------------------- /internal/node-utils/src/hash.ts: -------------------------------------------------------------------------------- 1 | import { createHash } from 'node:crypto'; 2 | 3 | /** 4 | * 生产基于内容的 hash,可自定义长度 5 | * @param content 6 | * @param hashLSize 7 | */ 8 | function generatorContentHash(content: string, hashLSize?: number) { 9 | const hash = createHash('md5').update(content, 'utf8').digest('hex'); 10 | 11 | if (hashLSize) { 12 | return hash.slice(0, hashLSize); 13 | } 14 | 15 | return hash; 16 | } 17 | 18 | export { generatorContentHash }; 19 | -------------------------------------------------------------------------------- /internal/node-utils/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './constants'; 2 | export * from './date'; 3 | export * from './fs'; 4 | export * from './git'; 5 | export { getStagedFiles, add as gitAdd } from './git'; 6 | export { generatorContentHash } from './hash'; 7 | export * from './monorepo'; 8 | export { toPosixPath } from './path'; 9 | export { prettierFormat } from './prettier'; 10 | export * from './spinner'; 11 | export type { Package } from '@manypkg/get-packages'; 12 | export { default as colors } from 'chalk'; 13 | export { consola } from 'consola'; 14 | export * from 'execa'; 15 | 16 | export { default as fs } from 'node:fs/promises'; 17 | 18 | export { type PackageJson, readPackageJSON } from 'pkg-types'; 19 | export { rimraf } from 'rimraf'; 20 | -------------------------------------------------------------------------------- /internal/node-utils/src/path.ts: -------------------------------------------------------------------------------- 1 | import { posix } from 'node:path'; 2 | 3 | /** 4 | * 将给定的文件路径转换为 POSIX 风格。 5 | * @param {string} pathname - 原始文件路径。 6 | */ 7 | function toPosixPath(pathname: string) { 8 | return pathname.split(`\\`).join(posix.sep); 9 | } 10 | 11 | export { toPosixPath }; 12 | -------------------------------------------------------------------------------- /internal/node-utils/src/prettier.ts: -------------------------------------------------------------------------------- 1 | import fs from 'node:fs/promises'; 2 | 3 | import { format, getFileInfo, resolveConfig } from 'prettier'; 4 | 5 | async function prettierFormat(filepath: string) { 6 | const prettierOptions = await resolveConfig(filepath, {}); 7 | 8 | const fileInfo = await getFileInfo(filepath); 9 | 10 | const input = await fs.readFile(filepath, 'utf8'); 11 | const output = await format(input, { 12 | ...prettierOptions, 13 | parser: fileInfo.inferredParser as any, 14 | }); 15 | if (output !== input) { 16 | await fs.writeFile(filepath, output, 'utf8'); 17 | } 18 | return output; 19 | } 20 | 21 | export { prettierFormat }; 22 | -------------------------------------------------------------------------------- /internal/node-utils/src/spinner.ts: -------------------------------------------------------------------------------- 1 | import type { Ora } from 'ora'; 2 | 3 | import ora from 'ora'; 4 | 5 | interface SpinnerOptions { 6 | failedText?: string; 7 | successText?: string; 8 | title: string; 9 | } 10 | export async function spinner( 11 | { failedText, successText, title }: SpinnerOptions, 12 | callback: () => Promise, 13 | ): Promise { 14 | const loading: Ora = ora(title).start(); 15 | 16 | try { 17 | const result = await callback(); 18 | loading.succeed(successText || 'Success!'); 19 | return result; 20 | } catch (error) { 21 | loading.fail(failedText || 'Failed!'); 22 | throw error; 23 | } finally { 24 | loading.stop(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /internal/node-utils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/node.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /internal/tailwind-config/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild'; 2 | 3 | export default defineBuildConfig({ 4 | clean: true, 5 | declaration: true, 6 | entries: ['src/index', './src/postcss.config'], 7 | rollup: { 8 | emitCJS: true, 9 | }, 10 | }); 11 | -------------------------------------------------------------------------------- /internal/tailwind-config/src/module.d.ts: -------------------------------------------------------------------------------- 1 | declare module '@tailwindcss/nesting' { 2 | export default any; 3 | } 4 | -------------------------------------------------------------------------------- /internal/tailwind-config/src/postcss.config.ts: -------------------------------------------------------------------------------- 1 | import config from '.'; 2 | 3 | export default { 4 | plugins: { 5 | ...(process.env.NODE_ENV === 'production' ? { cssnano: {} } : {}), 6 | // Specifying the config is not necessary in most cases, but it is included 7 | autoprefixer: {}, 8 | // 修复 element-plus 和 ant-design-vue 的样式和tailwindcss冲突问题 9 | 'postcss-antd-fixes': { prefixes: ['ant', 'el'] }, 10 | 'postcss-import': {}, 11 | 'postcss-preset-env': {}, 12 | tailwindcss: { config }, 13 | 'tailwindcss/nesting': {}, 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /internal/tailwind-config/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/node.json", 4 | "compilerOptions": { 5 | "moduleResolution": "bundler" 6 | }, 7 | "include": ["src"], 8 | "exclude": ["node_modules"] 9 | } 10 | -------------------------------------------------------------------------------- /internal/tsconfig/library.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "Web Application", 4 | "extends": "./base.json", 5 | "compilerOptions": { 6 | "jsx": "preserve", 7 | "lib": ["ESNext", "DOM", "DOM.Iterable"], 8 | "useDefineForClassFields": true, 9 | "moduleResolution": "bundler", 10 | "declaration": true, 11 | "noEmit": false 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /internal/tsconfig/node.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "Node Config", 4 | "extends": "./base.json", 5 | "compilerOptions": { 6 | "composite": false, 7 | "lib": ["ESNext"], 8 | "baseUrl": "./", 9 | "types": ["node"], 10 | "noImplicitAny": true 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /internal/tsconfig/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vben/tsconfig", 3 | "version": "5.5.7", 4 | "private": true, 5 | "homepage": "https://github.com/vbenjs/vue-vben-admin", 6 | "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", 7 | "repository": { 8 | "type": "git", 9 | "url": "git+https://github.com/vbenjs/vue-vben-admin.git", 10 | "directory": "internal/tsconfig" 11 | }, 12 | "license": "MIT", 13 | "type": "module", 14 | "files": [ 15 | "base.json", 16 | "library.json", 17 | "node.json", 18 | "web-app.json", 19 | "web.json" 20 | ], 21 | "dependencies": { 22 | "@vben/types": "workspace:*", 23 | "vite": "catalog:" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /internal/tsconfig/web-app.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "Web Application", 4 | "extends": "./web.json", 5 | "compilerOptions": { 6 | "types": ["vite/client", "@vben/types/global"] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /internal/tsconfig/web.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "Web Package", 4 | "extends": "./base.json", 5 | "compilerOptions": { 6 | "jsx": "preserve", 7 | "jsxImportSource": "vue", 8 | "lib": ["ESNext", "DOM", "DOM.Iterable"], 9 | "useDefineForClassFields": true, 10 | "moduleResolution": "bundler", 11 | "types": ["vite/client"], 12 | "declaration": false 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /internal/vite-config/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild'; 2 | 3 | export default defineBuildConfig({ 4 | clean: true, 5 | declaration: true, 6 | entries: ['src/index'], 7 | }); 8 | -------------------------------------------------------------------------------- /internal/vite-config/src/config/common.ts: -------------------------------------------------------------------------------- 1 | import type { UserConfig } from 'vite'; 2 | 3 | async function getCommonConfig(): Promise { 4 | return { 5 | build: { 6 | chunkSizeWarningLimit: 2000, 7 | reportCompressedSize: false, 8 | sourcemap: false, 9 | }, 10 | }; 11 | } 12 | 13 | export { getCommonConfig }; 14 | -------------------------------------------------------------------------------- /internal/vite-config/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './config'; 2 | export * from './options'; 3 | export * from './plugins'; 4 | export { loadAndConvertEnv } from './utils/env'; 5 | -------------------------------------------------------------------------------- /internal/vite-config/src/plugins/inject-app-loading/README.md: -------------------------------------------------------------------------------- 1 | # inject-app-loading 2 | 3 | 用于在应用加载时显示加载动画的插件,可自行选择加载动画的样式。 4 | -------------------------------------------------------------------------------- /internal/vite-config/src/plugins/print.ts: -------------------------------------------------------------------------------- 1 | import type { PluginOption } from 'vite'; 2 | 3 | import type { PrintPluginOptions } from '../typing'; 4 | 5 | import { colors } from '@vben/node-utils'; 6 | 7 | export const vitePrintPlugin = ( 8 | options: PrintPluginOptions = {}, 9 | ): PluginOption => { 10 | const { infoMap = {} } = options; 11 | 12 | return { 13 | configureServer(server) { 14 | const _printUrls = server.printUrls; 15 | server.printUrls = () => { 16 | _printUrls(); 17 | 18 | for (const [key, value] of Object.entries(infoMap)) { 19 | console.log( 20 | ` ${colors.green('➜')} ${colors.bold(key)}: ${colors.cyan(value)}`, 21 | ); 22 | } 23 | }; 24 | }, 25 | enforce: 'pre', 26 | name: 'vite:print-info', 27 | }; 28 | }; 29 | -------------------------------------------------------------------------------- /internal/vite-config/src/plugins/vxe-table.ts: -------------------------------------------------------------------------------- 1 | import type { PluginOption } from 'vite'; 2 | 3 | import { lazyImport, VxeResolver } from 'vite-plugin-lazy-import'; 4 | 5 | async function viteVxeTableImportsPlugin(): Promise { 6 | return [ 7 | lazyImport({ 8 | resolvers: [ 9 | VxeResolver({ 10 | libraryName: 'vxe-table', 11 | }), 12 | VxeResolver({ 13 | libraryName: 'vxe-pc-ui', 14 | }), 15 | ], 16 | }), 17 | ]; 18 | } 19 | 20 | export { viteVxeTableImportsPlugin }; 21 | -------------------------------------------------------------------------------- /internal/vite-config/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/node.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/@core/README.md: -------------------------------------------------------------------------------- 1 | # @vben-core 2 | 3 | 系统一些比较基础的SDK和UI组件库,该目录后续完善后,可能会迁移出去或者发布到npm,请勿将任何业务逻辑和业务包放在该目录。 4 | -------------------------------------------------------------------------------- /packages/@core/base/README.md: -------------------------------------------------------------------------------- 1 | # base 2 | 3 | 基础共享包,请勿引入 workspace 依赖 4 | 5 | - 6 | -------------------------------------------------------------------------------- /packages/@core/base/design/src/design-tokens/index.ts: -------------------------------------------------------------------------------- 1 | import './default.css'; 2 | import './dark.css'; 3 | 4 | export {}; 5 | -------------------------------------------------------------------------------- /packages/@core/base/design/src/index.ts: -------------------------------------------------------------------------------- 1 | import './design-tokens'; 2 | 3 | import './css/global.css'; 4 | import './css/transition.css'; 5 | import './css/nprogress.css'; 6 | import './css/ui.css'; 7 | 8 | export {}; 9 | -------------------------------------------------------------------------------- /packages/@core/base/design/src/scss-bem/bem.scss: -------------------------------------------------------------------------------- 1 | @forward './constants'; 2 | 3 | @mixin b($block) { 4 | $B: $namespace + '-' + $block !global; 5 | 6 | .#{$B} { 7 | @content; 8 | } 9 | } 10 | 11 | @mixin e($name) { 12 | @at-root { 13 | &#{$element-separator}#{$name} { 14 | @content; 15 | } 16 | } 17 | } 18 | 19 | @mixin m($name) { 20 | @at-root { 21 | &#{$modifier-separator}#{$name} { 22 | @content; 23 | } 24 | } 25 | } 26 | 27 | // block__element.is-active {} 28 | @mixin is($state, $prefix: $state-prefix) { 29 | @at-root { 30 | &.#{$prefix}-#{$state} { 31 | @content; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /packages/@core/base/design/src/scss-bem/constants.scss: -------------------------------------------------------------------------------- 1 | $namespace: 'vben' !default; 2 | $common-separator: '-' !default; 3 | $element-separator: '__' !default; 4 | $modifier-separator: '--' !default; 5 | $state-prefix: 'is' !default; 6 | -------------------------------------------------------------------------------- /packages/@core/base/design/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/web.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/@core/base/design/vite.config.mts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from '@vben/vite-config'; 2 | 3 | export default defineConfig(async () => { 4 | return { 5 | vite: { 6 | publicDir: 'src/scss-bem', 7 | }, 8 | }; 9 | }); 10 | -------------------------------------------------------------------------------- /packages/@core/base/icons/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild'; 2 | 3 | export default defineBuildConfig({ 4 | clean: true, 5 | declaration: true, 6 | entries: ['src/index'], 7 | }); 8 | -------------------------------------------------------------------------------- /packages/@core/base/icons/src/create-icon.ts: -------------------------------------------------------------------------------- 1 | import { defineComponent, h } from 'vue'; 2 | 3 | import { Icon } from '@iconify/vue'; 4 | 5 | function createIconifyIcon(icon: string) { 6 | return defineComponent({ 7 | name: `Icon-${icon}`, 8 | setup(props, { attrs }) { 9 | return () => h(Icon, { icon, ...props, ...attrs }); 10 | }, 11 | }); 12 | } 13 | 14 | export { createIconifyIcon }; 15 | -------------------------------------------------------------------------------- /packages/@core/base/icons/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create-icon'; 2 | 3 | export * from './lucide'; 4 | 5 | export type { IconifyIcon as IconifyIconStructure } from '@iconify/vue'; 6 | export { 7 | addCollection, 8 | addIcon, 9 | Icon as IconifyIcon, 10 | listIcons, 11 | } from '@iconify/vue'; 12 | -------------------------------------------------------------------------------- /packages/@core/base/icons/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/web.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/@core/base/shared/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild'; 2 | 3 | export default defineBuildConfig({ 4 | clean: true, 5 | declaration: true, 6 | entries: [ 7 | 'src/store', 8 | 'src/constants/index', 9 | 'src/utils/index', 10 | 'src/color/index', 11 | 'src/cache/index', 12 | 'src/global-state', 13 | ], 14 | }); 15 | -------------------------------------------------------------------------------- /packages/@core/base/shared/src/cache/index.ts: -------------------------------------------------------------------------------- 1 | export * from './storage-manager'; 2 | -------------------------------------------------------------------------------- /packages/@core/base/shared/src/cache/types.ts: -------------------------------------------------------------------------------- 1 | type StorageType = 'localStorage' | 'sessionStorage'; 2 | 3 | interface StorageValue { 4 | data: T; 5 | expiry: null | number; 6 | } 7 | 8 | interface IStorageCache { 9 | clear(): void; 10 | getItem(key: string): null | T; 11 | key(index: number): null | string; 12 | length(): number; 13 | removeItem(key: string): void; 14 | setItem(key: string, value: T, expiryInMinutes?: number): void; 15 | } 16 | 17 | export type { IStorageCache, StorageType, StorageValue }; 18 | -------------------------------------------------------------------------------- /packages/@core/base/shared/src/color/color.ts: -------------------------------------------------------------------------------- 1 | import { TinyColor } from '@ctrl/tinycolor'; 2 | 3 | export function isDarkColor(color: string) { 4 | return new TinyColor(color).isDark(); 5 | } 6 | 7 | export function isLightColor(color: string) { 8 | return new TinyColor(color).isLight(); 9 | } 10 | -------------------------------------------------------------------------------- /packages/@core/base/shared/src/color/index.ts: -------------------------------------------------------------------------------- 1 | export * from './color'; 2 | export * from './convert'; 3 | export * from './generator'; 4 | -------------------------------------------------------------------------------- /packages/@core/base/shared/src/constants/globals.ts: -------------------------------------------------------------------------------- 1 | /** layout content 组件的高度 */ 2 | export const CSS_VARIABLE_LAYOUT_CONTENT_HEIGHT = `--vben-content-height`; 3 | /** layout content 组件的宽度 */ 4 | export const CSS_VARIABLE_LAYOUT_CONTENT_WIDTH = `--vben-content-width`; 5 | /** layout header 组件的高度 */ 6 | export const CSS_VARIABLE_LAYOUT_HEADER_HEIGHT = `--vben-header-height`; 7 | /** layout footer 组件的高度 */ 8 | export const CSS_VARIABLE_LAYOUT_FOOTER_HEIGHT = `--vben-footer-height`; 9 | 10 | /** 内容区域的组件ID */ 11 | export const ELEMENT_ID_MAIN_CONTENT = `__vben_main_content`; 12 | 13 | /** 14 | * @zh_CN 默认命名空间 15 | */ 16 | export const DEFAULT_NAMESPACE = 'vben'; 17 | -------------------------------------------------------------------------------- /packages/@core/base/shared/src/constants/index.ts: -------------------------------------------------------------------------------- 1 | export * from './globals'; 2 | export * from './vben'; 3 | -------------------------------------------------------------------------------- /packages/@core/base/shared/src/constants/vben.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @zh_CN GITHUB 仓库地址 3 | */ 4 | export const VBEN_GITHUB_URL = 'https://github.com/vbenjs/vue-vben-admin'; 5 | 6 | /** 7 | * @zh_CN 文档地址 8 | */ 9 | export const VBEN_DOC_URL = 'https://doc.vben.pro'; 10 | 11 | /** 12 | * @zh_CN Vben Logo 13 | */ 14 | export const VBEN_LOGO_URL = 15 | 'https://unpkg.com/@vbenjs/static-source@0.1.7/source/logo-v1.webp'; 16 | 17 | /** 18 | * @zh_CN Vben Admin 首页地址 19 | */ 20 | export const VBEN_PREVIEW_URL = 'https://www.vben.pro'; 21 | 22 | export const VBEN_ELE_PREVIEW_URL = 'https://ele.vben.pro'; 23 | 24 | export const VBEN_NAIVE_PREVIEW_URL = 'https://naive.vben.pro'; 25 | 26 | export const VBEN_ANT_PREVIEW_URL = 'https://ant.vben.pro'; 27 | -------------------------------------------------------------------------------- /packages/@core/base/shared/src/store.ts: -------------------------------------------------------------------------------- 1 | export * from '@tanstack/vue-store'; 2 | -------------------------------------------------------------------------------- /packages/@core/base/shared/src/utils/cn.ts: -------------------------------------------------------------------------------- 1 | import type { ClassValue } from 'clsx'; 2 | 3 | import { clsx } from 'clsx'; 4 | import { twMerge } from 'tailwind-merge'; 5 | 6 | function cn(...inputs: ClassValue[]) { 7 | return twMerge(clsx(inputs)); 8 | } 9 | 10 | export { cn }; 11 | -------------------------------------------------------------------------------- /packages/@core/base/shared/src/utils/date.ts: -------------------------------------------------------------------------------- 1 | import dayjs from 'dayjs'; 2 | 3 | export function formatDate(time: number | string, format = 'YYYY-MM-DD') { 4 | try { 5 | const date = dayjs(time); 6 | if (!date.isValid()) { 7 | throw new Error('Invalid date'); 8 | } 9 | return date.format(format); 10 | } catch (error) { 11 | console.error(`Error formatting date: ${error}`); 12 | return time; 13 | } 14 | } 15 | 16 | export function formatDateTime(time: number | string) { 17 | return formatDate(time, 'YYYY-MM-DD HH:mm:ss'); 18 | } 19 | 20 | export function isDate(value: any): value is Date { 21 | return value instanceof Date; 22 | } 23 | 24 | export function isDayjsObject(value: any): value is dayjs.Dayjs { 25 | return dayjs.isDayjs(value); 26 | } 27 | -------------------------------------------------------------------------------- /packages/@core/base/shared/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './cn'; 2 | export * from './date'; 3 | export * from './diff'; 4 | export * from './dom'; 5 | export * from './download'; 6 | export * from './inference'; 7 | export * from './letter'; 8 | export * from './merge'; 9 | export * from './nprogress'; 10 | export * from './state-handler'; 11 | export * from './to'; 12 | export * from './tree'; 13 | export * from './unique'; 14 | export * from './update-css-variables'; 15 | export * from './util'; 16 | export * from './window'; 17 | export { default as cloneDeep } from 'lodash.clonedeep'; 18 | export { default as get } from 'lodash.get'; 19 | export { default as isEqual } from 'lodash.isequal'; 20 | export { default as set } from 'lodash.set'; 21 | -------------------------------------------------------------------------------- /packages/@core/base/shared/src/utils/merge.ts: -------------------------------------------------------------------------------- 1 | import { createDefu } from 'defu'; 2 | 3 | export { createDefu as createMerge, defu as merge } from 'defu'; 4 | 5 | export const mergeWithArrayOverride = createDefu((originObj, key, updates) => { 6 | if (Array.isArray(originObj[key]) && Array.isArray(updates)) { 7 | originObj[key] = updates; 8 | return true; 9 | } 10 | }); 11 | -------------------------------------------------------------------------------- /packages/@core/base/shared/src/utils/to.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @param { Readonly } promise 3 | * @param {object=} errorExt - Additional Information you can pass to the err object 4 | * @return { Promise } 5 | */ 6 | export async function to( 7 | promise: Readonly>, 8 | errorExt?: object, 9 | ): Promise<[null, T] | [U, undefined]> { 10 | try { 11 | const data = await promise; 12 | const result: [null, T] = [null, data]; 13 | return result; 14 | } catch (error) { 15 | if (errorExt) { 16 | const parsedError = Object.assign({}, error, errorExt); 17 | return [parsedError as U, undefined]; 18 | } 19 | return [error as U, undefined]; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/@core/base/shared/src/utils/unique.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * 根据指定字段对对象数组进行去重 3 | * @param arr 要去重的对象数组 4 | * @param key 去重依据的字段名 5 | * @returns 去重后的对象数组 6 | */ 7 | function uniqueByField(arr: T[], key: keyof T): T[] { 8 | const seen = new Map(); 9 | return arr.filter((item) => { 10 | const value = item[key]; 11 | return seen.has(value) ? false : (seen.set(value, item), true); 12 | }); 13 | } 14 | 15 | export { uniqueByField }; 16 | -------------------------------------------------------------------------------- /packages/@core/base/shared/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/library.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/@core/base/typings/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild'; 2 | 3 | export default defineBuildConfig({ 4 | clean: true, 5 | declaration: true, 6 | entries: ['src/index'], 7 | }); 8 | -------------------------------------------------------------------------------- /packages/@core/base/typings/src/basic.d.ts: -------------------------------------------------------------------------------- 1 | interface BasicOption { 2 | label: string; 3 | value: string; 4 | } 5 | 6 | type SelectOption = BasicOption; 7 | 8 | type TabOption = BasicOption; 9 | 10 | interface BasicUserInfo { 11 | /** 12 | * 头像 13 | */ 14 | avatar: string; 15 | /** 16 | * 用户昵称 17 | */ 18 | realName: string; 19 | /** 20 | * 用户角色 21 | */ 22 | roles?: string[]; 23 | /** 24 | * 用户id 25 | */ 26 | userId: string; 27 | /** 28 | * 用户名 29 | */ 30 | username: string; 31 | } 32 | 33 | type ClassType = Array | object | string; 34 | 35 | export type { BasicOption, BasicUserInfo, ClassType, SelectOption, TabOption }; 36 | -------------------------------------------------------------------------------- /packages/@core/base/typings/src/index.ts: -------------------------------------------------------------------------------- 1 | export type * from './app'; 2 | export type * from './basic'; 3 | export type * from './helper'; 4 | export type * from './menu-record'; 5 | export type * from './tabs'; 6 | export type * from './vue-router'; 7 | -------------------------------------------------------------------------------- /packages/@core/base/typings/src/tabs.ts: -------------------------------------------------------------------------------- 1 | import type { RouteLocationNormalized } from 'vue-router'; 2 | 3 | export interface TabDefinition extends RouteLocationNormalized { 4 | /** 5 | * 标签页的key 6 | */ 7 | key?: string; 8 | } 9 | -------------------------------------------------------------------------------- /packages/@core/base/typings/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/library.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/@core/base/typings/vue-router.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-restricted-imports */ 2 | import type { RouteMeta as IRouteMeta } from '@vben-core/typings'; 3 | 4 | import 'vue-router'; 5 | 6 | declare module 'vue-router' { 7 | // eslint-disable-next-line @typescript-eslint/no-empty-object-type 8 | interface RouteMeta extends IRouteMeta {} 9 | } 10 | -------------------------------------------------------------------------------- /packages/@core/composables/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild'; 2 | 3 | export default defineBuildConfig({ 4 | clean: true, 5 | declaration: true, 6 | entries: ['src/index'], 7 | }); 8 | -------------------------------------------------------------------------------- /packages/@core/composables/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-is-mobile'; 2 | export * from './use-layout-style'; 3 | export * from './use-namespace'; 4 | export * from './use-priority-value'; 5 | export * from './use-scroll-lock'; 6 | export * from './use-simple-locale'; 7 | export * from './use-sortable'; 8 | export { 9 | useEmitAsProps, 10 | useForwardExpose, 11 | useForwardProps, 12 | useForwardPropsEmits, 13 | } from 'radix-vue'; 14 | -------------------------------------------------------------------------------- /packages/@core/composables/src/use-is-mobile.ts: -------------------------------------------------------------------------------- 1 | import { breakpointsTailwind, useBreakpoints } from '@vueuse/core'; 2 | 3 | export function useIsMobile() { 4 | const breakpoints = useBreakpoints(breakpointsTailwind); 5 | const isMobile = breakpoints.smaller('md'); 6 | return { isMobile }; 7 | } 8 | -------------------------------------------------------------------------------- /packages/@core/composables/src/use-simple-locale/README.md: -------------------------------------------------------------------------------- 1 | # Simple i18n 2 | 3 | Simple i18 implementation 4 | -------------------------------------------------------------------------------- /packages/@core/composables/src/use-simple-locale/index.ts: -------------------------------------------------------------------------------- 1 | import type { Locale } from './messages'; 2 | 3 | import { computed, ref } from 'vue'; 4 | 5 | import { createSharedComposable } from '@vueuse/core'; 6 | 7 | import { getMessages } from './messages'; 8 | 9 | export const useSimpleLocale = createSharedComposable(() => { 10 | const currentLocale = ref('zh-CN'); 11 | 12 | const setSimpleLocale = (locale: Locale) => { 13 | currentLocale.value = locale; 14 | }; 15 | 16 | const $t = computed(() => { 17 | const localeMessages = getMessages(currentLocale.value); 18 | return (key: string) => { 19 | return localeMessages[key] || key; 20 | }; 21 | }); 22 | return { 23 | $t, 24 | currentLocale, 25 | setSimpleLocale, 26 | }; 27 | }); 28 | -------------------------------------------------------------------------------- /packages/@core/composables/src/use-simple-locale/messages.ts: -------------------------------------------------------------------------------- 1 | export type Locale = 'en-US' | 'zh-CN'; 2 | 3 | export const messages: Record> = { 4 | 'en-US': { 5 | cancel: 'Cancel', 6 | collapse: 'Collapse', 7 | confirm: 'Confirm', 8 | expand: 'Expand', 9 | prompt: 'Prompt', 10 | reset: 'Reset', 11 | submit: 'Submit', 12 | }, 13 | 'zh-CN': { 14 | cancel: '取消', 15 | collapse: '收起', 16 | confirm: '确认', 17 | expand: '展开', 18 | prompt: '提示', 19 | reset: '重置', 20 | submit: '提交', 21 | }, 22 | }; 23 | 24 | export const getMessages = (locale: Locale) => messages[locale]; 25 | -------------------------------------------------------------------------------- /packages/@core/composables/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/library.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/@core/preferences/__tests__/config.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from 'vitest'; 2 | 3 | import { defaultPreferences } from '../src/config'; 4 | 5 | describe('defaultPreferences immutability test', () => { 6 | // 创建快照,确保默认配置对象不被修改 7 | it('should not modify the config object', () => { 8 | expect(defaultPreferences).toMatchSnapshot(); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /packages/@core/preferences/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild'; 2 | 3 | export default defineBuildConfig({ 4 | clean: true, 5 | declaration: true, 6 | entries: ['src/index'], 7 | }); 8 | -------------------------------------------------------------------------------- /packages/@core/preferences/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/web.json", 4 | "include": ["src", "__tests__"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/README.md: -------------------------------------------------------------------------------- 1 | # ui-kit 2 | 3 | 用于管理公共组件、不同UI组件库封装的组件 4 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/form-ui/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild'; 2 | 3 | export default defineBuildConfig({ 4 | clean: true, 5 | declaration: true, 6 | entries: [ 7 | { 8 | builder: 'mkdist', 9 | input: './src', 10 | loaders: ['vue'], 11 | pattern: ['**/*.vue'], 12 | }, 13 | { 14 | builder: 'mkdist', 15 | format: 'esm', 16 | input: './src', 17 | loaders: ['js'], 18 | pattern: ['**/*.ts'], 19 | }, 20 | ], 21 | }); 22 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/form-ui/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | export { default } from '@vben/tailwind-config/postcss'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/form-ui/src/form-render/context.ts: -------------------------------------------------------------------------------- 1 | import type { FormRenderProps } from '../types'; 2 | 3 | import { computed } from 'vue'; 4 | 5 | import { createContext } from '@vben-core/shadcn-ui'; 6 | 7 | export const [injectRenderFormProps, provideFormRenderProps] = 8 | createContext('FormRenderProps'); 9 | 10 | export const useFormContext = () => { 11 | const formRenderProps = injectRenderFormProps(); 12 | 13 | const isVertical = computed(() => formRenderProps.layout === 'vertical'); 14 | 15 | const componentMap = computed(() => formRenderProps.componentMap); 16 | const componentBindEventMap = computed( 17 | () => formRenderProps.componentBindEventMap, 18 | ); 19 | return { 20 | componentBindEventMap, 21 | componentMap, 22 | isVertical, 23 | }; 24 | }; 25 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/form-ui/src/form-render/index.ts: -------------------------------------------------------------------------------- 1 | export { default as FormField } from './form-field.vue'; 2 | export { default as FormLabel } from './form-label.vue'; 3 | export { default as Form } from './form.vue'; 4 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/form-ui/src/index.ts: -------------------------------------------------------------------------------- 1 | export { setupVbenForm } from './config'; 2 | 3 | export type { 4 | BaseFormComponentType, 5 | ExtendedFormApi, 6 | VbenFormProps, 7 | FormSchema as VbenFormSchema, 8 | } from './types'; 9 | 10 | export * from './use-vben-form'; 11 | // export { default as VbenForm } from './vben-form.vue'; 12 | export * as z from 'zod'; 13 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/form-ui/tailwind.config.mjs: -------------------------------------------------------------------------------- 1 | export { default } from '@vben/tailwind-config'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/form-ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/web.json", 4 | "include": ["src", "__tests__"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/layout-ui/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild'; 2 | 3 | export default defineBuildConfig({ 4 | clean: true, 5 | declaration: true, 6 | entries: [ 7 | { 8 | builder: 'mkdist', 9 | input: './src', 10 | loaders: ['vue'], 11 | pattern: ['**/*.vue'], 12 | }, 13 | { 14 | builder: 'mkdist', 15 | format: 'esm', 16 | input: './src', 17 | loaders: ['js'], 18 | pattern: ['**/*.ts'], 19 | }, 20 | ], 21 | }); 22 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/layout-ui/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | export { default } from '@vben/tailwind-config/postcss'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/layout-ui/src/components/index.ts: -------------------------------------------------------------------------------- 1 | export { default as LayoutContent } from './layout-content.vue'; 2 | export { default as LayoutFooter } from './layout-footer.vue'; 3 | export { default as LayoutHeader } from './layout-header.vue'; 4 | export { default as LayoutSidebar } from './layout-sidebar.vue'; 5 | export { default as LayoutTabbar } from './layout-tabbar.vue'; 6 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/layout-ui/src/components/layout-tabbar.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 31 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/layout-ui/src/components/widgets/index.ts: -------------------------------------------------------------------------------- 1 | export { default as SidebarCollapseButton } from './sidebar-collapse-button.vue'; 2 | export { default as SidebarFixedButton } from './sidebar-fixed-button.vue'; 3 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/layout-ui/src/components/widgets/sidebar-collapse-button.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 20 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/layout-ui/src/components/widgets/sidebar-fixed-button.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 20 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/layout-ui/src/index.ts: -------------------------------------------------------------------------------- 1 | export type * from './vben-layout'; 2 | export { default as VbenAdminLayout } from './vben-layout.vue'; 3 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/layout-ui/tailwind.config.mjs: -------------------------------------------------------------------------------- 1 | export { default } from '@vben/tailwind-config'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/layout-ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/web.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/menu-ui/README.md: -------------------------------------------------------------------------------- 1 | # 菜单组件 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/menu-ui/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild'; 2 | 3 | export default defineBuildConfig({ 4 | clean: true, 5 | declaration: true, 6 | entries: [ 7 | { 8 | builder: 'mkdist', 9 | input: './src', 10 | pattern: ['**/*'], 11 | }, 12 | { 13 | builder: 'mkdist', 14 | input: './src', 15 | loaders: ['vue'], 16 | pattern: ['**/*.vue'], 17 | }, 18 | { 19 | builder: 'mkdist', 20 | format: 'esm', 21 | input: './src', 22 | loaders: ['js'], 23 | pattern: ['**/*.ts'], 24 | }, 25 | ], 26 | }); 27 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/menu-ui/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | export { default } from '@vben/tailwind-config/postcss'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/menu-ui/src/components/index.ts: -------------------------------------------------------------------------------- 1 | export { default as MenuBadge } from './menu-badge.vue'; 2 | export { default as MenuItem } from './menu-item.vue'; 3 | export { default as Menu } from './menu.vue'; 4 | export { default as SubMenu } from './sub-menu.vue'; 5 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/menu-ui/src/components/menu-badge-dot.vue: -------------------------------------------------------------------------------- 1 | 14 | 29 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/menu-ui/src/components/normal-menu/index.ts: -------------------------------------------------------------------------------- 1 | export type * from './normal-menu'; 2 | export { default as NormalMenu } from './normal-menu.vue'; 3 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/menu-ui/src/components/normal-menu/normal-menu.ts: -------------------------------------------------------------------------------- 1 | import type { MenuRecordRaw } from '@vben-core/typings'; 2 | 3 | interface NormalMenuProps { 4 | /** 5 | * 菜单数据 6 | */ 7 | activePath?: string; 8 | /** 9 | * 是否折叠 10 | */ 11 | collapse?: boolean; 12 | /** 13 | * 菜单项 14 | */ 15 | menus?: MenuRecordRaw[]; 16 | /** 17 | * @zh_CN 是否圆润风格 18 | * @default true 19 | */ 20 | rounded?: boolean; 21 | /** 22 | * 主题 23 | */ 24 | theme?: 'dark' | 'light'; 25 | } 26 | 27 | export type { NormalMenuProps }; 28 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/menu-ui/src/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-menu'; 2 | export * from './use-menu-context'; 3 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/menu-ui/src/index.ts: -------------------------------------------------------------------------------- 1 | export { default as MenuBadge } from './components/menu-badge.vue'; 2 | export * from './components/normal-menu'; 3 | export { default as Menu } from './menu.vue'; 4 | export type * from './types'; 5 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/menu-ui/src/menu.vue: -------------------------------------------------------------------------------- 1 | 25 | 26 | 33 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/menu-ui/tailwind.config.mjs: -------------------------------------------------------------------------------- 1 | export { default } from '@vben/tailwind-config'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/menu-ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/web.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/popup-ui/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild'; 2 | 3 | export default defineBuildConfig({ 4 | clean: true, 5 | declaration: true, 6 | entries: [ 7 | { 8 | builder: 'mkdist', 9 | input: './src', 10 | loaders: ['vue'], 11 | pattern: ['**/*.vue'], 12 | }, 13 | { 14 | builder: 'mkdist', 15 | format: 'esm', 16 | input: './src', 17 | loaders: ['js'], 18 | pattern: ['**/*.ts'], 19 | }, 20 | ], 21 | }); 22 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/popup-ui/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | export { default } from '@vben/tailwind-config/postcss'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/popup-ui/src/alert/index.ts: -------------------------------------------------------------------------------- 1 | export type { 2 | AlertProps, 3 | BeforeCloseScope, 4 | IconType, 5 | PromptProps, 6 | } from './alert'; 7 | export { useAlertContext } from './alert'; 8 | export { default as Alert } from './alert.vue'; 9 | export { 10 | vbenAlert as alert, 11 | clearAllAlerts, 12 | vbenConfirm as confirm, 13 | vbenPrompt as prompt, 14 | } from './AlertBuilder'; 15 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/popup-ui/src/drawer/index.ts: -------------------------------------------------------------------------------- 1 | export type * from './drawer'; 2 | export { default as VbenDrawer } from './drawer.vue'; 3 | export { setDefaultDrawerProps, useVbenDrawer } from './use-drawer'; 4 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/popup-ui/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './alert'; 2 | export * from './drawer'; 3 | export * from './modal'; 4 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/popup-ui/src/modal/index.ts: -------------------------------------------------------------------------------- 1 | export type * from './modal'; 2 | export { default as VbenModal } from './modal.vue'; 3 | export { setDefaultModalProps, useVbenModal } from './use-modal'; 4 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/popup-ui/tailwind.config.mjs: -------------------------------------------------------------------------------- 1 | export { default } from '@vben/tailwind-config'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/popup-ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/web.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild'; 2 | 3 | export default defineBuildConfig({ 4 | clean: true, 5 | declaration: true, 6 | entries: [ 7 | { 8 | builder: 'mkdist', 9 | input: './src', 10 | 11 | pattern: ['**/*'], 12 | }, 13 | { 14 | builder: 'mkdist', 15 | input: './src', 16 | loaders: ['vue'], 17 | pattern: ['**/*.vue'], 18 | }, 19 | { 20 | builder: 'mkdist', 21 | format: 'esm', 22 | input: './src', 23 | loaders: ['js'], 24 | pattern: ['**/*.ts'], 25 | }, 26 | ], 27 | }); 28 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://shadcn-vue.com/schema.json", 3 | "style": "new-york", 4 | "typescript": true, 5 | "tailwind": { 6 | "config": "tailwind.config.mjs", 7 | "css": "src/assets/index.css", 8 | "baseColor": "slate", 9 | "cssVariables": true 10 | }, 11 | "framework": "vite", 12 | "aliases": { 13 | "components": "@vben-core/shadcn-ui/components", 14 | "utils": "@vben-core/shared/utils" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | export { default } from '@vben/tailwind-config/postcss'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/avatar/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VbenAvatar } from './avatar.vue'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/back-top/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VbenBackTop } from './back-top.vue'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/breadcrumb/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VbenBreadcrumbView } from './breadcrumb-view.vue'; 2 | 3 | export type * from './types'; 4 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/breadcrumb/types.ts: -------------------------------------------------------------------------------- 1 | import type { Component } from 'vue'; 2 | 3 | import type { BreadcrumbStyleType } from '@vben-core/typings'; 4 | 5 | export interface IBreadcrumb { 6 | icon?: Component | string; 7 | isHome?: boolean; 8 | items?: IBreadcrumb[]; 9 | path?: string; 10 | title?: string; 11 | } 12 | 13 | export interface BreadcrumbProps { 14 | breadcrumbs: IBreadcrumb[]; 15 | showIcon?: boolean; 16 | styleType?: BreadcrumbStyleType; 17 | } 18 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/button/index.ts: -------------------------------------------------------------------------------- 1 | export type * from './button'; 2 | export { default as VbenButtonGroup } from './button-group.vue'; 3 | export { default as VbenButton } from './button.vue'; 4 | export { default as VbenCheckButtonGroup } from './check-button-group.vue'; 5 | export { default as VbenIconButton } from './icon-button.vue'; 6 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/checkbox/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VbenCheckbox } from './checkbox.vue'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/context-menu/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VbenContextMenu } from './context-menu.vue'; 2 | 3 | export type * from './interface'; 4 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/context-menu/interface.ts: -------------------------------------------------------------------------------- 1 | import type { Component } from 'vue'; 2 | 3 | interface IContextMenuItem { 4 | /** 5 | * @zh_CN 是否禁用 6 | */ 7 | disabled?: boolean; 8 | /** 9 | * @zh_CN 点击事件处理 10 | * @param data 11 | */ 12 | handler?: (data: any) => void; 13 | /** 14 | * @zh_CN 图标 15 | */ 16 | icon?: Component; 17 | /** 18 | * @zh_CN 是否显示图标 19 | */ 20 | inset?: boolean; 21 | /** 22 | * @zh_CN 唯一标识 23 | */ 24 | key: string; 25 | /** 26 | * @zh_CN 是否是分割线 27 | */ 28 | separator?: boolean; 29 | /** 30 | * @zh_CN 快捷键 31 | */ 32 | shortcut?: string; 33 | /** 34 | * @zh_CN 标题 35 | */ 36 | text: string; 37 | } 38 | export type { IContextMenuItem }; 39 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/count-to-animator/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VbenCountToAnimator } from './count-to-animator.vue'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/dropdown-menu/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VbenDropdownMenu } from './dropdown-menu.vue'; 2 | export { default as VbenDropdownRadioMenu } from './dropdown-radio-menu.vue'; 3 | 4 | export type * from './interface'; 5 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/dropdown-menu/interface.ts: -------------------------------------------------------------------------------- 1 | import type { Component } from 'vue'; 2 | 3 | interface VbenDropdownMenuItem { 4 | disabled?: boolean; 5 | /** 6 | * @zh_CN 点击事件处理 7 | * @param data 8 | */ 9 | handler?: (data: any) => void; 10 | /** 11 | * @zh_CN 图标 12 | */ 13 | icon?: Component; 14 | /** 15 | * @zh_CN 标题 16 | */ 17 | label: string; 18 | /** 19 | * @zh_CN 是否是分割线 20 | */ 21 | separator?: boolean; 22 | /** 23 | * @zh_CN 唯一标识 24 | */ 25 | value: string; 26 | } 27 | 28 | interface DropdownMenuProps { 29 | menus: VbenDropdownMenuItem[]; 30 | } 31 | 32 | export type { DropdownMenuProps, VbenDropdownMenuItem }; 33 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/expandable-arrow/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VbenExpandableArrow } from './expandable-arrow.vue'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/full-screen/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VbenFullScreen } from './full-screen.vue'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/hover-card/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VbenHoverCard } from './hover-card.vue'; 2 | export type { HoverCardContentProps } from 'radix-vue'; 3 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/icon/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VbenIcon } from './icon.vue'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from './avatar'; 2 | export * from './back-top'; 3 | export * from './breadcrumb'; 4 | export * from './button'; 5 | export * from './checkbox'; 6 | export * from './context-menu'; 7 | export * from './count-to-animator'; 8 | export * from './dropdown-menu'; 9 | export * from './expandable-arrow'; 10 | export * from './full-screen'; 11 | export * from './hover-card'; 12 | export * from './icon'; 13 | export * from './input-password'; 14 | export * from './logo'; 15 | export * from './pin-input'; 16 | export * from './popover'; 17 | export * from './render-content'; 18 | export * from './scrollbar'; 19 | export * from './segmented'; 20 | export * from './select'; 21 | export * from './spine-text'; 22 | export * from './spinner'; 23 | export * from './tooltip'; 24 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/input-password/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VbenInputPassword } from './input-password.vue'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/logo/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VbenLogo } from './logo.vue'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/pin-input/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VbenPinInput } from './input.vue'; 2 | 3 | export type * from './types'; 4 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/pin-input/types.ts: -------------------------------------------------------------------------------- 1 | interface PinInputProps { 2 | class?: any; 3 | /** 4 | * 验证码长度 5 | */ 6 | codeLength?: number; 7 | /** 8 | * 发送验证码按钮文本 9 | */ 10 | createText?: (countdown: number) => string; 11 | /** 12 | * 是否禁用 13 | */ 14 | disabled?: boolean; 15 | /** 16 | * 自定义验证码发送逻辑 17 | * @returns 18 | */ 19 | handleSendCode?: () => Promise; 20 | /** 21 | * 发送验证码按钮loading 22 | */ 23 | loading?: boolean; 24 | /** 25 | * 最大重试时间 26 | */ 27 | maxTime?: number; 28 | } 29 | 30 | export type { PinInputProps }; 31 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/popover/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VbenPopover } from './popover.vue'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/render-content/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VbenRenderContent } from './render-content.vue'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/scrollbar/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VbenScrollbar } from './scrollbar.vue'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/segmented/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VbenSegmented } from './segmented.vue'; 2 | 3 | export type * from './types'; 4 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/segmented/types.ts: -------------------------------------------------------------------------------- 1 | interface SegmentedItem { 2 | label: string; 3 | value: string; 4 | } 5 | 6 | export type { SegmentedItem }; 7 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/select/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VbenSelect } from './select.vue'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/spine-text/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VbenSpineText } from './spine-text.vue'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/spinner/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VbenLoading } from './loading.vue'; 2 | export { default as VbenSpinner } from './spinner.vue'; 3 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/tooltip/help-tooltip.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 32 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/components/tooltip/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VbenHelpTooltip } from './help-tooltip.vue'; 2 | export { default as VbenTooltip } from './tooltip.vue'; 3 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './components'; 2 | export * from './ui'; 3 | export { createContext, Slot, VisuallyHidden } from 'radix-vue'; 4 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/accordion/Accordion.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 17 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/accordion/AccordionItem.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 26 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/accordion/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Accordion } from './Accordion.vue'; 2 | export { default as AccordionContent } from './AccordionContent.vue'; 3 | export { default as AccordionItem } from './AccordionItem.vue'; 4 | export { default as AccordionTrigger } from './AccordionTrigger.vue'; 5 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/alert-dialog/AlertDialog.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 17 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/alert-dialog/AlertDialogAction.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/alert-dialog/AlertDialogCancel.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/alert-dialog/AlertDialogOverlay.vue: -------------------------------------------------------------------------------- 1 | 6 | 9 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/alert-dialog/index.ts: -------------------------------------------------------------------------------- 1 | export { default as AlertDialog } from './AlertDialog.vue'; 2 | export { default as AlertDialogAction } from './AlertDialogAction.vue'; 3 | export { default as AlertDialogCancel } from './AlertDialogCancel.vue'; 4 | export { default as AlertDialogContent } from './AlertDialogContent.vue'; 5 | export { default as AlertDialogDescription } from './AlertDialogDescription.vue'; 6 | export { default as AlertDialogTitle } from './AlertDialogTitle.vue'; 7 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/avatar/Avatar.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 28 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/avatar/AvatarFallback.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/avatar/AvatarImage.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 12 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/avatar/avatar.ts: -------------------------------------------------------------------------------- 1 | import type { VariantProps } from 'class-variance-authority'; 2 | 3 | import { cva } from 'class-variance-authority'; 4 | 5 | export const avatarVariant = cva( 6 | 'inline-flex items-center justify-center font-normal text-foreground select-none shrink-0 bg-secondary overflow-hidden', 7 | { 8 | variants: { 9 | shape: { 10 | circle: 'rounded-full', 11 | square: 'rounded-md', 12 | }, 13 | size: { 14 | base: 'h-16 w-16 text-2xl', 15 | lg: 'h-32 w-32 text-5xl', 16 | sm: 'h-10 w-10 text-xs', 17 | }, 18 | }, 19 | }, 20 | ); 21 | 22 | export type AvatarVariants = VariantProps; 23 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/avatar/index.ts: -------------------------------------------------------------------------------- 1 | export * from './avatar'; 2 | export { default as Avatar } from './Avatar.vue'; 3 | export { default as AvatarFallback } from './AvatarFallback.vue'; 4 | export { default as AvatarImage } from './AvatarImage.vue'; 5 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/badge/Badge.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 19 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/badge/index.ts: -------------------------------------------------------------------------------- 1 | export * from './badge'; 2 | 3 | export { default as Badge } from './Badge.vue'; 4 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/breadcrumb/Breadcrumb.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/breadcrumb/BreadcrumbEllipsis.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 23 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/breadcrumb/BreadcrumbItem.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 18 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/breadcrumb/BreadcrumbLink.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 22 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/breadcrumb/BreadcrumbList.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 21 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/breadcrumb/BreadcrumbPage.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 19 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/breadcrumb/BreadcrumbSeparator.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 22 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/breadcrumb/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Breadcrumb } from './Breadcrumb.vue'; 2 | export { default as BreadcrumbEllipsis } from './BreadcrumbEllipsis.vue'; 3 | export { default as BreadcrumbItem } from './BreadcrumbItem.vue'; 4 | export { default as BreadcrumbLink } from './BreadcrumbLink.vue'; 5 | export { default as BreadcrumbList } from './BreadcrumbList.vue'; 6 | export { default as BreadcrumbPage } from './BreadcrumbPage.vue'; 7 | export { default as BreadcrumbSeparator } from './BreadcrumbSeparator.vue'; 8 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/button/Button.vue: -------------------------------------------------------------------------------- 1 | 23 | 24 | 33 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/button/index.ts: -------------------------------------------------------------------------------- 1 | export * from './button'; 2 | 3 | export { default as Button } from './Button.vue'; 4 | 5 | export type * from './types'; 6 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/button/types.ts: -------------------------------------------------------------------------------- 1 | export type ButtonVariantSize = 2 | | 'default' 3 | | 'icon' 4 | | 'lg' 5 | | 'sm' 6 | | 'xs' 7 | | null 8 | | undefined; 9 | 10 | export type ButtonVariants = 11 | | 'default' 12 | | 'destructive' 13 | | 'ghost' 14 | | 'heavy' 15 | | 'icon' 16 | | 'link' 17 | | 'outline' 18 | | 'secondary' 19 | | null 20 | | undefined; 21 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/card/Card.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 21 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/card/CardContent.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/card/CardDescription.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/card/CardFooter.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/card/CardHeader.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/card/CardTitle.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/card/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Card } from './Card.vue'; 2 | export { default as CardContent } from './CardContent.vue'; 3 | export { default as CardDescription } from './CardDescription.vue'; 4 | export { default as CardFooter } from './CardFooter.vue'; 5 | export { default as CardHeader } from './CardHeader.vue'; 6 | export { default as CardTitle } from './CardTitle.vue'; 7 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/checkbox/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Checkbox } from './Checkbox.vue'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/context-menu/ContextMenu.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 19 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/context-menu/ContextMenuGroup.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/context-menu/ContextMenuPortal.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/context-menu/ContextMenuRadioGroup.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 20 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/context-menu/ContextMenuSeparator.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 25 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/context-menu/ContextMenuShortcut.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 18 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/context-menu/ContextMenuSub.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 17 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/context-menu/ContextMenuTrigger.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/dialog/Dialog.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 17 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/dialog/DialogClose.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/dialog/DialogDescription.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 29 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/dialog/DialogFooter.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/dialog/DialogHeader.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 16 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/dialog/DialogOverlay.vue: -------------------------------------------------------------------------------- 1 | 9 | 12 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/dialog/DialogTitle.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 31 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/dialog/DialogTrigger.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/dialog/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Dialog } from './Dialog.vue'; 2 | export { default as DialogClose } from './DialogClose.vue'; 3 | export { default as DialogContent } from './DialogContent.vue'; 4 | export { default as DialogDescription } from './DialogDescription.vue'; 5 | export { default as DialogFooter } from './DialogFooter.vue'; 6 | export { default as DialogHeader } from './DialogHeader.vue'; 7 | export { default as DialogScrollContent } from './DialogScrollContent.vue'; 8 | export { default as DialogTitle } from './DialogTitle.vue'; 9 | export { default as DialogTrigger } from './DialogTrigger.vue'; 10 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/dropdown-menu/DropdownMenu.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 19 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/dropdown-menu/DropdownMenuGroup.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/dropdown-menu/DropdownMenuRadioGroup.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 20 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/dropdown-menu/DropdownMenuSeparator.vue: -------------------------------------------------------------------------------- 1 | 22 | 23 | 29 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/dropdown-menu/DropdownMenuShortcut.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/dropdown-menu/DropdownMenuSub.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 17 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/dropdown-menu/DropdownMenuTrigger.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/form/FormControl.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 20 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/form/FormDescription.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 21 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/form/FormItem.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 21 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/form/FormLabel.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 19 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/form/FormMessage.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 19 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/form/index.ts: -------------------------------------------------------------------------------- 1 | export { default as FormControl } from './FormControl.vue'; 2 | export { default as FormDescription } from './FormDescription.vue'; 3 | export { default as FormItem } from './FormItem.vue'; 4 | export { default as FormLabel } from './FormLabel.vue'; 5 | export { default as FormMessage } from './FormMessage.vue'; 6 | export { FORM_ITEM_INJECTION_KEY } from './injectionKeys'; 7 | export { 8 | Form, 9 | Field as FormField, 10 | FieldArray as FormFieldArray, 11 | } from 'vee-validate'; 12 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/form/injectionKeys.ts: -------------------------------------------------------------------------------- 1 | import type { InjectionKey } from 'vue'; 2 | 3 | // eslint-disable-next-line symbol-description 4 | export const FORM_ITEM_INJECTION_KEY = Symbol() as InjectionKey; 5 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/hover-card/HoverCard.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 17 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/hover-card/HoverCardTrigger.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/hover-card/index.ts: -------------------------------------------------------------------------------- 1 | export { default as HoverCard } from './HoverCard.vue'; 2 | export { default as HoverCardContent } from './HoverCardContent.vue'; 3 | export { default as HoverCardTrigger } from './HoverCardTrigger.vue'; 4 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/input/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Input } from './Input.vue'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/label/Label.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 32 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/label/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Label } from './Label.vue'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/number-field/NumberFieldContent.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 21 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/number-field/NumberFieldInput.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 17 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/number-field/index.ts: -------------------------------------------------------------------------------- 1 | export { default as NumberField } from './NumberField.vue'; 2 | export { default as NumberFieldContent } from './NumberFieldContent.vue'; 3 | export { default as NumberFieldDecrement } from './NumberFieldDecrement.vue'; 4 | export { default as NumberFieldIncrement } from './NumberFieldIncrement.vue'; 5 | export { default as NumberFieldInput } from './NumberFieldInput.vue'; 6 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/pagination/index.ts: -------------------------------------------------------------------------------- 1 | export { default as PaginationEllipsis } from './PaginationEllipsis.vue'; 2 | export { default as PaginationFirst } from './PaginationFirst.vue'; 3 | export { default as PaginationLast } from './PaginationLast.vue'; 4 | export { default as PaginationNext } from './PaginationNext.vue'; 5 | export { default as PaginationPrev } from './PaginationPrev.vue'; 6 | export { 7 | PaginationRoot as Pagination, 8 | PaginationList, 9 | PaginationListItem, 10 | } from 'radix-vue'; 11 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/pin-input/PinInputGroup.vue: -------------------------------------------------------------------------------- 1 | 17 | 18 | 26 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/pin-input/PinInputSeparator.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 18 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/pin-input/index.ts: -------------------------------------------------------------------------------- 1 | export { default as PinInput } from './PinInput.vue'; 2 | export { default as PinInputGroup } from './PinInputGroup.vue'; 3 | export { default as PinInputInput } from './PinInputInput.vue'; 4 | export { default as PinInputSeparator } from './PinInputSeparator.vue'; 5 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/popover/Popover.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 17 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/popover/PopoverTrigger.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/popover/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Popover } from './Popover.vue'; 2 | export { default as PopoverContent } from './PopoverContent.vue'; 3 | export { default as PopoverTrigger } from './PopoverTrigger.vue'; 4 | export { PopoverAnchor } from 'radix-vue'; 5 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/radio-group/index.ts: -------------------------------------------------------------------------------- 1 | export { default as RadioGroup } from './RadioGroup.vue'; 2 | export { default as RadioGroupItem } from './RadioGroupItem.vue'; 3 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/resizable/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ResizableHandle } from './ResizableHandle.vue'; 2 | export { default as ResizablePanelGroup } from './ResizablePanelGroup.vue'; 3 | export { SplitterPanel as ResizablePanel } from 'radix-vue'; 4 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/scroll-area/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ScrollArea } from './ScrollArea.vue'; 2 | export { default as ScrollBar } from './ScrollBar.vue'; 3 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/select/Select.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 17 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/select/SelectGroup.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 24 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/select/SelectItemText.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/select/SelectLabel.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/select/SelectSeparator.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 25 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/select/SelectValue.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/select/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Select } from './Select.vue'; 2 | export { default as SelectContent } from './SelectContent.vue'; 3 | export { default as SelectGroup } from './SelectGroup.vue'; 4 | export { default as SelectItem } from './SelectItem.vue'; 5 | export { default as SelectItemText } from './SelectItemText.vue'; 6 | export { default as SelectLabel } from './SelectLabel.vue'; 7 | export { default as SelectScrollDownButton } from './SelectScrollDownButton.vue'; 8 | export { default as SelectScrollUpButton } from './SelectScrollUpButton.vue'; 9 | export { default as SelectSeparator } from './SelectSeparator.vue'; 10 | export { default as SelectTrigger } from './SelectTrigger.vue'; 11 | export { default as SelectValue } from './SelectValue.vue'; 12 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/separator/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Separator } from './Separator.vue'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/sheet/Sheet.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 17 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/sheet/SheetClose.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/sheet/SheetDescription.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 27 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/sheet/SheetFooter.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/sheet/SheetHeader.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/sheet/SheetOverlay.vue: -------------------------------------------------------------------------------- 1 | 9 | 12 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/sheet/SheetTitle.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 27 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/sheet/SheetTrigger.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/sheet/index.ts: -------------------------------------------------------------------------------- 1 | export * from './sheet'; 2 | export { default as Sheet } from './Sheet.vue'; 3 | export { default as SheetClose } from './SheetClose.vue'; 4 | export { default as SheetContent } from './SheetContent.vue'; 5 | export { default as SheetDescription } from './SheetDescription.vue'; 6 | export { default as SheetFooter } from './SheetFooter.vue'; 7 | export { default as SheetHeader } from './SheetHeader.vue'; 8 | export { default as SheetTitle } from './SheetTitle.vue'; 9 | 10 | export { default as SheetTrigger } from './SheetTrigger.vue'; 11 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/switch/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Switch } from './Switch.vue'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/tabs/Tabs.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 17 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/tabs/TabsList.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 32 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/tabs/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Tabs } from './Tabs.vue'; 2 | export { default as TabsContent } from './TabsContent.vue'; 3 | export { default as TabsList } from './TabsList.vue'; 4 | export { default as TabsTrigger } from './TabsTrigger.vue'; 5 | export { TabsIndicator } from 'radix-vue'; 6 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/textarea/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Textarea } from './Textarea.vue'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/toggle-group/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ToggleGroup } from './ToggleGroup.vue'; 2 | export { default as ToggleGroupItem } from './ToggleGroupItem.vue'; 3 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/toggle/index.ts: -------------------------------------------------------------------------------- 1 | export * from './toggle'; 2 | export { default as Toggle } from './Toggle.vue'; 3 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/tooltip/Tooltip.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 17 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/tooltip/TooltipProvider.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/tooltip/TooltipTrigger.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 14 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/tooltip/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Tooltip } from './Tooltip.vue'; 2 | export { default as TooltipContent } from './TooltipContent.vue'; 3 | export { default as TooltipProvider } from './TooltipProvider.vue'; 4 | export { default as TooltipTrigger } from './TooltipTrigger.vue'; 5 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/src/ui/tree/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VbenTree } from './tree.vue'; 2 | export type { FlattenedItem } from 'radix-vue'; 3 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/tailwind.config.mjs: -------------------------------------------------------------------------------- 1 | export { default } from '@vben/tailwind-config'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/shadcn-ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/web.json", 4 | "compilerOptions": { 5 | "baseUrl": ".", 6 | "paths": { 7 | "@vben-core/shadcn-ui/*": ["./src/*"] 8 | } 9 | }, 10 | "include": ["src"], 11 | "exclude": ["node_modules"] 12 | } 13 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/tabs-ui/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild'; 2 | 3 | export default defineBuildConfig({ 4 | clean: true, 5 | declaration: true, 6 | entries: [ 7 | { 8 | builder: 'mkdist', 9 | input: './src', 10 | loaders: ['vue'], 11 | pattern: ['**/*.vue'], 12 | }, 13 | { 14 | builder: 'mkdist', 15 | format: 'esm', 16 | input: './src', 17 | loaders: ['js'], 18 | pattern: ['**/*.ts'], 19 | }, 20 | ], 21 | }); 22 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/tabs-ui/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | export { default } from '@vben/tailwind-config/postcss'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/tabs-ui/src/components/index.ts: -------------------------------------------------------------------------------- 1 | export { default as TabsChrome } from './tabs-chrome/tabs.vue'; 2 | export { default as Tabs } from './tabs/tabs.vue'; 3 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/tabs-ui/src/components/widgets/index.ts: -------------------------------------------------------------------------------- 1 | export { default as TabsToolMore } from './tool-more.vue'; 2 | export { default as TabsToolScreen } from './tool-screen.vue'; 3 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/tabs-ui/src/components/widgets/tool-more.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 19 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/tabs-ui/src/components/widgets/tool-screen.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 20 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/tabs-ui/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './components/widgets'; 2 | export { default as TabsView } from './tabs-view.vue'; 3 | export type { IContextMenuItem } from '@vben-core/shadcn-ui'; 4 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/tabs-ui/tailwind.config.mjs: -------------------------------------------------------------------------------- 1 | export { default } from '@vben/tailwind-config'; 2 | -------------------------------------------------------------------------------- /packages/@core/ui-kit/tabs-ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/web.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/constants/README.md: -------------------------------------------------------------------------------- 1 | # @vben/constants 2 | 3 | 用于多个 `app` 公用的常量,继承了 `@vben-core/shared/constants` 的所有能力。业务上有通用常量可以放在这里。 4 | 5 | ## 用法 6 | 7 | ### 添加依赖 8 | 9 | ```bash 10 | # 进入目标应用目录,例如 apps/xxxx-app 11 | # cd apps/xxxx-app 12 | pnpm add @vben/constants 13 | ``` 14 | 15 | ### 使用 16 | 17 | ```ts 18 | import { LOGIN_PATH } from '@vben/constants'; 19 | ``` 20 | -------------------------------------------------------------------------------- /packages/constants/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vben/constants", 3 | "version": "5.5.7", 4 | "homepage": "https://github.com/vbenjs/vue-vben-admin", 5 | "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/vbenjs/vue-vben-admin.git", 9 | "directory": "packages/constants" 10 | }, 11 | "license": "MIT", 12 | "type": "module", 13 | "sideEffects": [ 14 | "**/*.css" 15 | ], 16 | "exports": { 17 | ".": { 18 | "types": "./src/index.ts", 19 | "default": "./src/index.ts" 20 | } 21 | }, 22 | "dependencies": { 23 | "@vben-core/shared": "workspace:*" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /packages/constants/src/core.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @zh_CN 登录页面 url 地址 3 | */ 4 | export const LOGIN_PATH = '/auth/login'; 5 | 6 | export interface LanguageOption { 7 | label: string; 8 | value: 'en-US' | 'zh-CN'; 9 | } 10 | 11 | /** 12 | * Supported languages 13 | */ 14 | export const SUPPORT_LANGUAGES: LanguageOption[] = [ 15 | { 16 | label: '简体中文', 17 | value: 'zh-CN', 18 | }, 19 | { 20 | label: 'English', 21 | value: 'en-US', 22 | }, 23 | ]; 24 | -------------------------------------------------------------------------------- /packages/constants/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './core'; 2 | export * from '@vben-core/shared/constants'; 3 | -------------------------------------------------------------------------------- /packages/constants/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/web.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/effects/README.md: -------------------------------------------------------------------------------- 1 | ## Effects 目录 2 | 3 | `effects` 目录专门用于存放与轻微耦合相关的代码和逻辑。如果你的包具有以下特点,建议将其放置在 `effects` 目录下: 4 | 5 | - **状态管理**:使用状态管理框架 `pinia`,并包含处理副作用(如异步操作、API 调用)的部分。 6 | - **用户偏好设置**:使用 `@vben-core/preferences` 处理用户偏好设置,涉及本地存储或浏览器缓存逻辑(如使用 `localStorage`)。 7 | - **导航和路由**:处理导航、页面跳转等场景,需要管理路由变化的逻辑。 8 | - **组件库依赖**:包含与特定组件库紧密耦合或依赖大型仓库的部分。 9 | 10 | 通过将相关代码归类到 `effects` 目录,可以使项目结构更加清晰,便于维护和扩展。 11 | -------------------------------------------------------------------------------- /packages/effects/access/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vben/access", 3 | "version": "5.5.7", 4 | "homepage": "https://github.com/vbenjs/vue-vben-admin", 5 | "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/vbenjs/vue-vben-admin.git", 9 | "directory": "packages/effects/permissions" 10 | }, 11 | "license": "MIT", 12 | "type": "module", 13 | "sideEffects": [ 14 | "**/*.css" 15 | ], 16 | "exports": { 17 | ".": { 18 | "types": "./src/index.ts", 19 | "default": "./src/index.ts" 20 | } 21 | }, 22 | "dependencies": { 23 | "@vben/preferences": "workspace:*", 24 | "@vben/stores": "workspace:*", 25 | "@vben/types": "workspace:*", 26 | "@vben/utils": "workspace:*", 27 | "vue": "catalog:" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /packages/effects/access/src/index.ts: -------------------------------------------------------------------------------- 1 | export { default as AccessControl } from './access-control.vue'; 2 | export * from './accessible'; 3 | export * from './directive'; 4 | export * from './use-access'; 5 | -------------------------------------------------------------------------------- /packages/effects/access/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/web.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/components/api-component/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ApiComponent } from './api-component.vue'; 2 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/components/captcha/hooks/useCaptchaPoints.ts: -------------------------------------------------------------------------------- 1 | import type { CaptchaPoint } from '../types'; 2 | 3 | import { reactive } from 'vue'; 4 | 5 | export function useCaptchaPoints() { 6 | const points = reactive([]); 7 | function addPoint(point: CaptchaPoint) { 8 | points.push(point); 9 | } 10 | 11 | function clearPoints() { 12 | points.splice(0); 13 | } 14 | return { 15 | addPoint, 16 | clearPoints, 17 | points, 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/components/captcha/index.ts: -------------------------------------------------------------------------------- 1 | export { default as PointSelectionCaptcha } from './point-selection-captcha/index.vue'; 2 | export { default as PointSelectionCaptchaCard } from './point-selection-captcha/index.vue'; 3 | 4 | export { default as SliderCaptcha } from './slider-captcha/index.vue'; 5 | export { default as SliderRotateCaptcha } from './slider-rotate-captcha/index.vue'; 6 | export type * from './types'; 7 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/components/col-page/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ColPage } from './col-page.vue'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/components/col-page/types.ts: -------------------------------------------------------------------------------- 1 | import type { PageProps } from '../page/types'; 2 | 3 | export interface ColPageProps extends PageProps { 4 | /** 5 | * 左侧宽度 6 | * @default 30 7 | */ 8 | leftWidth?: number; 9 | leftMinWidth?: number; 10 | leftMaxWidth?: number; 11 | leftCollapsedWidth?: number; 12 | leftCollapsible?: boolean; 13 | /** 14 | * 右侧宽度 15 | * @default 70 16 | */ 17 | rightWidth?: number; 18 | rightMinWidth?: number; 19 | rightCollapsedWidth?: number; 20 | rightMaxWidth?: number; 21 | rightCollapsible?: boolean; 22 | 23 | resizable?: boolean; 24 | splitLine?: boolean; 25 | splitHandle?: boolean; 26 | } 27 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/components/count-to/index.ts: -------------------------------------------------------------------------------- 1 | export { default as CountTo } from './count-to.vue'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/components/ellipsis-text/index.ts: -------------------------------------------------------------------------------- 1 | export { default as EllipsisText } from './ellipsis-text.vue'; 2 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/components/icon-picker/index.ts: -------------------------------------------------------------------------------- 1 | export { default as IconPicker } from './icon-picker.vue'; 2 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/components/json-viewer/index.ts: -------------------------------------------------------------------------------- 1 | export { default as JsonViewer } from './index.vue'; 2 | 3 | export * from './types'; 4 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/components/loading/index.ts: -------------------------------------------------------------------------------- 1 | export * from './directive'; 2 | export { default as Loading } from './loading.vue'; 3 | export { default as Spinner } from './spinner.vue'; 4 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/components/loading/spinner.vue: -------------------------------------------------------------------------------- 1 | 20 | 29 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/components/page/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Page } from './page.vue'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/components/page/types.ts: -------------------------------------------------------------------------------- 1 | export interface PageProps { 2 | title?: string; 3 | description?: string; 4 | contentClass?: string; 5 | /** 6 | * 根据content可见高度自适应 7 | */ 8 | autoContentHeight?: boolean; 9 | headerClass?: string; 10 | footerClass?: string; 11 | /** 12 | * Custom height offset value (in pixels) to adjust content area sizing 13 | * when used with autoContentHeight 14 | * @default 0 15 | */ 16 | heightOffset?: number; 17 | } 18 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/components/resize/index.ts: -------------------------------------------------------------------------------- 1 | export { default as VResize } from './resize.vue'; 2 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './components'; 2 | export * from './ui'; 3 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/ui/about/about.ts: -------------------------------------------------------------------------------- 1 | import type { Component } from 'vue'; 2 | 3 | interface AboutProps { 4 | description?: string; 5 | name?: string; 6 | title?: string; 7 | } 8 | 9 | interface DescriptionItem { 10 | content: Component | string; 11 | title: string; 12 | } 13 | 14 | export type { AboutProps, DescriptionItem }; 15 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/ui/about/index.ts: -------------------------------------------------------------------------------- 1 | export { default as About } from './about.vue'; 2 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/ui/authentication/auth-title.vue: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/ui/authentication/index.ts: -------------------------------------------------------------------------------- 1 | export { default as AuthenticationCodeLogin } from './code-login.vue'; 2 | export { default as AuthenticationForgetPassword } from './forget-password.vue'; 3 | export { default as AuthenticationLoginExpiredModal } from './login-expired-modal.vue'; 4 | export { default as AuthenticationLogin } from './login.vue'; 5 | export { default as AuthenticationQrCodeLogin } from './qrcode-login.vue'; 6 | export { default as AuthenticationRegister } from './register.vue'; 7 | export type { AuthenticationProps } from './types'; 8 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/ui/dashboard/analysis/analysis-chart-card.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 25 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/ui/dashboard/analysis/index.ts: -------------------------------------------------------------------------------- 1 | export { default as AnalysisChartCard } from './analysis-chart-card.vue'; 2 | export { default as AnalysisChartsTabs } from './analysis-charts-tabs.vue'; 3 | export { default as AnalysisOverview } from './analysis-overview.vue'; 4 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/ui/dashboard/index.ts: -------------------------------------------------------------------------------- 1 | export * from './analysis'; 2 | export type * from './typing'; 3 | export * from './workbench'; 4 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/ui/dashboard/workbench/index.ts: -------------------------------------------------------------------------------- 1 | export { default as WorkbenchHeader } from './workbench-header.vue'; 2 | export { default as WorkbenchProject } from './workbench-project.vue'; 3 | export { default as WorkbenchQuickNav } from './workbench-quick-nav.vue'; 4 | export { default as WorkbenchTodo } from './workbench-todo.vue'; 5 | export { default as WorkbenchTrends } from './workbench-trends.vue'; 6 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/ui/fallback/fallback.ts: -------------------------------------------------------------------------------- 1 | interface FallbackProps { 2 | /** 3 | * 描述 4 | */ 5 | description?: string; 6 | /** 7 | * @zh_CN 首页路由地址 8 | * @default / 9 | */ 10 | homePath?: string; 11 | /** 12 | * @zh_CN 默认显示的图片 13 | * @default pageNotFoundSvg 14 | */ 15 | image?: string; 16 | /** 17 | * @zh_CN 内置类型 18 | */ 19 | status?: '403' | '404' | '500' | 'coming-soon' | 'offline'; 20 | /** 21 | * @zh_CN 页面提示语 22 | */ 23 | title?: string; 24 | } 25 | export type { FallbackProps }; 26 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/ui/fallback/index.ts: -------------------------------------------------------------------------------- 1 | export type * from './fallback'; 2 | export { default as Fallback } from './fallback.vue'; 3 | -------------------------------------------------------------------------------- /packages/effects/common-ui/src/ui/index.ts: -------------------------------------------------------------------------------- 1 | export * from './about'; 2 | export * from './authentication'; 3 | export * from './dashboard'; 4 | export * from './fallback'; 5 | -------------------------------------------------------------------------------- /packages/effects/common-ui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/web.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/effects/hooks/README.md: -------------------------------------------------------------------------------- 1 | # @vben/hooks 2 | 3 | 用于多个 `app` 公用的 hook,继承了 `@vben/hooks` 的所有能力。业务上有通用 hooks 可以放在这里。 4 | 5 | ## 用法 6 | 7 | ### 添加依赖 8 | 9 | ```bash 10 | # 进入目标应用目录,例如 apps/xxxx-app 11 | # cd apps/xxxx-app 12 | pnpm add @vben/hooks 13 | ``` 14 | 15 | ### 使用 16 | 17 | ```ts 18 | import { useNamespace } from '@vben/hooks'; 19 | ``` 20 | -------------------------------------------------------------------------------- /packages/effects/hooks/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './use-app-config'; 2 | export * from './use-content-maximize'; 3 | export * from './use-design-tokens'; 4 | export * from './use-hover-toggle'; 5 | export * from './use-pagination'; 6 | export * from './use-refresh'; 7 | export * from './use-tabs'; 8 | export * from './use-watermark'; 9 | export * from '@vben-core/composables'; 10 | -------------------------------------------------------------------------------- /packages/effects/hooks/src/use-app-config.ts: -------------------------------------------------------------------------------- 1 | import type { 2 | ApplicationConfig, 3 | VbenAdminProAppConfigRaw, 4 | } from '@vben/types/global'; 5 | 6 | /** 7 | * 由 vite-inject-app-config 注入的全局配置 8 | */ 9 | export function useAppConfig( 10 | env: Record, 11 | isProduction: boolean, 12 | ): ApplicationConfig { 13 | // 生产环境下,直接使用 window._VBEN_ADMIN_PRO_APP_CONF_ 全局变量 14 | const config = isProduction 15 | ? window._VBEN_ADMIN_PRO_APP_CONF_ 16 | : (env as VbenAdminProAppConfigRaw); 17 | 18 | const { VITE_GLOB_API_URL } = config; 19 | 20 | return { 21 | apiURL: VITE_GLOB_API_URL, 22 | }; 23 | } 24 | -------------------------------------------------------------------------------- /packages/effects/hooks/src/use-content-maximize.ts: -------------------------------------------------------------------------------- 1 | import { updatePreferences, usePreferences } from '@vben/preferences'; 2 | /** 3 | * 主体区域最大化 4 | */ 5 | export function useContentMaximize() { 6 | const { contentIsMaximize } = usePreferences(); 7 | 8 | function toggleMaximize() { 9 | const isMaximize = contentIsMaximize.value; 10 | 11 | updatePreferences({ 12 | header: { 13 | hidden: !isMaximize, 14 | }, 15 | sidebar: { 16 | hidden: !isMaximize, 17 | }, 18 | }); 19 | } 20 | return { 21 | contentIsMaximize, 22 | toggleMaximize, 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /packages/effects/hooks/src/use-refresh.ts: -------------------------------------------------------------------------------- 1 | import { useRouter } from 'vue-router'; 2 | 3 | import { useTabbarStore } from '@vben/stores'; 4 | 5 | export function useRefresh() { 6 | const router = useRouter(); 7 | const tabbarStore = useTabbarStore(); 8 | 9 | async function refresh() { 10 | await tabbarStore.refresh(router); 11 | } 12 | 13 | return { 14 | refresh, 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /packages/effects/hooks/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/web.json", 4 | "compilerOptions": { 5 | "types": ["vite/client", "@vben/types/global"] 6 | }, 7 | "include": ["src"], 8 | "exclude": ["node_modules"] 9 | } 10 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/authentication/index.ts: -------------------------------------------------------------------------------- 1 | export { default as AuthPageLayout } from './authentication.vue'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/authentication/types.ts: -------------------------------------------------------------------------------- 1 | export type ToolbarType = 'color' | 'language' | 'layout' | 'theme'; 2 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/basic/README.md: -------------------------------------------------------------------------------- 1 | ## layout 2 | 3 | ### header 4 | 5 | - 支持N个自定义插槽,命名方式:header-right-n,header-left-n 6 | - header-left-n ,排序方式:0-19 ,breadcrumb 21-x 7 | - header-right-n ,排序方式:0-49,global-search,51-59,theme-toggle,61-69,language-toggle,71-79,fullscreen,81-89,notification,91-149,user-dropdown,151-x 8 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/basic/content/content-spinner.vue: -------------------------------------------------------------------------------- 1 | 10 | 13 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/basic/content/index.ts: -------------------------------------------------------------------------------- 1 | export { default as LayoutContentSpinner } from './content-spinner.vue'; 2 | export { default as LayoutContent } from './content.vue'; 3 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/basic/copyright/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Copyright } from './copyright.vue'; 2 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/basic/footer/footer.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/basic/footer/index.ts: -------------------------------------------------------------------------------- 1 | export { default as LayoutFooter } from './footer.vue'; 2 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/basic/header/index.ts: -------------------------------------------------------------------------------- 1 | export { default as LayoutHeader } from './header.vue'; 2 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/basic/index.ts: -------------------------------------------------------------------------------- 1 | export { default as BasicLayout } from './layout.vue'; 2 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/basic/menu/index.ts: -------------------------------------------------------------------------------- 1 | export { default as LayoutExtraMenu } from './extra-menu.vue'; 2 | export { default as LayoutMenu } from './menu.vue'; 3 | export { default as LayoutMixedMenu } from './mixed-menu.vue'; 4 | export * from './use-extra-menu'; 5 | export * from './use-mixed-menu'; 6 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/basic/tabbar/index.ts: -------------------------------------------------------------------------------- 1 | export { default as LayoutTabbar } from './tabbar.vue'; 2 | export * from './use-tabbar'; 3 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/iframe/iframe-view.vue: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/iframe/index.ts: -------------------------------------------------------------------------------- 1 | export { default as IFrameRouterView } from './iframe-router-view.vue'; 2 | export { default as IFrameView } from './iframe-view.vue'; 3 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './authentication'; 2 | export * from './basic'; 3 | export * from './iframe'; 4 | export * from './widgets'; 5 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/widgets/check-updates/index.ts: -------------------------------------------------------------------------------- 1 | export { default as CheckUpdates } from './check-updates.vue'; 2 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/widgets/global-search/index.ts: -------------------------------------------------------------------------------- 1 | export { default as GlobalSearch } from './global-search.vue'; 2 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/widgets/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Breadcrumb } from './breadcrumb.vue'; 2 | export * from './check-updates'; 3 | export { default as AuthenticationColorToggle } from './color-toggle.vue'; 4 | export * from './global-search'; 5 | export { default as LanguageToggle } from './language-toggle.vue'; 6 | export { default as AuthenticationLayoutToggle } from './layout-toggle.vue'; 7 | export * from './lock-screen'; 8 | export * from './notification'; 9 | export * from './preferences'; 10 | export * from './theme-toggle'; 11 | export * from './user-dropdown'; 12 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/widgets/lock-screen/index.ts: -------------------------------------------------------------------------------- 1 | export { default as LockScreenModal } from './lock-screen-modal.vue'; 2 | export { default as LockScreen } from './lock-screen.vue'; 3 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/widgets/notification/index.ts: -------------------------------------------------------------------------------- 1 | export { default as Notification } from './notification.vue'; 2 | 3 | export type * from './types'; 4 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/widgets/notification/types.ts: -------------------------------------------------------------------------------- 1 | interface NotificationItem { 2 | avatar: string; 3 | date: string; 4 | isRead?: boolean; 5 | message: string; 6 | title: string; 7 | } 8 | 9 | export type { NotificationItem }; 10 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/widgets/preferences/blocks/block.vue: -------------------------------------------------------------------------------- 1 | 14 | 15 | 23 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/widgets/preferences/blocks/layout/footer.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 18 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/widgets/preferences/blocks/theme/color-mode.vue: -------------------------------------------------------------------------------- 1 | 18 | 19 | 27 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/widgets/preferences/icons/index.ts: -------------------------------------------------------------------------------- 1 | import HeaderNav from './header-nav.vue'; 2 | 3 | export { default as ContentCompact } from './content-compact.vue'; 4 | export { default as FullContent } from './full-content.vue'; 5 | export { default as HeaderMixedNav } from './header-mixed-nav.vue'; 6 | export { default as HeaderSidebarNav } from './header-sidebar-nav.vue'; 7 | export { default as MixedNav } from './mixed-nav.vue'; 8 | export { default as SidebarMixedNav } from './sidebar-mixed-nav.vue'; 9 | export { default as SidebarNav } from './sidebar-nav.vue'; 10 | 11 | const ContentWide = HeaderNav; 12 | export { ContentWide, HeaderNav }; 13 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/widgets/preferences/index.ts: -------------------------------------------------------------------------------- 1 | export { default as PreferencesButton } from './preferences-button.vue'; 2 | export { default as Preferences } from './preferences.vue'; 3 | export * from './use-open-preferences'; 4 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/widgets/preferences/preferences-button.vue: -------------------------------------------------------------------------------- 1 | 14 | 21 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/widgets/preferences/use-open-preferences.ts: -------------------------------------------------------------------------------- 1 | import { ref } from 'vue'; 2 | 3 | const openPreferences = ref(false); 4 | 5 | function useOpenPreferences() { 6 | function handleOpenPreference() { 7 | openPreferences.value = true; 8 | } 9 | 10 | return { 11 | handleOpenPreference, 12 | openPreferences, 13 | }; 14 | } 15 | 16 | export { useOpenPreferences }; 17 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/widgets/theme-toggle/index.ts: -------------------------------------------------------------------------------- 1 | export { default as ThemeToggle } from './theme-toggle.vue'; 2 | -------------------------------------------------------------------------------- /packages/effects/layouts/src/widgets/user-dropdown/index.ts: -------------------------------------------------------------------------------- 1 | export { default as UserDropdown } from './user-dropdown.vue'; 2 | -------------------------------------------------------------------------------- /packages/effects/layouts/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/web.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/effects/plugins/README.md: -------------------------------------------------------------------------------- 1 | # @vben/plugins 2 | 3 | 该目录用于存放项目中集成的第三方库及其相关插件。每个插件都包含了可重用的逻辑、配置和组件,方便在项目中进行统一管理和调用。 4 | 5 | ## 注意 6 | 7 | 所有的第三方插件都必须以 `subpath` 形式引入,例: 8 | 9 | 以 `echarts` 为例,引入方式如下: 10 | 11 | **packages.json** 12 | 13 | ```json 14 | "exports": { 15 | "./echarts": { 16 | "types": "./src/echarts/index.ts", 17 | "default": "./src/echarts/index.ts" 18 | } 19 | } 20 | ``` 21 | 22 | **使用方式** 23 | 24 | ```ts 25 | import { useEcharts } from '@vben/plugins/echarts'; 26 | ``` 27 | 28 | 这样做的好处是,应用可以自行选择是否使用插件,而不会因为插件的引入及副作用而导致打包体积增大,只引入需要的插件即可。 29 | -------------------------------------------------------------------------------- /packages/effects/plugins/src/echarts/echarts-ui.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 16 | -------------------------------------------------------------------------------- /packages/effects/plugins/src/echarts/index.ts: -------------------------------------------------------------------------------- 1 | export * from './echarts'; 2 | export { default as EchartsUI } from './echarts-ui.vue'; 3 | export * from './use-echarts'; 4 | -------------------------------------------------------------------------------- /packages/effects/plugins/src/motion/index.ts: -------------------------------------------------------------------------------- 1 | export * from './types'; 2 | 3 | export { 4 | MotionComponent as Motion, 5 | MotionDirective, 6 | MotionGroupComponent as MotionGroup, 7 | MotionPlugin, 8 | } from '@vueuse/motion'; 9 | -------------------------------------------------------------------------------- /packages/effects/plugins/src/motion/types.ts: -------------------------------------------------------------------------------- 1 | export const MotionPresets = [ 2 | 'fade', 3 | 'fadeVisible', 4 | 'fadeVisibleOnce', 5 | 'rollBottom', 6 | 'rollLeft', 7 | 'rollRight', 8 | 'rollTop', 9 | 'rollVisibleBottom', 10 | 'rollVisibleLeft', 11 | 'rollVisibleRight', 12 | 'rollVisibleTop', 13 | 'pop', 14 | 'popVisible', 15 | 'popVisibleOnce', 16 | 'slideBottom', 17 | 'slideLeft', 18 | 'slideRight', 19 | 'slideTop', 20 | 'slideVisibleBottom', 21 | 'slideVisibleLeft', 22 | 'slideVisibleRight', 23 | 'slideVisibleTop', 24 | ] as const; 25 | 26 | export type MotionPreset = (typeof MotionPresets)[number]; 27 | -------------------------------------------------------------------------------- /packages/effects/plugins/src/vxe-table/index.ts: -------------------------------------------------------------------------------- 1 | export { setupVbenVxeTable } from './init'; 2 | export type { VxeTableGridOptions } from './types'; 3 | export * from './use-vxe-grid'; 4 | 5 | export { default as VbenVxeGrid } from './use-vxe-grid.vue'; 6 | export type { 7 | VxeGridListeners, 8 | VxeGridProps, 9 | VxeGridPropTypes, 10 | } from 'vxe-table'; 11 | -------------------------------------------------------------------------------- /packages/effects/plugins/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/web.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/effects/request/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './request-client'; 2 | export * from 'axios'; 3 | -------------------------------------------------------------------------------- /packages/effects/request/src/request-client/index.ts: -------------------------------------------------------------------------------- 1 | export * from './preset-interceptors'; 2 | export * from './request-client'; 3 | export type * from './types'; 4 | -------------------------------------------------------------------------------- /packages/effects/request/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/web.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/icons/README.md: -------------------------------------------------------------------------------- 1 | # @vben/icons 2 | 3 | 用于多个 `app` 公用的图标文件,继承了 `@vben-core/icons` 的所有能力。业务上有通用图标可以放在这里。 4 | 5 | ## 用法 6 | 7 | ### 添加依赖 8 | 9 | ```bash 10 | # 进入目标应用目录,例如 apps/xxxx-app 11 | # cd apps/xxxx-app 12 | pnpm add @vben/icons 13 | ``` 14 | 15 | ### 使用 16 | 17 | ```ts 18 | import { X } from '@vben/icons'; 19 | ``` 20 | -------------------------------------------------------------------------------- /packages/icons/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vben/icons", 3 | "version": "5.5.7", 4 | "homepage": "https://github.com/vbenjs/vue-vben-admin", 5 | "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/vbenjs/vue-vben-admin.git", 9 | "directory": "packages/icons" 10 | }, 11 | "license": "MIT", 12 | "type": "module", 13 | "exports": { 14 | ".": { 15 | "types": "./src/index.ts", 16 | "default": "./src/index.ts" 17 | } 18 | }, 19 | "dependencies": { 20 | "@vben-core/icons": "workspace:*" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/icons/src/iconify/index.ts: -------------------------------------------------------------------------------- 1 | import { createIconifyIcon } from '@vben-core/icons'; 2 | 3 | export * from '@vben-core/icons'; 4 | 5 | export const MdiKeyboardEsc = createIconifyIcon('mdi:keyboard-esc'); 6 | 7 | export const MdiWechat = createIconifyIcon('mdi:wechat'); 8 | 9 | export const MdiGithub = createIconifyIcon('mdi:github'); 10 | 11 | export const MdiGoogle = createIconifyIcon('mdi:google'); 12 | 13 | export const MdiQqchat = createIconifyIcon('mdi:qqchat'); 14 | 15 | export const MaterialSymbolsAdd = createIconifyIcon('material-symbols:add'); 16 | 17 | export const MingcuteProfileLine = createIconifyIcon('mingcute:profile-line'); 18 | -------------------------------------------------------------------------------- /packages/icons/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './iconify'; 2 | export { default as EmptyIcon } from './icons/empty-icon.vue'; 3 | export * from './svg'; 4 | -------------------------------------------------------------------------------- /packages/icons/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/web.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/locales/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vben/locales", 3 | "version": "5.5.7", 4 | "homepage": "https://github.com/vbenjs/vue-vben-admin", 5 | "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/vbenjs/vue-vben-admin.git", 9 | "directory": "packages/locales" 10 | }, 11 | "license": "MIT", 12 | "type": "module", 13 | "sideEffects": [ 14 | "**/*.css" 15 | ], 16 | "exports": { 17 | ".": { 18 | "types": "./src/index.ts", 19 | "default": "./src/index.ts" 20 | } 21 | }, 22 | "dependencies": { 23 | "@intlify/core-base": "catalog:", 24 | "@vben-core/composables": "workspace:*", 25 | "vue": "catalog:", 26 | "vue-i18n": "catalog:" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /packages/locales/src/index.ts: -------------------------------------------------------------------------------- 1 | import { 2 | i18n, 3 | loadLocaleMessages, 4 | loadLocalesMap, 5 | loadLocalesMapFromDir, 6 | setupI18n, 7 | } from './i18n'; 8 | 9 | const $t = i18n.global.t; 10 | const $te = i18n.global.te; 11 | 12 | export { 13 | $t, 14 | $te, 15 | i18n, 16 | loadLocaleMessages, 17 | loadLocalesMap, 18 | loadLocalesMapFromDir, 19 | setupI18n, 20 | }; 21 | export { 22 | type ImportLocaleFn, 23 | type LocaleSetupOptions, 24 | type SupportedLanguagesType, 25 | } from './typing'; 26 | export type { CompileError } from '@intlify/core-base'; 27 | 28 | export { useI18n } from 'vue-i18n'; 29 | 30 | export type { Locale } from 'vue-i18n'; 31 | -------------------------------------------------------------------------------- /packages/locales/src/langs/en-US/common.json: -------------------------------------------------------------------------------- 1 | { 2 | "back": "Back", 3 | "backToHome": "Back To Home", 4 | "login": "Login", 5 | "logout": "Logout", 6 | "prompt": "Prompt", 7 | "cancel": "Cancel", 8 | "confirm": "Confirm", 9 | "reset": "Reset", 10 | "noData": "No Data", 11 | "refresh": "Refresh", 12 | "loadingMenu": "Loading Menu", 13 | "query": "Search", 14 | "search": "Search", 15 | "enabled": "Enabled", 16 | "disabled": "Disabled", 17 | "edit": "Edit", 18 | "delete": "Delete", 19 | "create": "Create", 20 | "yes": "Yes", 21 | "no": "No", 22 | "showSearchPanel": "Show search panel", 23 | "hideSearchPanel": "Hide search panel" 24 | } 25 | -------------------------------------------------------------------------------- /packages/locales/src/langs/zh-CN/common.json: -------------------------------------------------------------------------------- 1 | { 2 | "back": "返回", 3 | "backToHome": "返回首页", 4 | "login": "登录", 5 | "logout": "退出登录", 6 | "prompt": "提示", 7 | "cancel": "取消", 8 | "confirm": "确认", 9 | "reset": "重置", 10 | "noData": "暂无数据", 11 | "refresh": "刷新", 12 | "loadingMenu": "加载菜单中", 13 | "query": "查询", 14 | "search": "搜索", 15 | "enabled": "已启用", 16 | "disabled": "已禁用", 17 | "edit": "修改", 18 | "delete": "删除", 19 | "create": "新增", 20 | "yes": "是", 21 | "no": "否", 22 | "showSearchPanel": "显示搜索面板", 23 | "hideSearchPanel": "隐藏搜索面板" 24 | } 25 | -------------------------------------------------------------------------------- /packages/locales/src/typing.ts: -------------------------------------------------------------------------------- 1 | export type SupportedLanguagesType = 'en-US' | 'zh-CN'; 2 | 3 | export type ImportLocaleFn = () => Promise<{ default: Record }>; 4 | 5 | export type LoadMessageFn = ( 6 | lang: SupportedLanguagesType, 7 | ) => Promise | undefined>; 8 | 9 | export interface LocaleSetupOptions { 10 | /** 11 | * Default language 12 | * @default zh-CN 13 | */ 14 | defaultLocale?: SupportedLanguagesType; 15 | /** 16 | * Load message function 17 | * @param lang 18 | * @returns 19 | */ 20 | loadMessages?: LoadMessageFn; 21 | /** 22 | * Whether to warn when the key is not found 23 | */ 24 | missingWarn?: boolean; 25 | } 26 | -------------------------------------------------------------------------------- /packages/locales/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/web.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/preferences/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vben/preferences", 3 | "version": "5.5.7", 4 | "homepage": "https://github.com/vbenjs/vue-vben-admin", 5 | "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/vbenjs/vue-vben-admin.git", 9 | "directory": "packages/preferences" 10 | }, 11 | "license": "MIT", 12 | "type": "module", 13 | "sideEffects": [ 14 | "**/*.css" 15 | ], 16 | "exports": { 17 | ".": { 18 | "types": "./src/index.ts", 19 | "default": "./src/index.ts" 20 | } 21 | }, 22 | "dependencies": { 23 | "@vben-core/preferences": "workspace:*", 24 | "@vben-core/typings": "workspace:*" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /packages/preferences/src/index.ts: -------------------------------------------------------------------------------- 1 | import type { Preferences } from '@vben-core/preferences'; 2 | import type { DeepPartial } from '@vben-core/typings'; 3 | 4 | /** 5 | * 如果你想所有的app都使用相同的默认偏好设置,你可以在这里定义 6 | * 而不是去修改 @vben-core/preferences 中的默认偏好设置 7 | * @param preferences 8 | * @returns 9 | */ 10 | 11 | function defineOverridesPreferences(preferences: DeepPartial) { 12 | return preferences; 13 | } 14 | 15 | export { defineOverridesPreferences }; 16 | 17 | export * from '@vben-core/preferences'; 18 | -------------------------------------------------------------------------------- /packages/preferences/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/web.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/stores/shim-pinia.d.ts: -------------------------------------------------------------------------------- 1 | // https://github.com/vuejs/pinia/issues/2098 2 | declare module 'pinia' { 3 | export function acceptHMRUpdate( 4 | initialUseStore: any | StoreDefinition, 5 | hot: any, 6 | ): (newModule: any) => any; 7 | } 8 | 9 | export {}; 10 | -------------------------------------------------------------------------------- /packages/stores/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './modules'; 2 | export * from './setup'; 3 | export { defineStore, storeToRefs } from 'pinia'; 4 | -------------------------------------------------------------------------------- /packages/stores/src/modules/index.ts: -------------------------------------------------------------------------------- 1 | export * from './access'; 2 | export * from './tabbar'; 3 | export * from './user'; 4 | -------------------------------------------------------------------------------- /packages/stores/src/modules/lock.ts: -------------------------------------------------------------------------------- 1 | import { defineStore } from 'pinia'; 2 | 3 | interface AppState { 4 | /** 5 | * 是否锁屏状态 6 | */ 7 | isLockScreen: boolean; 8 | /** 9 | * 锁屏密码 10 | */ 11 | lockScreenPassword?: string; 12 | } 13 | 14 | export const useLockStore = defineStore('core-lock', { 15 | actions: { 16 | lockScreen(password: string) { 17 | this.isLockScreen = true; 18 | this.lockScreenPassword = password; 19 | }, 20 | 21 | unlockScreen() { 22 | this.isLockScreen = false; 23 | this.lockScreenPassword = undefined; 24 | }, 25 | }, 26 | persist: { 27 | pick: ['isLockScreen', 'lockScreenPassword'], 28 | }, 29 | state: (): AppState => ({ 30 | isLockScreen: false, 31 | lockScreenPassword: undefined, 32 | }), 33 | }); 34 | -------------------------------------------------------------------------------- /packages/stores/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/web.json", 4 | "include": ["src", "shim-pinia.d.ts"] 5 | } 6 | -------------------------------------------------------------------------------- /packages/styles/README.md: -------------------------------------------------------------------------------- 1 | # @vben/styles 2 | 3 | 用于多个 `app` 公用的样式文件,继承了 `@vben-core/design` 的所有能力。业务上有通用的样式文件可以放在这里。 4 | 5 | ## 用法 6 | 7 | ### 添加依赖 8 | 9 | ```bash 10 | # 进入目标应用目录,例如 apps/xxxx-app 11 | # cd apps/xxxx-app 12 | pnpm add @vben/styles 13 | ``` 14 | 15 | ### 使用 16 | 17 | ```ts 18 | import '@vben/styles'; 19 | ``` 20 | -------------------------------------------------------------------------------- /packages/styles/src/global/index.scss: -------------------------------------------------------------------------------- 1 | @use '@vben-core/design/bem' as *; 2 | -------------------------------------------------------------------------------- /packages/styles/src/index.ts: -------------------------------------------------------------------------------- 1 | import '@vben-core/design'; 2 | -------------------------------------------------------------------------------- /packages/styles/src/naive/index.css: -------------------------------------------------------------------------------- 1 | .form-valid-error { 2 | .n-base-selection__state-border, 3 | .n-input__state-border, 4 | .n-radio-group__splitor { 5 | border: var(--n-border-error); 6 | } 7 | 8 | .n-radio-group .n-radio-button, 9 | .n-radio-group .n-radio-group__splitor { 10 | --n-button-border-color: rgb(255 56 96); 11 | } 12 | 13 | .n-radio__dot { 14 | --n-box-shadow: inset 0 0 0 1px rgb(255 56 96); 15 | } 16 | 17 | .n-checkbox-box__border { 18 | --n-border: 1px solid rgb(255 56 96); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/styles/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/web.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/types/README.md: -------------------------------------------------------------------------------- 1 | # @vben/types 2 | 3 | 用于多个 `app` 公用的工具类型,继承了 `@vben-core/typings` 的所有能力。业务上有通用的类型定义可以放在这里。 4 | 5 | ## 用法 6 | 7 | ### 添加依赖 8 | 9 | ```bash 10 | # 进入目标应用目录,例如 apps/xxxx-app 11 | # cd apps/xxxx-app 12 | pnpm add @vben/types 13 | ``` 14 | 15 | ### 使用 16 | 17 | ```ts 18 | // 推荐加上 type 19 | import type { SelectOption } from '@vben/types'; 20 | ``` 21 | -------------------------------------------------------------------------------- /packages/types/global.d.ts: -------------------------------------------------------------------------------- 1 | import type { RouteMeta as IRouteMeta } from '@vben-core/typings'; 2 | 3 | import 'vue-router'; 4 | 5 | declare module 'vue-router' { 6 | // eslint-disable-next-line @typescript-eslint/no-empty-object-type 7 | interface RouteMeta extends IRouteMeta {} 8 | } 9 | 10 | export interface VbenAdminProAppConfigRaw { 11 | VITE_GLOB_API_URL: string; 12 | } 13 | 14 | export interface ApplicationConfig { 15 | apiURL: string; 16 | } 17 | 18 | declare global { 19 | interface Window { 20 | _VBEN_ADMIN_PRO_APP_CONF_: VbenAdminProAppConfigRaw; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/types/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vben/types", 3 | "version": "5.5.7", 4 | "homepage": "https://github.com/vbenjs/vue-vben-admin", 5 | "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/vbenjs/vue-vben-admin.git", 9 | "directory": "packages/types" 10 | }, 11 | "license": "MIT", 12 | "type": "module", 13 | "exports": { 14 | ".": { 15 | "types": "./src/index.ts", 16 | "default": "./src/index.ts" 17 | }, 18 | "./global": { 19 | "types": "./global.d.ts" 20 | } 21 | }, 22 | "dependencies": { 23 | "@vben-core/typings": "workspace:*", 24 | "vue": "catalog:", 25 | "vue-router": "catalog:" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /packages/types/src/index.ts: -------------------------------------------------------------------------------- 1 | export type * from './user'; 2 | export type * from '@vben-core/typings'; 3 | -------------------------------------------------------------------------------- /packages/types/src/user.ts: -------------------------------------------------------------------------------- 1 | import type { BasicUserInfo } from '@vben-core/typings'; 2 | 3 | /** 用户信息 */ 4 | interface UserInfo extends BasicUserInfo { 5 | /** 6 | * 用户描述 7 | */ 8 | desc: string; 9 | /** 10 | * 首页地址 11 | */ 12 | homePath: string; 13 | 14 | /** 15 | * accessToken 16 | */ 17 | token: string; 18 | } 19 | 20 | export type { UserInfo }; 21 | -------------------------------------------------------------------------------- /packages/types/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/web.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /packages/utils/README.md: -------------------------------------------------------------------------------- 1 | # @vben/utils 2 | 3 | 用于多个 `app` 公用的工具包,继承了 `@vben-core/shared/utils` 的所有能力。业务上有通用的工具函数可以放在这里。 4 | 5 | ## 用法 6 | 7 | ### 添加依赖 8 | 9 | ```bash 10 | # 进入目标应用目录,例如 apps/xxxx-app 11 | # cd apps/xxxx-app 12 | pnpm add @vben/utils 13 | ``` 14 | 15 | ### 使用 16 | 17 | ```ts 18 | import { isString } from '@vben/utils'; 19 | ``` 20 | -------------------------------------------------------------------------------- /packages/utils/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vben/utils", 3 | "version": "5.5.7", 4 | "homepage": "https://github.com/vbenjs/vue-vben-admin", 5 | "bugs": "https://github.com/vbenjs/vue-vben-admin/issues", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/vbenjs/vue-vben-admin.git", 9 | "directory": "packages/utils" 10 | }, 11 | "license": "MIT", 12 | "type": "module", 13 | "sideEffects": [ 14 | "**/*.css" 15 | ], 16 | "exports": { 17 | ".": { 18 | "types": "./src/index.ts", 19 | "default": "./src/index.ts" 20 | } 21 | }, 22 | "dependencies": { 23 | "@vben-core/shared": "workspace:*", 24 | "@vben-core/typings": "workspace:*", 25 | "vue-router": "catalog:" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /packages/utils/src/helpers/get-popup-container.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * If the node is holding inside a form, return the form element, 3 | * otherwise return the parent node of the given element or 4 | * the document body if the element is not provided. 5 | */ 6 | export function getPopupContainer(node?: HTMLElement): HTMLElement { 7 | return ( 8 | node?.closest('form') ?? (node?.parentNode as HTMLElement) ?? document.body 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /packages/utils/src/helpers/index.ts: -------------------------------------------------------------------------------- 1 | export * from './find-menu-by-path'; 2 | export * from './generate-menus'; 3 | export * from './generate-routes-backend'; 4 | export * from './generate-routes-frontend'; 5 | export * from './get-popup-container'; 6 | export * from './merge-route-modules'; 7 | export * from './reset-routes'; 8 | export * from './unmount-global-loading'; 9 | -------------------------------------------------------------------------------- /packages/utils/src/helpers/merge-route-modules.ts: -------------------------------------------------------------------------------- 1 | import type { RouteRecordRaw } from 'vue-router'; 2 | 3 | // 定义模块类型 4 | interface RouteModuleType { 5 | default: RouteRecordRaw[]; 6 | } 7 | 8 | /** 9 | * 合并动态路由模块的默认导出 10 | * @param routeModules 动态导入的路由模块对象 11 | * @returns 合并后的路由配置数组 12 | */ 13 | function mergeRouteModules( 14 | routeModules: Record, 15 | ): RouteRecordRaw[] { 16 | const mergedRoutes: RouteRecordRaw[] = []; 17 | 18 | for (const routeModule of Object.values(routeModules)) { 19 | const moduleRoutes = (routeModule as RouteModuleType)?.default ?? []; 20 | mergedRoutes.push(...moduleRoutes); 21 | } 22 | 23 | return mergedRoutes; 24 | } 25 | 26 | export { mergeRouteModules }; 27 | 28 | export type { RouteModuleType }; 29 | -------------------------------------------------------------------------------- /packages/utils/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './helpers'; 2 | export * from '@vben-core/shared/cache'; 3 | export * from '@vben-core/shared/color'; 4 | export * from '@vben-core/shared/utils'; 5 | -------------------------------------------------------------------------------- /packages/utils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/library.json", 4 | "compilerOptions": { 5 | "types": ["@vben-core/typings/vue-router"] 6 | }, 7 | "include": ["src"], 8 | "exclude": ["node_modules"] 9 | } 10 | -------------------------------------------------------------------------------- /scripts/turbo-run/bin/turbo-run.mjs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import('../dist/index.mjs'); 4 | -------------------------------------------------------------------------------- /scripts/turbo-run/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild'; 2 | 3 | export default defineBuildConfig({ 4 | clean: true, 5 | declaration: true, 6 | entries: ['src/index'], 7 | }); 8 | -------------------------------------------------------------------------------- /scripts/turbo-run/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vben/turbo-run", 3 | "version": "5.5.7", 4 | "private": true, 5 | "license": "MIT", 6 | "type": "module", 7 | "scripts": { 8 | "stub": "pnpm unbuild --stub" 9 | }, 10 | "files": [ 11 | "dist" 12 | ], 13 | "bin": { 14 | "turbo-run": "./bin/turbo-run.mjs" 15 | }, 16 | "main": "./dist/index.mjs", 17 | "module": "./dist/index.mjs", 18 | "exports": { 19 | ".": { 20 | "default": "./dist/index.mjs" 21 | }, 22 | "./package.json": "./package.json" 23 | }, 24 | "dependencies": { 25 | "@clack/prompts": "catalog:", 26 | "@vben/node-utils": "workspace:*", 27 | "cac": "catalog:" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /scripts/turbo-run/src/index.ts: -------------------------------------------------------------------------------- 1 | import { colors, consola } from '@vben/node-utils'; 2 | 3 | import { cac } from 'cac'; 4 | 5 | import { run } from './run'; 6 | 7 | try { 8 | const turboRun = cac('turbo-run'); 9 | 10 | turboRun 11 | .command('[script]') 12 | .usage(`Run turbo interactively.`) 13 | .action(async (command: string) => { 14 | run({ command }); 15 | }); 16 | 17 | // Invalid command 18 | turboRun.on('command:*', () => { 19 | consola.error(colors.red('Invalid command!')); 20 | process.exit(1); 21 | }); 22 | 23 | turboRun.usage('turbo-run'); 24 | turboRun.help(); 25 | turboRun.parse(); 26 | } catch (error) { 27 | consola.error(error); 28 | process.exit(1); 29 | } 30 | -------------------------------------------------------------------------------- /scripts/turbo-run/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/node.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /scripts/vsh/bin/vsh.mjs: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import('../dist/index.mjs'); 4 | -------------------------------------------------------------------------------- /scripts/vsh/build.config.ts: -------------------------------------------------------------------------------- 1 | import { defineBuildConfig } from 'unbuild'; 2 | 3 | export default defineBuildConfig({ 4 | clean: true, 5 | declaration: true, 6 | entries: ['src/index'], 7 | }); 8 | -------------------------------------------------------------------------------- /scripts/vsh/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vben/vsh", 3 | "version": "5.5.6", 4 | "private": true, 5 | "license": "MIT", 6 | "type": "module", 7 | "scripts": { 8 | "stub": "pnpm unbuild --stub" 9 | }, 10 | "files": [ 11 | "dist" 12 | ], 13 | "bin": { 14 | "vsh": "./bin/vsh.mjs" 15 | }, 16 | "main": "./dist/index.mjs", 17 | "module": "./dist/index.mjs", 18 | "exports": { 19 | ".": { 20 | "default": "./dist/index.mjs" 21 | }, 22 | "./package.json": "./package.json" 23 | }, 24 | "dependencies": { 25 | "@vben/node-utils": "workspace:*", 26 | "cac": "catalog:", 27 | "circular-dependency-scanner": "catalog:", 28 | "depcheck": "catalog:", 29 | "publint": "catalog:" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /scripts/vsh/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "extends": "@vben/tsconfig/node.json", 4 | "include": ["src"], 5 | "exclude": ["node_modules"] 6 | } 7 | -------------------------------------------------------------------------------- /stylelint.config.mjs: -------------------------------------------------------------------------------- 1 | export default { 2 | extends: ['@vben/stylelint-config'], 3 | root: true, 4 | }; 5 | -------------------------------------------------------------------------------- /vitest.config.ts: -------------------------------------------------------------------------------- 1 | import Vue from '@vitejs/plugin-vue'; 2 | import VueJsx from '@vitejs/plugin-vue-jsx'; 3 | import { configDefaults, defineConfig } from 'vitest/config'; 4 | 5 | export default defineConfig({ 6 | plugins: [Vue(), VueJsx()], 7 | test: { 8 | environment: 'happy-dom', 9 | exclude: [...configDefaults.exclude, '**/e2e/**'], 10 | }, 11 | }); 12 | -------------------------------------------------------------------------------- /vitest.workspace.ts: -------------------------------------------------------------------------------- 1 | import { defineWorkspace } from 'vitest/config'; 2 | 3 | export default defineWorkspace(['vitest.config.ts']); 4 | --------------------------------------------------------------------------------