From 0a3bdb004bfa1d4e6ff10be3728b9b62613f98ee Mon Sep 17 00:00:00 2001 From: Padreug Date: Mon, 8 Jun 2026 22:27:35 +0200 Subject: [PATCH] refactor(buttons): introduce shadcn-vue Button, gold-pill variants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the shadcn-vue Button component at src/components/ui/button/ and sweep every site CTA through it instead of repeating the same rounded-md class string across nine views. The Button's variants are tuned to the new Wix-inspired aesthetic: - default: gold fill, cream text, rounded-full, uppercase tracking 0.2em - outline: gold outline + gold text on transparent, same shape - ghost / link / secondary / destructive: rounded-full equivalents Two follow-ups noted: 1. components.json had a stale "framework" key from older shadcn-vue schemas; dropped. The CLI still rejects the file on a path-resolve check against tsconfig — needs deeper investigation, so I wrote the Button by hand for now. 2. SiteHeader's nav-dropdown toggles and the locale switcher are not routed through Button on purpose — they're a different control pattern from CTAs. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/components/ui/button/Button.vue | 26 ++++++++++++++++++++++ src/components/ui/button/index.ts | 34 +++++++++++++++++++++++++++++ src/views/AccommodationView.vue | 21 ++++++++---------- src/views/EventsView.vue | 10 ++++----- src/views/HomeView.vue | 32 ++++++++++----------------- src/views/LongStaysView.vue | 19 ++++++---------- src/views/MarketplaceView.vue | 12 +++++----- src/views/OpportunitiesView.vue | 21 ++++++++---------- src/views/ReservationsView.vue | 23 ++++++++++--------- src/views/SymposiumView.vue | 19 ++++++---------- 10 files changed, 125 insertions(+), 92 deletions(-) create mode 100644 src/components/ui/button/Button.vue create mode 100644 src/components/ui/button/index.ts diff --git a/src/components/ui/button/Button.vue b/src/components/ui/button/Button.vue new file mode 100644 index 0000000..ef04935 --- /dev/null +++ b/src/components/ui/button/Button.vue @@ -0,0 +1,26 @@ + + + diff --git a/src/components/ui/button/index.ts b/src/components/ui/button/index.ts new file mode 100644 index 0000000..b97260b --- /dev/null +++ b/src/components/ui/button/index.ts @@ -0,0 +1,34 @@ +import { cva, type VariantProps } from 'class-variance-authority' + +export { default as Button } from './Button.vue' + +export const buttonVariants = cva( + 'inline-flex items-center justify-center whitespace-nowrap font-display uppercase tracking-[0.2em] ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50', + { + variants: { + variant: { + default: 'rounded-full bg-primary text-primary-foreground hover:opacity-90', + outline: + 'rounded-full border border-accent/50 bg-transparent text-accent hover:bg-accent/10', + ghost: 'rounded-full text-accent hover:bg-accent/10', + link: 'text-accent underline-offset-4 hover:underline', + secondary: + 'rounded-full bg-secondary text-secondary-foreground hover:bg-secondary/80', + destructive: + 'rounded-full bg-destructive text-destructive-foreground hover:bg-destructive/90', + }, + size: { + default: 'h-12 px-6 py-3 text-xs', + sm: 'h-9 px-4 text-[10px]', + lg: 'h-14 px-8 text-sm', + icon: 'h-10 w-10 rounded-full', + }, + }, + defaultVariants: { + variant: 'default', + size: 'default', + }, + }, +) + +export type ButtonVariants = VariantProps diff --git a/src/views/AccommodationView.vue b/src/views/AccommodationView.vue index 1cfeb41..73f1b8f 100644 --- a/src/views/AccommodationView.vue +++ b/src/views/AccommodationView.vue @@ -1,6 +1,7 @@