create-wervt 0.2.4 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/package.json +1 -1
  2. package/template/.claude/skills/nuxt-ui/SKILL.md +334 -0
  3. package/template/.claude/skills/nuxt-ui/references/components.md +377 -0
  4. package/template/.claude/skills/nuxt-ui/references/composables.md +127 -0
  5. package/template/.claude/skills/nuxt-ui/references/layouts/chat.md +195 -0
  6. package/template/.claude/skills/nuxt-ui/references/layouts/dashboard.md +220 -0
  7. package/template/.claude/skills/nuxt-ui/references/layouts/docs.md +141 -0
  8. package/template/.claude/skills/nuxt-ui/references/layouts/editor.md +167 -0
  9. package/template/.claude/skills/nuxt-ui/references/layouts/page.md +260 -0
  10. package/template/.claude/skills/nuxt-ui/references/theming.md +427 -0
  11. package/template/.claude/skills/nuxt-ui-mobile/SKILL.md +92 -0
  12. package/template/.claude/skills/nuxt-ui-mobile/examples/app/composables/useDemoItems.ts +18 -0
  13. package/template/.claude/skills/nuxt-ui-mobile/examples/app/pages/index.vue +121 -0
  14. package/template/.claude/skills/nuxt-ui-mobile/examples/app/pages/items/[id].vue +77 -0
  15. package/template/.claude/skills/nuxt-ui-mobile/examples/app/pages/settings/index.vue +71 -0
  16. package/template/.claude/skills/nuxt-ui-mobile/examples/app/pages/settings/sort.vue +23 -0
  17. package/template/.claude/skills/nuxt-ui-mobile/references/patterns.md +212 -0
  18. package/template/.claude/skills/nuxt-ui-mobile/references/review-checklist.md +49 -0
  19. package/template/.claude/skills/nuxt-ui-mobile/references/tokens.md +86 -0
  20. package/template/.claude/skills/nuxt-ui-mobile/scripts/gen-palette.mjs +58 -0
  21. package/template/.claude/skills/nuxt-ui-mobile/template/app/app.config.ts +298 -0
  22. package/template/.claude/skills/nuxt-ui-mobile/template/app/app.vue +8 -0
  23. package/template/.claude/skills/nuxt-ui-mobile/template/app/assets/css/main.css +331 -0
  24. package/template/.claude/skills/nuxt-ui-mobile/template/app/components/mobile/ActionSheet.vue +47 -0
  25. package/template/.claude/skills/nuxt-ui-mobile/template/app/components/mobile/ListRow.vue +73 -0
  26. package/template/.claude/skills/nuxt-ui-mobile/template/app/components/mobile/ListSection.vue +26 -0
  27. package/template/.claude/skills/nuxt-ui-mobile/template/app/components/mobile/NavBar.vue +88 -0
  28. package/template/.claude/skills/nuxt-ui-mobile/template/app/components/mobile/TabBar.vue +45 -0
  29. package/template/.claude/skills/nuxt-ui-mobile/template/app/layouts/default.vue +16 -0
  30. package/template/.claude/skills/nuxt-ui-mobile/template/app/layouts/plain.vue +6 -0
  31. package/template/.claude/skills/nuxt-ui-mobile/template/nuxt.config.ts +27 -0
  32. package/template/AGENTS.md +33 -1
  33. package/template/package.json +2 -2
