vome-core 0.1.76 → 0.1.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/api/client.js +2 -3
- package/dist/admin/components/layout/vm-app-header.vue +341 -0
- package/dist/admin/components/layout/vm-app-sidebar.vue +187 -0
- package/dist/admin/components/layout/vm-sidebar-flyout.vue +268 -0
- package/dist/admin/components/layout/vm-sidebar-nav-item.vue +490 -0
- package/dist/admin/components/layout/vm-sidebar-nav.vue +104 -0
- package/dist/admin/components/layout/vm-tags-view.vue +233 -0
- package/dist/admin/components/ui/avatar/Avatar.vue +18 -0
- package/dist/admin/components/ui/avatar/AvatarFallback.vue +21 -0
- package/dist/admin/components/ui/avatar/AvatarImage.vue +16 -0
- package/dist/admin/components/ui/avatar/index.d.ts +3 -0
- package/dist/admin/components/ui/avatar/index.js +1 -0
- package/dist/admin/components/ui/badge/Badge.vue +26 -0
- package/dist/admin/components/ui/badge/index.d.ts +6 -0
- package/dist/admin/components/ui/badge/index.js +1 -0
- package/dist/admin/components/ui/button/Button.vue +31 -0
- package/dist/admin/components/ui/button/index.d.ts +7 -0
- package/dist/admin/components/ui/button/index.js +1 -0
- package/dist/admin/components/ui/checkbox/Checkbox.vue +35 -0
- package/dist/admin/components/ui/checkbox/index.d.ts +1 -0
- package/dist/admin/components/ui/checkbox/index.js +1 -0
- package/dist/admin/components/ui/dialog/Dialog.vue +19 -0
- package/dist/admin/components/ui/dialog/DialogClose.vue +15 -0
- package/dist/admin/components/ui/dialog/DialogContent.vue +135 -0
- package/dist/admin/components/ui/dialog/DialogDescription.vue +23 -0
- package/dist/admin/components/ui/dialog/DialogFooter.vue +27 -0
- package/dist/admin/components/ui/dialog/DialogHeader.vue +17 -0
- package/dist/admin/components/ui/dialog/DialogOverlay.vue +21 -0
- package/dist/admin/components/ui/dialog/DialogScrollContent.vue +60 -0
- package/dist/admin/components/ui/dialog/DialogTitle.vue +23 -0
- package/dist/admin/components/ui/dialog/DialogTrigger.vue +15 -0
- package/dist/admin/components/ui/dialog/index.d.ts +10 -0
- package/dist/admin/components/ui/dialog/index.js +1 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenu.vue +19 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +39 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuContent.vue +39 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuGroup.vue +15 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuItem.vue +31 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuLabel.vue +23 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuRadioGroup.vue +21 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +40 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuSeparator.vue +23 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuShortcut.vue +17 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuSub.vue +18 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuSubContent.vue +27 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +31 -0
- package/dist/admin/components/ui/dropdown-menu/DropdownMenuTrigger.vue +17 -0
- package/dist/admin/components/ui/dropdown-menu/index.d.ts +15 -0
- package/dist/admin/components/ui/dropdown-menu/index.js +1 -0
- package/dist/admin/components/ui/input/Input.vue +34 -0
- package/dist/admin/components/ui/input/index.d.ts +1 -0
- package/dist/admin/components/ui/input/index.js +1 -0
- package/dist/admin/components/ui/label/Label.vue +26 -0
- package/dist/admin/components/ui/label/index.d.ts +1 -0
- package/dist/admin/components/ui/label/index.js +1 -0
- package/dist/admin/components/ui/scroll-area/ScrollArea.vue +33 -0
- package/dist/admin/components/ui/scroll-area/ScrollBar.vue +32 -0
- package/dist/admin/components/ui/scroll-area/index.d.ts +2 -0
- package/dist/admin/components/ui/scroll-area/index.js +1 -0
- package/dist/admin/components/ui/select/Select.vue +19 -0
- package/dist/admin/components/ui/select/SelectContent.vue +51 -0
- package/dist/admin/components/ui/select/SelectGroup.vue +15 -0
- package/dist/admin/components/ui/select/SelectItem.vue +44 -0
- package/dist/admin/components/ui/select/SelectItemText.vue +15 -0
- package/dist/admin/components/ui/select/SelectLabel.vue +17 -0
- package/dist/admin/components/ui/select/SelectScrollDownButton.vue +26 -0
- package/dist/admin/components/ui/select/SelectScrollUpButton.vue +26 -0
- package/dist/admin/components/ui/select/SelectSeparator.vue +19 -0
- package/dist/admin/components/ui/select/SelectTrigger.vue +33 -0
- package/dist/admin/components/ui/select/SelectValue.vue +15 -0
- package/dist/admin/components/ui/select/index.d.ts +11 -0
- package/dist/admin/components/ui/select/index.js +1 -0
- package/dist/admin/components/ui/separator/Separator.vue +29 -0
- package/dist/admin/components/ui/separator/index.d.ts +1 -0
- package/dist/admin/components/ui/separator/index.js +1 -0
- package/dist/admin/components/ui/sheet/Sheet.vue +19 -0
- package/dist/admin/components/ui/sheet/SheetClose.vue +15 -0
- package/dist/admin/components/ui/sheet/SheetContent.vue +63 -0
- package/dist/admin/components/ui/sheet/SheetDescription.vue +21 -0
- package/dist/admin/components/ui/sheet/SheetFooter.vue +16 -0
- package/dist/admin/components/ui/sheet/SheetHeader.vue +15 -0
- package/dist/admin/components/ui/sheet/SheetOverlay.vue +21 -0
- package/dist/admin/components/ui/sheet/SheetTitle.vue +21 -0
- package/dist/admin/components/ui/sheet/SheetTrigger.vue +15 -0
- package/dist/admin/components/ui/sheet/index.d.ts +8 -0
- package/dist/admin/components/ui/sheet/index.js +1 -0
- package/dist/admin/components/ui/sonner/Toaster.vue +117 -0
- package/dist/admin/components/ui/sonner/index.d.ts +1 -0
- package/dist/admin/components/ui/sonner/index.js +1 -0
- package/dist/admin/components/ui/table/Table.vue +16 -0
- package/dist/admin/components/ui/table/TableBody.vue +17 -0
- package/dist/admin/components/ui/table/TableCaption.vue +17 -0
- package/dist/admin/components/ui/table/TableCell.vue +22 -0
- package/dist/admin/components/ui/table/TableEmpty.vue +34 -0
- package/dist/admin/components/ui/table/TableFooter.vue +17 -0
- package/dist/admin/components/ui/table/TableHead.vue +17 -0
- package/dist/admin/components/ui/table/TableHeader.vue +17 -0
- package/dist/admin/components/ui/table/TableRow.vue +17 -0
- package/dist/admin/components/ui/table/index.d.ts +9 -0
- package/dist/admin/components/ui/table/index.js +1 -0
- package/dist/admin/components/ui/table/utils.d.ts +3 -0
- package/dist/admin/components/ui/table/utils.js +1 -0
- package/dist/admin/components/ui/tabs/Tabs.vue +24 -0
- package/dist/admin/components/ui/tabs/TabsContent.vue +21 -0
- package/dist/admin/components/ui/tabs/TabsList.vue +24 -0
- package/dist/admin/components/ui/tabs/TabsTrigger.vue +26 -0
- package/dist/admin/components/ui/tabs/index.d.ts +4 -0
- package/dist/admin/components/ui/tabs/index.js +1 -0
- package/dist/admin/components/ui/tooltip/Tooltip.vue +19 -0
- package/dist/admin/components/ui/tooltip/TooltipContent.vue +34 -0
- package/dist/admin/components/ui/tooltip/TooltipProvider.vue +14 -0
- package/dist/admin/components/ui/tooltip/TooltipTrigger.vue +15 -0
- package/dist/admin/components/ui/tooltip/index.d.ts +4 -0
- package/dist/admin/components/ui/tooltip/index.js +1 -0
- package/dist/admin/crud/components/vm-color-picker.vue +0 -3
- package/dist/admin/crud/components/vm-richtext-extensions.js +1 -1
- package/dist/admin/crud/config.js +1 -1
- package/dist/admin/crud/confirm.d.ts +8 -0
- package/dist/admin/crud/confirm.js +1 -1
- package/dist/admin/crud/crud-page-request.js +1 -1
- package/dist/admin/crud/dict.js +1 -1
- package/dist/admin/crud/export-fetch.js +1 -1
- package/dist/admin/crud/key.js +1 -1
- package/dist/admin/crud/plugins.js +1 -1
- package/dist/admin/crud/span.js +1 -1
- package/dist/admin/crud/style.d.ts +4 -0
- package/dist/admin/crud/style.js +1 -1
- package/dist/admin/crud/validate.js +1 -1
- package/dist/admin/crud/vm-data-i18n-btn.vue +0 -7
- package/dist/admin/directives/perm.js +1 -1
- package/dist/admin/env.d.ts +0 -4
- package/dist/admin/hooks/useUpload.js +1 -1
- package/dist/admin/index.d.ts +11 -4
- package/dist/admin/index.js +16 -7
- package/dist/admin/lib/browser.js +1 -1
- package/dist/admin/lib/cn.js +1 -1
- package/dist/admin/lib/dialog-float.js +1 -1
- package/dist/admin/lib/document-title.d.ts +6 -0
- package/dist/admin/lib/document-title.js +1 -0
- package/dist/admin/lib/export-excel.js +1 -1
- package/dist/admin/lib/import-excel.js +1 -1
- package/dist/admin/lib/json.js +1 -1
- package/dist/admin/lib/menu.js +1 -1
- package/dist/admin/lib/micro-locale.d.ts +5 -0
- package/dist/admin/lib/micro-locale.js +1 -0
- package/dist/admin/lib/micro-theme.d.ts +14 -0
- package/dist/admin/lib/micro-theme.js +1 -0
- package/dist/admin/lib/setup-crud-defaults.d.ts +2 -0
- package/dist/admin/lib/setup-crud-defaults.js +1 -0
- package/dist/admin/lib/shell.d.ts +13 -0
- package/dist/admin/lib/shell.js +1 -0
- package/dist/admin/lib/theme-color-options.js +1 -1
- package/dist/admin/lib/tree.js +1 -1
- package/dist/admin/lib/upload.js +1 -1
- package/dist/admin/lib/video-frame.js +1 -1
- package/dist/admin/router/create.d.ts +16 -0
- package/dist/admin/router/create.js +1 -0
- package/dist/admin/router/guards.d.ts +6 -0
- package/dist/admin/router/guards.js +1 -0
- package/dist/admin/router/index.d.ts +6 -3
- package/dist/admin/router/index.js +5 -80
- package/dist/admin/router/menu-routes.d.ts +7 -2
- package/dist/admin/router/menu-routes.js +10 -12
- package/dist/admin/service/index.js +0 -3
- package/dist/admin/stores/dict.d.ts +13 -0
- package/dist/admin/stores/dict.js +1 -0
- package/dist/admin/stores/locale.d.ts +3 -0
- package/dist/admin/stores/locale.js +1 -0
- package/dist/admin/stores/theme.d.ts +1 -0
- package/dist/admin/stores/theme.js +1 -0
- package/dist/admin/themes/dark.d.ts +2 -0
- package/dist/admin/themes/dark.js +1 -0
- package/dist/admin/themes/index.d.ts +9 -0
- package/dist/admin/themes/index.js +1 -0
- package/dist/admin/themes/light.d.ts +2 -0
- package/dist/admin/themes/light.js +1 -0
- package/dist/client/configure.d.ts +3 -0
- package/dist/client/configure.js +7 -0
- package/dist/client/vite-admin.js +2 -4
- package/dist/client/vite-auto-import.js +4 -4
- package/dist/client/vite-resolve.d.ts +3 -3
- package/dist/client/vite-resolve.js +10 -15
- package/dist/ext/plugin-market-urls.d.ts +8 -0
- package/dist/index.js +1 -1
- package/dist/server/index.js +1 -1
- package/dist/shared/datetime-picker.js +1 -1
- package/dist/shared/excel.js +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/shared/locale-json.js +1 -1
- package/dist/shared/tree.js +1 -1
- package/package.json +13 -4
- package/typings/admin/theme.ts +10 -0
- package/dist/admin/config/plugin-dev.d.ts +0 -52
- package/dist/admin/config/plugin-dev.js +0 -1
- package/typings/admin/host.d.ts +0 -66
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div ref="rootRef" class="vm-tags">
|
|
3
|
+
<div ref="trackRef" class="vm-tags__track" :style="trackStyle">
|
|
4
|
+
<button
|
|
5
|
+
v-for="tag in list"
|
|
6
|
+
:key="tag.path"
|
|
7
|
+
type="button"
|
|
8
|
+
class="vm-tags__item"
|
|
9
|
+
:class="{ 'is-active': route.path === tag.path }"
|
|
10
|
+
@click="router.push(tag.fullPath)"
|
|
11
|
+
@click.middle="close(tag.path, $event)"
|
|
12
|
+
>
|
|
13
|
+
<span class="vm-tags__title">{{ tagTitle(tag) }}</span>
|
|
14
|
+
<i
|
|
15
|
+
v-if="tag.path !== '/'"
|
|
16
|
+
class="ri-close-line vm-tags__close"
|
|
17
|
+
@click="close(tag.path, $event)"
|
|
18
|
+
/>
|
|
19
|
+
</button>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script setup lang="ts">
|
|
25
|
+
import { useLocaleStore } from '../../stores/locale'
|
|
26
|
+
|
|
27
|
+
defineOptions({ name: 'vm-tags-view' })
|
|
28
|
+
|
|
29
|
+
const tags = useTagsStore()
|
|
30
|
+
const user = useUserStore()
|
|
31
|
+
const locale = useLocaleStore()
|
|
32
|
+
const route = useRoute()
|
|
33
|
+
const router = useRouter()
|
|
34
|
+
|
|
35
|
+
const rootRef = ref<HTMLElement | null>(null)
|
|
36
|
+
const trackRef = ref<HTMLElement | null>(null)
|
|
37
|
+
const offset = ref(0)
|
|
38
|
+
|
|
39
|
+
/** 首页由顶栏按钮进入,tabs 不再塞首页项 */
|
|
40
|
+
const list = computed(() => tags.list.filter((t) => t.path !== '/'))
|
|
41
|
+
|
|
42
|
+
function findMenuByPath(
|
|
43
|
+
nodes: MenuTreeNode[],
|
|
44
|
+
path: string,
|
|
45
|
+
): MenuTreeNode | null {
|
|
46
|
+
for (const n of nodes) {
|
|
47
|
+
if (n.router === path) return n
|
|
48
|
+
if (n.children?.length) {
|
|
49
|
+
const hit = findMenuByPath(n.children, path)
|
|
50
|
+
if (hit) return hit
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return null
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function tagTitle(tag: { path: string; title: string }) {
|
|
57
|
+
const node = findMenuByPath(user.menus, tag.path)
|
|
58
|
+
return node ? locale.tMenu(node) : tag.title
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const trackStyle = computed(() =>
|
|
62
|
+
offset.value > 0 ? { transform: `translateX(-${offset.value}px)` } : undefined,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
function measureTabs() {
|
|
66
|
+
const root = rootRef.value
|
|
67
|
+
const track = trackRef.value
|
|
68
|
+
if (!root || !track) return
|
|
69
|
+
|
|
70
|
+
const containerWidth = root.clientWidth
|
|
71
|
+
const items = track.querySelectorAll<HTMLElement>('.vm-tags__item')
|
|
72
|
+
if (!items.length || containerWidth <= 0) {
|
|
73
|
+
offset.value = 0
|
|
74
|
+
return
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const gap = 4
|
|
78
|
+
const positions: number[] = []
|
|
79
|
+
const widths: number[] = []
|
|
80
|
+
let total = 0
|
|
81
|
+
|
|
82
|
+
items.forEach((el, i) => {
|
|
83
|
+
positions.push(total)
|
|
84
|
+
const w = el.offsetWidth
|
|
85
|
+
widths.push(w)
|
|
86
|
+
total += w + (i < items.length - 1 ? gap : 0)
|
|
87
|
+
})
|
|
88
|
+
|
|
89
|
+
const maxOffset = Math.max(0, total - containerWidth)
|
|
90
|
+
if (maxOffset === 0) {
|
|
91
|
+
offset.value = 0
|
|
92
|
+
return
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const activeIndex = list.value.findIndex((t) => t.path === route.path)
|
|
96
|
+
// 默认贴右:左侧最早打开的 tab 被裁切隐藏
|
|
97
|
+
let next = maxOffset
|
|
98
|
+
|
|
99
|
+
if (activeIndex >= 0) {
|
|
100
|
+
const left = positions[activeIndex]!
|
|
101
|
+
const right = left + widths[activeIndex]!
|
|
102
|
+
if (left < next) next = left
|
|
103
|
+
if (right > next + containerWidth) next = right - containerWidth
|
|
104
|
+
next = Math.min(maxOffset, Math.max(0, next))
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
offset.value = next
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
let ro: ResizeObserver | undefined
|
|
111
|
+
|
|
112
|
+
function scheduleMeasure() {
|
|
113
|
+
nextTick(() => measureTabs())
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function close(path: string, e: Event) {
|
|
117
|
+
e.preventDefault()
|
|
118
|
+
e.stopPropagation()
|
|
119
|
+
if (path === '/') return
|
|
120
|
+
const i = list.value.findIndex((t) => t.path === path)
|
|
121
|
+
tags.remove(path)
|
|
122
|
+
if (route.path === path) {
|
|
123
|
+
const next = list.value[i - 1] || list.value[i] || null
|
|
124
|
+
void router.push(next?.fullPath || '/')
|
|
125
|
+
}
|
|
126
|
+
scheduleMeasure()
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
watch(
|
|
130
|
+
() => [list.value.length, route.path, ...list.value.map((t) => t.title)] as const,
|
|
131
|
+
scheduleMeasure,
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
onMounted(() => {
|
|
135
|
+
scheduleMeasure()
|
|
136
|
+
ro = new ResizeObserver(scheduleMeasure)
|
|
137
|
+
if (rootRef.value) ro.observe(rootRef.value)
|
|
138
|
+
if (trackRef.value) ro.observe(trackRef.value)
|
|
139
|
+
})
|
|
140
|
+
|
|
141
|
+
onUnmounted(() => {
|
|
142
|
+
ro?.disconnect()
|
|
143
|
+
})
|
|
144
|
+
</script>
|
|
145
|
+
|
|
146
|
+
<style lang="scss" scoped>
|
|
147
|
+
.vm-tags {
|
|
148
|
+
min-width: 0;
|
|
149
|
+
flex: 1;
|
|
150
|
+
overflow: hidden;
|
|
151
|
+
margin-left: 4px;
|
|
152
|
+
padding: 0;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.vm-tags__track {
|
|
156
|
+
display: flex;
|
|
157
|
+
width: max-content;
|
|
158
|
+
align-items: center;
|
|
159
|
+
gap: 4px;
|
|
160
|
+
transition: transform 0.15s ease;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.vm-tags__item {
|
|
164
|
+
display: inline-flex;
|
|
165
|
+
height: 32px;
|
|
166
|
+
flex-shrink: 0;
|
|
167
|
+
align-items: center;
|
|
168
|
+
gap: 0;
|
|
169
|
+
padding: 0 10px;
|
|
170
|
+
border: none;
|
|
171
|
+
border-radius: 8px;
|
|
172
|
+
background: var(--muted);
|
|
173
|
+
color: var(--muted-foreground);
|
|
174
|
+
font-size: 12px;
|
|
175
|
+
font-weight: 600;
|
|
176
|
+
line-height: 1;
|
|
177
|
+
cursor: pointer;
|
|
178
|
+
transition:
|
|
179
|
+
background 0.15s ease,
|
|
180
|
+
color 0.15s ease,
|
|
181
|
+
box-shadow 0.15s ease,
|
|
182
|
+
gap 0.15s ease,
|
|
183
|
+
padding 0.15s ease;
|
|
184
|
+
|
|
185
|
+
&:hover {
|
|
186
|
+
gap: 4px;
|
|
187
|
+
padding-right: 8px;
|
|
188
|
+
color: var(--foreground);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&.is-active {
|
|
192
|
+
background: #fff;
|
|
193
|
+
color: var(--brand);
|
|
194
|
+
box-shadow: var(--shadow-card);
|
|
195
|
+
|
|
196
|
+
.dark & {
|
|
197
|
+
background: var(--card);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.vm-tags__title {
|
|
203
|
+
white-space: nowrap;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/* 默认占 0 宽;悬停展开关闭按钮宽度 */
|
|
207
|
+
.vm-tags__close {
|
|
208
|
+
display: inline-flex;
|
|
209
|
+
width: 0;
|
|
210
|
+
height: 14px;
|
|
211
|
+
flex-shrink: 0;
|
|
212
|
+
align-items: center;
|
|
213
|
+
justify-content: center;
|
|
214
|
+
overflow: hidden;
|
|
215
|
+
font-size: 14px;
|
|
216
|
+
line-height: 1;
|
|
217
|
+
opacity: 0;
|
|
218
|
+
transition:
|
|
219
|
+
width 0.15s ease,
|
|
220
|
+
opacity 0.15s ease,
|
|
221
|
+
color 0.15s ease;
|
|
222
|
+
|
|
223
|
+
.vm-tags__item:hover & {
|
|
224
|
+
width: 14px;
|
|
225
|
+
opacity: 0.55;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.vm-tags__item:hover &:hover {
|
|
229
|
+
opacity: 1;
|
|
230
|
+
color: var(--destructive);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { AvatarRoot } from "reka-ui"
|
|
4
|
+
import { cn } from "@core/admin/lib/cn"
|
|
5
|
+
|
|
6
|
+
const props = defineProps<{
|
|
7
|
+
class?: HTMLAttributes["class"]
|
|
8
|
+
}>()
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<AvatarRoot
|
|
13
|
+
data-slot="avatar"
|
|
14
|
+
:class="cn('relative flex size-8 shrink-0 overflow-hidden rounded-full', props.class)"
|
|
15
|
+
>
|
|
16
|
+
<slot />
|
|
17
|
+
</AvatarRoot>
|
|
18
|
+
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { AvatarFallbackProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
5
|
+
import { AvatarFallback } from "reka-ui"
|
|
6
|
+
import { cn } from "@core/admin/lib/cn"
|
|
7
|
+
|
|
8
|
+
const props = defineProps<AvatarFallbackProps & { class?: HTMLAttributes["class"] }>()
|
|
9
|
+
|
|
10
|
+
const delegatedProps = reactiveOmit(props, "class")
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<AvatarFallback
|
|
15
|
+
data-slot="avatar-fallback"
|
|
16
|
+
v-bind="delegatedProps"
|
|
17
|
+
:class="cn('bg-muted flex size-full items-center justify-center rounded-full', props.class)"
|
|
18
|
+
>
|
|
19
|
+
<slot />
|
|
20
|
+
</AvatarFallback>
|
|
21
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { AvatarImageProps } from "reka-ui"
|
|
3
|
+
import { AvatarImage } from "reka-ui"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<AvatarImageProps>()
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<AvatarImage
|
|
10
|
+
data-slot="avatar-image"
|
|
11
|
+
v-bind="props"
|
|
12
|
+
class="aspect-square size-full"
|
|
13
|
+
>
|
|
14
|
+
<slot />
|
|
15
|
+
</AvatarImage>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x3f3f96,_0x546d35){var _0x1d694c=_0x6b0c,_0x809012=_0x3f3f96();while(!![]){try{var _0x286427=parseInt(_0x1d694c(0x73))/0x1*(parseInt(_0x1d694c(0x71))/0x2)+parseInt(_0x1d694c(0x6b))/0x3+-parseInt(_0x1d694c(0x6d))/0x4+parseInt(_0x1d694c(0x6c))/0x5*(-parseInt(_0x1d694c(0x74))/0x6)+-parseInt(_0x1d694c(0x6e))/0x7+parseInt(_0x1d694c(0x6f))/0x8*(-parseInt(_0x1d694c(0x72))/0x9)+parseInt(_0x1d694c(0x70))/0xa;if(_0x286427===_0x546d35)break;else _0x809012['push'](_0x809012['shift']());}catch(_0x115d68){_0x809012['push'](_0x809012['shift']());}}}(_0x2b62,0xbe341));export{default as Avatar}from'./Avatar.vue';function _0x6b0c(_0x5b7333,_0x7e79a){_0x5b7333=_0x5b7333-0x6b;var _0x2b621f=_0x2b62();var _0x6b0cf6=_0x2b621f[_0x5b7333];if(_0x6b0c['xVPvhh']===undefined){var _0x38b98a=function(_0xb80223){var _0x17bb87='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x47f5a2='',_0x50e092='';for(var _0x3d104a=0x0,_0x1a5957,_0x1bddb8,_0x1deaa9=0x0;_0x1bddb8=_0xb80223['charAt'](_0x1deaa9++);~_0x1bddb8&&(_0x1a5957=_0x3d104a%0x4?_0x1a5957*0x40+_0x1bddb8:_0x1bddb8,_0x3d104a++%0x4)?_0x47f5a2+=String['fromCharCode'](0xff&_0x1a5957>>(-0x2*_0x3d104a&0x6)):0x0){_0x1bddb8=_0x17bb87['indexOf'](_0x1bddb8);}for(var _0x11d0f8=0x0,_0x4d2e5d=_0x47f5a2['length'];_0x11d0f8<_0x4d2e5d;_0x11d0f8++){_0x50e092+='%'+('00'+_0x47f5a2['charCodeAt'](_0x11d0f8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x50e092);};_0x6b0c['AWVmrP']=_0x38b98a,_0x6b0c['ANBQtu']={},_0x6b0c['xVPvhh']=!![];}var _0x2bb51a=_0x2b621f[0x0],_0x3d3ce8=_0x5b7333+_0x2bb51a,_0x176c30=_0x6b0c['ANBQtu'][_0x3d3ce8];return!_0x176c30?(_0x6b0cf6=_0x6b0c['AWVmrP'](_0x6b0cf6),_0x6b0c['ANBQtu'][_0x3d3ce8]=_0x6b0cf6):_0x6b0cf6=_0x176c30,_0x6b0cf6;}export{default as AvatarFallback}from'./AvatarFallback.vue';export{default as AvatarImage}from'./AvatarImage.vue';function _0x2b62(){var _0x5e2937=['mZaWmZC2vNPtB3nm','mJe1otu0mdb5EeHZEKW','mLjeB1DSzq','mJm0rxfhBvPf','mta4ndyWn3fqr3vsvW','mJu4A0fsEgrq','mtmXmtmWmhvMELrmqW','nZuZmJvOsuDqt0G','mJC4otq5nM1dtgHPEa','nda2ntq4mwDktwzdtW'];_0x2b62=function(){return _0x5e2937;};return _0x2b62();}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { PrimitiveProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import type { BadgeVariants } from "."
|
|
5
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
6
|
+
import { Primitive } from "reka-ui"
|
|
7
|
+
import { cn } from "@core/admin/lib/cn"
|
|
8
|
+
import { badgeVariants } from "."
|
|
9
|
+
|
|
10
|
+
const props = defineProps<PrimitiveProps & {
|
|
11
|
+
variant?: BadgeVariants["variant"]
|
|
12
|
+
class?: HTMLAttributes["class"]
|
|
13
|
+
}>()
|
|
14
|
+
|
|
15
|
+
const delegatedProps = reactiveOmit(props, "class")
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<Primitive
|
|
20
|
+
data-slot="badge"
|
|
21
|
+
:class="cn(badgeVariants({ variant }), props.class)"
|
|
22
|
+
v-bind="delegatedProps"
|
|
23
|
+
>
|
|
24
|
+
<slot />
|
|
25
|
+
</Primitive>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { VariantProps } from "class-variance-authority";
|
|
2
|
+
export { default as Badge } from "./Badge.vue";
|
|
3
|
+
export declare const badgeVariants: (props?: {
|
|
4
|
+
variant?: "default" | "destructive" | "outline" | "secondary";
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
6
|
+
export type BadgeVariants = VariantProps<typeof badgeVariants>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _0x1a4f(_0xa9540f,_0x420496){_0xa9540f=_0xa9540f-0x1dc;const _0x5721f0=_0x5721();let _0x1a4fca=_0x5721f0[_0xa9540f];if(_0x1a4f['RTVwox']===undefined){var _0x22eae2=function(_0x20eda1){const _0x214873='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x57db34='',_0x516a67='';for(let _0x4653c1=0x0,_0x215c0d,_0x175640,_0x4e3778=0x0;_0x175640=_0x20eda1['charAt'](_0x4e3778++);~_0x175640&&(_0x215c0d=_0x4653c1%0x4?_0x215c0d*0x40+_0x175640:_0x175640,_0x4653c1++%0x4)?_0x57db34+=String['fromCharCode'](0xff&_0x215c0d>>(-0x2*_0x4653c1&0x6)):0x0){_0x175640=_0x214873['indexOf'](_0x175640);}for(let _0x2d09b3=0x0,_0x401c4c=_0x57db34['length'];_0x2d09b3<_0x401c4c;_0x2d09b3++){_0x516a67+='%'+('00'+_0x57db34['charCodeAt'](_0x2d09b3)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x516a67);};_0x1a4f['YYCYiL']=_0x22eae2,_0x1a4f['mTsubg']={},_0x1a4f['RTVwox']=!![];}const _0x122360=_0x5721f0[0x0],_0x537859=_0xa9540f+_0x122360,_0x59852d=_0x1a4f['mTsubg'][_0x537859];return!_0x59852d?(_0x1a4fca=_0x1a4f['YYCYiL'](_0x1a4fca),_0x1a4f['mTsubg'][_0x537859]=_0x1a4fca):_0x1a4fca=_0x59852d,_0x1a4fca;}function _0x5721(){const _0x46646e=['zgvMyxvSDa','mtaXntnSA2f6DM8','yM9YzgvYlxrYyw5ZCgfYzw50igjNlxnLy29UzgfYEsb0zxH0lxnLy29UzgfYEs1MB3jLz3jVDw5KifTHjL06Ag92zxi6yMCTC2vJB25Kyxj5lZKW','mJe3otbuugDhyMW','mtu0r1HxqNL4','mtCXBK1Ssg9I','yM9YzgvYlxrYyw5ZCgfYzw50igjNlwrLC3rYDwn0AxzLihrLEhqTD2HPDguGw2eMxtPOB3zLCJPIzY1Kzxn0CNvJDgL2zs85mcbMB2n1CY12AxnPyMXLoNjPBMCTzgvZDhj1y3rPDMuVmJaGzgfYAZPMB2n1CY12AxnPyMXLoNjPBMCTzgvZDhj1y3rPDMuVndaGzgfYAZPIzY1Kzxn0CNvJDgL2zs82ma','mtCWnZfqrwHIshq','Aw5SAw5LlwzSzxGGAxrLBxmTy2vUDgvYigP1C3rPzNKTy2vUDgvYihjVDw5KzwqTzNvSBcbIB3jKzxiGChGTmIbWEs0WlJuGDgv4Dc14CYbMB250lw1LzgL1Bsb3lwzPDcb3AgL0zxnWywnLlw5VD3jHCcbZAhjPBMSTmcbBjJ5ZDMDDoNnPEMuTmYbNyxaTmsbBjJ5ZDMDDoNbVAw50zxiTzxzLBNrZlw5VBMuGzM9JDxmTDMLZAwjSztPIB3jKzxiTCMLUzYbMB2n1CY12AxnPyMXLoNjPBMCTCMLUzY81mcbMB2n1CY12AxnPyMXLoNjPBMCTmYbHCMLHlwLUDMfSAwq6CMLUzY1Kzxn0CNvJDgL2zs8YmcbKyxjRoMfYAweTAw52ywXPzdPYAw5NlwrLC3rYDwn0AxzLlZqWigfYAweTAw52ywXPzdPIB3jKzxiTzgvZDhj1y3rPDMuGDhjHBNnPDgLVBI1By29SB3iSyM94lxnOywrVD10GB3zLCMzSB3CTAgLKzgvU','nty5ndqWmMHTrevWCa','nZHnufvRD2G','yM9YzgvYlxrYyw5ZCgfYzw50igjNlxbYAw1HCNKGDgv4Dc1WCMLTyxj5lwzVCMvNCM91BMqGw2eMxtPOB3zLCJPIzY1WCMLTyxj5lZKW','ndm0otzxDg5Vr28','mJC5mJi0nwzICefzqW','mtm1nZqWEeTfqNzi','mte2nZy0nJjmAu9vDwm'];_0x5721=function(){return _0x46646e;};return _0x5721();}const _0x4c94dd=_0x1a4f;(function(_0x31036d,_0x522c57){const _0x5c44bf=_0x1a4f,_0x3b1686=_0x31036d();while(!![]){try{const _0x1aa783=-parseInt(_0x5c44bf(0x1e3))/0x1*(-parseInt(_0x5c44bf(0x1e0))/0x2)+parseInt(_0x5c44bf(0x1e6))/0x3*(parseInt(_0x5c44bf(0x1ea))/0x4)+-parseInt(_0x5c44bf(0x1e9))/0x5+-parseInt(_0x5c44bf(0x1e5))/0x6+-parseInt(_0x5c44bf(0x1eb))/0x7+-parseInt(_0x5c44bf(0x1e8))/0x8*(parseInt(_0x5c44bf(0x1e1))/0x9)+-parseInt(_0x5c44bf(0x1df))/0xa*(-parseInt(_0x5c44bf(0x1dd))/0xb);if(_0x1aa783===_0x522c57)break;else _0x3b1686['push'](_0x3b1686['shift']());}catch(_0x2250a3){_0x3b1686['push'](_0x3b1686['shift']());}}}(_0x5721,0xe2d55));import{cva}from'class-variance-authority';export{default as Badge}from'./Badge.vue';export const badgeVariants=cva(_0x4c94dd(0x1e4),{'variants':{'variant':{'default':_0x4c94dd(0x1e7),'secondary':_0x4c94dd(0x1de),'destructive':_0x4c94dd(0x1e2),'outline':'text-foreground\x20[a&]:hover:bg-accent\x20[a&]:hover:text-accent-foreground'}},'defaultVariants':{'variant':_0x4c94dd(0x1dc)}});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { PrimitiveProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import type { ButtonVariants } from "."
|
|
5
|
+
import { Primitive } from "reka-ui"
|
|
6
|
+
import { cn } from "@core/admin/lib/cn"
|
|
7
|
+
import { buttonVariants } from "."
|
|
8
|
+
|
|
9
|
+
interface Props extends PrimitiveProps {
|
|
10
|
+
variant?: ButtonVariants["variant"]
|
|
11
|
+
size?: ButtonVariants["size"]
|
|
12
|
+
class?: HTMLAttributes["class"]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
16
|
+
as: "button",
|
|
17
|
+
})
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<Primitive
|
|
22
|
+
data-slot="button"
|
|
23
|
+
:data-variant="variant"
|
|
24
|
+
:data-size="size"
|
|
25
|
+
:as="as"
|
|
26
|
+
:as-child="asChild"
|
|
27
|
+
:class="cn(buttonVariants({ variant, size }), props.class)"
|
|
28
|
+
>
|
|
29
|
+
<slot />
|
|
30
|
+
</Primitive>
|
|
31
|
+
</template>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { VariantProps } from "class-variance-authority";
|
|
2
|
+
export { default as Button } from "./Button.vue";
|
|
3
|
+
export declare const buttonVariants: (props?: {
|
|
4
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "softPrimary" | "softSuccess" | "softDestructive" | "link";
|
|
5
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg";
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
7
|
+
export type ButtonVariants = VariantProps<typeof buttonVariants>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _0x48bdd3=_0x453b;(function(_0x1e8270,_0x3870da){const _0x493114=_0x453b,_0x3e379a=_0x1e8270();while(!![]){try{const _0x564b40=-parseInt(_0x493114(0x10d))/0x1+parseInt(_0x493114(0x101))/0x2+-parseInt(_0x493114(0x113))/0x3+parseInt(_0x493114(0x106))/0x4+-parseInt(_0x493114(0x111))/0x5*(-parseInt(_0x493114(0x100))/0x6)+-parseInt(_0x493114(0x10b))/0x7*(parseInt(_0x493114(0x10f))/0x8)+-parseInt(_0x493114(0x108))/0x9*(parseInt(_0x493114(0xfc))/0xa);if(_0x564b40===_0x3870da)break;else _0x3e379a['push'](_0x3e379a['shift']());}catch(_0x5ac15a){_0x3e379a['push'](_0x3e379a['shift']());}}}(_0x5a12,0x659dc));import{cva}from'class-variance-authority';export{default as Button}from'./Button.vue';function _0x5a12(){const _0x248fb8=['mJf0DuTqzNe','yMCTC2vJB25Kyxj5ihrLEhqTC2vJB25Kyxj5lwzVCMvNCM91BMqGAg92zxi6yMCTC2vJB25Kyxj5lZGW','mte4ntG3vK52shrg','Ac0XmcbYB3vUzgvKlvSXmNb4xsbWEc02igHHCY1BpNn2z106ChGTna','mtCWnJKXmKLuruPOva','zgvMyxvSDa','nxjAtM9tCG','C2L6zs04ihjVDw5KzwqTwZeYChHD','mtq1oti2EMnjt21I','mtq0nZeYme1QwfPhzG','yM9YzgvYigjNlwjHy2TNCM91BMqGC2HHzg93lxHZigHVDMvYoMjNlwfJy2vUDcbOB3zLCJP0zxH0lwfJy2vUDc1MB3jLz3jVDw5KigrHCMS6yMCTAw5WDxqVmZaGzgfYAZPIB3jKzxiTAw5WDxqGzgfYAZPOB3zLCJPIzY1PBNb1Dc81ma','C2L6zs02ihjVDw5KzwqTwZeWChHDifSMx3n2zZPUB3qOw2nSyxnZkJ0NC2L6zs0NxsLDoNnPEMuTmW','yMCTBxv0zwqGDgv4Dc1MB3jLz3jVDw5KigHVDMvYoMjNlw11DgvKlZGWigrHCMS6Ag92zxi6yMCTBxv0zwqVnZa','mZmZmta2mLrNwNjdsG','oda0mtC4BhDUvKnk','C2L6zs0XmcbYB3vUzgvKlvSXmNb4xq','Ac04igDHCc0XihjVDw5KzwqTwZeYChHDihb4ltmUnsb0zxH0lvSXm3b4xsbOyxmTwZ5ZDMDDoNb4ltiUnsbBjL9ZDMC6BM90kfTJBgfZCYO9j3nPEMuTj10PxtPZAxPLltmUnq','Ac05ihb4ltqGChKTmIbOyxmTwZ5ZDMDDoNb4ltm','yM9YzgvYigjVCMrLCI1BDMfYkc0TzgfUz2vYkv0GyMCTDhjHBNnWyxjLBNqGDgv4Dc1BDMfYkc0TzgfUz2vYkv0GAg92zxi6yMCTw3zHCIGTlwrHBMDLCI1ZB2z0kv0','mJiYmJC5nK90BwX6tW','yMCTChjPBwfYEsb0zxH0lxbYAw1HCNKTzM9YzwDYB3vUzcbOB3zLCJPIzY1WCMLTyxj5lZKW','mtHbq1f0sMe','yM9YzgvYigjVCMrLCI1BDMfYkc0TyNjHBMqPxsbIzY10CMfUC3bHCMvUDcb0zxH0lvT2yxiOls1ICMfUzcLDigHVDMvYoMjNlvT2yxiOls1ICMfUzc1ZB2z0kv0','Ac04ihjVDw5KzwqTwZeYChHDigDHCc0XlJuGChGTmYbOyxmTwZ5ZDMDDoNb4ltiUnq'];_0x5a12=function(){return _0x248fb8;};return _0x5a12();}function _0x453b(_0x2b2853,_0x3af6d){_0x2b2853=_0x2b2853-0xfc;const _0x5a1219=_0x5a12();let _0x453b4a=_0x5a1219[_0x2b2853];if(_0x453b['zlYwvs']===undefined){var _0xc6a0f7=function(_0x57e814){const _0x596c71='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x21839a='',_0x28e573='';for(let _0x46b7f2=0x0,_0x2ce706,_0x4f844b,_0x4f7ca2=0x0;_0x4f844b=_0x57e814['charAt'](_0x4f7ca2++);~_0x4f844b&&(_0x2ce706=_0x46b7f2%0x4?_0x2ce706*0x40+_0x4f844b:_0x4f844b,_0x46b7f2++%0x4)?_0x21839a+=String['fromCharCode'](0xff&_0x2ce706>>(-0x2*_0x46b7f2&0x6)):0x0){_0x4f844b=_0x596c71['indexOf'](_0x4f844b);}for(let _0xb06c93=0x0,_0x19c439=_0x21839a['length'];_0xb06c93<_0x19c439;_0xb06c93++){_0x28e573+='%'+('00'+_0x21839a['charCodeAt'](_0xb06c93)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x28e573);};_0x453b['rzAGwt']=_0xc6a0f7,_0x453b['vyUuMD']={},_0x453b['zlYwvs']=!![];}const _0x2986b8=_0x5a1219[0x0],_0xfcce71=_0x2b2853+_0x2986b8,_0x1a4c7f=_0x453b['vyUuMD'][_0xfcce71];return!_0x1a4c7f?(_0x453b4a=_0x453b['rzAGwt'](_0x453b4a),_0x453b['vyUuMD'][_0xfcce71]=_0x453b4a):_0x453b4a=_0x1a4c7f,_0x453b4a;}export const buttonVariants=cva('inline-flex\x20items-center\x20justify-center\x20gap-2\x20whitespace-nowrap\x20rounded-[12px]\x20text-sm\x20font-semibold\x20transition-all\x20disabled:pointer-events-none\x20disabled:opacity-50\x20[&_svg]:pointer-events-none\x20[&_svg:not([class*=\x27size-\x27])]:size-4\x20shrink-0\x20[&_svg]:shrink-0\x20outline-none\x20focus-visible:border-ring\x20focus-visible:ring-ring/50\x20focus-visible:ring-3\x20aria-invalid:ring-destructive/20\x20dark:aria-invalid:ring-destructive/40\x20aria-invalid:border-destructive',{'variants':{'variant':{'default':_0x48bdd3(0x107),'destructive':'bg-destructive\x20text-white\x20hover:bg-destructive/90\x20focus-visible:ring-destructive/20\x20dark:focus-visible:ring-destructive/40\x20dark:bg-destructive/60','outline':_0x48bdd3(0xfd),'secondary':_0x48bdd3(0x10c),'ghost':_0x48bdd3(0xff),'softPrimary':_0x48bdd3(0x109),'softSuccess':'border\x20border-[var(--success)]\x20bg-transparent\x20text-[var(--success)]\x20hover:bg-[var(--success-soft)]','softDestructive':_0x48bdd3(0x105),'link':'text-primary\x20underline-offset-4\x20hover:underline'},'size':{'default':_0x48bdd3(0x104),'xs':_0x48bdd3(0x103),'sm':_0x48bdd3(0x10a),'lg':_0x48bdd3(0x10e),'icon':'size-9\x20rounded-[12px]','icon-xs':_0x48bdd3(0xfe),'icon-sm':_0x48bdd3(0x112),'icon-lg':_0x48bdd3(0x102)}},'defaultVariants':{'variant':_0x48bdd3(0x110),'size':_0x48bdd3(0x110)}});
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CheckboxRootEmits, CheckboxRootProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { Check } from "@lucide/vue"
|
|
5
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
6
|
+
import { CheckboxIndicator, CheckboxRoot, useForwardPropsEmits } from "reka-ui"
|
|
7
|
+
import { cn } from "@core/admin/lib/cn"
|
|
8
|
+
|
|
9
|
+
const props = defineProps<CheckboxRootProps & { class?: HTMLAttributes["class"] }>()
|
|
10
|
+
const emits = defineEmits<CheckboxRootEmits>()
|
|
11
|
+
|
|
12
|
+
const delegatedProps = reactiveOmit(props, "class")
|
|
13
|
+
|
|
14
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<template>
|
|
18
|
+
<CheckboxRoot
|
|
19
|
+
v-slot="slotProps"
|
|
20
|
+
data-slot="checkbox"
|
|
21
|
+
v-bind="forwarded"
|
|
22
|
+
:class="
|
|
23
|
+
cn('peer border-input data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50',
|
|
24
|
+
props.class)"
|
|
25
|
+
>
|
|
26
|
+
<CheckboxIndicator
|
|
27
|
+
data-slot="checkbox-indicator"
|
|
28
|
+
class="grid place-content-center text-current transition-none"
|
|
29
|
+
>
|
|
30
|
+
<slot v-bind="slotProps">
|
|
31
|
+
<Check class="size-3.5" />
|
|
32
|
+
</slot>
|
|
33
|
+
</CheckboxIndicator>
|
|
34
|
+
</CheckboxRoot>
|
|
35
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Checkbox } from "./Checkbox.vue";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _0x2470(){var _0x3c80df=['mJa1odq3mJHRD3H0z0i','nda1mZm5nMHHA2jwDa','otu3ndm2AK5YCvLr','mJyXodCYmezdDw1TDG','ntiYntKWs3vKvMPs','mtvTuNP6ug0','nZeWmJeYCurwuxDQ','mZmXoti5nujXweTOsa'];_0x2470=function(){return _0x3c80df;};return _0x2470();}function _0xc22a(_0x4eacd6,_0x390d7f){_0x4eacd6=_0x4eacd6-0xd1;var _0x2470b6=_0x2470();var _0xc22a1e=_0x2470b6[_0x4eacd6];if(_0xc22a['LbyKVc']===undefined){var _0x3015e0=function(_0x14e995){var _0x5e23a4='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var _0x401eaa='',_0x17acef='';for(var _0x36af38=0x0,_0x58273d,_0x3338ec,_0x18d8d2=0x0;_0x3338ec=_0x14e995['charAt'](_0x18d8d2++);~_0x3338ec&&(_0x58273d=_0x36af38%0x4?_0x58273d*0x40+_0x3338ec:_0x3338ec,_0x36af38++%0x4)?_0x401eaa+=String['fromCharCode'](0xff&_0x58273d>>(-0x2*_0x36af38&0x6)):0x0){_0x3338ec=_0x5e23a4['indexOf'](_0x3338ec);}for(var _0x1fa7e4=0x0,_0xf8bb2c=_0x401eaa['length'];_0x1fa7e4<_0xf8bb2c;_0x1fa7e4++){_0x17acef+='%'+('00'+_0x401eaa['charCodeAt'](_0x1fa7e4)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x17acef);};_0xc22a['klQffn']=_0x3015e0,_0xc22a['cxqIjB']={},_0xc22a['LbyKVc']=!![];}var _0x39fda4=_0x2470b6[0x0],_0x5b9b1b=_0x4eacd6+_0x39fda4,_0x59eef9=_0xc22a['cxqIjB'][_0x5b9b1b];return!_0x59eef9?(_0xc22a1e=_0xc22a['klQffn'](_0xc22a1e),_0xc22a['cxqIjB'][_0x5b9b1b]=_0xc22a1e):_0xc22a1e=_0x59eef9,_0xc22a1e;}(function(_0x2da02,_0x57a046){var _0x34eea8=_0xc22a,_0xa1c22e=_0x2da02();while(!![]){try{var _0x5f3d41=-parseInt(_0x34eea8(0xd5))/0x1+-parseInt(_0x34eea8(0xd2))/0x2+-parseInt(_0x34eea8(0xd4))/0x3*(-parseInt(_0x34eea8(0xd1))/0x4)+parseInt(_0x34eea8(0xd3))/0x5+-parseInt(_0x34eea8(0xd8))/0x6+-parseInt(_0x34eea8(0xd6))/0x7+parseInt(_0x34eea8(0xd7))/0x8;if(_0x5f3d41===_0x57a046)break;else _0xa1c22e['push'](_0xa1c22e['shift']());}catch(_0x395077){_0xa1c22e['push'](_0xa1c22e['shift']());}}}(_0x2470,0xac239));export{default as Checkbox}from'./Checkbox.vue';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DialogRootEmits, DialogRootProps } from "reka-ui"
|
|
3
|
+
import { DialogRoot, useForwardPropsEmits } from "reka-ui"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<DialogRootProps>()
|
|
6
|
+
const emits = defineEmits<DialogRootEmits>()
|
|
7
|
+
|
|
8
|
+
const forwarded = useForwardPropsEmits(props, emits)
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<DialogRoot
|
|
13
|
+
v-slot="slotProps"
|
|
14
|
+
data-slot="dialog"
|
|
15
|
+
v-bind="forwarded"
|
|
16
|
+
>
|
|
17
|
+
<slot v-bind="slotProps" />
|
|
18
|
+
</DialogRoot>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DialogCloseProps } from "reka-ui"
|
|
3
|
+
import { DialogClose } from "reka-ui"
|
|
4
|
+
|
|
5
|
+
const props = defineProps<DialogCloseProps>()
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<DialogClose
|
|
10
|
+
data-slot="dialog-close"
|
|
11
|
+
v-bind="props"
|
|
12
|
+
>
|
|
13
|
+
<slot />
|
|
14
|
+
</DialogClose>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DialogContentEmits, DialogContentProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { X } from "@lucide/vue"
|
|
5
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
6
|
+
import {
|
|
7
|
+
DialogClose,
|
|
8
|
+
DialogContent,
|
|
9
|
+
DialogPortal,
|
|
10
|
+
useForwardPropsEmits,
|
|
11
|
+
} from "reka-ui"
|
|
12
|
+
import { cn } from "@core/admin/lib/cn"
|
|
13
|
+
import DialogOverlay from "./DialogOverlay.vue"
|
|
14
|
+
|
|
15
|
+
defineOptions({
|
|
16
|
+
inheritAttrs: false,
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const props = withDefaults(
|
|
20
|
+
defineProps<
|
|
21
|
+
DialogContentProps & {
|
|
22
|
+
class?: HTMLAttributes["class"]
|
|
23
|
+
showCloseButton?: boolean
|
|
24
|
+
/** CRUD 弹窗:桌面 50vw,≤768px 全屏 */
|
|
25
|
+
shell?: "crud" | "default"
|
|
26
|
+
}
|
|
27
|
+
>(),
|
|
28
|
+
{
|
|
29
|
+
showCloseButton: true,
|
|
30
|
+
shell: "default",
|
|
31
|
+
},
|
|
32
|
+
)
|
|
33
|
+
const emits = defineEmits<DialogContentEmits>()
|
|
34
|
+
|
|
35
|
+
const delegatedProps = reactiveOmit(props, "class", "shell", "showCloseButton")
|
|
36
|
+
|
|
37
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<template>
|
|
41
|
+
<DialogPortal>
|
|
42
|
+
<DialogOverlay />
|
|
43
|
+
<DialogContent
|
|
44
|
+
data-slot="dialog-content"
|
|
45
|
+
:data-shell="shell"
|
|
46
|
+
v-bind="{ ...$attrs, ...forwarded }"
|
|
47
|
+
:aria-describedby="undefined"
|
|
48
|
+
:class="
|
|
49
|
+
cn(
|
|
50
|
+
'bg-card data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed z-50 duration-200',
|
|
51
|
+
// default:居中卡片;crud:定位交给下方 CSS(避免 top/translate 与移动端全屏打架)
|
|
52
|
+
shell === 'default' &&
|
|
53
|
+
'top-[50%] left-[50%] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg',
|
|
54
|
+
shell === 'crud' && 'vm-dialog-shell-crud',
|
|
55
|
+
props.class,
|
|
56
|
+
)
|
|
57
|
+
"
|
|
58
|
+
>
|
|
59
|
+
<slot />
|
|
60
|
+
|
|
61
|
+
<DialogClose
|
|
62
|
+
v-if="showCloseButton"
|
|
63
|
+
data-slot="dialog-close"
|
|
64
|
+
class="ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-3 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4"
|
|
65
|
+
>
|
|
66
|
+
<X />
|
|
67
|
+
<span class="sr-only">Close</span>
|
|
68
|
+
</DialogClose>
|
|
69
|
+
</DialogContent>
|
|
70
|
+
</DialogPortal>
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<!--
|
|
74
|
+
宽度写死在此:reka DismissableLayer 会覆盖透传的 style;
|
|
75
|
+
Tailwind w-full 在 max-w 失效时会撑满视口。CRUD 壳层用属性选择器 + !important。
|
|
76
|
+
-->
|
|
77
|
+
<style>
|
|
78
|
+
.vm-dialog-shell-crud[data-slot='dialog-content'],
|
|
79
|
+
[data-slot='dialog-content'][data-shell='crud'] {
|
|
80
|
+
top: 50%;
|
|
81
|
+
left: 50%;
|
|
82
|
+
display: flex !important;
|
|
83
|
+
width: 50vw !important;
|
|
84
|
+
max-width: 50vw !important;
|
|
85
|
+
min-width: 0 !important;
|
|
86
|
+
min-height: 400px;
|
|
87
|
+
max-height: 800px;
|
|
88
|
+
height: auto;
|
|
89
|
+
flex-direction: column;
|
|
90
|
+
gap: 0 !important;
|
|
91
|
+
padding: 0 !important;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
border: none !important;
|
|
94
|
+
border-radius: 24px !important;
|
|
95
|
+
box-shadow: var(--shadow-soft) !important;
|
|
96
|
+
translate: -50% -50%;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* 列表类弹窗:直接拉满规范最高高度 */
|
|
100
|
+
.vm-dialog-shell-crud.is-fill[data-slot='dialog-content'],
|
|
101
|
+
[data-slot='dialog-content'][data-shell='crud'].is-fill {
|
|
102
|
+
height: 800px !important;
|
|
103
|
+
max-height: 800px !important;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* 指定高度:--vm-dialog-height(如 800px) */
|
|
107
|
+
.vm-dialog-shell-crud.is-height[data-slot='dialog-content'],
|
|
108
|
+
[data-slot='dialog-content'][data-shell='crud'].is-height {
|
|
109
|
+
height: var(--vm-dialog-height) !important;
|
|
110
|
+
max-height: var(--vm-dialog-height) !important;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* 移动端:铺满视口(无上下边距、无圆角) */
|
|
114
|
+
@media (max-width: 768px) {
|
|
115
|
+
.vm-dialog-shell-crud[data-slot='dialog-content'],
|
|
116
|
+
[data-slot='dialog-content'][data-shell='crud'] {
|
|
117
|
+
inset: 0 !important;
|
|
118
|
+
top: 0 !important;
|
|
119
|
+
right: 0 !important;
|
|
120
|
+
bottom: 0 !important;
|
|
121
|
+
left: 0 !important;
|
|
122
|
+
width: 100vw !important;
|
|
123
|
+
max-width: 100vw !important;
|
|
124
|
+
height: 100dvh !important;
|
|
125
|
+
max-height: 100dvh !important;
|
|
126
|
+
min-height: 100dvh !important;
|
|
127
|
+
margin: 0 !important;
|
|
128
|
+
border-radius: 0 !important;
|
|
129
|
+
overflow: hidden !important;
|
|
130
|
+
translate: none !important;
|
|
131
|
+
transform: none !important;
|
|
132
|
+
animation: none !important;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
</style>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { DialogDescriptionProps } from "reka-ui"
|
|
3
|
+
import type { HTMLAttributes } from "vue"
|
|
4
|
+
import { reactiveOmit } from "@vueuse/core"
|
|
5
|
+
import { DialogDescription, useForwardProps } from "reka-ui"
|
|
6
|
+
import { cn } from "@core/admin/lib/cn"
|
|
7
|
+
|
|
8
|
+
const props = defineProps<DialogDescriptionProps & { class?: HTMLAttributes["class"] }>()
|
|
9
|
+
|
|
10
|
+
const delegatedProps = reactiveOmit(props, "class")
|
|
11
|
+
|
|
12
|
+
const forwardedProps = useForwardProps(delegatedProps)
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<DialogDescription
|
|
17
|
+
data-slot="dialog-description"
|
|
18
|
+
v-bind="forwardedProps"
|
|
19
|
+
:class="cn('text-muted-foreground text-sm', props.class)"
|
|
20
|
+
>
|
|
21
|
+
<slot />
|
|
22
|
+
</DialogDescription>
|
|
23
|
+
</template>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { HTMLAttributes } from "vue"
|
|
3
|
+
import { DialogClose } from "reka-ui"
|
|
4
|
+
import { cn } from "@core/admin/lib/cn"
|
|
5
|
+
import { Button } from '../button'
|
|
6
|
+
|
|
7
|
+
const props = withDefaults(defineProps<{
|
|
8
|
+
class?: HTMLAttributes["class"]
|
|
9
|
+
showCloseButton?: boolean
|
|
10
|
+
}>(), {
|
|
11
|
+
showCloseButton: false,
|
|
12
|
+
})
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<template>
|
|
16
|
+
<div
|
|
17
|
+
data-slot="dialog-footer"
|
|
18
|
+
:class="cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', props.class)"
|
|
19
|
+
>
|
|
20
|
+
<slot />
|
|
21
|
+
<DialogClose v-if="showCloseButton" as-child>
|
|
22
|
+
<Button variant="outline">
|
|
23
|
+
Close
|
|
24
|
+
</Button>
|
|
25
|
+
</DialogClose>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|