- Implement unified design system tokens, 10px radius, and IRANSans typography - Modernize sidebar with Gemini-style collapsed expander, square 1:1 items, and elevated profile flyout - Standardize all modal dialogs with 16px padding, fixed header/footer, 16px medium title, and sticky bottom actions - Refactor DealFormView and CustomFieldsSection with standard UiField, UiInput, and UiSelect components - Add draggable bottom-left QuickCreate floating action button
120 lines
2.1 KiB
Vue
120 lines
2.1 KiB
Vue
<script setup lang="ts">
|
|
withDefaults(
|
|
defineProps<{
|
|
padding?: 'none' | 'sm' | 'md' | 'lg';
|
|
shadow?: 'none' | 'xs' | 'sm' | 'md';
|
|
interactive?: boolean;
|
|
title?: string;
|
|
}>(),
|
|
{
|
|
padding: 'md',
|
|
shadow: 'xs',
|
|
interactive: false,
|
|
},
|
|
);
|
|
</script>
|
|
|
|
<template>
|
|
<div
|
|
class="ui-card"
|
|
:class="[
|
|
`pad-${padding}`,
|
|
`shadow-${shadow}`,
|
|
{ interactive }
|
|
]"
|
|
>
|
|
<header v-if="title || $slots.header" class="card-head">
|
|
<slot name="header">
|
|
<h3 v-if="title" class="card-title">{{ title }}</h3>
|
|
</slot>
|
|
<div v-if="$slots.actions" class="card-actions">
|
|
<slot name="actions" />
|
|
</div>
|
|
</header>
|
|
<div class="card-body">
|
|
<slot />
|
|
</div>
|
|
<footer v-if="$slots.footer" class="card-foot">
|
|
<slot name="footer" />
|
|
</footer>
|
|
</div>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.ui-card {
|
|
background: var(--surface);
|
|
border: 1px solid var(--line);
|
|
border-radius: var(--radius);
|
|
box-sizing: border-box;
|
|
transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
|
|
}
|
|
|
|
/* Padding variants */
|
|
.ui-card.pad-none {
|
|
padding: 0;
|
|
}
|
|
|
|
.ui-card.pad-sm {
|
|
padding: var(--sp-3);
|
|
}
|
|
|
|
.ui-card.pad-md {
|
|
padding: var(--sp-5);
|
|
}
|
|
|
|
.ui-card.pad-lg {
|
|
padding: var(--sp-6);
|
|
}
|
|
|
|
/* Shadow variants */
|
|
.ui-card.shadow-none {
|
|
box-shadow: none;
|
|
}
|
|
|
|
.ui-card.shadow-xs {
|
|
box-shadow: var(--shadow-xs);
|
|
}
|
|
|
|
.ui-card.shadow-sm {
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
|
|
.ui-card.shadow-md {
|
|
box-shadow: var(--shadow-md);
|
|
}
|
|
|
|
.ui-card.interactive:hover {
|
|
border-color: var(--line-strong);
|
|
box-shadow: var(--shadow-sm);
|
|
}
|
|
|
|
.card-head {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--sp-3);
|
|
padding-bottom: var(--sp-3);
|
|
margin-bottom: var(--sp-4);
|
|
border-bottom: 1px solid var(--line-light);
|
|
}
|
|
|
|
.card-title {
|
|
margin: 0;
|
|
font-size: var(--fs-md);
|
|
font-weight: var(--fw-bold);
|
|
color: var(--ink);
|
|
}
|
|
|
|
.card-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--sp-2);
|
|
}
|
|
|
|
.card-foot {
|
|
padding-top: var(--sp-3);
|
|
margin-top: var(--sp-4);
|
|
border-top: 1px solid var(--line-light);
|
|
}
|
|
</style>
|