feat(ui): adopt Tailwind v4 design system and archive change
- Add tailwindcss v4 + @tailwindcss/vite to mall, shop-admin, admin - Add @vmall/shared/theme.css tokens with html[data-accent] presets - Add @vmall/ui kit (VBtn/VBadge/VField/VInput/VCard/VPanel/VTable/VPage, VAccentSwatch, useAccent) as a Nuxt module - Convert all three apps to kit + utilities; delete ui.css/mall.css and every <style scoped>; consoles get accent presets, mall locked to red - Fix VCard boolean prop default (padding) and PDP/store stale useAsyncData keys on param navigation - Archive adopt-tailwind-design-system; new frontend-ui capability spec
This commit is contained in:
@@ -4,42 +4,19 @@ const emit = defineEmits<{ "update:modelValue": [key: string] }>();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="tabs">
|
||||
<div class="tab-head">
|
||||
<div>
|
||||
<div class="flex border-b border-border">
|
||||
<button
|
||||
v-for="tab in tabs"
|
||||
:key="tab.key"
|
||||
type="button"
|
||||
:class="{ on: tab.key === modelValue }"
|
||||
class="border-0 border-b-2 border-transparent bg-transparent px-6 py-3 text-sm text-muted transition-colors"
|
||||
:class="tab.key === modelValue ? 'border-primary font-semibold text-primary' : 'hover:text-primary'"
|
||||
@click="emit('update:modelValue', tab.key)"
|
||||
>{{ tab.label }}</button>
|
||||
</div>
|
||||
<div class="tab-body">
|
||||
<div class="py-5">
|
||||
<slot :active="modelValue" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.tab-head {
|
||||
display: flex;
|
||||
border-bottom: 1px solid var(--mall-line);
|
||||
}
|
||||
.tab-head button {
|
||||
border: 0;
|
||||
background: none;
|
||||
padding: 12px 24px;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
color: var(--mall-muted);
|
||||
border-bottom: 2px solid transparent;
|
||||
}
|
||||
.tab-head button.on {
|
||||
color: var(--mall-red);
|
||||
border-bottom-color: var(--mall-red);
|
||||
font-weight: 600;
|
||||
}
|
||||
.tab-body {
|
||||
padding: 20px 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user