Commit 3eb7a8bc by vince

chore: @vben-core/iconify was renamed @vben-core/icons. Add readme.md for some packages

1 parent 3a91a24e
Showing 68 changed files with 178 additions and 69 deletions
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
"**/node_modules/**", "**/node_modules/**",
"**/dist/**", "**/dist/**",
"**/*-dist/**", "**/*-dist/**",
"**/iconify/**", "**/icons/**",
"pnpm-lock.yaml", "pnpm-lock.yaml",
"**/*.log" "**/*.log"
] ]
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
} }
}, },
"dependencies": { "dependencies": {
"prettier": "^3.3.2", "prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.5" "prettier-plugin-tailwindcss": "^0.6.5"
} }
} }
...@@ -36,13 +36,13 @@ ...@@ -36,13 +36,13 @@
"postcss": "^8.4.39", "postcss": "^8.4.39",
"postcss-html": "^1.7.0", "postcss-html": "^1.7.0",
"postcss-scss": "^4.0.9", "postcss-scss": "^4.0.9",
"prettier": "^3.3.2", "prettier": "^3.3.3",
"stylelint": "^16.7.0", "stylelint": "^16.7.0",
"stylelint-config-recommended": "^14.0.1", "stylelint-config-recommended": "^14.0.1",
"stylelint-config-recommended-scss": "^14.1.0", "stylelint-config-recommended-scss": "^14.1.0",
"stylelint-config-recommended-vue": "^1.5.0", "stylelint-config-recommended-vue": "^1.5.0",
"stylelint-config-standard": "^36.0.1", "stylelint-config-standard": "^36.0.1",
"stylelint-order": "^6.0.4", "stylelint-order": "^6.0.4",
"stylelint-prettier": "^5.0.0" "stylelint-prettier": "^5.0.1"
} }
} }
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
"find-up": "^7.0.0", "find-up": "^7.0.0",
"nanoid": "^5.0.7", "nanoid": "^5.0.7",
"pkg-types": "^1.1.3", "pkg-types": "^1.1.3",
"prettier": "^3.3.2", "prettier": "^3.3.3",
"rimraf": "^6.0.1", "rimraf": "^6.0.1",
"zx": "^7.2.3" "zx": "^7.2.3"
} }
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
"resolve.exports": "^2.0.2", "resolve.exports": "^2.0.2",
"vite-plugin-lib-inject-css": "^2.1.1", "vite-plugin-lib-inject-css": "^2.1.1",
"vite-plugin-pwa": "^0.20.0", "vite-plugin-pwa": "^0.20.0",
"vite-plugin-vue-devtools": "^7.3.5" "vite-plugin-vue-devtools": "^7.3.6"
}, },
"devDependencies": { "devDependencies": {
"@types/html-minifier-terser": "^7.0.2", "@types/html-minifier-terser": "^7.0.2",
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
"rollup": "^4.18.1", "rollup": "^4.18.1",
"rollup-plugin-visualizer": "^5.12.0", "rollup-plugin-visualizer": "^5.12.0",
"sass": "^1.77.8", "sass": "^1.77.8",
"unplugin-turbo-console": "^1.9.3", "unplugin-turbo-console": "^1.9.5",
"vite": "^5.3.3", "vite": "^5.3.3",
"vite-plugin-compression": "^0.5.1", "vite-plugin-compression": "^0.5.1",
"vite-plugin-dts": "^3.9.1", "vite-plugin-dts": "^3.9.1",
......
{ {
"name": "@vben-core/iconify", "name": "@vben-core/icons",
"version": "5.0.0", "version": "5.0.0",
"homepage": "https://github.com/vbenjs/vue-vben-admin", "homepage": "https://github.com/vbenjs/vue-vben-admin",
"bugs": "https://github.com/vbenjs/vue-vben-admin/issues", "bugs": "https://github.com/vbenjs/vue-vben-admin/issues",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/vbenjs/vue-vben-admin.git", "url": "git+https://github.com/vbenjs/vue-vben-admin.git",
"directory": "packages/@vben-core/shared/iconify" "directory": "packages/@vben-core/shared/icons"
}, },
"license": "MIT", "license": "MIT",
"type": "module", "type": "module",
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
} }
}, },
"dependencies": { "dependencies": {
"@vben-core/iconify": "workspace:*", "@vben-core/icons": "workspace:*",
"@vben-core/shadcn-ui": "workspace:*", "@vben-core/shadcn-ui": "workspace:*",
"@vben-core/toolkit": "workspace:*", "@vben-core/toolkit": "workspace:*",
"@vben-core/typings": "workspace:*", "@vben-core/typings": "workspace:*",
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import type { CSSProperties } from 'vue'; import type { CSSProperties } from 'vue';
import { computed, useSlots } from 'vue'; import { computed, useSlots } from 'vue';
import { IcRoundMenu } from '@vben-core/iconify'; import { IcRoundMenu } from '@vben-core/icons';
import { VbenIconButton } from '@vben-core/shadcn-ui'; import { VbenIconButton } from '@vben-core/shadcn-ui';
interface Props { interface Props {
......
<script setup lang="ts"> <script setup lang="ts">
import { MdiMenuClose, MdiMenuOpen } from '@vben-core/iconify'; import { MdiMenuClose, MdiMenuOpen } from '@vben-core/icons';
interface Props { interface Props {
theme: string; theme: string;
......
<script setup lang="ts"> <script setup lang="ts">
import { MdiPin, MdiPinOff } from '@vben-core/iconify'; import { MdiPin, MdiPinOff } from '@vben-core/icons';
interface Props { interface Props {
theme: string; theme: string;
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
}, },
"dependencies": { "dependencies": {
"@vben-core/hooks": "workspace:*", "@vben-core/hooks": "workspace:*",
"@vben-core/iconify": "workspace:*", "@vben-core/icons": "workspace:*",
"@vben-core/shadcn-ui": "workspace:*", "@vben-core/shadcn-ui": "workspace:*",
"@vben-core/toolkit": "workspace:*", "@vben-core/toolkit": "workspace:*",
"@vben-core/typings": "workspace:*", "@vben-core/typings": "workspace:*",
......
...@@ -19,7 +19,7 @@ import { ...@@ -19,7 +19,7 @@ import {
} from 'vue'; } from 'vue';
import { useNamespace } from '@vben-core/hooks'; import { useNamespace } from '@vben-core/hooks';
import { IcRoundMoreHoriz } from '@vben-core/iconify'; import { IcRoundMoreHoriz } from '@vben-core/icons';
import { isHttpUrl } from '@vben-core/toolkit'; import { isHttpUrl } from '@vben-core/toolkit';
import { UseResizeObserverReturn, useResizeObserver } from '@vueuse/core'; import { UseResizeObserverReturn, useResizeObserver } from '@vueuse/core';
......
...@@ -7,7 +7,7 @@ import { useNamespace } from '@vben-core/hooks'; ...@@ -7,7 +7,7 @@ import { useNamespace } from '@vben-core/hooks';
import { import {
IcRoundChevronRight, IcRoundChevronRight,
IcRoundKeyboardArrowDown, IcRoundKeyboardArrowDown,
} from '@vben-core/iconify'; } from '@vben-core/icons';
import { VbenIcon } from '@vben-core/shadcn-ui'; import { VbenIcon } from '@vben-core/shadcn-ui';
import { useMenuContext } from '../hooks'; import { useMenuContext } from '../hooks';
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
}, },
"dependencies": { "dependencies": {
"@radix-icons/vue": "^1.0.0", "@radix-icons/vue": "^1.0.0",
"@vben-core/iconify": "workspace:*", "@vben-core/icons": "workspace:*",
"@vben-core/toolkit": "workspace:*", "@vben-core/toolkit": "workspace:*",
"@vben-core/typings": "workspace:*", "@vben-core/typings": "workspace:*",
"@vueuse/core": "^10.11.0", "@vueuse/core": "^10.11.0",
......
...@@ -3,7 +3,7 @@ import type { BacktopProps } from './backtop'; ...@@ -3,7 +3,7 @@ import type { BacktopProps } from './backtop';
import { computed } from 'vue'; import { computed } from 'vue';
import { IcRoundArrowUpward } from '@vben-core/iconify'; import { IcRoundArrowUpward } from '@vben-core/icons';
import { VbenButton } from '../button'; import { VbenButton } from '../button';
import { useBackTop } from './use-backtop'; import { useBackTop } from './use-backtop';
......
<script lang="ts" setup> <script lang="ts" setup>
import type { IBreadcrumb } from './interface'; import type { IBreadcrumb } from './interface';
import { IcRoundKeyboardArrowDown } from '@vben-core/iconify'; import { IcRoundKeyboardArrowDown } from '@vben-core/icons';
import { import {
Breadcrumb, Breadcrumb,
BreadcrumbItem, BreadcrumbItem,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import type { HTMLAttributes } from 'vue'; import type { HTMLAttributes } from 'vue';
import { computed } from 'vue'; import { computed } from 'vue';
import { MdiLoading } from '@vben-core/iconify'; import { MdiLoading } from '@vben-core/icons';
import { import {
type ButtonVariants, type ButtonVariants,
buttonVariants, buttonVariants,
......
<script lang="ts" setup> <script lang="ts" setup>
import { IcRoundFullscreen, IcRoundFullscreenExit } from '@vben-core/iconify'; import { IcRoundFullscreen, IcRoundFullscreenExit } from '@vben-core/icons';
import { useFullscreen } from '@vueuse/core'; import { useFullscreen } from '@vueuse/core';
......
<script setup lang="ts"> <script setup lang="ts">
import { type Component, computed } from 'vue'; import { type Component, computed } from 'vue';
import { Icon, IconDefault } from '@vben-core/iconify'; import { Icon, IconDefault } from '@vben-core/icons';
import { isHttpUrl, isObject, isString } from '@vben-core/toolkit'; import { isHttpUrl, isObject, isString } from '@vben-core/toolkit';
const props = defineProps<{ const props = defineProps<{
......
<script setup lang="ts"> <script setup lang="ts">
import { ref, useSlots } from 'vue'; import { ref, useSlots } from 'vue';
import { import { IcOutlineVisibility, IcOutlineVisibilityOff } from '@vben-core/icons';
IcOutlineVisibility,
IcOutlineVisibilityOff,
} from '@vben-core/iconify';
import { import {
type InputProps, type InputProps,
VbenInput, VbenInput,
......
...@@ -44,7 +44,7 @@ function handleScroll(event: Event) { ...@@ -44,7 +44,7 @@ function handleScroll(event: Event) {
:class="{ :class="{
'opacity-100': !isAtTop, 'opacity-100': !isAtTop,
}" }"
class="scrollbar-top-shadow pointer-events-none absolute top-0 z-10 h-16 w-full opacity-0 transition-opacity duration-1000 ease-in-out will-change-[opacity]" class="scrollbar-top-shadow pointer-events-none absolute top-0 z-10 h-12 w-full opacity-0 transition-opacity duration-300 ease-in-out will-change-[opacity]"
></div> ></div>
<slot></slot> <slot></slot>
<div <div
...@@ -52,7 +52,7 @@ function handleScroll(event: Event) { ...@@ -52,7 +52,7 @@ function handleScroll(event: Event) {
:class="{ :class="{
'opacity-100': !isAtTop && !isAtBottom, 'opacity-100': !isAtTop && !isAtBottom,
}" }"
class="scrollbar-bottom-shadow pointer-events-none absolute bottom-0 z-10 h-16 w-full opacity-0 transition-opacity duration-1000 ease-in-out will-change-[opacity]" class="scrollbar-bottom-shadow pointer-events-none absolute bottom-0 z-10 h-12 w-full opacity-0 transition-opacity duration-300 ease-in-out will-change-[opacity]"
></div> ></div>
<ScrollBar v-if="horizontal" orientation="horizontal" /> <ScrollBar v-if="horizontal" orientation="horizontal" />
</ScrollArea> </ScrollArea>
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
}, },
"dependencies": { "dependencies": {
"@vben-core/hooks": "workspace:*", "@vben-core/hooks": "workspace:*",
"@vben-core/iconify": "workspace:*", "@vben-core/icons": "workspace:*",
"@vben-core/shadcn-ui": "workspace:*", "@vben-core/shadcn-ui": "workspace:*",
"@vben-core/typings": "workspace:*", "@vben-core/typings": "workspace:*",
"vue": "^3.4.31" "vue": "^3.4.31"
......
...@@ -5,7 +5,7 @@ import type { TabConfig, TabsProps } from '../../types'; ...@@ -5,7 +5,7 @@ import type { TabConfig, TabsProps } from '../../types';
import { computed, nextTick, onMounted, ref, watch } from 'vue'; import { computed, nextTick, onMounted, ref, watch } from 'vue';
import { IcRoundClose, MdiPin } from '@vben-core/iconify'; import { IcRoundClose, MdiPin } from '@vben-core/icons';
import { VbenContextMenu, VbenIcon } from '@vben-core/shadcn-ui'; import { VbenContextMenu, VbenIcon } from '@vben-core/shadcn-ui';
interface Props extends TabsProps {} interface Props extends TabsProps {}
...@@ -174,7 +174,7 @@ function handleUnpinTab(tab: TabConfig) { ...@@ -174,7 +174,7 @@ function handleUnpinTab(tab: TabConfig) {
<!-- tab-item-main --> <!-- tab-item-main -->
<div <div
class="tabs-chrome__item-main absolute left-0 right-0 z-[2] mx-[calc(var(--gap)*2)] my-0 flex h-full items-center overflow-hidden rounded-tl-[5px] rounded-tr-[5px] duration-150 group-hover:pr-3" class="tabs-chrome__item-main group-[.is-active]:text-primary text-accent-foreground dark:group-[.is-active]:text-accent-foreground absolute left-0 right-0 z-[2] mx-[calc(var(--gap)*2)] my-0 flex h-full items-center overflow-hidden rounded-tl-[5px] rounded-tr-[5px] duration-150 group-hover:pr-3"
> >
<VbenIcon <VbenIcon
v-if="showIcon" v-if="showIcon"
...@@ -184,7 +184,7 @@ function handleUnpinTab(tab: TabConfig) { ...@@ -184,7 +184,7 @@ function handleUnpinTab(tab: TabConfig) {
/> />
<span <span
class="tabs-chrome__label text-accent-foreground ml-[var(--gap)] flex-1 overflow-hidden whitespace-nowrap" class="tabs-chrome__label ml-[var(--gap)] flex-1 overflow-hidden whitespace-nowrap"
> >
{{ tab.title }} {{ tab.title }}
</span> </span>
......
...@@ -3,7 +3,7 @@ import type { TabConfig, TabsProps } from '../../types'; ...@@ -3,7 +3,7 @@ import type { TabConfig, TabsProps } from '../../types';
import { computed } from 'vue'; import { computed } from 'vue';
import { IcRoundClose, MdiPin } from '@vben-core/iconify'; import { IcRoundClose, MdiPin } from '@vben-core/icons';
import { VbenContextMenu, VbenIcon, VbenScrollbar } from '@vben-core/shadcn-ui'; import { VbenContextMenu, VbenIcon, VbenScrollbar } from '@vben-core/shadcn-ui';
import { TabDefinition } from '@vben-core/typings'; import { TabDefinition } from '@vben-core/typings';
...@@ -113,7 +113,7 @@ function handleUnpinTab(tab: TabConfig) { ...@@ -113,7 +113,7 @@ function handleUnpinTab(tab: TabConfig) {
<!-- tab-item-main --> <!-- tab-item-main -->
<div <div
class="mx-3 mr-3 flex h-full items-center overflow-hidden rounded-tl-[5px] rounded-tr-[5px] pr-3 transition-all duration-300" class="group-[.is-active]:text-primary dark:group-[.is-active]:text-accent-foreground text-accent-foreground mx-3 mr-3 flex h-full items-center overflow-hidden rounded-tl-[5px] rounded-tr-[5px] pr-3 transition-all duration-300"
> >
<!-- <div <!-- <div
class="mx-3 ml-3 mr-2 flex h-full items-center overflow-hidden rounded-tl-[5px] rounded-tr-[5px] transition-all duration-300 group-hover:mr-2 group-hover:pr-4 group-[.is-active]:pr-4" class="mx-3 ml-3 mr-2 flex h-full items-center overflow-hidden rounded-tl-[5px] rounded-tr-[5px] transition-all duration-300 group-hover:mr-2 group-hover:pr-4 group-[.is-active]:pr-4"
...@@ -125,9 +125,7 @@ function handleUnpinTab(tab: TabConfig) { ...@@ -125,9 +125,7 @@ function handleUnpinTab(tab: TabConfig) {
fallback fallback
/> />
<span <span class="flex-1 overflow-hidden whitespace-nowrap">
class="text-accent-foreground flex-1 overflow-hidden whitespace-nowrap"
>
{{ tab.title }} {{ tab.title }}
</span> </span>
</div> </div>
......
<script lang="ts" setup> <script lang="ts" setup>
import type { DropdownMenuProps } from '@vben-core/shadcn-ui'; import type { DropdownMenuProps } from '@vben-core/shadcn-ui';
import { IcRoundKeyboardArrowDown } from '@vben-core/iconify'; import { IcRoundKeyboardArrowDown } from '@vben-core/icons';
import { VbenDropdownMenu } from '@vben-core/shadcn-ui'; import { VbenDropdownMenu } from '@vben-core/shadcn-ui';
defineProps<DropdownMenuProps>(); defineProps<DropdownMenuProps>();
......
<script lang="ts" setup> <script lang="ts" setup>
import { IcRoundFitScreen, IcTwotoneFitScreen } from '@vben-core/iconify'; import { IcRoundFitScreen, IcTwotoneFitScreen } from '@vben-core/icons';
const screen = defineModel<boolean>('screen'); const screen = defineModel<boolean>('screen');
......
# @vben/constants
用于多个 `app` 公用的常量,继承了 `@vben-core/constants` 的所有能力。业务上有通用常量可以放在这里。
## 用法
### 添加依赖
```bash
# 进入目标应用目录,例如 apps/xxxx-app
# cd apps/xxxx-app
pnpm add @vben/hooks --workspace
```
### 使用
```ts
import { useNamespace } from '@vben/hooks';
```
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
}, },
"dependencies": { "dependencies": {
"@vben-core/hooks": "workspace:*", "@vben-core/hooks": "workspace:*",
"@vben-core/iconify": "workspace:*", "@vben-core/icons": "workspace:*",
"@vben-core/locales": "workspace:*", "@vben-core/locales": "workspace:*",
"@vben-core/shadcn-ui": "workspace:*", "@vben-core/shadcn-ui": "workspace:*",
"@vben/constants": "workspace:*", "@vben/constants": "workspace:*",
......
<script setup lang="ts"> <script setup lang="ts">
import { MdiGithub, MdiGoogle, MdiQqchat, MdiWechat } from '@vben-core/iconify'; import { MdiGithub, MdiGoogle, MdiQqchat, MdiWechat } from '@vben-core/icons';
import { $t } from '@vben-core/locales'; import { $t } from '@vben-core/locales';
import { VbenIconButton } from '@vben-core/shadcn-ui'; import { VbenIconButton } from '@vben-core/shadcn-ui';
......
...@@ -4,7 +4,7 @@ import type { FallbackProps } from './fallback'; ...@@ -4,7 +4,7 @@ import type { FallbackProps } from './fallback';
import { computed, defineAsyncComponent } from 'vue'; import { computed, defineAsyncComponent } from 'vue';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { IcRoundArrowBackIosNew, IcRoundRefresh } from '@vben-core/iconify'; import { IcRoundArrowBackIosNew, IcRoundRefresh } from '@vben-core/icons';
import { $t } from '@vben-core/locales'; import { $t } from '@vben-core/locales';
import { VbenButton } from '@vben-core/shadcn-ui'; import { VbenButton } from '@vben-core/shadcn-ui';
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
}, },
"dependencies": { "dependencies": {
"@vben-core/helpers": "workspace:*", "@vben-core/helpers": "workspace:*",
"@vben-core/iconify": "workspace:*", "@vben-core/icons": "workspace:*",
"@vben-core/layout-ui": "workspace:*", "@vben-core/layout-ui": "workspace:*",
"@vben-core/locales": "workspace:*", "@vben-core/locales": "workspace:*",
"@vben-core/menu-ui": "workspace:*", "@vben-core/menu-ui": "workspace:*",
......
...@@ -20,7 +20,7 @@ import { ...@@ -20,7 +20,7 @@ import {
MdiFormatHorizontalAlignRight, MdiFormatHorizontalAlignRight,
MdiPin, MdiPin,
MdiPinOff, MdiPinOff,
} from '@vben-core/iconify'; } from '@vben-core/icons';
import { $t, useI18n } from '@vben-core/locales'; import { $t, useI18n } from '@vben-core/locales';
import { updatePreferences, usePreferences } from '@vben-core/preferences'; import { updatePreferences, usePreferences } from '@vben-core/preferences';
import { import {
......
<script setup lang="ts"> <script setup lang="ts">
import type { BuiltinThemeType } from '@vben-core/typings'; import type { BuiltinThemeType } from '@vben-core/typings';
import { IcRoundColorLens } from '@vben-core/iconify'; import { IcRoundColorLens } from '@vben-core/icons';
import { import {
COLOR_PRESETS, COLOR_PRESETS,
preferences, preferences,
......
...@@ -9,7 +9,7 @@ import { ...@@ -9,7 +9,7 @@ import {
IcRoundSearch, IcRoundSearch,
IcRoundSubdirectoryArrowLeft, IcRoundSubdirectoryArrowLeft,
MdiKeyboardEsc, MdiKeyboardEsc,
} from '@vben-core/iconify'; } from '@vben-core/icons';
import { $t } from '@vben-core/locales'; import { $t } from '@vben-core/locales';
import { import {
Dialog, Dialog,
......
...@@ -4,7 +4,7 @@ import type { MenuRecordRaw } from '@vben-core/typings'; ...@@ -4,7 +4,7 @@ import type { MenuRecordRaw } from '@vben-core/typings';
import { nextTick, onMounted, ref, shallowRef, watch } from 'vue'; import { nextTick, onMounted, ref, shallowRef, watch } from 'vue';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { IcRoundClose, IcRoundSearchOff } from '@vben-core/iconify'; import { IcRoundClose, IcRoundSearchOff } from '@vben-core/icons';
import { $t } from '@vben-core/locales'; import { $t } from '@vben-core/locales';
import { VbenIcon, VbenScrollbar } from '@vben-core/shadcn-ui'; import { VbenIcon, VbenScrollbar } from '@vben-core/shadcn-ui';
import { mapTree, traverseTreeValues, uniqueByField } from '@vben-core/toolkit'; import { mapTree, traverseTreeValues, uniqueByField } from '@vben-core/toolkit';
......
<script setup lang="ts"> <script setup lang="ts">
import type { SupportedLanguagesType } from '@vben-core/typings'; import type { SupportedLanguagesType } from '@vben-core/typings';
import { IcBaselineLanguage } from '@vben-core/iconify'; import { IcBaselineLanguage } from '@vben-core/icons';
import { loadLocaleMessages } from '@vben-core/locales'; import { loadLocaleMessages } from '@vben-core/locales';
import { import {
SUPPORT_LANGUAGES, SUPPORT_LANGUAGES,
......
...@@ -4,7 +4,7 @@ import type { AuthPageLayoutType } from '@vben-core/typings'; ...@@ -4,7 +4,7 @@ import type { AuthPageLayoutType } from '@vben-core/typings';
import { computed } from 'vue'; import { computed } from 'vue';
import { MdiDockBottom, MdiDockLeft, MdiDockRight } from '@vben-core/iconify'; import { MdiDockBottom, MdiDockLeft, MdiDockRight } from '@vben-core/icons';
import { $t } from '@vben-core/locales'; import { $t } from '@vben-core/locales';
import { import {
preferences, preferences,
......
<script setup lang="ts"> <script setup lang="ts">
import { computed, reactive, ref, watchEffect } from 'vue'; import { computed, reactive, ref, watchEffect } from 'vue';
import { IcRoundLock } from '@vben-core/iconify'; import { IcRoundLock } from '@vben-core/icons';
import { $t, useI18n } from '@vben-core/locales'; import { $t, useI18n } from '@vben-core/locales';
import { import {
VbenAvatar, VbenAvatar,
......
...@@ -4,7 +4,7 @@ import type { NotificationItem } from './types'; ...@@ -4,7 +4,7 @@ import type { NotificationItem } from './types';
import { import {
IcRoundMarkEmailRead, IcRoundMarkEmailRead,
IcRoundNotificationsNone, IcRoundNotificationsNone,
} from '@vben-core/iconify'; } from '@vben-core/icons';
import { $t } from '@vben-core/locales'; import { $t } from '@vben-core/locales';
import { import {
VbenButton, VbenButton,
......
...@@ -3,7 +3,7 @@ import type { SelectOption } from '@vben-core/typings'; ...@@ -3,7 +3,7 @@ import type { SelectOption } from '@vben-core/typings';
import { useSlots } from 'vue'; import { useSlots } from 'vue';
import { MdiQuestionMarkCircleOutline } from '@vben-core/iconify'; import { MdiQuestionMarkCircleOutline } from '@vben-core/icons';
import { Input, VbenTooltip } from '@vben-core/shadcn-ui'; import { Input, VbenTooltip } from '@vben-core/shadcn-ui';
defineOptions({ defineOptions({
......
...@@ -3,7 +3,7 @@ import type { LayoutType } from '@vben-core/typings'; ...@@ -3,7 +3,7 @@ import type { LayoutType } from '@vben-core/typings';
import { type Component, computed } from 'vue'; import { type Component, computed } from 'vue';
import { MdiQuestionMarkCircleOutline } from '@vben-core/iconify'; import { MdiQuestionMarkCircleOutline } from '@vben-core/icons';
import { $t } from '@vben-core/locales'; import { $t } from '@vben-core/locales';
import { VbenTooltip } from '@vben-core/shadcn-ui'; import { VbenTooltip } from '@vben-core/shadcn-ui';
......
...@@ -3,7 +3,7 @@ import type { SelectOption } from '@vben-core/typings'; ...@@ -3,7 +3,7 @@ import type { SelectOption } from '@vben-core/typings';
import { useSlots } from 'vue'; import { useSlots } from 'vue';
import { MdiQuestionMarkCircleOutline } from '@vben-core/iconify'; import { MdiQuestionMarkCircleOutline } from '@vben-core/icons';
import { import {
NumberField, NumberField,
NumberFieldContent, NumberFieldContent,
......
...@@ -3,7 +3,7 @@ import type { SelectOption } from '@vben-core/typings'; ...@@ -3,7 +3,7 @@ import type { SelectOption } from '@vben-core/typings';
import { useSlots } from 'vue'; import { useSlots } from 'vue';
import { MdiQuestionMarkCircleOutline } from '@vben-core/iconify'; import { MdiQuestionMarkCircleOutline } from '@vben-core/icons';
import { import {
Select, Select,
SelectContent, SelectContent,
......
<script setup lang="ts"> <script setup lang="ts">
import { useSlots } from 'vue'; import { useSlots } from 'vue';
import { MdiQuestionMarkCircleOutline } from '@vben-core/iconify'; import { MdiQuestionMarkCircleOutline } from '@vben-core/icons';
import { Switch, VbenTooltip } from '@vben-core/shadcn-ui'; import { Switch, VbenTooltip } from '@vben-core/shadcn-ui';
defineOptions({ defineOptions({
......
...@@ -3,7 +3,7 @@ import type { BuiltinThemeType } from '@vben-core/typings'; ...@@ -3,7 +3,7 @@ import type { BuiltinThemeType } from '@vben-core/typings';
import { computed, ref } from 'vue'; import { computed, ref } from 'vue';
import { MdiEditBoxOutline } from '@vben-core/iconify'; import { MdiEditBoxOutline } from '@vben-core/icons';
import { $t } from '@vben-core/locales'; import { $t } from '@vben-core/locales';
import { import {
BUILT_IN_THEME_PRESETS, BUILT_IN_THEME_PRESETS,
......
...@@ -7,7 +7,7 @@ import { ...@@ -7,7 +7,7 @@ import {
IcRoundMotionPhotosAuto, IcRoundMotionPhotosAuto,
IcRoundWbSunny, IcRoundWbSunny,
MdiMoonAndStars, MdiMoonAndStars,
} from '@vben-core/iconify'; } from '@vben-core/icons';
import { $t } from '@vben-core/locales'; import { $t } from '@vben-core/locales';
import SwitchItem from '../switch-item.vue'; import SwitchItem from '../switch-item.vue';
......
...@@ -13,7 +13,7 @@ import type { ...@@ -13,7 +13,7 @@ import type {
import { computed, ref } from 'vue'; import { computed, ref } from 'vue';
import { IcRoundFolderCopy, IcRoundRestartAlt } from '@vben-core/iconify'; import { IcRoundFolderCopy, IcRoundRestartAlt } from '@vben-core/icons';
import { $t, loadLocaleMessages } from '@vben-core/locales'; import { $t, loadLocaleMessages } from '@vben-core/locales';
import { import {
clearPreferencesCache, clearPreferencesCache,
......
...@@ -5,7 +5,7 @@ import { ...@@ -5,7 +5,7 @@ import {
IcRoundMotionPhotosAuto, IcRoundMotionPhotosAuto,
IcRoundWbSunny, IcRoundWbSunny,
MdiMoonAndStars, MdiMoonAndStars,
} from '@vben-core/iconify'; } from '@vben-core/icons';
import { $t } from '@vben-core/locales'; import { $t } from '@vben-core/locales';
import { import {
preferences, preferences,
......
...@@ -8,7 +8,7 @@ import { ...@@ -8,7 +8,7 @@ import {
IcRoundLock, IcRoundLock,
IcRoundLogout, IcRoundLogout,
IcRoundSettingsSuggest, IcRoundSettingsSuggest,
} from '@vben-core/iconify'; } from '@vben-core/icons';
import { $t } from '@vben-core/locales'; import { $t } from '@vben-core/locales';
import { preferences, usePreferences } from '@vben-core/preferences'; import { preferences, usePreferences } from '@vben-core/preferences';
import { import {
......
# @vben/hooks
用于多个 `app` 公用的 hook,继承了 `@vben-core/hooks` 的所有能力。业务上有通用 hooks 可以放在这里。
## 用法
### 添加依赖
```bash
# 进入目标应用目录,例如 apps/xxxx-app
# cd apps/xxxx-app
pnpm add @vben/hooks --workspace
```
### 使用
```ts
import { useNamespace } from '@vben/hooks';
```
# @vben/icons
用于多个 `app` 公用的图标文件,继承了 `@vben-core/icons` 的所有能力。业务上有通用图标可以放在这里。
## 用法
### 添加依赖
```bash
# 进入目标应用目录,例如 apps/xxxx-app
# cd apps/xxxx-app
pnpm add @vben/icons --workspace
```
### 使用
```ts
import { IcRoundClose } from '@vben/icons';
```
...@@ -35,6 +35,6 @@ ...@@ -35,6 +35,6 @@
} }
}, },
"dependencies": { "dependencies": {
"@vben-core/iconify": "workspace:*" "@vben-core/icons": "workspace:*"
} }
} }
export * from '@vben-core/iconify'; export * from '@vben-core/icons';
import { createIconifyIcon } from '@vben-core/iconify'; import { createIconifyIcon } from '@vben-core/icons';
import { loadSvgIcons } from './load'; import { loadSvgIcons } from './load';
......
import { import {
addIcon, addIcon,
// addCollection // addCollection
} from '@vben-core/iconify'; } from '@vben-core/icons';
// addCollection({ // addCollection({
// prefix: 'mdi', // prefix: 'mdi',
......
# @vben/styles
用于多个 `app` 公用的样式文件,继承了 `@vben-core/design` 的所有能力。业务上有通用的样式文件可以放在这里。
## 用法
### 添加依赖
```bash
# 进入目标应用目录,例如 apps/xxxx-app
# cd apps/xxxx-app
pnpm add @vben/styles --workspace
```
### 使用
```ts
import '@vben/styles';
```
# @vben/types
用于多个 `app` 公用的工具类型,继承了 `@vben-core/typings` 的所有能力。业务上有通用的类型定义可以放在这里。
## 用法
### 添加依赖
```bash
# 进入目标应用目录,例如 apps/xxxx-app
# cd apps/xxxx-app
pnpm add @vben/types --workspace
```
### 使用
```ts
// 推荐加上 type
import type { SelectOption } from '@vben/types';
```
# @vben/utils
用于多个 `app` 公用的工具包,继承了 `@vben-core/toolkit` 的所有能力。业务上有通用的工具函数可以放在这里。
## 用法
### 添加依赖
```bash
# 进入目标应用目录,例如 apps/xxxx-app
# cd apps/xxxx-app
pnpm add @vben/utils --workspace
```
### 使用
```ts
import { isString } from '@vben/utils';
```
...@@ -77,8 +77,8 @@ ...@@ -77,8 +77,8 @@
"path": "packages/@core/shared/hooks", "path": "packages/@core/shared/hooks",
}, },
{ {
"name": "@vben-core/iconify", "name": "@vben-core/icons",
"path": "packages/@core/shared/iconify", "path": "packages/@core/shared/icons",
}, },
{ {
"name": "@vben-core/toolkit", "name": "@vben-core/toolkit",
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"docs:preview": "vitepress preview" "docs:preview": "vitepress preview"
}, },
"devDependencies": { "devDependencies": {
"vitepress": "^1.3.0", "vitepress": "^1.3.1",
"vue": "^3.4.31" "vue": "^3.4.31"
} }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!