@@ -0,0 +1,49 @@
1
+ # Mobile UI review checklist
2
+
3
+ Check at 390×844 in light and dark mode. Every "no" is a finding.
4
+
5
+ ## Structure
6
+ - [ ] Top-level sections are in a bottom tab bar (2–5), with no hamburger or sidebar on the phone.
7
+ - [ ] Tabs only navigate; there are no actions in the tab bar.
8
+ - [ ] Tab roots use a large title; pushed screens use an inline title and a Back chevron.
9
+ - [ ] Create/edit tasks use a bottom sheet with Cancel on the left and the completing action on the right, disabled until the input is valid.
10
+ - [ ] There's never more than one sheet or modal open. Alerts are only for rare, irreversible cases. Undoable actions use an undo toast instead of a confirmation.
11
+ - [ ] Choices about a started action use an action sheet: destructive in red, Cancel last.
12
+
13
+ ## Layout and touch
14
+ - [ ] 16px side margins. Nothing sits under the notch, home indicator or bars (safe areas).
15
+ - [ ] Every tap target is at least 44×44, and targets have room between them.
16
+ - [ ] The primary action is reachable with the thumb (lower half or nav bar trailing). Destructive actions aren't next to frequent ones.
17
+ - [ ] Lists: inset grouped sections, separators inset to the text, rows at least 44px. Chevrons only on drill-down rows.
18
+ - [ ] No `100vh`. No horizontal page scroll. No nested scroll areas in the same direction.
19
+
20
+ ## Type and color
21
+ - [ ] Only iOS text styles (`text-body` etc.), nothing under 11px, no thin or light weights.
22
+ - [ ] Only semantic color tokens; no raw palette classes or hex values in components.
23
+ - [ ] The accent color marks only interactive elements. Red marks only destructive actions or errors.
24
+ - [ ] Works in both light and dark mode, follows the system setting, and has no in-app theme toggle.
25
+ - [ ] Text contrast is at least 4.5:1. Meaning never depends on color alone.
26
+ - [ ] Glass material only on floating chrome, never on content cards.
27
+
28
+ ## Controls and forms
29
+ - [ ] At most one prominent (`solid`) button per view, and never a destructive one.
30
+ - [ ] Switches appear only inside list rows. Option choices use checkmark rows, not radio buttons.
31
+ - [ ] Segmented controls only for 2–5 related views of the same content.
32
+ - [ ] Inputs: visible labels, at least 16px text, correct `type`/`inputmode`/`autocomplete`/`enterkeyhint`.
33
+ - [ ] Errors appear inline next to the field and say how to fix the problem.
34
+ - [ ] Async buttons show `loading`.
35
+
36
+ ## States and feedback
37
+ - [ ] Loading shows skeletons shaped like the content, never a blank screen.
38
+ - [ ] Empty states explain the situation and offer one next step.
39
+ - [ ] Toasts are short, appear at the top, and aren't used for things visible on screen anyway.
40
+ - [ ] Animations respect `prefers-reduced-motion`. No decorative loops.
41
+
42
+ ## Writing
43
+ - [ ] Buttons are verbs, "Cancel" cancels, no "OK" where a verb fits.
44
+ - [ ] Nav titles are short (under about 15 characters) and never the app name.
45
+ - [ ] No "click", "we", "Oops" or "Invalid". Capitalization is consistent.
46
+
47
+ ## Platform
48
+ - [ ] `viewport-fit=cover` and a scheme-aware `theme-color` matching the page background are set.
49
+ - [ ] Checked on a real iPhone: safe areas, keyboard covering inputs, no zoom on focus (see the ios-web-polish skill).
@@ -0,0 +1,86 @@
1
+ # Tokens and overrides
2
+
3
+ What `template/` sets, why, and how to change it.
4
+
5
+ ## Type: iOS text styles
6
+
7
+ Dynamic Type "Large" defaults, with iOS points mapped 1:1 to CSS px. Use them as `text-<style>`; each one sets size, line height and weight together.
8
+
9
+ | Class | Size / line | Weight | Use |
10
+ |---|---|---|---|
11
+ | `text-large-title` | 34 / 41 | bold | Large nav title (tab roots) |
12
+ | `text-title-1` | 28 / 34 | bold | Rare: hero numbers, onboarding |
13
+ | `text-title-2` | 22 / 28 | bold | Section titles on content pages |
14
+ | `text-title-3` | 20 / 25 | semibold | Card titles, empty-state titles |
15
+ | `text-headline` | 17 / 22 | semibold | Inline nav title, emphasized row titles |
16
+ | `text-body` | 17 / 22 | regular | Default text, row titles, inputs, buttons |
17
+ | `text-callout` | 16 / 21 | regular | Secondary paragraphs |
18
+ | `text-subhead` | 15 / 20 | regular | Row subtitles, form labels |
19
+ | `text-footnote` | 13 / 18 | regular | Section headers and footers, hints |
20
+ | `text-caption-1` | 12 / 16 | regular | Timestamps, metadata |
21
+ | `text-caption-2` | 11 / 13 | regular | Tab bar labels; the smallest allowed |
22
+
23
+ - **No letter-spacing.** Safari applies SF's optical tracking itself for `system-ui`. Adding tracking doubles it.
24
+ - `app.config.ts` registers these names with tailwind-merge (`ui.tv.twMergeConfig`). Without that, `text-body` would be read as a *color* and dropped next to `text-highlighted`. If you add a style, add it to `textStyles` too.
25
+ - Fonts: `font-sans` (SF via `system-ui`), `font-rounded` (SF Pro Rounded, for numbers or friendly accents), `font-mono`. `ui.fonts: false` in `nuxt.config` stops Nuxt UI from downloading web fonts.
26
+
27
+ ## Color
28
+
29
+ ### Palettes
30
+ `--color-ios-{blue,green,red,orange,indigo,teal,purple,pink}-{50…950}` and `--color-ios-gray-*`.
31
+
32
+ - **500 = Apple's increased-contrast light value**, used as the light-mode semantic color. The standard light values fail WCAG AA on white (blue 3.5:1, green 2.2:1); the increased-contrast variants reach about 4.5:1. **400 = Apple's dark value**, which Nuxt UI uses in dark mode.
33
+ - `ios-gray` runs from systemGray6 (50) to dark systemGray6 (950), so the neutral scale doubles as the iOS fill and surface colors.
34
+ - Mapping in `app.config.ts`: primary = blue, secondary = indigo, success = green, info = teal, warning = orange, error = red, neutral = gray.
35
+ - For exact iOS-26-look colors instead of AA-safe ones: regenerate with the standard light values in `scripts/gen-palette.mjs`.
36
+ - In dark mode, solid primary buttons keep Nuxt UI's dark label (`text-inverted`). White on dark-mode blue is only 3.2:1.
37
+
38
+ ### Rebrand
39
+ 1. Add the brand hex (light and dark variant) to `colors` in `scripts/gen-palette.mjs`, then run it from a folder with `culori@4` installed: `node gen-palette.mjs > palette.css`.
40
+ 2. Paste the new `--color-<name>-*` block into `@theme static` in `main.css` and set `primary: '<name>'` in `app.config.ts`.
41
+ 3. Check contrast: the 500 value against white, and the 400 value against `#1c1c1e`, both at least 4.5:1 for text use.
42
+
43
+ ### Surfaces and text (semantic, adapt to dark mode)
44
+
45
+ | Token / class | Light | Dark | iOS equivalent |
46
+ |---|---|---|---|
47
+ | `bg-grouped` | #F2F2F7 | #000 | systemGroupedBackground (page) |
48
+ | `bg-cell` | #FFF | #1C1C1E | secondarySystemGroupedBackground (rows, cards) |
49
+ | `bg-default` | #FFF | #1C1C1E | systemBackground / elevated (sheets, popovers) |
50
+ | `bg-muted` / `bg-elevated` / `bg-accented` | gray 50/100/200 | gray 900/800/700 | fills for pressed states and soft buttons |
51
+ | `bg-fill` | 118,118,128 @ 12% | @ 24% | tertiarySystemFill (search field, segmented track, switch off) |
52
+ | `text-highlighted` / `text-default` | #000 | #FFF | label |
53
+ | `text-muted` | 60,60,67 @ 72% | 235,235,245 @ 65% | secondaryLabel, raised for AA |
54
+ | `text-dimmed` | @ 45% | @ 40% | tertiaryLabel / placeholder |
55
+ | `border-separator` = `border-default` | 60,60,67 @ 29% | 84,84,88 @ 65% | separator |
56
+
57
+ `prefers-contrast: more` raises muted text and separators.
58
+
59
+ ## Materials
60
+
61
+ - `glass`: translucent blur, edge hairline and floating shadow. Used for the tab bar and toasts.
62
+ - `glass-bar`: the same without the shadow. Used for the nav bar after the large title collapses.
63
+ - `glass-control`: smaller blur and soft shadow. Used for nav bar button capsules.
64
+ - Menus and popovers: the `floatingSurface` class string in `app.config.ts` (glass background, no ring, soft shadow, about 22px radius).
65
+ - All of them fall back to opaque under `prefers-reduced-transparency`. Never apply them to content.
66
+
67
+ ## Shape and size
68
+
69
+ - `--ui-radius: 0.5rem`, so `rounded-sm` 8, `rounded-md` 12, `rounded-lg` 16 (list sections, cards), `rounded-xl` 24, `rounded-2xl` 32.
70
+ - Buttons are capsules (`rounded-full`). Inputs are 10px. Sheets have a 32px top radius. Alerts 28px.
71
+ - Button / input `md` (the default) is 44px tall with 17px text. `lg` is 50px, for primary actions at the bottom of a screen. `sm` is 34px, `xs` 26px; both still have a 44px hit area through `touch-target`.
72
+ - All inputs have at least 16px text at every size. Smaller text triggers iOS zoom on focus.
73
+ - Switch is 51×31 and green (`success`), like iOS.
74
+ - `--ui-header-height: 2.75rem` (44pt bar). `--app-tabbar-height: 4.25rem`.
75
+
76
+ ## Utilities
77
+
78
+ | Utility | Purpose |
79
+ |---|---|
80
+ | `touch-target` | Invisible 44×44 minimum hit area. Already on every `UButton`. Doesn't override `absolute`/`fixed`/`sticky`. |
81
+ | `pt-safe` / `pb-safe` / `pl-safe` / `pr-safe` | Safe-area padding. Needs `viewport-fit=cover`, which the template sets. |
82
+ | `glass`, `glass-bar`, `glass-control` | See Materials. |
83
+
84
+ ## Icons
85
+
86
+ The template switches Nuxt UI's internal icons (`ui.icons`) to **Phosphor** (`i-ph-*`) so internal and app icons match. Use regular weight in content, `-fill` for selected tabs and Settings tiles, and `-bold` for chevrons and small glyphs in bars. Don't mix in Lucide.
@@ -0,0 +1,58 @@
1
+ // Usage: in a folder with culori installed (npm i culori@4): node gen-palette.mjs > palette.css — edit `colors` to add a brand color
2
+ import { converter, toGamut } from 'culori'
3
+
4
+ const oklch = converter('oklch')
5
+ const clamp = toGamut('rgb', 'oklch')
6
+
7
+ // iOS system colors (HIG color specs): [increased-contrast light, standard dark].
8
+ // The standard light values miss WCAG AA against white (blue 3.5:1, green 2.2:1);
9
+ // Apple's increased-contrast light variants land at ~4.5:1, so light mode uses those.
10
+ const colors = {
11
+ blue: [[30, 110, 244], [0, 145, 255]],
12
+ green: [[0, 137, 50], [48, 209, 88]],
13
+ red: [[233, 21, 45], [255, 66, 69]],
14
+ orange: [[197, 83, 0], [255, 146, 48]],
15
+ indigo: [[86, 74, 222], [109, 124, 255]],
16
+ teal: [[0, 129, 152], [0, 210, 224]],
17
+ purple: [[176, 47, 194], [219, 52, 242]],
18
+ pink: [[231, 18, 77], [255, 55, 95]]
19
+ }
20
+
21
+ const rgb = ([r, g, b]) => ({ mode: 'rgb', r: r / 255, g: g / 255, b: b / 255 })
22
+ const fmt = c => {
23
+ const o = oklch(clamp(c))
24
+ return `oklch(${(o.l * 100).toFixed(1)}% ${o.c.toFixed(3)} ${(o.h ?? 0).toFixed(1)})`
25
+ }
26
+
27
+ const out = []
28
+ for (const [name, [light, dark]] of Object.entries(colors)) {
29
+ const l5 = oklch(rgb(light))
30
+ const l4 = oklch(rgb(dark))
31
+ const shade = (L, cf) => fmt({ mode: 'oklch', l: L, c: l5.c * cf, h: l5.h })
32
+ const p = {
33
+ 50: shade(0.975, 0.1),
34
+ 100: shade(0.94, 0.22),
35
+ 200: shade(0.89, 0.42),
36
+ 300: shade(0.82, 0.68),
37
+ 400: fmt(l4),
38
+ 500: fmt(l5),
39
+ 600: shade(l5.l - 0.08, 0.95),
40
+ 700: shade(l5.l - 0.15, 0.85),
41
+ 800: shade(l5.l - 0.22, 0.7),
42
+ 900: shade(l5.l - 0.28, 0.55),
43
+ 950: shade(l5.l - 0.36, 0.4)
44
+ }
45
+ out.push(` /* ${name}: 500 = light (increased contrast), 400 = dark */`)
46
+ for (const [k, v] of Object.entries(p)) out.push(` --color-ios-${name}-${k}: ${v};`)
47
+ }
48
+
49
+ // systemGray6 → dark systemGray6, so neutral-50…300 read as light-mode fills and 700…950 as dark-mode surfaces
50
+ const grays = {
51
+ 50: [242, 242, 247], 100: [229, 229, 234], 200: [209, 209, 214], 300: [199, 199, 204],
52
+ 400: [174, 174, 178], 500: [142, 142, 147], 600: [99, 99, 102], 700: [72, 72, 74],
53
+ 800: [58, 58, 60], 900: [44, 44, 46], 950: [28, 28, 30]
54
+ }
55
+ out.push(' /* gray: iOS systemGray…systemGray6 (light) continuing into the dark-mode grays */')
56
+ for (const [k, v] of Object.entries(grays)) out.push(` --color-ios-gray-${k}: rgb(${v.join(' ')});`)
57
+
58
+ console.log(out.join('\n'))
@@ -0,0 +1,298 @@
1
+ // nuxt-ui-mobile — opinionated Nuxt UI defaults for phone-first, HIG-aligned apps.
2
+ // Sizes are re-tuned so `md` (the default) is the 44pt iOS control height with 17pt text.
3
+ // Menus and popovers float like iOS menus: blurred material and a soft shadow instead of a hard ring,
4
+ // with faint, inset dividers between groups
5
+ const floatingSurface = 'bg-(--app-glass) backdrop-blur-2xl backdrop-saturate-150 ring-0 shadow-(--app-glass-shadow) rounded-[1.375rem]'
6
+ const menuSlots = {
7
+ content: `${floatingSurface} min-w-56`,
8
+ viewport: 'divide-(--app-menu-divider)',
9
+ group: 'p-1.5',
10
+ separator: 'mx-3 my-1 h-[0.5px] bg-(--app-menu-divider)'
11
+ }
12
+ // iOS menu symbols share the label color instead of a dimmed gray
13
+ const menuActive = { false: { itemLeadingIcon: 'text-default' } }
14
+
15
+ const textStyles = ['large-title', 'title-1', 'title-2', 'title-3', 'headline', 'body', 'callout', 'subhead', 'footnote', 'caption-1', 'caption-2']
16
+
17
+ export default defineAppConfig({
18
+ ui: {
19
+ colors: {
20
+ primary: 'ios-blue',
21
+ secondary: 'ios-indigo',
22
+ success: 'ios-green',
23
+ info: 'ios-teal',
24
+ warning: 'ios-orange',
25
+ error: 'ios-red',
26
+ neutral: 'ios-gray'
27
+ },
28
+
29
+ // Without this tailwind-merge reads `text-body` as a color and drops it next to `text-highlighted`
30
+ tv: {
31
+ twMergeConfig: {
32
+ extend: {
33
+ theme: { text: textStyles }
34
+ }
35
+ }
36
+ },
37
+
38
+ icons: {
39
+ arrowDown: 'i-ph-arrow-down',
40
+ arrowLeft: 'i-ph-arrow-left',
41
+ arrowRight: 'i-ph-arrow-right',
42
+ arrowUp: 'i-ph-arrow-up',
43
+ caution: 'i-ph-warning-circle',
44
+ check: 'i-ph-check-bold',
45
+ chevronDoubleLeft: 'i-ph-caret-double-left-bold',
46
+ chevronDoubleRight: 'i-ph-caret-double-right-bold',
47
+ chevronDown: 'i-ph-caret-down-bold',
48
+ chevronLeft: 'i-ph-caret-left-bold',
49
+ chevronRight: 'i-ph-caret-right-bold',
50
+ chevronUp: 'i-ph-caret-up-bold',
51
+ close: 'i-ph-x-bold',
52
+ copy: 'i-ph-copy',
53
+ copyCheck: 'i-ph-check',
54
+ dark: 'i-ph-moon',
55
+ drag: 'i-ph-dots-six-vertical',
56
+ ellipsis: 'i-ph-dots-three-bold',
57
+ error: 'i-ph-x-circle',
58
+ external: 'i-ph-arrow-up-right',
59
+ eye: 'i-ph-eye',
60
+ eyeOff: 'i-ph-eye-slash',
61
+ file: 'i-ph-file',
62
+ folder: 'i-ph-folder',
63
+ folderOpen: 'i-ph-folder-open',
64
+ hash: 'i-ph-hash',
65
+ info: 'i-ph-info',
66
+ light: 'i-ph-sun',
67
+ loading: 'i-ph-circle-notch',
68
+ menu: 'i-ph-list',
69
+ minus: 'i-ph-minus',
70
+ panelClose: 'i-ph-sidebar-simple',
71
+ panelOpen: 'i-ph-sidebar-simple',
72
+ plus: 'i-ph-plus',
73
+ reload: 'i-ph-arrow-counter-clockwise',
74
+ search: 'i-ph-magnifying-glass',
75
+ stop: 'i-ph-square',
76
+ star: 'i-ph-star',
77
+ success: 'i-ph-check-circle',
78
+ system: 'i-ph-device-mobile',
79
+ tip: 'i-ph-lightbulb',
80
+ upload: 'i-ph-upload-simple',
81
+ warning: 'i-ph-warning'
82
+ },
83
+
84
+ button: {
85
+ slots: {
86
+ // Capsule shape (iOS 26 controls), dim-on-press like UIKit, hit area ≥ 44pt even for small buttons
87
+ base: 'rounded-full font-semibold touch-target select-none active:opacity-60 transition-[color,background-color,opacity]'
88
+ },
89
+ variants: {
90
+ size: {
91
+ xs: { base: 'px-2.5 py-1 text-footnote gap-1', leadingIcon: 'size-4', trailingIcon: 'size-4' },
92
+ sm: { base: 'px-3.5 py-[7px] text-subhead gap-1.5', leadingIcon: 'size-[18px]', trailingIcon: 'size-[18px]' },
93
+ md: { base: 'px-4 py-[11px] text-body gap-2', leadingIcon: 'size-[22px]', trailingIcon: 'size-[22px]' },
94
+ lg: { base: 'px-5 py-3.5 text-body gap-2', leadingIcon: 'size-6', trailingIcon: 'size-6' },
95
+ xl: { base: 'px-6 py-4 text-headline gap-2.5', leadingIcon: 'size-6', trailingIcon: 'size-6' }
96
+ },
97
+ square: {
98
+ true: ''
99
+ }
100
+ },
101
+ compoundVariants: [
102
+ { size: 'xs', square: true, class: 'p-1' },
103
+ { size: 'sm', square: true, class: 'p-[7px]' },
104
+ { size: 'md', square: true, class: 'p-[11px]' },
105
+ { size: 'lg', square: true, class: 'p-3.5' },
106
+ { size: 'xl', square: true, class: 'p-4' }
107
+ ]
108
+ },
109
+
110
+ input: {
111
+ slots: { base: 'rounded-[10px]' },
112
+ variants: {
113
+ // Every size stays ≥ 16px: smaller text makes iOS Safari zoom into the field on focus
114
+ size: {
115
+ xs: { base: 'px-2.5 py-1.5 text-base/5' },
116
+ sm: { base: 'px-3 py-2 text-base/5' },
117
+ md: { base: 'px-3 py-[11px] text-body' },
118
+ lg: { base: 'px-3.5 py-3 text-body' },
119
+ xl: { base: 'px-4 py-3.5 text-body' }
120
+ }
121
+ }
122
+ },
123
+ textarea: {
124
+ slots: { base: 'rounded-[10px]' },
125
+ variants: {
126
+ size: {
127
+ xs: { base: 'text-base/5' },
128
+ sm: { base: 'text-base/5' },
129
+ md: { base: 'px-3 py-[11px] text-body' },
130
+ lg: { base: 'px-3.5 py-3 text-body' },
131
+ xl: { base: 'px-4 py-3.5 text-body' }
132
+ }
133
+ }
134
+ },
135
+ select: {
136
+ slots: { ...menuSlots, base: 'rounded-[10px]', content: floatingSurface },
137
+ variants: {
138
+ size: {
139
+ xs: { base: 'text-base/5' },
140
+ sm: { base: 'text-base/5' },
141
+ md: { base: 'px-3 py-[11px] text-body', item: 'px-3 py-[11px] text-body gap-2.5' },
142
+ lg: { base: 'px-3.5 py-3 text-body' },
143
+ xl: { base: 'px-4 py-3.5 text-body' }
144
+ }
145
+ }
146
+ },
147
+ selectMenu: {
148
+ slots: { ...menuSlots, base: 'rounded-[10px]', content: floatingSurface },
149
+ variants: {
150
+ size: {
151
+ xs: { base: 'text-base/5' },
152
+ sm: { base: 'text-base/5' },
153
+ md: { base: 'px-3 py-[11px] text-body', item: 'px-3 py-[11px] text-body gap-2.5' },
154
+ lg: { base: 'px-3.5 py-3 text-body' },
155
+ xl: { base: 'px-4 py-3.5 text-body' }
156
+ }
157
+ }
158
+ },
159
+ inputNumber: {
160
+ variants: {
161
+ size: {
162
+ xs: { base: 'text-base/5' },
163
+ sm: { base: 'text-base/5' },
164
+ md: { base: 'py-[11px] text-body' }
165
+ }
166
+ }
167
+ },
168
+ formField: {
169
+ slots: {
170
+ label: 'text-subhead font-medium text-default',
171
+ description: 'text-footnote',
172
+ hint: 'text-footnote',
173
+ help: 'text-footnote',
174
+ error: 'mt-1.5 text-footnote'
175
+ }
176
+ },
177
+
178
+ // iOS switch is 51×31pt; only ever place it in a list row
179
+ switch: {
180
+ slots: {
181
+ base: 'data-[state=unchecked]:bg-fill',
182
+ thumb: 'shadow-md'
183
+ },
184
+ variants: {
185
+ size: {
186
+ md: {
187
+ base: 'w-[51px]',
188
+ container: 'h-[31px]',
189
+ thumb: 'size-[27px] data-[state=checked]:translate-x-5 data-[state=checked]:rtl:-translate-x-5',
190
+ wrapper: 'text-body'
191
+ }
192
+ }
193
+ },
194
+ defaultVariants: { color: 'success' }
195
+ },
196
+
197
+ // Segmented control look; use only for 2–5 closely related views of the same content
198
+ tabs: {
199
+ slots: {
200
+ list: 'rounded-full bg-fill p-1',
201
+ indicator: 'rounded-full shadow-sm',
202
+ trigger: 'rounded-full font-semibold',
203
+ label: 'text-subhead'
204
+ },
205
+ compoundVariants: [
206
+ {
207
+ variant: 'pill',
208
+ color: 'primary',
209
+ class: { indicator: 'bg-default dark:bg-elevated', trigger: 'data-[state=active]:text-highlighted' }
210
+ }
211
+ ]
212
+ },
213
+
214
+ // Bottom sheet: big top radius, 36×5pt grabber, home-indicator-safe container
215
+ drawer: {
216
+ slots: {
217
+ overlay: 'bg-black/40',
218
+ content: 'bg-default ring-0',
219
+ handle: '!w-9 !h-[5px] !bg-accented',
220
+ container: 'gap-3 px-4 pt-3 pb-[max(1rem,env(safe-area-inset-bottom))]',
221
+ header: 'min-h-11',
222
+ title: 'text-headline text-center',
223
+ description: 'text-footnote text-center'
224
+ },
225
+ compoundVariants: [
226
+ { direction: 'bottom', inset: false, class: { content: 'rounded-t-[2rem]', handle: 'mt-[5px]' } }
227
+ ]
228
+ },
229
+
230
+ // Reserve UModal for alerts on phones; sheets go through UDrawer
231
+ modal: {
232
+ slots: {
233
+ overlay: 'bg-black/40',
234
+ content: 'rounded-[1.75rem] ring-0 divide-none',
235
+ title: 'text-headline',
236
+ description: 'text-footnote'
237
+ }
238
+ },
239
+
240
+ toast: {
241
+ slots: {
242
+ root: 'glass rounded-[1.25rem] ring-0 shadow-none',
243
+ title: 'text-subhead font-semibold',
244
+ description: 'text-footnote'
245
+ }
246
+ },
247
+
248
+ // Menu rows at 44pt like UIMenu; size variants override slots, so the change lives on `md`
249
+ dropdownMenu: {
250
+ slots: menuSlots,
251
+ variants: {
252
+ active: menuActive,
253
+ size: {
254
+ md: { item: 'px-3 py-[11px] text-body gap-2.5', label: 'px-3 py-2 text-footnote' }
255
+ }
256
+ }
257
+ },
258
+ contextMenu: {
259
+ slots: menuSlots,
260
+ variants: {
261
+ active: menuActive,
262
+ size: {
263
+ md: { item: 'px-3 py-[11px] text-body gap-2.5', label: 'px-3 py-2 text-footnote' }
264
+ }
265
+ }
266
+ },
267
+
268
+ popover: {
269
+ slots: { content: floatingSurface }
270
+ },
271
+
272
+ card: {
273
+ slots: {
274
+ root: 'rounded-lg',
275
+ header: 'p-4',
276
+ body: 'p-4',
277
+ footer: 'p-4'
278
+ },
279
+ variants: {
280
+ variant: {
281
+ outline: { root: 'bg-cell ring-0' }
282
+ }
283
+ }
284
+ },
285
+
286
+ empty: {
287
+ variants: {
288
+ size: {
289
+ md: { title: 'text-title-3', description: 'text-subhead text-muted' }
290
+ }
291
+ }
292
+ },
293
+
294
+ skeleton: {
295
+ base: 'bg-fill'
296
+ }
297
+ }
298
+ })
@@ -0,0 +1,8 @@
1
+ <template>
2
+ <!-- Toasts drop from the top like iOS banners and stay clear of the tab bar -->
3
+ <UApp :toaster="{ position: 'top-center', duration: 3000 }">
4
+ <NuxtLayout>
5
+ <NuxtPage />
6
+ </NuxtLayout>
7
+ </UApp>
8
+ </template>