| 123456789101112131415161718 |
- import { defineConfig, presetWind3 } from 'unocss'
- import { presetAgentTokens } from '@agent-server/ui-tokens'
- export default defineConfig({
- presets: [presetWind3(), presetAgentTokens()],
- // 手机上的触控尺寸:按钮、输入框至少 40px 高
- shortcuts: [
- ['m-btn', 'inline-flex items-center justify-center gap-1.5 h-10 px-4 rounded-md border-none cursor-pointer select-none disabled:(opacity-50 cursor-not-allowed)'],
- ['m-btn-primary', 'm-btn bg-primary text-primary-fg'],
- ['m-btn-secondary', 'm-btn bg-[var(--app-secondary-button-background)] text-fg'],
- ['m-btn-danger', 'm-btn bg-transparent text-error border border-solid border-border-input'],
- ['m-field', 'w-full h-10 px-3 rounded-md bg-input text-fg border border-solid border-border-input outline-none focus:border-border-active placeholder:text-[var(--app-input-placeholder-foreground)]'],
- ['m-icon', 'inline-flex items-center justify-center w-10 h-10 rounded-md border-none bg-transparent text-fg cursor-pointer active:bg-hover disabled:opacity-40'],
- ['m-row', 'flex items-center gap-3 w-full min-h-14 px-4 py-2 text-left border-0 bg-transparent text-fg cursor-pointer active:bg-hover'],
- ['m-group', 'mx-3 rounded-lg bg-bg border border-solid border-border overflow-hidden'],
- ['m-group-title', 'px-4 pt-4 pb-1.5 text-[12px] text-fg-muted'],
- ],
- })
|