uno.config.ts 1.3 KB

123456789101112131415161718
  1. import { defineConfig, presetWind3 } from 'unocss'
  2. import { presetAgentTokens } from '@agent-server/ui-tokens'
  3. export default defineConfig({
  4. presets: [presetWind3(), presetAgentTokens()],
  5. // 手机上的触控尺寸:按钮、输入框至少 40px 高
  6. shortcuts: [
  7. ['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)'],
  8. ['m-btn-primary', 'm-btn bg-primary text-primary-fg'],
  9. ['m-btn-secondary', 'm-btn bg-[var(--app-secondary-button-background)] text-fg'],
  10. ['m-btn-danger', 'm-btn bg-transparent text-error border border-solid border-border-input'],
  11. ['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)]'],
  12. ['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'],
  13. ['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'],
  14. ['m-group', 'mx-3 rounded-lg bg-bg border border-solid border-border overflow-hidden'],
  15. ['m-group-title', 'px-4 pt-4 pb-1.5 text-[12px] text-fg-muted'],
  16. ],
  17. })