Compare commits

...

177 Commits

Author SHA1 Message Date
Benjamin Canac
065061920b chore(deps): add tailwindcss to peerDependencies 2025-02-19 16:28:30 +01:00
Benjamin Canac
637f5d342e fix(Tooltip): bind $attrs on trigger
Resolves #3339, resolves #2897
2025-02-19 16:23:09 +01:00
Romain Hamel
015ceacb11 feat(Form): add prop to disable state transformation (#3356) 2025-02-19 16:22:36 +01:00
renovate[bot]
6a42c70b35 chore(deps): update devdependency vite to ^6.1.1 (v3) (#3355)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-19 15:40:52 +01:00
Benjamin Canac
d33a83e147 fix(Modal/Slideover): fixed header height
Resolves #3333
2025-02-19 15:19:38 +01:00
Anthony Fu
09492f79f2 fix(vite): exclude @nuxt/ui from vite pre-optimization (#3352)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-02-19 13:47:46 +01:00
Benjamin Canac
a8f9a02833 playground-vue(deps): update vite 2025-02-19 12:11:47 +01:00
Benjamin Canac
d958fc27c2 chore(deps): remove vite resolution 2025-02-19 12:04:03 +01:00
renovate[bot]
5b1e710800 chore(deps): update all non-major dependencies (v3) (#3342)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-19 11:59:47 +01:00
renovate[bot]
61b6008732 chore(deps): update tailwindcss to ^4.0.7 (v3) (#3350)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-19 11:48:32 +01:00
Benjamin Canac
a14a09b6ea docs(avatar): remove reka-ui link 2025-02-18 18:14:38 +01:00
Benjamin Canac
b6ec519ca9 docs(theme): update icon 2025-02-18 18:05:09 +01:00
Benjamin Canac
67e546504d fix(Avatar): render on SSR
Co-Authored-By: Sébastien Chopin <seb@nuxt.com>
2025-02-18 18:04:59 +01:00
Benjamin Canac
572e567528 docs(theme): improve @source section 2025-02-18 12:55:54 +01:00
Benjamin Canac
d29a6cba0e docs(app): move safelist back into app.vue 2025-02-18 12:11:16 +01:00
Benjamin Canac
ada04f64a5 fix(CommandPalette): wrong ellipsis color 2025-02-18 11:15:23 +01:00
Benjamin Canac
aefa09c69b fix(Modal): use dvh unit 2025-02-18 11:01:43 +01:00
Benjamin Canac
ae30f9423d fix(Drawer/Modal/Slideover): disable close autofocus
Resolves #3227
2025-02-18 10:59:14 +01:00
Sébastien Chopin
e64fd290b2 docs: fix seo on templates page 2025-02-17 23:44:34 +01:00
Benjamin Canac
9821894532 fix(module): use key when merging modules options 2025-02-17 15:22:07 +01:00
Benjamin Canac
114fcd263a docs(deps): update @nuxt/ui-pro 2025-02-17 14:52:56 +01:00
Benjamin Canac
be12aa4633 chore(release): v3.0.0-alpha.13 2025-02-17 14:31:49 +01:00
Benjamin Canac
6058a13ff5 docs(deps): update @nuxt/ui-pro 2025-02-17 13:05:28 +01:00
Benjamin Canac
0c827d2981 chore(Avatar/Stepper): fix types for vue-tsc@2.2.0 2025-02-17 12:37:54 +01:00
Benjamin Canac
408ebf0f00 test(Table): fix types 2025-02-17 12:37:33 +01:00
Benjamin Canac
63c4d97986 playground-vue(deps): update typescript 2025-02-17 12:37:26 +01:00
Benjamin Canac
10259c477c chore(deps): set rollup and vue resolutions 2025-02-17 12:13:28 +01:00
Benjamin Canac
3f0856c288 playground-vue: move styles into main.css 2025-02-17 12:13:13 +01:00
Benjamin Canac
dbdb4b6a38 playground: move styles into main.css 2025-02-17 12:10:32 +01:00
Benjamin Canac
32b0fbf594 docs: move styles into main.css 2025-02-17 11:59:33 +01:00
renovate[bot]
47be7e1b71 chore(deps): lock file maintenance (v3) (#3336)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-17 10:59:52 +01:00
renovate[bot]
d623b37e76 chore(deps): update all non-major dependencies (v3) (#3317)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-17 10:44:53 +01:00
Benjamin Canac
6c52b5146d docs(deps): update @nuxt/ui-pro 2025-02-16 21:38:06 +01:00
Benjamin Canac
f92bac64a9 docs(nuxt.config): remove nitro.prerender.failOnError 2025-02-16 19:28:19 +01:00
Benjamin Canac
416342486d chore(deps): update @nuxt/ui-pro 2025-02-16 19:23:43 +01:00
Benjamin Canac
07781c3fb4 chore(deps): update vue-tsc resolution 2025-02-16 16:52:32 +01:00
Benjamin Canac
036ba4c57f chore(Table): update types 2025-02-16 16:33:49 +01:00
Benjamin Canac
37276dda5e chore(github): deploy docs on push 2025-02-16 16:22:56 +01:00
Benjamin Canac
6c7bacd0ba chore(deps): update & remove happy-dom resolution 2025-02-16 16:14:55 +01:00
Benjamin Canac
b6d771d427 playground-vue(app): add missing components 2025-02-16 12:53:19 +01:00
Benjamin Canac
cbaf9ec776 docs(app): clean css variables 2025-02-16 12:53:13 +01:00
Sandro Circi
7641d89552 fix(Modal): always fullscreen on mobile (#2637)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-02-16 12:52:21 +01:00
Benjamin Canac
f55e869637 fix(Link): allow usage without vue-router in vue
Resolves #3001
2025-02-16 12:18:03 +01:00
Benjamin Canac
0275076c1b docs(content): add icons 2025-02-15 23:42:53 +01:00
Benjamin Canac
e25f2f0b05 docs(app): reduce tabs size 2025-02-15 23:42:28 +01:00
Benjamin Canac
f74953a4ad docs(app): improve command palette icons 2025-02-15 23:15:37 +01:00
Benjamin Canac
3a3ae07d88 docs(deps): update @nuxt/ui-pro 2025-02-15 19:02:10 +01:00
B. Jonson
1d09a2aa35 feat(locale): add Bengali (বাংলা) language (#3321)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-02-15 18:45:54 +01:00
Benjamin Canac
f0553ebb49 fix(Table): proxy props without useForwardProps
https://github.com/nuxt/ui/issues/3255#issuecomment-2640503829
2025-02-15 18:43:33 +01:00
Benjamin Canac
fa92053116 docs(ThemePicker): improve design 2025-02-15 18:25:19 +01:00
Benjamin Canac
76c527d8b9 docs(define-shortcuts): clarify meta key on windows
Resolves #3318
2025-02-15 16:33:16 +01:00
Benjamin Canac
6d9b9edc55 feat(Drawer): add inset prop
Resolves #2994
2025-02-15 16:21:41 +01:00
Benjamin Canac
fabf42735e docs(nuxt.config): disable nitro.prerender.failOnError 2025-02-15 13:28:34 +01:00
Benjamin Canac
847d4aa752 feat(Card): add variant prop 2025-02-14 19:23:07 +01:00
Maxime Pauvert
7a56903f47 docs: fix pro templates url (#3319) 2025-02-14 17:42:28 +01:00
Benjamin Canac
c480e1d77f chore(package): add .nuxt/ui.css to files 2025-02-14 16:55:23 +01:00
Benjamin Canac
0a1c76c82e playground-vue(deps): clean 2025-02-14 16:41:37 +01:00
Sébastien Chopin
69d49a5214 docs: remove unused prop in terms 2025-02-14 15:16:36 +01:00
Benjamin Canac
5846c1e2ee feat(ContextMenu/DropdownMenu/NavigationMenu): add external-icon prop
Resolves #2996
2025-02-14 15:00:06 +01:00
Sébastien Chopin
ba3ed86ae1 docs: add marketing pages (#3308)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-02-14 14:18:14 +01:00
renovate[bot]
d4bc9b3d0e chore(deps): update pnpm to v10 (v3) (#3234)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-02-14 12:33:55 +01:00
renovate[bot]
83365da00e chore(deps): update all non-major dependencies (v3) (#3293)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-02-14 12:01:16 +01:00
Benjamin Canac
77697910be docs(deps): update @nuxt/ui-pro 2025-02-13 23:06:57 +01:00
Maxime Pauvert
5775532689 docs(theme): fix source definition with content (#3313) 2025-02-13 22:27:55 +01:00
Benjamin Canac
df44779953 docs(deps): update @nuxt/ui-pro 2025-02-13 17:51:31 +01:00
Benjamin Canac
186c024fcb docs(command-palette): disable all autofocus 2025-02-13 16:29:40 +01:00
Benjamin Canac
0c8a272d42 docs(ComponentCode): fix edge-case 2025-02-13 16:26:12 +01:00
Benjamin Canac
ff6658ea71 docs(app): missing blackAsPrimary feature on error page 2025-02-13 11:57:47 +01:00
Benjamin Canac
8097fff79d fix(Card): remove shadow-sm for consistency 2025-02-13 11:57:34 +01:00
Benjamin Canac
03a00b59e5 docs(deps): update @nuxt/ui-pro 2025-02-12 21:47:48 +01:00
Benjamin Canac
2b56c291ca chore(deps): set vite resolution 2025-02-12 21:43:15 +01:00
Benjamin Canac
4c417716c1 chore: update prettier workers version 2025-02-12 21:41:52 +01:00
Benjamin Canac
7de4b3bfda docs(app): improve safelist 2025-02-12 18:36:59 +01:00
Benjamin Canac
9cd8d3df40 docs(LogoPro): add collapsed prop 2025-02-12 18:36:36 +01:00
Benjamin Canac
115350d298 docs(app): typo 2025-02-12 18:36:19 +01:00
Benjamin Canac
9d29e0b407 fix(Calendar/InputMenu/Textarea): add missing PartialString type on ui prop
Resolves #3299
2025-02-12 11:51:21 +01:00
renovate[bot]
c00e1d72d9 chore(deps): update all non-major dependencies (v3) (#3238)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-11 21:20:04 +01:00
Benjamin Canac
e7e75858d7 fix(SelectMenu): wrap content with FocusScope
Resolves #2657
2025-02-11 15:14:06 +01:00
renovate[bot]
80e6c1d264 chore(deps): update tailwindcss to ^4.0.6 (v3) (#3274)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-11 14:58:36 +01:00
Hugo Richard
39c0a60955 docs(calendar): fix date picker example (#3284) 2025-02-10 15:13:21 +01:00
Chandara H. Wei
3413608168 docs(SupportedLanguages): wrong flag emoji for Khmer language (#3278) 2025-02-09 13:33:33 +01:00
Benjamin Canac
0363bf7c66 chore(README): wrong radix-vue link 2025-02-09 12:43:38 +01:00
renovate[bot]
bef3675a89 chore(deps): update dependency @nuxt/devtools-kit to v2 (v3) (#3253)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-07 21:44:03 +01:00
Sébastien Chopin
3eec33be53 docs(theme): fix when using neutral color on pre-rendering 2025-02-07 17:56:51 +01:00
Benjamin Canac
e419dcbe61 fix(Modal/Slideover): improve title & description accessibility
Resolves #3267, resolves #3215
2025-02-07 16:48:47 +01:00
Benjamin Canac
2ee47e5c9e docs(deps): update @nuxt/ui-pro 2025-02-07 13:01:58 +01:00
Benjamin Canac
54e6841ad0 dectools(app): use error css var 2025-02-07 13:01:49 +01:00
Sandro Circi
104852a55c chore: use new syntax for css variables (#3258)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-02-07 11:24:14 +01:00
Benjamin Canac
8e7c52e1fb docs(theme): handle neutral color on ssr 2025-02-07 11:13:57 +01:00
Benjamin Canac
e779764465 docs(deps): update @nuxt/ui-pro 2025-02-06 21:14:42 +01:00
renovate[bot]
71ed7ce6b0 chore(deps): update tailwindcss to ^4.0.4 (v3) (#3257)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-06 17:29:31 +01:00
Benjamin Canac
443a0be017 feat(module): generate tailwindcss theme colors (#2967)
Co-authored-by: HugoRCD <hugo.richard@epitech.eu>
Co-authored-by: Sébastien Chopin <seb@nuxt.com>
2025-02-06 17:29:03 +01:00
Muhammad Mahmoud
4aa317944e feat(Table): extends core options and support other options like pagination (#3177)
Co-authored-by: Sandros94 <sandro.circi@digitoolmedia.com>
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-02-05 22:04:00 +01:00
Farnabaz
c5bb540519 docs(llms): generate llms.txt from content (#3246) 2025-02-05 18:25:39 +01:00
Benjamin Canac
dfa48828ff chore(types): add missing VNode import 2025-02-05 16:13:59 +01:00
Benjamin Canac
089185fbe4 feat(useToast): proxy emits 2025-02-05 15:44:15 +01:00
Benjamin Canac
abd2be1aa6 feat(Toast): handle vnodes in title and description
Resolves #3226
2025-02-05 15:32:20 +01:00
Denis Moshkin
d94b304d0c chore(package): add keywords (#3243) 2025-02-05 13:50:56 +01:00
Benjamin Canac
153f341a8c fix(useToast)!: don't return a promise on add 2025-02-05 13:44:26 +01:00
Benjamin Canac
533e889589 fix(Toast)!: rename click to onClick for consistency 2025-02-05 13:44:21 +01:00
Benjamin Canac
2c192ac145 feat(Alert/Toast)!: add orientation prop 2025-02-05 13:44:21 +01:00
Benjamin Canac
cd0a9d39d8 fix(App): wrap ModalProvider / SlideoverProvider inside TooltipProvider
Resolves #3236
2025-02-04 21:45:24 +01:00
Benjamin Canac
87234cb4da chore(package): export utils 2025-02-04 16:31:46 +01:00
Benjamin Canac
86ac79b6b4 chore(templates): import from @nuxt/ui 2025-02-04 16:27:10 +01:00
Benjamin Canac
e595314b2b chore(types): export utils 2025-02-04 15:38:02 +01:00
renovate[bot]
ac08569a34 chore(deps): update all non-major dependencies (v3) (#3231)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Farnabaz <farnabaz@gmail.com>
2025-02-04 15:38:02 +01:00
Benjamin Canac
961711c7b7 docs(form): import types from @nuxt/ui 2025-02-04 14:56:49 +01:00
José Duarte Alleuy
10fb843f8f feat(Badge): add support within button groups (#3224)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-02-03 12:11:22 +01:00
renovate[bot]
deddc7cf97 chore(deps): lock file maintenance (v3) (#3229)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-03 10:59:18 +01:00
renovate[bot]
86e8ccd8e6 chore(deps): update all non-major dependencies (v3) (#3205)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-03 10:41:33 +01:00
Benjamin Canac
7b4f612cc9 chore(deps): add caret range specifier to @standard-schema/spec 2025-02-02 19:23:28 +01:00
renovate[bot]
618c1159f2 chore(deps): update devdependency @nuxt/eslint-config to v1 (v3) (#3212)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-02 19:16:07 +01:00
Hugo Richard
f21e923a64 docs(ComponentTheme): broken github link (#3223) 2025-02-02 11:38:54 +01:00
renovate[bot]
69bc686efd chore(deps): update tailwindcss to ^4.0.3 (v3) (#3221)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-01 18:21:16 +01:00
Chingiz Mammadov
0fb6753c9d feat(locale): add Azerbaijani language (#3209) 2025-01-31 23:59:14 +01:00
renovate[bot]
e354d1b3a2 chore(deps): update tailwindcss to ^4.0.2 (v3) (#3219)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-31 23:57:02 +01:00
Benjamin Canac
07e1b4f1f4 fix(NavigationMenu): disable collapsible with collapsed prop 2025-01-30 14:19:13 +01:00
Anthony Fu
6c20f8a9ea feat(unplugin): expose options for embedded plugins, throw warnings for duplication (#3207) 2025-01-30 12:17:42 +01:00
renovate[bot]
ce3eaaa7b9 chore(deps): update tailwindcss to ^4.0.1 (v3) (#3206)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-30 11:51:08 +01:00
Benjamin Canac
49dd0885a0 fix(Badge): missing UAvatar import
Resolves #3203
2025-01-29 17:38:23 +01:00
Benjamin Canac
c1c9da4d38 fix(NavigationMenu): wrong level compute on vertical orientation 2025-01-29 16:11:32 +01:00
Benjamin Canac
0e46c3e8cf fix(NavigationMenu): remove negative mb causing overflow issues 2025-01-29 15:29:49 +01:00
Chandara H. Wei
995e07d6ff fix(locale): export km (#3201) 2025-01-29 12:51:03 +01:00
renovate[bot]
d93ab0616e chore(deps): update all non-major dependencies (v3) (#3192)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-01-29 11:08:57 +01:00
Benjamin Canac
a3cfdb7c12 docs(input): remove pre-filled password example
Resolves #3195
2025-01-29 11:05:31 +01:00
VisualYuki
7299b0c603 chore(npmrc): set shell-emulator to make scripts work on windows (#3198) 2025-01-29 10:45:03 +01:00
renovate[bot]
b9000a7bf1 chore(deps): update nuxt framework to ^3.15.4 (v3) (#3199)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-29 10:42:27 +01:00
Benjamin Canac
97f26c6777 docs(deps): update @nuxt/ui-pro 2025-01-28 17:31:06 +01:00
Benjamin Canac
4cbfcaf867 cli: update reka-ui url 2025-01-28 17:30:59 +01:00
Benjamin Canac
e2b78a78a4 feat(CommandPalette): support link props in items
Resolves #3190
2025-01-28 14:51:57 +01:00
Typed SIGTERM
527631d2d1 chore(deps): fix tailwindcss version specifier (#3188) 2025-01-28 10:03:22 +01:00
Benjamin Canac
2703498fe5 docs(deps): update @nuxt/ui-pro 2025-01-27 19:03:13 +01:00
Benjamin Canac
e2d570bcf3 docs(components): update badges 2025-01-27 18:56:50 +01:00
Benjamin Canac
bc10a1cabe chore(release): v3.0.0-alpha.12 2025-01-27 18:49:23 +01:00
renovate[bot]
dcd86144a2 chore(deps): lock file maintenance (v3) (#3183)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-27 17:37:33 +01:00
renovate[bot]
761680b5cb chore(deps): update all non-major dependencies (v3) (#3185)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-27 17:27:48 +01:00
renovate[bot]
3183e4afe3 chore(deps): update nuxt framework to ^3.15.3 (v3) (#3176)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-27 17:18:45 +01:00
Benjamin Canac
cd16b95c98 fix(components): prevent multiple appConfig identifier import (#3186) 2025-01-27 13:26:21 +01:00
Benjamin Canac
d27be06164 chore(Avatar): cast ImageComponent to string 2025-01-27 13:02:56 +01:00
Sagiv
f3958773d6 feat(locale): add Hebrew language (#3181) 2025-01-27 10:50:48 +01:00
renovate[bot]
2006ec0646 chore(deps): update all non-major dependencies (v3) (#3154)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-27 10:45:31 +01:00
Benjamin Canac
3320e0473c chore(renovate): run pnpm dedupe post update 2025-01-25 12:22:30 +01:00
Romain Hamel
c0b485d563 feat(Form): form validation properties (#3137) 2025-01-24 19:10:44 +01:00
Nándor Dudás
891ba1fec6 feat(locale): add Hungarian language (#3129)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-01-24 19:07:55 +01:00
Howard Guo
1a95104631 fix(locale): remove emoji fallback for Chinese (#3134) 2025-01-24 18:37:33 +01:00
Benjamin Canac
ac86ee01b9 feat(NavigationMenu): add contentOrientation prop 2025-01-24 18:35:04 +01:00
Gerben Mulder
8f7f579da0 fix(Form): standard schema validation no longer wrapped in value object (#3104) 2025-01-24 18:21:52 +01:00
Nexos Creator
8e96daa5cc feat(locale): add Hindi language (#3170) 2025-01-24 17:31:14 +01:00
Benjamin Canac
36d7402be1 fix(Avatar): hide fallback when image is loaded
Resolves nuxt/ui-pro#727
2025-01-24 17:29:53 +01:00
Benjamin Canac
63b7de4159 docs(navigation-menu): add missing github icon 2025-01-24 14:46:06 +01:00
Benjamin Canac
f8b4de587e docs(installation): add devtools.enabled option 2025-01-24 14:45:56 +01:00
Benjamin Canac
890c3d0840 docs(getting-started): wrong heading for devtools 2025-01-24 14:41:53 +01:00
Benjamin Canac
7441b6451d playground(nuxt.config): enable @nuxt/fonts outside devtools prepare 2025-01-24 14:36:45 +01:00
Benjamin Canac
2b7ff3edf6 fix(NavigationMenu): handle children recursively in vertical orientation
Resolves #3128
2025-01-24 14:07:29 +01:00
Benjamin Canac
9b5a957cdd fix(ContextMenu/DropdownMenu): remove unnecessary bindings in html 2025-01-24 13:03:44 +01:00
Benjamin Canac
00c5f26111 fix(Avatar): handle loading manually to support @nuxt/image
Resolves nuxt/ui-pro#727
2025-01-24 12:14:48 +01:00
Benjamin Canac
aafddd8eed fix(useToast): add in queue and improve unique ids
Resolves #2686
2025-01-24 11:16:02 +01:00
Benjamin Canac
8d941e1360 docs(deps): update @nuxt/ui-pro 2025-01-23 11:18:13 +01:00
Konstantin
ba3d5e2c7d docs(table): describe meta field on columns (#3160) 2025-01-23 10:49:07 +01:00
Benjamin Canac
1b989c419d docs(ComponentExample): pass width to iframe only without iframeMobile 2025-01-22 18:06:17 +01:00
Benjamin Canac
b8b7a8366d docs(app): increase content search result limit 2025-01-22 17:47:37 +01:00
Benjamin Canac
fb94ee379c docs(app): replace heroicons icons by lucide 2025-01-22 17:40:17 +01:00
Benjamin Canac
a5ed62f83a docs(deps): update @nuxt/ui-pro 2025-01-22 15:37:14 +01:00
Benjamin Canac
12b6c78a17 docs(app): prevent ui-pro / vue switch when disabled 2025-01-22 15:37:14 +01:00
renovate[bot]
9cafd1295e chore(deps): update tailwindcss to v4.0.0 (v3) (#3155)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-22 15:15:24 +01:00
Benjamin Canac
545c3917a1 docs(ComponentTheme): prevent async data override on generate 2025-01-22 10:35:11 +01:00
renovate[bot]
3e2e5a075d chore(deps): update all non-major dependencies (v3) (#3150)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-21 15:54:27 +01:00
Aaron Dewes
629dcfab16 docs(input): fix aria-label on examples (#3149) 2025-01-21 12:12:14 +01:00
renovate[bot]
53d636aa9b chore(deps): update devdependency vitest to v3 (v3) (#3117)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-20 18:29:25 +01:00
renovate[bot]
eb068b2f90 chore(deps): lock file maintenance (v3) (#3145)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-20 18:10:25 +01:00
Benjamin Canac
75a470d588 chore(deps): dedupe 2025-01-20 14:49:13 +01:00
Benjamin Canac
90dc03cd03 chore(Select): clean props 2025-01-20 14:48:28 +01:00
Romain Hamel
088dc9bf38 docs(form): fix nested form example schema (#3135) 2025-01-20 11:53:05 +01:00
Romain Hamel
b95b91391a feat(FormField): set aria-describedby and aria-invalid attributes (#3123) 2025-01-20 11:46:09 +01:00
renovate[bot]
b8d99726ef chore(deps): update all non-major dependencies (v3) (#3091)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-20 11:17:39 +01:00
Hugo Richard
b88f67ccfe docs(app): add h-64 to safelist (#3115) 2025-01-20 11:13:44 +01:00
renovate[bot]
55b233dc3d chore(deps): update nuxt framework to ^3.15.2 (v3) (#3074)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-20 10:56:59 +01:00
437 changed files with 24145 additions and 20464 deletions

View File

@@ -1,12 +1,6 @@
name: docs
on:
push:
branches:
- v3
pull_request:
branches:
- v3
on: push
jobs:
deploy:

1
.npmrc
View File

@@ -1,3 +1,4 @@
shamefully-hoist=true
auto-install-peers=true
ignore-workspace-root-check=true
shell-emulator=true

View File

@@ -1,5 +1,89 @@
# Changelog
## [3.0.0-alpha.13](https://github.com/nuxt/ui/compare/v3.0.0-alpha.12...v3.0.0-alpha.13) (2025-02-17)
### ⚠ BREAKING CHANGES
* **useToast:** don't return a promise on `add`
* **Toast:** rename `click` to `onClick` for consistency
* **Alert/Toast:** add `orientation` prop
### Features
* **Alert/Toast:** add `orientation` prop ([2c192ac](https://github.com/nuxt/ui/commit/2c192ac145e3550153821627a389f03e26f247b5))
* **Badge:** add support within button groups ([#3224](https://github.com/nuxt/ui/issues/3224)) ([10fb843](https://github.com/nuxt/ui/commit/10fb843f8ffc2cda9cf9a29cdf37c6b5dae9ca17))
* **Card:** add `variant` prop ([847d4aa](https://github.com/nuxt/ui/commit/847d4aa752decc8c21a8eb57bff32a371c800b6d))
* **CommandPalette:** support link props in items ([e2b78a7](https://github.com/nuxt/ui/commit/e2b78a78a45c1b2339ba57e3ec1fcf2a1500b3af)), closes [#3190](https://github.com/nuxt/ui/issues/3190)
* **ContextMenu/DropdownMenu/NavigationMenu:** add `external-icon` prop ([5846c1e](https://github.com/nuxt/ui/commit/5846c1e2ee9f0851e902550f7e873cc703fe7cb4)), closes [#2996](https://github.com/nuxt/ui/issues/2996)
* **Drawer:** add `inset` prop ([6d9b9ed](https://github.com/nuxt/ui/commit/6d9b9edc5524ad32abdec925c276519e1a1a59e4)), closes [#2994](https://github.com/nuxt/ui/issues/2994)
* **locale:** add Azerbaijani language ([#3209](https://github.com/nuxt/ui/issues/3209)) ([0fb6753](https://github.com/nuxt/ui/commit/0fb6753c9de9144b7958052ae287b34911afcbd7))
* **locale:** add Bengali (বাংলা) language ([#3321](https://github.com/nuxt/ui/issues/3321)) ([1d09a2a](https://github.com/nuxt/ui/commit/1d09a2aa35944bc798cf53809ae227d05592a5bd))
* **module:** generate `tailwindcss` theme colors ([#2967](https://github.com/nuxt/ui/issues/2967)) ([443a0be](https://github.com/nuxt/ui/commit/443a0be0174f84526145db8c0349136e5fc4bbf3))
* **Table:** extends core options and support other options like `pagination` ([#3177](https://github.com/nuxt/ui/issues/3177)) ([4aa3179](https://github.com/nuxt/ui/commit/4aa317944e17956b08e5ded3fb564ae0bbd4e888))
* **Toast:** handle vnodes in `title` and `description` ([abd2be1](https://github.com/nuxt/ui/commit/abd2be1aa667f91c47673450445e09211c821365)), closes [#3226](https://github.com/nuxt/ui/issues/3226)
* **unplugin:** expose options for embedded plugins, throw warnings for duplication ([#3207](https://github.com/nuxt/ui/issues/3207)) ([6c20f8a](https://github.com/nuxt/ui/commit/6c20f8a9ea03273a795c5f88c071830decd54c1e))
* **useToast:** proxy emits ([089185f](https://github.com/nuxt/ui/commit/089185fbe4a13fa3253bf49780c4d0a673eef59a))
### Bug Fixes
* **App:** wrap `ModalProvider` / `SlideoverProvider` inside `TooltipProvider` ([cd0a9d3](https://github.com/nuxt/ui/commit/cd0a9d39d879a80342462b1c553602177f1ae8ee)), closes [#3236](https://github.com/nuxt/ui/issues/3236)
* **Badge:** missing `UAvatar` import ([49dd088](https://github.com/nuxt/ui/commit/49dd0885a043e736cfa335d7657bb68ae6142ccf)), closes [#3203](https://github.com/nuxt/ui/issues/3203)
* **Calendar/InputMenu/Textarea:** add missing `PartialString` type on `ui` prop ([9d29e0b](https://github.com/nuxt/ui/commit/9d29e0b4078c4638365caca4784ecad569cd0464)), closes [#3299](https://github.com/nuxt/ui/issues/3299)
* **Card:** remove `shadow-sm` for consistency ([8097fff](https://github.com/nuxt/ui/commit/8097fff79d3d9f63481c6cd8e3e724a67f7761df))
* **Link:** allow usage without `vue-router` in vue ([f55e869](https://github.com/nuxt/ui/commit/f55e86963737238749a8d7e85bca1e724ae4c4c2)), closes [#3001](https://github.com/nuxt/ui/issues/3001)
* **locale:** export `km` ([#3201](https://github.com/nuxt/ui/issues/3201)) ([995e07d](https://github.com/nuxt/ui/commit/995e07d6ffa47ee593b28aa587699676e2ad3b90))
* **Modal/Slideover:** improve `title` & `description` accessibility ([e419dcb](https://github.com/nuxt/ui/commit/e419dcbe61e6949abc76b8a1fc2f088fd7a402a0)), closes [#3267](https://github.com/nuxt/ui/issues/3267) [#3215](https://github.com/nuxt/ui/issues/3215)
* **Modal:** always fullscreen on mobile ([#2637](https://github.com/nuxt/ui/issues/2637)) ([7641d89](https://github.com/nuxt/ui/commit/7641d89552df1ed42e70bbac90f5486b58bd9349))
* **NavigationMenu:** disable collapsible with `collapsed` prop ([07e1b4f](https://github.com/nuxt/ui/commit/07e1b4f1f44efe90ac16138de5dbd78faf66e974))
* **NavigationMenu:** remove negative mb causing overflow issues ([0e46c3e](https://github.com/nuxt/ui/commit/0e46c3e8cf94fb52c47b9d46eaba2d18329a6f45))
* **NavigationMenu:** wrong `level` compute on `vertical` orientation ([c1c9da4](https://github.com/nuxt/ui/commit/c1c9da4d38b7675ce6323d938030e1b9a577f7c4))
* **SelectMenu:** wrap content with `FocusScope` ([e7e7585](https://github.com/nuxt/ui/commit/e7e75858d7c5f0d966d2b9b7a16bc95573a31025)), closes [#2657](https://github.com/nuxt/ui/issues/2657)
* **Table:** proxy props without `useForwardProps` ([f0553eb](https://github.com/nuxt/ui/commit/f0553ebb496f2f4bad5fd5ab0b3006c9ee8edba3))
* **Toast:** rename `click` to `onClick` for consistency ([533e889](https://github.com/nuxt/ui/commit/533e88958916b356c00511a90e16c8b11af0b521))
* **useToast:** don't return a promise on `add` ([153f341](https://github.com/nuxt/ui/commit/153f341a8c1a09a6fd3069886a26d9a3f5de41de))
## [3.0.0-alpha.12](https://github.com/nuxt/ui/compare/v3.0.0-alpha.11...v3.0.0-alpha.12) (2025-01-27)
### ⚠ BREAKING CHANGES
* **ColorPicker:** migrate from `color` to `colortranslator` (#3097)
* **Form:** include nested state in submit data (#3028)
### Features
* **css:** add `light` variant to reverse colors ([75f7064](https://github.com/nuxt/ui/commit/75f7064b409a47d068007d0b4f3af007fb24c679))
* **FormField:** set `aria-describedby` and `aria-invalid` attributes ([#3123](https://github.com/nuxt/ui/issues/3123)) ([b95b913](https://github.com/nuxt/ui/commit/b95b91391af21ee0fd96c69fb6ccf99b3126bc79))
* **Form:** form validation properties ([#3137](https://github.com/nuxt/ui/issues/3137)) ([c0b485d](https://github.com/nuxt/ui/commit/c0b485d56376d6655d15d6241daeef19f25db25f))
* **locale:** add Hebrew language ([#3181](https://github.com/nuxt/ui/issues/3181)) ([f395877](https://github.com/nuxt/ui/commit/f3958773d610d64fe15cf57525044eec22dc1f96))
* **locale:** add Hindi language ([#3170](https://github.com/nuxt/ui/issues/3170)) ([8e96daa](https://github.com/nuxt/ui/commit/8e96daa5cc57e1a2c7605d54f8640f8e012a645d))
* **locale:** add Hungarian language ([#3129](https://github.com/nuxt/ui/issues/3129)) ([891ba1f](https://github.com/nuxt/ui/commit/891ba1fec64255ba4db0f4447e044cc9140ced94))
* **locale:** add Khmer language ([#3119](https://github.com/nuxt/ui/issues/3119)) ([64421a1](https://github.com/nuxt/ui/commit/64421a190ff43563cc73f64b6a9141d69e3f5ca5))
* **locale:** add Norwegian Bokmål language ([#3095](https://github.com/nuxt/ui/issues/3095)) ([9ccfe8f](https://github.com/nuxt/ui/commit/9ccfe8fbb3284a5bdd0766ba5831135d298b563f))
* **NavigationMenu:** add `collapsed` prop ([3fc2210](https://github.com/nuxt/ui/commit/3fc2210e0392b63b065e4f4899ff864f1a3717b1))
* **NavigationMenu:** add `contentOrientation` prop ([ac86ee0](https://github.com/nuxt/ui/commit/ac86ee01b9fc9b5dc882b210d88b8fef73148e42))
* **NavigationMenu:** handle `label` type in items ([27fdc8e](https://github.com/nuxt/ui/commit/27fdc8e260bb8d2ca815c84cfdc30b6ca3baa038)), closes [#2993](https://github.com/nuxt/ui/issues/2993)
### Bug Fixes
* **Alert:** allow actions wrap ([#3083](https://github.com/nuxt/ui/issues/3083)) ([e7c10bc](https://github.com/nuxt/ui/commit/e7c10bcb0dbbfbbe48bbdea7cbd99d4535be1adb))
* **Avatar:** handle loading manually to support `@nuxt/image` ([00c5f26](https://github.com/nuxt/ui/commit/00c5f261117fd986c8be70ecdc21762023e7ebc0)), closes [nuxt/ui-pro#727](https://github.com/nuxt/ui-pro/issues/727)
* **Avatar:** hide fallback when image is loaded ([36d7402](https://github.com/nuxt/ui/commit/36d7402be1f823c753c7cd44cca82bbb5fd4cddd)), closes [nuxt/ui-pro#727](https://github.com/nuxt/ui-pro/issues/727)
* **Button:** wrong avatar size with `block` prop ([ba1dd13](https://github.com/nuxt/ui/commit/ba1dd13173835c9b72b862eb9f875a8cd79c5604))
* **colors:** move css variables to `base` layer ([533ccec](https://github.com/nuxt/ui/commit/533ccec11007ec9078fd8daefd88f6b146991939)), closes [#3075](https://github.com/nuxt/ui/issues/3075)
* **components:** prevent multiple `appConfig` identifier import ([#3186](https://github.com/nuxt/ui/issues/3186)) ([cd16b95](https://github.com/nuxt/ui/commit/cd16b95c98c0ec29bc0586ba890555f79be00290))
* **ContextMenu/DropdownMenu:** remove unnecessary bindings in html ([9b5a957](https://github.com/nuxt/ui/commit/9b5a957cdd01baafaa981864ad7d03902ad6918d))
* **Form:** include nested state in submit data ([#3028](https://github.com/nuxt/ui/issues/3028)) ([de9ecb1](https://github.com/nuxt/ui/commit/de9ecb1d767060f88c1dbdf69b9c04d5731b049d))
* **Form:** standard schema validation no longer wrapped in `value` object ([#3104](https://github.com/nuxt/ui/issues/3104)) ([8f7f579](https://github.com/nuxt/ui/commit/8f7f579da0fc58575184dc445ff0dda0c0ca1298))
* **locale:** remove emoji fallback for Chinese ([#3134](https://github.com/nuxt/ui/issues/3134)) ([1a95104](https://github.com/nuxt/ui/commit/1a951046319eaf85c2adb44928a0255dedef093d))
* **locale:** year translation missing `ñ` in `es` ([#3090](https://github.com/nuxt/ui/issues/3090)) ([1bf370e](https://github.com/nuxt/ui/commit/1bf370e6fd27fab644689335b7356bbf4c359663))
* **NavigationMenu:** handle children recursively in vertical orientation ([2b7ff3e](https://github.com/nuxt/ui/commit/2b7ff3edf6620d7ed4a491d89f0e616b5916984b)), closes [#3128](https://github.com/nuxt/ui/issues/3128)
* **NavigationMenu:** highlight open items on `horizontal` orientation only ([931211a](https://github.com/nuxt/ui/commit/931211a634183a8122ce0be874cc1f9048768d88))
* **useToast:** add in queue and improve unique ids ([aafddd8](https://github.com/nuxt/ui/commit/aafddd8eed0f3fc7c7228c2db4718ba54f3fc522)), closes [#2686](https://github.com/nuxt/ui/issues/2686)
### Code Refactoring
* **ColorPicker:** migrate from `color` to `colortranslator` ([#3097](https://github.com/nuxt/ui/issues/3097)) ([51e5e65](https://github.com/nuxt/ui/commit/51e5e65be7f834ec226be28d95a1b547b85b329c))
## [3.0.0-alpha.11](https://github.com/nuxt/ui/compare/v3.0.0-alpha.10...v3.0.0-alpha.11) (2025-01-13)
### ⚠ BREAKING CHANGES

View File

@@ -7,7 +7,7 @@
[![License][license-src]][license-href]
[![Nuxt][nuxt-src]][nuxt-href]
We're thrilled to introduce Nuxt UI v3, a significant upgrade to our UI library that delivers extensive improvements and robust new capabilities. This major update harnesses the combined strengths of [Reka UI](https://reka-ui.com/), [Tailwind CSS v4](https://tailwindcss.com/docs/v4-beta), and [Tailwind Variants](https://www.tailwind-variants.org/) to offer developers an unparalleled set of tools for creating sophisticated, accessible, and highly performant user interfaces.
We're thrilled to introduce Nuxt UI v3, a significant upgrade to our UI library that delivers extensive improvements and robust new capabilities. This major update harnesses the combined strengths of [Reka UI](https://reka-ui.com/), [Tailwind CSS v4](https://tailwindcss.com/), and [Tailwind Variants](https://www.tailwind-variants.org/) to offer developers an unparalleled set of tools for creating sophisticated, accessible, and highly performant user interfaces.
> [!NOTE]
> You are on the `v3` development branch, check out the [dev branch](https://github.com/nuxt/ui/tree/dev) for Nuxt UI v2.
@@ -106,7 +106,7 @@ Learn more in the [installation guide](https://ui3.nuxt.dev/getting-started/inst
- [nuxt/icon](https://github.com/nuxt/icon)
- [nuxt/fonts](https://github.com/nuxt/fonts)
- [nuxt-modules/color-mode](https://github.com/nuxt-modules/color-mode)
- [unovue/reka-ui](https://github.com/unovue/reka-ui)
- [unovue/radix-vue](https://github.com/unovue/radix-vue)
- [tailwindlabs/tailwindcss](https://github.com/tailwindlabs/tailwindcss)
- [vueuse/vueuse](https://github.com/vueuse/vueuse)

View File

@@ -6,8 +6,8 @@
},
"dependencies": {
"citty": "^0.1.6",
"consola": "^3.3.3",
"pathe": "^2.0.1",
"consola": "^3.4.0",
"pathe": "^2.0.3",
"scule": "^1.3.0"
}
}

View File

@@ -35,9 +35,9 @@ import _appConfig from '#build/app.config'
import theme from '#build/${path}/${prose ? 'prose/' : ''}${content ? 'content/' : ''}${kebabName}'
import { tv } from '${pro ? '#ui/utils/tv' : '../utils/tv'}'
const appConfig = _appConfig as AppConfig & { ${key}: { ${prose ? 'prose: { ' : ''}${camelName}: Partial<typeof theme> } }${prose ? ' }' : ''}
const appConfig${camelName} = _appConfig as AppConfig & { ${key}: { ${prose ? 'prose: { ' : ''}${camelName}: Partial<typeof theme> } }${prose ? ' }' : ''}
const ${camelName} = tv({ extend: tv(theme), ...(appConfig.${key}?.${prose ? 'prose?.' : ''}${camelName} || {}) })
const ${camelName} = tv({ extend: tv(theme), ...(appConfig${camelName}.${key}?.${prose ? 'prose?.' : ''}${camelName} || {}) })
export interface ${upperName}Props {
/**
@@ -78,9 +78,9 @@ import _appConfig from '#build/app.config'
import theme from '#build/${path}/${prose ? 'prose/' : ''}${content ? 'content/' : ''}${kebabName}'
import { tv } from '${pro ? '#ui/utils/tv' : '../utils/tv'}'
const appConfig = _appConfig as AppConfig & { ${key}: { ${prose ? 'prose: { ' : ''}${camelName}: Partial<typeof theme> } }${prose ? ' }' : ''}
const appConfig${camelName} = _appConfig as AppConfig & { ${key}: { ${prose ? 'prose: { ' : ''}${camelName}: Partial<typeof theme> } }${prose ? ' }' : ''}
const ${camelName} = tv({ extend: tv(theme), ...(appConfig.${key}?.${prose ? 'prose?.' : ''}${camelName} || {}) })
const ${camelName} = tv({ extend: tv(theme), ...(appConfig${camelName}.${key}?.${prose ? 'prose?.' : ''}${camelName} || {}) })
type ${upperName}Variants = VariantProps<typeof ${camelName}>
@@ -181,7 +181,7 @@ links:${primitive
: `
- label: ${upperName}
icon: i-custom-reka-ui
to: https://www.reka-ui.com/components/${kebabName}.html`}
to: https://reka-ui.com/docs/components/${kebabName}`}
- label: GitHub
icon: i-simple-icons-github
to: https://github.com/nuxt/${pro ? 'ui-pro' : 'ui'}/tree/v3/src/runtime/components/${upperName}.vue

View File

@@ -89,9 +89,9 @@ const isDark = computed({
</script>
<template>
<UApp class="flex justify-center items-center h-screen w-full relative font-sans">
<UApp>
<div v-if="status === 'pending' || error || !component || !components?.length">
<div v-if="error" class="flex flex-col justify-center items-center h-screen w-screen text-center text-[var(--ui-color-error-500)]">
<div v-if="error" class="flex flex-col justify-center items-center h-screen w-screen text-center text-(--ui-error)">
<UILogo class="h-8" />
<UIcon name="i-lucide-circle-alert" size="20" class="mt-2" />
<p>
@@ -100,9 +100,7 @@ const isDark = computed({
</div>
</div>
<template v-else>
<div
class="top-0 h-[49px] border-b border-[var(--ui-border)] flex justify-center"
>
<div class="top-0 h-[49px] border-b border-(--ui-border) flex justify-center">
<span />
<UInputMenu
@@ -114,8 +112,8 @@ const isDark = computed({
icon="i-lucide-search"
/>
<div class="absolute top-[49px] bottom-0 inset-x-0 grid xl:grid-cols-8 grid-cols-4 bg-[var(--ui-bg)]">
<div class="col-span-1 border-r border-[var(--ui-border)] hidden xl:block overflow-y-auto">
<div class="absolute top-[49px] bottom-0 inset-x-0 grid xl:grid-cols-8 grid-cols-4 bg-(--ui-bg)">
<div class="col-span-1 border-r border-(--ui-border) hidden xl:block overflow-y-auto">
<UNavigationMenu
:items="components.map((c) => ({ ...c, active: c.slug === component?.slug, onSelect: () => component = c }))"
orientation="vertical"
@@ -144,10 +142,10 @@ const isDark = computed({
</div>
</div>
<div class="border-l border-[var(--ui-border)] flex flex-col col-span-2 overflow-y-auto">
<UTabs color="neutral" variant="link" :items="tabs" class="relative" :ui="{ list: 'sticky top-0 bg-[var(--ui-bg)] z-50' }">
<div class="border-l border-(--ui-border) flex flex-col col-span-2 overflow-y-auto">
<UTabs color="neutral" variant="link" :items="tabs" class="relative" :ui="{ list: 'sticky top-0 bg-(--ui-bg) z-50' }">
<template #props>
<div v-for="prop in componentPropsMeta" :key="'prop-' + prop.name" class="px-3 py-5 border-b border-[var(--ui-border)]">
<div v-for="prop in componentPropsMeta" :key="'prop-' + prop.name" class="px-3 py-5 border-b border-(--ui-border)">
<ComponentPropInput
v-model="componentProps[prop.name]"
:meta="prop"
@@ -170,39 +168,17 @@ const isDark = computed({
@theme {
--font-sans: 'DM Sans', sans-serif;
--color-primary-50: var(--ui-color-primary-50);
--color-primary-100: var(--ui-color-primary-100);
--color-primary-200: var(--ui-color-primary-200);
--color-primary-300: var(--ui-color-primary-300);
--color-primary-400: var(--ui-color-primary-400);
--color-primary-500: var(--ui-color-primary-500);
--color-primary-600: var(--ui-color-primary-600);
--color-primary-700: var(--ui-color-primary-700);
--color-primary-800: var(--ui-color-primary-800);
--color-primary-900: var(--ui-color-primary-900);
--color-primary-950: var(--ui-color-primary-950);
--color-neutral-50: var(--ui-color-neutral-50);
--color-neutral-100: var(--ui-color-neutral-100);
--color-neutral-200: var(--ui-color-neutral-200);
--color-neutral-300: var(--ui-color-neutral-300);
--color-neutral-400: var(--ui-color-neutral-400);
--color-neutral-500: var(--ui-color-neutral-500);
--color-neutral-600: var(--ui-color-neutral-600);
--color-neutral-700: var(--ui-color-neutral-700);
--color-neutral-800: var(--ui-color-neutral-800);
--color-neutral-900: var(--ui-color-neutral-900);
--color-neutral-950: var(--ui-color-neutral-950);
}
:root {
--ui-border: var(--ui-color-neutral-200);
--ui-bg: white;
}
.dark {
--ui-border: var(--ui-color-neutral-800);
--ui-bg: var(--ui-color-neutral-900);
--color-green-50: #EFFDF5;
--color-green-100: #D9FBE8;
--color-green-200: #B3F5D1;
--color-green-300: #75EDAE;
--color-green-400: #00DC82;
--color-green-500: #00C16A;
--color-green-600: #00A155;
--color-green-700: #007F45;
--color-green-800: #016538;
--color-green-900: #0A5331;
--color-green-950: #052E16;
}
.shiki

View File

@@ -18,7 +18,7 @@ onMounted(() => {
</script>
<template>
<div class="border rounded-[var(--ui-radius)] border-[var(--ui-border)]">
<div class="border rounded-(--ui-radius) border-(--ui-border)">
<div
ref="wrapper"
:class="['overflow-hidden', collapsed && overflow ? 'max-h-48' : 'max-h-none']"
@@ -29,7 +29,7 @@ onMounted(() => {
</div>
<UButton
v-if="overflow"
class="bg-[var(--ui-bg)] group w-full flex justify-center my-1 border-t border-[var(--ui-border)] rounded-t-none"
class="bg-(--ui-bg) group w-full flex justify-center my-1 border-t border-(--ui-border) rounded-t-none"
variant="link"
color="neutral"
trailing-icon="i-lucide-chevron-down"

View File

@@ -126,7 +126,7 @@ const previewUrl = computed(() => {
</div>
<div v-if="highlightedCode && formattedCode" v-show="rendererReady" class="relative w-full p-3">
<!-- eslint-disable vue/no-v-html -->
<pre class="p-4 min-h-40 max-h-72 text-sm overflow-y-auto rounded-[calc(var(--ui-radius)*1.5)] border border-[var(--ui-border)] bg-neutral-50 dark:bg-neutral-800" v-html="highlightedCode" />
<pre class="p-4 min-h-40 max-h-72 text-sm overflow-y-auto rounded-[calc(var(--ui-radius)*1.5)] border border-(--ui-border) bg-(--ui-bg-muted)" v-html="highlightedCode" />
<UButton
color="neutral"
variant="link"

View File

@@ -17,21 +17,21 @@ watchEffect(() => {
})
const description = computed(() => {
return props.meta.description?.replace(/`([^`]+)`/g, '<code class="font-medium bg-[var(--ui-bg-elevated)] px-1 py-0.5 rounded-[var(--ui-radius)]">$1</code>')
return props.meta.description?.replace(/`([^`]+)`/g, '<code class="font-medium bg-(--ui-bg-elevated) px-1 py-0.5 rounded-(--ui-radius)">$1</code>')
})
</script>
<template>
<UFormField :name="meta?.name" class="" :ui="{ wrapper: 'mb-2' }" :class="{ 'opacity-70 cursor-not-allowed': !matchedInput || ignore }">
<template #label>
<p v-if="meta?.name" class="font-mono font-bold px-1.5 py-0.5 border border-[var(--ui-border-accented)] border-dashed rounded-[var(--ui-radius)] bg-[var(--ui-bg-elevated)]">
<p v-if="meta?.name" class="font-mono font-bold px-1.5 py-0.5 border border-(--ui-border-accented) border-dashed rounded-(--ui-radius) bg-(--ui-bg-elevated)">
{{ meta?.name }}
</p>
</template>
<template #description>
<!-- eslint-disable vue/no-v-html -->
<p v-if="meta.description" class="text-neutral-600 dark:text-neutral-400 mt-1" v-html="description" />
<p v-if="meta.description" class="mt-1" v-html="description" />
</template>
<component :is="matchedInput.component" v-if="!ignore && matchedInput" v-model="modelValue" :schema="parsedSchema" />

View File

@@ -5,6 +5,6 @@
viewBox="0 0 1020 200"
fill="none"
xmlns="http://www.w3.org/2000/svg"
class="w-auto h-6 shrink-0 text-[var(--ui-text)]"
><path d="M377 200C379.16 200 381 198.209 381 196V103C381 103 386 112 395 127L434 194C435.785 197.74 439.744 200 443 200H470V50H443C441.202 50 439 51.4941 439 54V148L421 116L385 55C383.248 51.8912 379.479 50 376 50H350V200H377Z" fill="currentColor" /><path d="M726 92H739C742.314 92 745 89.3137 745 86V60H773V92H800V116H773V159C773 169.5 778.057 174 787 174H800V200H783C759.948 200 745 185.071 745 160V116H726V92Z" fill="currentColor" /><path d="M591 92V154C591 168.004 585.742 179.809 578 188C570.258 196.191 559.566 200 545 200C530.434 200 518.742 196.191 511 188C503.389 179.809 498 168.004 498 154V92H514C517.412 92 520.769 92.622 523 95C525.231 97.2459 526 98.5652 526 102V154C526 162.059 526.457 167.037 530 171C533.543 174.831 537.914 176 545 176C552.217 176 555.457 174.831 559 171C562.543 167.037 563 162.059 563 154V102C563 98.5652 563.769 96.378 566 94C567.96 91.9107 570.028 91.9599 573 92C573.411 92.0055 574.586 92 575 92H591Z" fill="currentColor" /><path d="M676 144L710 92H684C680.723 92 677.812 93.1758 676 96L660 120L645 97C643.188 94.1758 639.277 92 636 92H611L645 143L608 200H634C637.25 200 640.182 196.787 642 194L660 167L679 195C680.818 197.787 683.75 200 687 200H713L676 144Z" fill="currentColor" /><path d="M168 200H279C282.542 200 285.932 198.756 289 197C292.068 195.244 295.23 193.041 297 190C298.77 186.959 300.002 183.51 300 179.999C299.998 176.488 298.773 173.04 297 170.001L222 41C220.23 37.96 218.067 35.7552 215 34C211.933 32.2448 207.542 31 204 31C200.458 31 197.067 32.2448 194 34C190.933 35.7552 188.77 37.96 187 41L168 74L130 9.99764C128.228 6.95784 126.068 3.75491 123 2C119.932 0.245087 116.542 0 113 0C109.458 0 106.068 0.245087 103 2C99.9323 3.75491 96.7717 6.95784 95 9.99764L2 170.001C0.226979 173.04 0.00154312 176.488 1.90993e-06 179.999C-0.0015393 183.51 0.229648 186.959 2 190C3.77035 193.04 6.93245 195.244 10 197C13.0675 198.756 16.4578 200 20 200H90C117.737 200 137.925 187.558 152 164L186 105L204 74L259 168H186L168 200ZM89 168H40L113 42L150 105L125.491 147.725C116.144 163.01 105.488 168 89 168Z" fill="var(--ui-color-primary-500)" /><path d="M958 60.0001H938C933.524 60.0001 929.926 59.9395 927 63C924.074 65.8905 925 67.5792 925 72V141C925 151.372 923.648 156.899 919 162C914.352 166.931 908.468 169 899 169C889.705 169 882.648 166.931 878 162C873.352 156.899 873 151.372 873 141V72.0001C873 67.5793 872.926 65.8906 870 63.0001C867.074 59.9396 863.476 60.0001 859 60.0001H840V141C840 159.023 845.016 173.458 855 184C865.156 194.542 879.893 200 899 200C918.107 200 932.844 194.542 943 184C953.156 173.458 958 159.023 958 141V60.0001Z" fill="var(--ui-color-primary-500)" /><path fill-rule="evenodd" clip-rule="evenodd" d="M1000 60.0233L1020 60V77L1020 128V156.007L1020 181L1020 189.004C1020 192.938 1019.98 194.429 1017 197.001C1014.02 199.725 1009.56 200 1005 200H986.001V181.006L986 130.012V70.0215C986 66.1576 986.016 64.5494 989 62.023C991.819 59.6358 995.437 60.0233 1000 60.0233Z" fill="var(--ui-color-primary-500)" /></svg>
class="w-auto h-6 shrink-0 text-(--ui-text)"
><path d="M377 200C379.16 200 381 198.209 381 196V103C381 103 386 112 395 127L434 194C435.785 197.74 439.744 200 443 200H470V50H443C441.202 50 439 51.4941 439 54V148L421 116L385 55C383.248 51.8912 379.479 50 376 50H350V200H377Z" fill="currentColor" /><path d="M726 92H739C742.314 92 745 89.3137 745 86V60H773V92H800V116H773V159C773 169.5 778.057 174 787 174H800V200H783C759.948 200 745 185.071 745 160V116H726V92Z" fill="currentColor" /><path d="M591 92V154C591 168.004 585.742 179.809 578 188C570.258 196.191 559.566 200 545 200C530.434 200 518.742 196.191 511 188C503.389 179.809 498 168.004 498 154V92H514C517.412 92 520.769 92.622 523 95C525.231 97.2459 526 98.5652 526 102V154C526 162.059 526.457 167.037 530 171C533.543 174.831 537.914 176 545 176C552.217 176 555.457 174.831 559 171C562.543 167.037 563 162.059 563 154V102C563 98.5652 563.769 96.378 566 94C567.96 91.9107 570.028 91.9599 573 92C573.411 92.0055 574.586 92 575 92H591Z" fill="currentColor" /><path d="M676 144L710 92H684C680.723 92 677.812 93.1758 676 96L660 120L645 97C643.188 94.1758 639.277 92 636 92H611L645 143L608 200H634C637.25 200 640.182 196.787 642 194L660 167L679 195C680.818 197.787 683.75 200 687 200H713L676 144Z" fill="currentColor" /><path d="M168 200H279C282.542 200 285.932 198.756 289 197C292.068 195.244 295.23 193.041 297 190C298.77 186.959 300.002 183.51 300 179.999C299.998 176.488 298.773 173.04 297 170.001L222 41C220.23 37.96 218.067 35.7552 215 34C211.933 32.2448 207.542 31 204 31C200.458 31 197.067 32.2448 194 34C190.933 35.7552 188.77 37.96 187 41L168 74L130 9.99764C128.228 6.95784 126.068 3.75491 123 2C119.932 0.245087 116.542 0 113 0C109.458 0 106.068 0.245087 103 2C99.9323 3.75491 96.7717 6.95784 95 9.99764L2 170.001C0.226979 173.04 0.00154312 176.488 1.90993e-06 179.999C-0.0015393 183.51 0.229648 186.959 2 190C3.77035 193.04 6.93245 195.244 10 197C13.0675 198.756 16.4578 200 20 200H90C117.737 200 137.925 187.558 152 164L186 105L204 74L259 168H186L168 200ZM89 168H40L113 42L150 105L125.491 147.725C116.144 163.01 105.488 168 89 168Z" fill="var(--ui-primary)" /><path d="M958 60.0001H938C933.524 60.0001 929.926 59.9395 927 63C924.074 65.8905 925 67.5792 925 72V141C925 151.372 923.648 156.899 919 162C914.352 166.931 908.468 169 899 169C889.705 169 882.648 166.931 878 162C873.352 156.899 873 151.372 873 141V72.0001C873 67.5793 872.926 65.8906 870 63.0001C867.074 59.9396 863.476 60.0001 859 60.0001H840V141C840 159.023 845.016 173.458 855 184C865.156 194.542 879.893 200 899 200C918.107 200 932.844 194.542 943 184C953.156 173.458 958 159.023 958 141V60.0001Z" fill="var(--ui-primary)" /><path fill-rule="evenodd" clip-rule="evenodd" d="M1000 60.0233L1020 60V77L1020 128V156.007L1020 181L1020 189.004C1020 192.938 1019.98 194.429 1017 197.001C1014.02 199.725 1009.56 200 1005 200H986.001V181.006L986 130.012V70.0215C986 66.1576 986.016 64.5494 989 62.023C991.819 59.6358 995.437 60.0233 1000 60.0233Z" fill="var(--ui-primary)" /></svg>
</template>

View File

@@ -26,7 +26,7 @@ const attributesSchemas = computed(() => {
<ComponentPropInput
v-for="attributeSchema in attributesSchemas"
:key="attributeSchema.name"
class="border-b last:border-b-0 border-[var(--ui-border)] p-4"
class="border-b last:border-b-0 border-(--ui-border) p-4"
:model-value="modelValue?.[attributeSchema.name]"
:meta="attributeSchema"
@update:model-value="(value: any) => {

View File

@@ -1,10 +1,10 @@
import { createHighlighterCore } from 'shiki/core'
import type { BuiltinLanguage, HighlighterCore } from 'shiki'
import loadWasm from 'shiki/wasm'
import MaterialThemeLighter from 'shiki/themes/material-theme-lighter.mjs'
import MaterialThemePalenight from 'shiki/themes/material-theme-palenight.mjs'
import VueLang from 'shiki/langs/vue.mjs'
import MarkdownLang from 'shiki/langs/markdown.mjs'
import { createOnigurumaEngine } from 'shiki/engine/oniguruma'
export const highlighter = shallowRef<HighlighterCore>()
@@ -16,7 +16,7 @@ export function useShiki() {
highlighter.value = await createHighlighterCore({
themes: [MaterialThemeLighter, MaterialThemePalenight],
langs: [VueLang, MarkdownLang],
loadWasm
engine: createOnigurumaEngine(import('shiki/wasm'))
})
}

View File

@@ -16,12 +16,12 @@ function handleMessage(message) {
async function handleFormatMessage(message) {
if (!globalThis.prettier) {
await Promise.all([
import('https://unpkg.com/prettier@3.3.3/standalone.js'),
import('https://unpkg.com/prettier@3.3.3/plugins/html.js'),
import('https://unpkg.com/prettier@3.3.3/plugins/postcss.js'),
import('https://unpkg.com/prettier@3.3.3/plugins/babel.js'),
import('https://unpkg.com/prettier@3.3.3/plugins/estree.js'),
import('https://unpkg.com/prettier@3.3.3/plugins/typescript.js')
import('https://unpkg.com/prettier@3.5.0/standalone.js'),
import('https://unpkg.com/prettier@3.5.0/plugins/html.js'),
import('https://unpkg.com/prettier@3.5.0/plugins/postcss.js'),
import('https://unpkg.com/prettier@3.5.0/plugins/babel.js'),
import('https://unpkg.com/prettier@3.5.0/plugins/estree.js'),
import('https://unpkg.com/prettier@3.5.0/plugins/typescript.js')
])
}

View File

@@ -12,8 +12,8 @@
"dependencies": {
"@nuxt/ui": "latest",
"knitwork": "^1.2.0",
"nuxt": "^3.15.1",
"prettier": "^3.4.2",
"zod": "^3.24.1"
"nuxt": "^3.15.4",
"prettier": "^3.5.1",
"zod": "^3.24.2"
}
}

View File

@@ -5,7 +5,8 @@ export default defineAppConfig({
duration: 5000
},
theme: {
radius: 0.25
radius: 0.25,
blackAsPrimary: false
},
ui: {
colors: {

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import { withoutTrailingSlash } from 'ufo'
// import { withoutTrailingSlash } from 'ufo'
import colors from 'tailwindcss/colors'
// import { debounce } from 'perfect-debounce'
@@ -22,34 +22,10 @@ const searchTerm = ref('')
// useTrackEvent('Search', { props: { query: `${query} - ${searchTerm.value?.commandPaletteRef.results.length} results` } })
// }, 500))
const links = computed(() => [{
label: 'Docs',
icon: 'i-lucide-square-play',
to: '/getting-started',
active: route.path.startsWith('/getting-started')
}, {
label: 'Components',
icon: 'i-lucide-square-code',
to: '/components',
active: route.path.startsWith('/components')
}, {
label: 'Roadmap',
icon: 'i-lucide-map',
to: '/roadmap'
}, {
label: 'Figma',
icon: 'i-lucide-figma',
to: 'https://www.figma.com/community/file/1288455405058138934',
target: '_blank'
}, {
label: 'Releases',
icon: 'i-lucide-rocket',
to: 'https://github.com/nuxt/ui/releases',
target: '_blank'
}].filter(Boolean))
const links = useLinks()
const color = computed(() => colorMode.value === 'dark' ? (colors as any)[appConfig.ui.colors.neutral][900] : 'white')
const radius = computed(() => `:root { --ui-radius: ${appConfig.theme.radius}rem; }`)
const blackAsPrimary = computed(() => appConfig.theme.blackAsPrimary ? `:root { --ui-primary: black; } .dark { --ui-primary: white; }` : ':root {}')
useHead({
meta: [
@@ -57,11 +33,12 @@ useHead({
{ key: 'theme-color', name: 'theme-color', content: color }
],
link: [
{ rel: 'icon', type: 'image/svg+xml', href: '/icon.svg' },
{ rel: 'canonical', href: `https://ui.nuxt.com${withoutTrailingSlash(route.path)}` }
{ rel: 'icon', type: 'image/svg+xml', href: '/icon.svg' }
// { rel: 'canonical', href: `https://ui.nuxt.com${withoutTrailingSlash(route.path)}` }
],
style: [
{ innerHTML: radius, id: 'nuxt-ui-radius', tagPriority: -2 }
{ innerHTML: radius, id: 'nuxt-ui-radius', tagPriority: -2 },
{ innerHTML: blackAsPrimary, id: 'nuxt-ui-black-as-primary', tagPriority: -2 }
],
htmlAttrs: {
lang: 'en'
@@ -81,7 +58,7 @@ provide('navigation', mappedNavigation)
<template>
<UApp :toaster="appConfig.toaster">
<NuxtLoadingIndicator color="#FFF" />
<NuxtLoadingIndicator color="var(--ui-primary)" :height="2" />
<template v-if="!route.path.startsWith('/examples')">
<!-- <Banner /> -->
@@ -94,7 +71,7 @@ provide('navigation', mappedNavigation)
</NuxtLayout>
<template v-if="!route.path.startsWith('/examples')">
<!-- <Footer /> -->
<Footer />
<ClientOnly>
<LazyUContentSearch
@@ -110,7 +87,7 @@ provide('navigation', mappedNavigation)
items: modules
}]"
:navigation="filteredNavigation"
:fuse="{ resultLimit: 42 }"
:fuse="{ resultLimit: 100 }"
/>
</ClientOnly>
</template>
@@ -118,39 +95,5 @@ provide('navigation', mappedNavigation)
</template>
<style>
@import "tailwindcss";
@import "@nuxt/ui-pro";
@source "../content";
@theme {
--container-8xl: 90rem;
--font-sans: 'Public Sans', sans-serif;
--color-green-50: #EFFDF5;
--color-green-100: #D9FBE8;
--color-green-200: #B3F5D1;
--color-green-300: #75EDAE;
--color-green-400: #00DC82;
--color-green-500: #00C16A;
--color-green-600: #00A155;
--color-green-700: #007F45;
--color-green-800: #016538;
--color-green-900: #0A5331;
--color-green-950: #052E16;
}
:root {
--ui-container: var(--container-8xl);
}
html[data-framework="nuxt"] .vue-only,
html[data-framework="vue"] .nuxt-only,
html[data-module="ui-pro"] .ui-only,
html[data-module="ui"] .ui-pro-only {
display: none;
}
/* Safelist (do not remove): [&>div]:*:my-0 [&>div]:*:w-full */
/* Safelist (do not remove): [&>div]:*:my-0 [&>div]:*:w-full h-64 !px-0 !py-0 !pt-0 !pb-0 !p-0 !justify-start !min-h-96 h-136 */
</style>

View File

@@ -0,0 +1,33 @@
@import "tailwindcss";
@import "@nuxt/ui-pro";
@source "../../../content";
@theme {
--container-8xl: 90rem;
--font-sans: 'Public Sans', sans-serif;
--color-green-50: #EFFDF5;
--color-green-100: #D9FBE8;
--color-green-200: #B3F5D1;
--color-green-300: #75EDAE;
--color-green-400: #00DC82;
--color-green-500: #00C16A;
--color-green-600: #00A155;
--color-green-700: #007F45;
--color-green-800: #016538;
--color-green-900: #0A5331;
--color-green-950: #052E16;
}
:root {
--ui-container: var(--container-8xl);
}
html[data-framework="nuxt"] .vue-only,
html[data-framework="vue"] .nuxt-only,
html[data-module="ui-pro"] .ui-only,
html[data-module="ui"] .ui-pro-only {
display: none;
}

View File

@@ -1,21 +1,18 @@
<script setup lang="ts">
const route = useRoute()
// const items = [{
// label: 'Figma Kit',
// to: 'https://www.figma.com/community/file/1288455405058138934',
// target: '_blank'
// }, {
// label: 'Playground',
// to: 'https://stackblitz.com/edit/nuxt-ui',
// target: '_blank'
// }, {
// label: 'Roadmap',
// to: '/roadmap'
// }, {
// label: 'Releases',
// to: '/releases'
// }]
const links = [{
label: 'Figma',
to: '/figma'
}, {
label: 'Roadmap',
to: '/roadmap'
}, {
label: 'Terms',
to: '/pro/terms'
}, {
label: 'Releases',
to: 'https://github.com/nuxt/ui/releases',
target: '_blank'
}]
</script>
<template>
@@ -23,15 +20,12 @@ const route = useRoute()
<UFooter>
<template #left>
<NuxtLink v-if="route.path.startsWith('/pro')" to="https://ui.nuxt.com/pro/purchase" target="_blank" class="text-sm text-[var(--ui-text-muted)]">
Purchase <span class="text-[var(--ui-text-highlighted)]">Nuxt UI Pro</span>
</NuxtLink>
<NuxtLink v-else to="https://github.com/nuxt/ui" target="_blank" class="text-sm text-[var(--ui-text-muted)]">
Published under <span class="text-[var(--ui-text-highlighted)]">MIT License</span>
<NuxtLink to="https://github.com/nuxt/ui" target="_blank" class="text-sm text-(--ui-text-muted)">
Published under <span class="text-(--ui-text-highlighted)">MIT License</span>
</NuxtLink>
</template>
<!-- <UNavigationMenu :items="items" variant="link" color="neutral" /> -->
<UNavigationMenu :items="links" variant="link" color="neutral" />
<template #right>
<UButton
@@ -41,6 +35,7 @@ const route = useRoute()
target="_blank"
color="neutral"
variant="ghost"
size="sm"
/>
<UButton
aria-label="Nuxt UI on Discord"
@@ -49,6 +44,7 @@ const route = useRoute()
target="_blank"
color="neutral"
variant="ghost"
size="sm"
/>
<UButton
aria-label="Nuxt on X"
@@ -57,6 +53,16 @@ const route = useRoute()
target="_blank"
color="neutral"
variant="ghost"
size="sm"
/>
<UButton
aria-label="Nuxt on BlueSky"
icon="i-simple-icons-bluesky"
to="https://bsky.app/profile/nuxt.com"
target="_blank"
color="neutral"
variant="ghost"
size="sm"
/>
<UButton
aria-label="Nuxt UI on GitHub"
@@ -65,6 +71,7 @@ const route = useRoute()
target="_blank"
color="neutral"
variant="ghost"
size="sm"
/>
</template>
</UFooter>

View File

@@ -19,10 +19,10 @@ watch(framework, () => {
:content="false"
color="neutral"
:ui="{
indicator: 'bg-[var(--ui-bg)]',
trigger: 'px-1 data-[state=active]:text-[var(--ui-text-highlighted)]'
indicator: 'bg-(--ui-bg)',
trigger: 'px-1 data-[state=active]:text-(--ui-text-highlighted)'
}"
size="sm"
size="xs"
@update:model-value="(framework = $event as string)"
/>
</template>

View File

@@ -27,7 +27,7 @@ const items = computed(() => props.links.map(({ icon, ...link }) => link))
<template>
<UHeader :ui="{ left: 'min-w-0' }" mode="drawer" :menu="{ shouldScaleBackground: true }">
<template #left>
<NuxtLink to="/" class="flex items-end gap-2 font-bold text-xl text-[var(--ui-text-highlighted)] min-w-0 focus-visible:outline-[var(--ui-primary)] shrink-0" aria-label="Nuxt UI">
<NuxtLink to="/" class="flex items-end gap-2 font-bold text-xl text-(--ui-text-highlighted) min-w-0 focus-visible:outline-(--ui-primary) shrink-0" aria-label="Nuxt UI">
<LogoPro class="w-auto h-6 shrink-0 ui-pro-only" />
<Logo class="w-auto h-6 shrink-0 ui-only" />
</NuxtLink>
@@ -45,7 +45,7 @@ const items = computed(() => props.links.map(({ icon, ...link }) => link))
trailing-icon="i-lucide-chevron-down"
size="xs"
class="-mb-[6px] font-semibold rounded-full truncate"
:class="[open && 'bg-[var(--ui-primary)]/15 ']"
:class="[open && 'bg-(--ui-primary)/15 ']"
:ui="{
trailingIcon: ['transition-transform duration-200', open ? 'rotate-180' : undefined].filter(Boolean).join(' ')
}"
@@ -74,7 +74,7 @@ const items = computed(() => props.links.map(({ icon, ...link }) => link))
</UTooltip>
</template>
<template #content>
<template #body>
<UNavigationMenu orientation="vertical" :items="links" class="-mx-2.5" />
<USeparator type="dashed" class="mt-4 mb-6" />

View File

@@ -1,14 +1,22 @@
<script setup lang="ts">
defineProps<{
collapsed?: boolean
}>()
</script>
<template>
<svg width="1352" height="200" viewBox="0 0 1352 200" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M377 200C379.16 200 381 198.209 381 196V103C381 103 386 112 395 127L434 194C435.785 197.74 439.744 200 443 200H470V50H443C441.202 50 439 51.4941 439 54V148L421 116L385 55C383.248 51.8912 379.479 50 376 50H350V200H377Z" fill="currentColor" />
<path d="M726 92H739C742.314 92 745 89.3137 745 86V60H773V92H800V116H773V159C773 169.5 778.057 174 787 174H800V200H783C759.948 200 745 185.071 745 160V116H726V92Z" fill="currentColor" />
<path d="M591 92V154C591 168.004 585.742 179.809 578 188C570.258 196.191 559.566 200 545 200C530.434 200 518.742 196.191 511 188C503.389 179.809 498 168.004 498 154V92H514C517.412 92 520.769 92.622 523 95C525.231 97.2459 526 98.5652 526 102V154C526 162.059 526.457 167.037 530 171C533.543 174.831 537.914 176 545 176C552.217 176 555.457 174.831 559 171C562.543 167.037 563 162.059 563 154V102C563 98.5652 563.769 96.378 566 94C567.96 91.9107 570.028 91.9599 573 92C573.411 92.0055 574.586 92 575 92H591Z" fill="currentColor" />
<path d="M676 144L710 92H684C680.723 92 677.812 93.1758 676 96L660 120L645 97C643.188 94.1758 639.277 92 636 92H611L645 143L608 200H634C637.25 200 640.182 196.787 642 194L660 167L679 195C680.818 197.787 683.75 200 687 200H713L676 144Z" fill="currentColor" />
<svg :viewBox="collapsed? '0 0 320 200' : '0 0 1352 200'" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M168 200H279C282.542 200 285.932 198.756 289 197C292.068 195.244 295.23 193.041 297 190C298.77 186.959 300.002 183.51 300 179.999C299.998 176.488 298.773 173.04 297 170.001L222 41C220.23 37.96 218.067 35.7552 215 34C211.933 32.2448 207.542 31 204 31C200.458 31 197.067 32.2448 194 34C190.933 35.7552 188.77 37.96 187 41L168 74L130 9.99764C128.228 6.95784 126.068 3.75491 123 2C119.932 0.245087 116.542 0 113 0C109.458 0 106.068 0.245087 103 2C99.9323 3.75491 96.7717 6.95784 95 9.99764L2 170.001C0.226979 173.04 0.00154312 176.488 1.90993e-06 179.999C-0.0015393 183.51 0.229648 186.959 2 190C3.77035 193.04 6.93245 195.244 10 197C13.0675 198.756 16.4578 200 20 200H90C117.737 200 137.925 187.558 152 164L186 105L204 74L259 168H186L168 200ZM89 168H40L113 42L150 105L125.491 147.725C116.144 163.01 105.488 168 89 168Z" fill="var(--ui-primary)" />
<path d="M958 60.0001H938C933.524 60.0001 929.926 59.9395 927 63C924.074 65.8905 925 67.5792 925 72V141C925 151.372 923.648 156.899 919 162C914.352 166.931 908.468 169 899 169C889.705 169 882.648 166.931 878 162C873.352 156.899 873 151.372 873 141V72.0001C873 67.5793 872.926 65.8906 870 63.0001C867.074 59.9396 863.476 60.0001 859 60.0001H840V141C840 159.023 845.016 173.458 855 184C865.156 194.542 879.893 200 899 200C918.107 200 932.844 194.542 943 184C953.156 173.458 958 159.023 958 141V60.0001Z" fill="currentColor" />
<path fill-rule="evenodd" clip-rule="evenodd" d="M1000 60.0233L1020 60V77L1020 128V156.007L1020 181L1020 189.004C1020 192.938 1019.98 194.429 1017 197.001C1014.02 199.725 1009.56 200 1005 200H986.001V181.006L986 130.012V70.0215C986 66.1576 986.016 64.5494 989 62.023C991.819 59.6358 995.437 60.0233 1000 60.0233Z" fill="currentColor" />
<path d="M1060 200V60H1117C1126.67 60 1134.98 61.2896 1142 65C1149.16 68.7104 1155.29 74.3744 1159 81C1162.71 87.6256 1164 95.3867 1164 104C1164 112.481 1162.71 120.374 1159 127C1155.29 133.626 1149.16 138.157 1142 142C1134.98 145.71 1126.67 148 1117 148H1090V200H1060ZM1115 123C1121.63 123 1126.69 121.578 1130 118C1133.31 114.29 1135 109.433 1135 104C1135 98.567 1133.31 93.5778 1130 90C1126.69 86.2896 1121.63 85 1115 85H1090V123H1115Z" fill="var(--ui-primary)" />
<path d="M1226 123C1219.37 123 1214.31 124.965 1211 130C1207.69 135.035 1206 142.122 1206 151V200H1178V100H1200C1203.31 100 1206 102.686 1206 106V116C1208.65 109.904 1211.16 106.518 1215 104C1218.98 101.482 1224.77 100 1231 100H1242V123H1226Z" fill="var(--ui-primary)" />
<path d="M1299 200C1288.93 200 1280.08 197.373 1272 193C1263.92 188.495 1257.51 182.818 1253 175C1248.49 167.049 1246 157.806 1246 148C1246 138.194 1248.49 129.818 1253 122C1257.51 114.049 1263.92 107.373 1272 103C1280.08 98.4946 1288.93 97 1299 97C1309.07 97 1318.92 98.4946 1327 103C1335.08 107.373 1340.49 114.049 1345 122C1349.51 129.818 1352 138.194 1352 148C1352 157.806 1349.51 167.049 1345 175C1340.49 182.818 1335.08 188.495 1327 193C1318.92 197.373 1309.07 200 1299 200ZM1299 176C1306.42 176 1312.36 173.168 1317 168C1321.64 162.832 1324 156.216 1324 148C1324 139.652 1321.64 133.168 1317 128C1312.36 122.832 1306.42 120 1299 120C1291.58 120 1285.64 122.832 1281 128C1276.36 133.168 1274 139.652 1274 148C1274 156.216 1276.36 162.832 1281 168C1285.64 173.168 1291.58 176 1299 176Z" fill="var(--ui-primary)" />
<g v-if="!collapsed">
<path d="M377 200C379.16 200 381 198.209 381 196V103C381 103 386 112 395 127L434 194C435.785 197.74 439.744 200 443 200H470V50H443C441.202 50 439 51.4941 439 54V148L421 116L385 55C383.248 51.8912 379.479 50 376 50H350V200H377Z" fill="currentColor" />
<path d="M726 92H739C742.314 92 745 89.3137 745 86V60H773V92H800V116H773V159C773 169.5 778.057 174 787 174H800V200H783C759.948 200 745 185.071 745 160V116H726V92Z" fill="currentColor" />
<path d="M591 92V154C591 168.004 585.742 179.809 578 188C570.258 196.191 559.566 200 545 200C530.434 200 518.742 196.191 511 188C503.389 179.809 498 168.004 498 154V92H514C517.412 92 520.769 92.622 523 95C525.231 97.2459 526 98.5652 526 102V154C526 162.059 526.457 167.037 530 171C533.543 174.831 537.914 176 545 176C552.217 176 555.457 174.831 559 171C562.543 167.037 563 162.059 563 154V102C563 98.5652 563.769 96.378 566 94C567.96 91.9107 570.028 91.9599 573 92C573.411 92.0055 574.586 92 575 92H591Z" fill="currentColor" />
<path d="M676 144L710 92H684C680.723 92 677.812 93.1758 676 96L660 120L645 97C643.188 94.1758 639.277 92 636 92H611L645 143L608 200H634C637.25 200 640.182 196.787 642 194L660 167L679 195C680.818 197.787 683.75 200 687 200H713L676 144Z" fill="currentColor" />
<path d="M958 60.0001H938C933.524 60.0001 929.926 59.9395 927 63C924.074 65.8905 925 67.5792 925 72V141C925 151.372 923.648 156.899 919 162C914.352 166.931 908.468 169 899 169C889.705 169 882.648 166.931 878 162C873.352 156.899 873 151.372 873 141V72.0001C873 67.5793 872.926 65.8906 870 63.0001C867.074 59.9396 863.476 60.0001 859 60.0001H840V141C840 159.023 845.016 173.458 855 184C865.156 194.542 879.893 200 899 200C918.107 200 932.844 194.542 943 184C953.156 173.458 958 159.023 958 141V60.0001Z" fill="currentColor" />
<path fill-rule="evenodd" clip-rule="evenodd" d="M1000 60.0233L1020 60V77L1020 128V156.007L1020 181L1020 189.004C1020 192.938 1019.98 194.429 1017 197.001C1014.02 199.725 1009.56 200 1005 200H986.001V181.006L986 130.012V70.0215C986 66.1576 986.016 64.5494 989 62.023C991.819 59.6358 995.437 60.0233 1000 60.0233Z" fill="currentColor" />
<path d="M1060 200V60H1117C1126.67 60 1134.98 61.2896 1142 65C1149.16 68.7104 1155.29 74.3744 1159 81C1162.71 87.6256 1164 95.3867 1164 104C1164 112.481 1162.71 120.374 1159 127C1155.29 133.626 1149.16 138.157 1142 142C1134.98 145.71 1126.67 148 1117 148H1090V200H1060ZM1115 123C1121.63 123 1126.69 121.578 1130 118C1133.31 114.29 1135 109.433 1135 104C1135 98.567 1133.31 93.5778 1130 90C1126.69 86.2896 1121.63 85 1115 85H1090V123H1115Z" fill="var(--ui-primary)" />
<path d="M1226 123C1219.37 123 1214.31 124.965 1211 130C1207.69 135.035 1206 142.122 1206 151V200H1178V100H1200C1203.31 100 1206 102.686 1206 106V116C1208.65 109.904 1211.16 106.518 1215 104C1218.98 101.482 1224.77 100 1231 100H1242V123H1226Z" fill="var(--ui-primary)" />
<path d="M1299 200C1288.93 200 1280.08 197.373 1272 193C1263.92 188.495 1257.51 182.818 1253 175C1248.49 167.049 1246 157.806 1246 148C1246 138.194 1248.49 129.818 1253 122C1257.51 114.049 1263.92 107.373 1272 103C1280.08 98.4946 1288.93 97 1299 97C1309.07 97 1318.92 98.4946 1327 103C1335.08 107.373 1340.49 114.049 1345 122C1349.51 129.818 1352 138.194 1352 148C1352 157.806 1349.51 167.049 1345 175C1340.49 182.818 1335.08 188.495 1327 193C1318.92 197.373 1309.07 200 1299 200ZM1299 176C1306.42 176 1312.36 173.168 1317 168C1321.64 162.832 1324 156.216 1324 148C1324 139.652 1321.64 133.168 1317 128C1312.36 122.832 1306.42 120 1299 120C1291.58 120 1285.64 122.832 1281 128C1276.36 133.168 1274 139.652 1274 148C1274 156.216 1276.36 162.832 1281 168C1285.64 173.168 1291.58 176 1299 176Z" fill="var(--ui-primary)" />
</g>
</svg>
</template>

View File

@@ -19,10 +19,10 @@ watch(module, () => {
:content="false"
color="neutral"
:ui="{
indicator: 'bg-[var(--ui-bg)]',
trigger: 'px-1 data-[state=active]:text-[var(--ui-text-highlighted)]'
indicator: 'bg-(--ui-bg)',
trigger: 'px-1 data-[state=active]:text-(--ui-text-highlighted)'
}"
size="sm"
size="xs"
@update:model-value="(module = $event as string)"
/>
</template>

View File

@@ -0,0 +1,28 @@
<template>
<div class="relative">
<UPageCard
variant="subtle"
class="rounded-[calc(var(--ui-radius)*6)]"
>
<video
class="rounded-[calc(var(--ui-radius)*2)]"
preload="none"
poster="https://res.cloudinary.com/nuxt/video/upload/so_3.3/v1708511800/ui-pro/video-nuxt-ui-pro_kwfbdh.jpg"
:controls="true"
>
<source
src="https://res.cloudinary.com/nuxt/video/upload/v1708511800/ui-pro/video-nuxt-ui-pro_kwfbdh.webm"
type="video/webm"
>
<source
src="https://res.cloudinary.com/nuxt/video/upload/v1708511800/ui-pro/video-nuxt-ui-pro_kwfbdh.mp4"
type="video/mp4"
>
<source
src="https://res.cloudinary.com/nuxt/video/upload/v1708511800/ui-pro/video-nuxt-ui-pro_kwfbdh.ogg"
type="video/ogg"
>
</video>
</UPageCard>
</div>
</template>

File diff suppressed because one or more lines are too long

View File

@@ -211,7 +211,7 @@ ${props.slots?.default}
`
for (const key of props.external) {
const cast = props.cast?.[key]
const value = cast ? castMap[cast]!.template(componentProps[key]) : json5.stringify(componentProps[key], null, 2).replace(/,([ |\t\n]+[}|\]])/g, '$1')
const value = cast ? castMap[cast]!.template(componentProps[key]) : json5.stringify(componentProps[key], null, 2)?.replace(/,([ |\t\n]+[}|\]])/g, '$1')
code += `const ${key === 'modelValue' ? 'value' : key} = ref(${value})
`
@@ -316,15 +316,15 @@ const { data: ast } = await useAsyncData(`component-code-${name}-${hash({ props:
<template>
<div class="my-5">
<div>
<div v-if="options.length" class="flex items-center gap-2.5 border border-[var(--ui-border-muted)] border-b-0 relative rounded-t-[calc(var(--ui-radius)*1.5)] px-4 py-2.5 overflow-x-auto">
<div v-if="options.length" class="flex items-center gap-2.5 border border-(--ui-border-muted) border-b-0 relative rounded-t-[calc(var(--ui-radius)*1.5)] px-4 py-2.5 overflow-x-auto">
<template v-for="option in options" :key="option.name">
<UFormField
:label="option.label"
size="sm"
class="inline-flex ring ring-[var(--ui-border-accented)] rounded-[var(--ui-radius)]"
class="inline-flex ring ring-(--ui-border-accented) rounded-(--ui-radius)"
:ui="{
wrapper: 'bg-[var(--ui-bg-elevated)]/50 rounded-l-[var(--ui-radius)] flex border-r border-[var(--ui-border-accented)]',
label: 'text-[var(--ui-text-muted)] px-2 py-1.5',
wrapper: 'bg-(--ui-bg-elevated)/50 rounded-l-(--ui-radius) flex border-r border-(--ui-border-accented)',
label: 'text-(--ui-text-muted) px-2 py-1.5',
container: 'mt-0'
}"
>
@@ -335,7 +335,7 @@ const { data: ast } = await useAsyncData(`component-code-${name}-${hash({ props:
value-key="value"
color="neutral"
variant="soft"
class="rounded-[var(--ui-radius)] rounded-l-none min-w-12"
class="rounded-(--ui-radius) rounded-l-none min-w-12"
:class="[option.name.toLowerCase().endsWith('color') && 'pl-6']"
:ui="{ itemLeadingChip: 'size-2' }"
@update:model-value="setComponentProp(option.name, $event)"
@@ -357,14 +357,14 @@ const { data: ast } = await useAsyncData(`component-code-${name}-${hash({ props:
:model-value="getComponentProp(option.name)"
color="neutral"
variant="soft"
:ui="{ base: 'rounded-[var(--ui-radius)] rounded-l-none min-w-12' }"
:ui="{ base: 'rounded-(--ui-radius) rounded-l-none min-w-12' }"
@update:model-value="setComponentProp(option.name, $event)"
/>
</UFormField>
</template>
</div>
<div v-if="component" class="flex justify-center border border-b-0 border-[var(--ui-border-muted)] relative p-4 z-[1]" :class="[!options.length && 'rounded-t-[calc(var(--ui-radius)*1.5)]', props.class, { 'overflow-hidden': props.overflowHidden }]">
<div v-if="component" class="flex justify-center border border-b-0 border-(--ui-border-muted) relative p-4 z-[1]" :class="[!options.length && 'rounded-t-[calc(var(--ui-radius)*1.5)]', props.class, { 'overflow-hidden': props.overflowHidden }]">
<component :is="component" v-bind="{ ...componentProps, ...componentEvents }">
<template v-for="slot in Object.keys(slots || {})" :key="slot" #[slot]>
<slot :name="slot" mdc-unwrap="p">

View File

@@ -132,18 +132,25 @@ const optionsValues = ref(props.options?.reduce((acc, option) => {
return acc
}, {} as Record<string, any>) || {})
const urlSearchParams = computed(() => new URLSearchParams({
...optionsValues.value,
...componentProps,
width: Math.round(width.value).toString()
}).toString())
const urlSearchParams = computed(() => {
const params = {
...optionsValues.value,
...componentProps
}
if (!props.iframeMobile) {
params.width = Math.round(width.value).toString()
}
return new URLSearchParams(params).toString()
})
</script>
<template>
<div ref="el" class="my-5">
<template v-if="preview">
<div class="border border-[var(--ui-border-muted)] relative z-[1]" :class="[{ 'border-b-0 rounded-t-[calc(var(--ui-radius)*1.5)]': props.source, 'rounded-[calc(var(--ui-radius)*1.5)]': !props.source, 'overflow-hidden': props.overflowHidden }]">
<div v-if="props.options?.length || !!slots.options" class="flex gap-4 p-4 border-b border-[var(--ui-border-muted)]">
<div class="border border-(--ui-border-muted) relative z-[1]" :class="[{ 'border-b-0 rounded-t-[calc(var(--ui-radius)*1.5)]': props.source, 'rounded-[calc(var(--ui-radius)*1.5)]': !props.source, 'overflow-hidden': props.overflowHidden }]">
<div v-if="props.options?.length || !!slots.options" class="flex gap-4 p-4 border-b border-(--ui-border-muted)">
<slot name="options" />
<UFormField
@@ -152,10 +159,10 @@ const urlSearchParams = computed(() => new URLSearchParams({
:label="option.label"
:name="option.name"
size="sm"
class="inline-flex ring ring-[var(--ui-border-accented)] rounded-[var(--ui-radius)]"
class="inline-flex ring ring-(--ui-border-accented) rounded-(--ui-radius)"
:ui="{
wrapper: 'bg-[var(--ui-bg-elevated)]/50 rounded-l-[var(--ui-radius)] flex border-r border-[var(--ui-border-accented)]',
label: 'text-[var(--ui-text-muted)] px-2 py-1.5',
wrapper: 'bg-(--ui-bg-elevated)/50 rounded-l-(--ui-radius) flex border-r border-(--ui-border-accented)',
label: 'text-(--ui-text-muted) px-2 py-1.5',
container: 'mt-0'
}"
>
@@ -167,7 +174,7 @@ const urlSearchParams = computed(() => new URLSearchParams({
:value-key="option.name.toLowerCase().endsWith('color') ? 'value' : undefined"
color="neutral"
variant="soft"
class="rounded-[var(--ui-radius)] rounded-l-none min-w-12"
class="rounded-(--ui-radius) rounded-l-none min-w-12"
:multiple="option.multiple"
:class="[option.name.toLowerCase().endsWith('color') && 'pl-6']"
:ui="{ itemLeadingChip: 'size-2' }"
@@ -188,7 +195,7 @@ const urlSearchParams = computed(() => new URLSearchParams({
:model-value="get(optionsValues, option.name)"
color="neutral"
variant="soft"
:ui="{ base: 'rounded-[var(--ui-radius)] rounded-l-none min-w-12' }"
:ui="{ base: 'rounded-(--ui-radius) rounded-l-none min-w-12' }"
@update:model-value="set(optionsValues, option.name, $event)"
/>
</UFormField>

View File

@@ -112,7 +112,7 @@ const metaProps: ComputedRef<ComponentMeta['props']> = computed(() => {
<ProseTd>
<HighlightInlineType v-if="prop.type" :type="prop.type" />
<MDC v-if="prop.description" :value="prop.description" class="text-[var(--ui-text-toned)] mt-1" />
<MDC v-if="prop.description" :value="prop.description" class="text-(--ui-text-toned) mt-1" />
<ComponentPropsLinks v-if="prop.tags?.length" :prop="prop" />
<ComponentPropsSchema v-if="prop.schema" :prop="prop" :ignore="ignore" />

View File

@@ -40,7 +40,7 @@ const schemaProps = computed(() => {
<ProseLi v-for="schemaProp in schemaProps" :key="schemaProp.name">
<HighlightInlineType :type="`${schemaProp.name}${schemaProp.required === false ? '?' : ''}: ${schemaProp.type}`" />
<MDC v-if="schemaProp.description" :value="schemaProp.description" class="text-[var(--ui-text-muted)] my-1" />
<MDC v-if="schemaProp.description" :value="schemaProp.description" class="text-(--ui-text-muted) my-1" />
</ProseLi>
</ProseUl>
</ProseCollapsible>

View File

@@ -36,7 +36,7 @@ const meta = await fetchComponentMeta(name as any)
<ProseTd>
<HighlightInlineType v-if="slot.type" :type="slot.type" />
<MDC v-if="slot.description" :value="slot.description" class="text-[var(--ui-text-toned)] mt-1" />
<MDC v-if="slot.description" :value="slot.description" class="text-(--ui-text-toned) mt-1" />
</ProseTd>
</ProseTr>
</ProseTbody>

View File

@@ -1,6 +1,7 @@
<script setup lang="ts">
import json5 from 'json5'
import { camelCase } from 'scule'
import { hash } from 'ohash'
import * as theme from '#build/ui'
import * as themePro from '#build/ui-pro'
@@ -14,7 +15,8 @@ const props = defineProps<{
const route = useRoute()
const { framework } = useSharedData()
const name = camelCase(props.slug ?? route.params.slug?.[route.params.slug.length - 1] ?? '')
const name = props.slug ?? route.params.slug?.[route.params.slug.length - 1] ?? ''
const camelName = camelCase(name)
const strippedCompoundVariants = ref(false)
@@ -22,7 +24,7 @@ const computedTheme = computed(() => props.pro ? props.prose ? themePro.prose :
const strippedTheme = computed(() => {
const strippedTheme = {
...(computedTheme.value as any)[name]
...(computedTheme.value as any)[camelName]
}
if (strippedTheme?.compoundVariants) {
@@ -62,8 +64,8 @@ const component = computed(() => {
const baseKey = props.pro ? 'uiPro' : 'ui'
const content = props.prose
? { prose: { [name]: strippedTheme.value } }
: { [name]: strippedTheme.value }
? { prose: { [camelName]: strippedTheme.value } }
: { [camelName]: strippedTheme.value }
if (props.extra?.length) {
props.extra.forEach((extra) => {
@@ -77,7 +79,14 @@ const component = computed(() => {
}
})
const { data: ast } = await useAsyncData(`component-theme-${name}`, async () => {
const themeLink = computed(() => {
const repo = props.pro ? 'ui-pro' : 'ui'
const slug = name.startsWith('content') ? `content/${name}` : name
return `https://github.com/nuxt/${repo}/blob/v3/src/theme/${slug}.ts`
})
const { data: ast } = await useAsyncData(`component-theme-${camelName}-${hash({ props })}`, async () => {
const md = `
::code-collapse{class="nuxt-only"}
@@ -109,7 +118,7 @@ export default defineConfig({
${strippedCompoundVariants.value
? `
::callout{icon="i-simple-icons-github" to="https://github.com/nuxt/ui/blob/v3/src/theme/${name}.ts"}
::callout{icon="i-simple-icons-github" to="${themeLink.value}" title="Compound variants"}
Some colors in \`compoundVariants\` are omitted for readability. Check out the source code on GitHub.
::`
: ''}

View File

@@ -1,6 +1,6 @@
<template>
<div class="relative overflow-hidden rounded-[var(--ui-radius)] border border-dashed border-[var(--ui-border-accented)] opacity-75 px-4 flex items-center justify-center">
<svg class="absolute inset-0 h-full w-full stroke-[var(--ui-border-inverted)]/10" fill="none">
<div class="relative overflow-hidden rounded-(--ui-radius) border border-dashed border-(--ui-border-accented) opacity-75 px-4 flex items-center justify-center">
<svg class="absolute inset-0 h-full w-full stroke-(--ui-border-inverted)/10" fill="none">
<defs>
<pattern
id="pattern-5c1e4f0e-62d5-498b-8ff0-cf77bb448c8e"

View File

@@ -10,19 +10,20 @@ const props = withDefaults(defineProps<{
function getEmojiFlag(locale: string): string {
const languageToCountry: Record<string, string> = {
ar: 'sa',
bn: 'bd',
cs: 'cz',
da: 'dk',
el: 'gr',
et: 'ee',
en: 'gb',
hi: 'in',
ja: 'jp',
kh: 'km',
km: 'kh',
ko: 'kr',
nb: 'no',
sv: 'se',
uk: 'ua',
vi: 'vn',
zh: 'cn'
vi: 'vn'
}
const baseLanguage = locale.split('-')[0]?.toLowerCase() || locale

View File

@@ -18,7 +18,7 @@ const items = [
<template>
<UAccordion :items="items">
<template #content="{ item }">
<p class="pb-3.5 text-sm text-[var(--ui-text-muted)]">
<p class="pb-3.5 text-sm text-(--ui-text-muted)">
This is the {{ item.label }} panel.
</p>
</template>

View File

@@ -22,7 +22,7 @@ const items = [
<template>
<UAccordion :items="items">
<template #colors="{ item }">
<p class="text-sm pb-3.5 text-[var(--ui-primary)]">
<p class="text-sm pb-3.5 text-(--ui-primary)">
{{ item.content }}
</p>
</template>

View File

@@ -3,7 +3,7 @@
<ULink
to="https://github.com/benjamincanac"
target="_blank"
class="hover:ring-[var(--ui-primary)] transition"
class="hover:ring-(--ui-primary) transition"
raw
>
<UAvatar
@@ -15,7 +15,7 @@
<ULink
to="https://github.com/romhml"
target="_blank"
class="hover:ring-[var(--ui-primary)] transition"
class="hover:ring-(--ui-primary) transition"
raw
>
<UAvatar
@@ -27,7 +27,7 @@
<ULink
to="https://github.com/noook"
target="_blank"
class="hover:ring-[var(--ui-primary)] transition"
class="hover:ring-(--ui-primary) transition"
raw
>
<UAvatar

View File

@@ -14,7 +14,7 @@ const items = [{
<template>
<UBreadcrumb :items="items">
<template #separator>
<span class="mx-2 text-[var(--ui-text-muted)]">/</span>
<span class="mx-2 text-(--ui-text-muted)">/</span>
</template>
</UBreadcrumb>
</template>

View File

@@ -0,0 +1,7 @@
<template>
<UButtonGroup>
<UBadge color="neutral" variant="outline" size="lg" label="https://" />
<UInput color="neutral" variant="outline" placeholder="www.example.com" />
</UButtonGroup>
</template>

View File

@@ -11,7 +11,7 @@ const modelValue = shallowRef(new CalendarDate(2022, 1, 10))
<template>
<UPopover>
<UButton color="neutral" variant="subtle" icon="i-lucide-calendar">
{{ df.format(modelValue.toDate(getLocalTimeZone())) }}
{{ modelValue ? df.format(modelValue.toDate(getLocalTimeZone())) : 'Select a date' }}
</UButton>
<template #content>

View File

@@ -1,13 +1,13 @@
<script setup lang="ts">
import type { DateValue } from '@internationalized/date'
import { CalendarDate } from '@internationalized/date'
import type { Matcher } from 'reka-ui/date'
const modelValue = shallowRef({
start: new CalendarDate(2022, 1, 1),
end: new CalendarDate(2022, 1, 9)
})
const isDateDisabled: Matcher = (date) => {
const isDateDisabled = (date: DateValue) => {
return date.day >= 10 && date.day <= 16
}
</script>

View File

@@ -1,13 +1,13 @@
<script setup lang="ts">
import type { DateValue } from '@internationalized/date'
import { CalendarDate } from '@internationalized/date'
import type { Matcher } from 'reka-ui/date'
const modelValue = shallowRef({
start: new CalendarDate(2022, 1, 1),
end: new CalendarDate(2022, 1, 9)
})
const isDateUnavailable: Matcher = (date) => {
const isDateUnavailable = (date: DateValue) => {
return date.day >= 10 && date.day <= 16
}
</script>

View File

@@ -29,31 +29,45 @@ const groups = [{
items: [
{
label: 'Benjamin Canac',
suffix: 'benjamincanac'
suffix: 'benjamincanac',
to: 'https://github.com/benjamincanac',
target: '_blank'
},
{
label: 'Sylvain Marroufin',
suffix: 'smarroufin'
suffix: 'smarroufin',
to: 'https://github.com/smarroufin',
target: '_blank'
},
{
label: 'Sébastien Chopin',
suffix: 'atinux'
suffix: 'atinux',
to: 'https://github.com/atinux',
target: '_blank'
},
{
label: 'Romain Hamel',
suffix: 'romhml'
suffix: 'romhml',
to: 'https://github.com/romhml',
target: '_blank'
},
{
label: 'Haytham A. Salama',
suffix: 'Haythamasalama'
suffix: 'Haythamasalama',
to: 'https://github.com/Haythamasalama',
target: '_blank'
},
{
label: 'Daniel Roe',
suffix: 'danielroe'
suffix: 'danielroe',
to: 'https://github.com/danielroe',
target: '_blank'
},
{
label: 'Neil Richter',
suffix: 'noook'
suffix: 'noook',
to: 'https://github.com/noook',
target: '_blank'
}
]
}]

View File

@@ -5,6 +5,8 @@ const users = [
{
label: 'Benjamin Canac',
suffix: 'benjamincanac',
to: 'https://github.com/benjamincanac',
target: '_blank',
avatar: {
src: 'https://github.com/benjamincanac.png'
}
@@ -12,6 +14,8 @@ const users = [
{
label: 'Sylvain Marroufin',
suffix: 'smarroufin',
to: 'https://github.com/smarroufin',
target: '_blank',
avatar: {
src: 'https://github.com/smarroufin.png'
}
@@ -19,6 +23,8 @@ const users = [
{
label: 'Sébastien Chopin',
suffix: 'atinux',
to: 'https://github.com/atinux',
target: '_blank',
avatar: {
src: 'https://github.com/atinux.png'
}
@@ -26,6 +32,8 @@ const users = [
{
label: 'Romain Hamel',
suffix: 'romhml',
to: 'https://github.com/romhml',
target: '_blank',
avatar: {
src: 'https://github.com/romhml.png'
}
@@ -33,6 +41,8 @@ const users = [
{
label: 'Haytham A. Salama',
suffix: 'Haythamasalama',
to: 'https://github.com/Haythamasalama',
target: '_blank',
avatar: {
src: 'https://github.com/Haythamasalama.png'
}
@@ -40,6 +50,8 @@ const users = [
{
label: 'Daniel Roe',
suffix: 'danielroe',
to: 'https://github.com/danielroe',
target: '_blank',
avatar: {
src: 'https://github.com/danielroe.png'
}
@@ -47,6 +59,8 @@ const users = [
{
label: 'Neil Richter',
suffix: 'noook',
to: 'https://github.com/noook',
target: '_blank',
avatar: {
src: 'https://github.com/noook.png'
}

View File

@@ -6,8 +6,7 @@ const users = [
to: 'https://github.com/benjamincanac',
target: '_blank',
avatar: {
src: 'https://github.com/benjamincanac.png',
alt: 'benjamincanac'
src: 'https://github.com/benjamincanac.png'
}
},
{
@@ -16,8 +15,7 @@ const users = [
to: 'https://github.com/smarroufin',
target: '_blank',
avatar: {
src: 'https://github.com/smarroufin.png',
alt: 'smarroufin'
src: 'https://github.com/smarroufin.png'
}
},
{
@@ -26,8 +24,7 @@ const users = [
to: 'https://github.com/atinux',
target: '_blank',
avatar: {
src: 'https://github.com/atinux.png',
alt: 'atinux'
src: 'https://github.com/atinux.png'
}
},
{
@@ -36,8 +33,7 @@ const users = [
to: 'https://github.com/romhml',
target: '_blank',
avatar: {
src: 'https://github.com/romhml.png',
alt: 'romhml'
src: 'https://github.com/romhml.png'
}
},
{
@@ -46,8 +42,7 @@ const users = [
to: 'https://github.com/Haythamasalama',
target: '_blank',
avatar: {
src: 'https://github.com/Haythamasalama.png',
alt: 'Haythamasalama'
src: 'https://github.com/Haythamasalama.png'
}
},
{
@@ -56,8 +51,7 @@ const users = [
to: 'https://github.com/danielroe',
target: '_blank',
avatar: {
src: 'https://github.com/danielroe.png',
alt: 'danielroe'
src: 'https://github.com/danielroe.png'
}
},
{
@@ -66,8 +60,7 @@ const users = [
to: 'https://github.com/noook',
target: '_blank',
avatar: {
src: 'https://github.com/noook.png',
alt: 'noook'
src: 'https://github.com/noook.png'
}
}
]

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
const router = useRouter()
const toast = useToast()
const groups = ref([
{
@@ -12,8 +12,7 @@ const groups = ref([
to: 'https://github.com/benjamincanac',
target: '_blank',
avatar: {
src: 'https://github.com/benjamincanac.png',
alt: 'benjamincanac'
src: 'https://github.com/benjamincanac.png'
}
},
{
@@ -22,8 +21,7 @@ const groups = ref([
to: 'https://github.com/smarroufin',
target: '_blank',
avatar: {
src: 'https://github.com/smarroufin.png',
alt: 'smarroufin'
src: 'https://github.com/smarroufin.png'
}
},
{
@@ -32,8 +30,7 @@ const groups = ref([
to: 'https://github.com/atinux',
target: '_blank',
avatar: {
src: 'https://github.com/atinux.png',
alt: 'atinux'
src: 'https://github.com/atinux.png'
}
},
{
@@ -42,8 +39,7 @@ const groups = ref([
to: 'https://github.com/romhml',
target: '_blank',
avatar: {
src: 'https://github.com/romhml.png',
alt: 'romhml'
src: 'https://github.com/romhml.png'
}
},
{
@@ -52,8 +48,7 @@ const groups = ref([
to: 'https://github.com/Haythamasalama',
target: '_blank',
avatar: {
src: 'https://github.com/Haythamasalama.png',
alt: 'Haythamasalama'
src: 'https://github.com/Haythamasalama.png'
}
},
{
@@ -62,8 +57,7 @@ const groups = ref([
to: 'https://github.com/danielroe',
target: '_blank',
avatar: {
src: 'https://github.com/danielroe.png',
alt: 'danielroe'
src: 'https://github.com/danielroe.png'
}
},
{
@@ -72,8 +66,7 @@ const groups = ref([
to: 'https://github.com/noook',
target: '_blank',
avatar: {
src: 'https://github.com/noook.png',
alt: 'noook'
src: 'https://github.com/noook.png'
}
}
]
@@ -90,7 +83,7 @@ const groups = ref([
'N'
],
onSelect() {
console.log('Add new file')
toast.add({ title: 'Add new file' })
}
},
{
@@ -102,7 +95,7 @@ const groups = ref([
'F'
],
onSelect() {
console.log('Add new folder')
toast.add({ title: 'Add new folder' })
}
},
{
@@ -114,7 +107,7 @@ const groups = ref([
'H'
],
onSelect() {
console.log('Add hashtag')
toast.add({ title: 'Add hashtag' })
}
},
{
@@ -126,7 +119,7 @@ const groups = ref([
'L'
],
onSelect() {
console.log('Add label')
toast.add({ title: 'Add label' })
}
}
]
@@ -134,15 +127,7 @@ const groups = ref([
])
function onSelect(item: any) {
if (item.onSelect) {
item.onSelect()
} else if (item.to) {
if (typeof item.to === 'string' && (item.target === '_blank' || item.to.startsWith('http'))) {
window.open(item.to, item.target || '_blank')
} else {
router.push(item.to)
}
}
console.log(item)
}
</script>

View File

@@ -33,7 +33,7 @@ const items = computed(() => [{
<template>
<UContextMenu :items="items" :ui="{ content: 'w-48' }">
<div class="flex items-center justify-center rounded-md border border-dashed border-[var(--ui-border-accented)] text-sm aspect-video w-72">
<div class="flex items-center justify-center rounded-md border border-dashed border-(--ui-border-accented) text-sm aspect-video w-72">
Right click here
</div>
</UContextMenu>

View File

@@ -26,7 +26,7 @@ const items = [
<template>
<UContextMenu :items="items" :ui="{ content: 'w-48' }">
<div class="flex items-center justify-center rounded-md border border-dashed border-[var(--ui-border-accented)] text-sm aspect-video w-72">
<div class="flex items-center justify-center rounded-md border border-dashed border-(--ui-border-accented) text-sm aspect-video w-72">
Right click here
</div>
</UContextMenu>

View File

@@ -13,7 +13,7 @@ const items = [{
<template>
<UContextMenu :items="items" :ui="{ content: 'w-48' }">
<div class="flex items-center justify-center rounded-md border border-dashed border-[var(--ui-border-accented)] text-sm aspect-video w-72">
<div class="flex items-center justify-center rounded-md border border-dashed border-(--ui-border-accented) text-sm aspect-video w-72">
Right click here
</div>
@@ -22,7 +22,7 @@ const items = [{
</template>
<template #refresh-trailing>
<UIcon v-if="loading" name="i-lucide-refresh-cw" class="shrink-0 size-5 text-[var(--ui-primary)] animate-spin" />
<UIcon v-if="loading" name="i-lucide-refresh-cw" class="shrink-0 size-5 text-(--ui-primary) animate-spin" />
</template>
</UContextMenu>
</template>

View File

@@ -7,7 +7,7 @@ const open = ref(false)
<UButton label="Open" color="neutral" variant="subtle" trailing-icon="i-lucide-chevron-up" />
<template #header>
<h2 class="text-[var(--ui-text-highlighted)] font-semibold">
<h2 class="text-(--ui-text-highlighted) font-semibold">
Drawer non-dismissible
</h2>

View File

@@ -29,7 +29,7 @@ const items = [
<UButton label="Open" color="neutral" variant="outline" icon="i-lucide-menu" />
<template #profile-trailing>
<UIcon name="i-lucide-badge-check" class="shrink-0 size-5 text-[var(--ui-primary)]" />
<UIcon name="i-lucide-badge-check" class="shrink-0 size-5 text-(--ui-primary)" />
</template>
</UDropdownMenu>
</template>

View File

@@ -17,7 +17,7 @@ const items = [{
<UButton label="Open" color="neutral" variant="outline" icon="i-lucide-menu" />
<template #profile-trailing>
<UIcon name="i-lucide-badge-check" class="shrink-0 size-5 text-[var(--ui-primary)]" />
<UIcon name="i-lucide-badge-check" class="shrink-0 size-5 text-(--ui-primary)" />
</template>
</UDropdownMenu>
</template>

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import type { FormError, FormSubmitEvent } from '#ui/types'
import type { FormError, FormSubmitEvent } from '@nuxt/ui'
const state = reactive({
email: undefined,

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
import Joi from 'joi'
import type { FormSubmitEvent } from '#ui/types'
import type { FormSubmitEvent } from '@nuxt/ui'
const schema = Joi.object({
email: Joi.string().required(),

View File

@@ -4,7 +4,7 @@ import type { FormSubmitEvent } from '@nuxt/ui'
const schema = z.object({
name: z.string().min(2),
news: z.boolean()
news: z.boolean().default(false)
})
type Schema = z.output<typeof schema>
@@ -36,7 +36,7 @@ async function onSubmit(event: FormSubmitEvent<any>) {
</UFormField>
<div>
<UCheckbox v-model="state.news" name="news" label="Register to our newsletter" />
<UCheckbox v-model="state.news" name="news" label="Register to our newsletter" @update:model-value="state.email = undefined" />
</div>
<UForm v-if="state.news" :state="state" :schema="nestedSchema">

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import type { FormError, FormErrorEvent, FormSubmitEvent } from '#ui/types'
import type { FormError, FormErrorEvent, FormSubmitEvent } from '@nuxt/ui'
const state = reactive({
email: undefined,

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
import { object, string, nonempty, refine, type Infer } from 'superstruct'
import type { FormSubmitEvent } from '#ui/types'
import type { FormSubmitEvent } from '@nuxt/ui'
const schema = object({
email: nonempty(string()),

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
import * as v from 'valibot'
import type { FormSubmitEvent } from '#ui/types'
import type { FormSubmitEvent } from '@nuxt/ui'
const schema = v.object({
email: v.pipe(v.string(), v.email('Invalid email')),

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
import { object, string, type InferType } from 'yup'
import type { FormSubmitEvent } from '#ui/types'
import type { FormSubmitEvent } from '@nuxt/ui'
const schema = object({
email: string().email('Invalid email').required('Required'),

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
import * as z from 'zod'
import type { FormSubmitEvent } from '#ui/types'
import type { FormSubmitEvent } from '@nuxt/ui'
const schema = z.object({
email: z.string().email('Invalid email'),

View File

@@ -33,7 +33,7 @@ const { data: users, status } = await useFetch('https://jsonplaceholder.typicode
<template #item-label="{ item }">
{{ item.label }}
<span class="text-[var(--ui-text-muted)]">
<span class="text-(--ui-text-muted)">
{{ item.email }}
</span>
</template>

View File

@@ -15,7 +15,7 @@ const domain = ref(domains[0])
}"
>
<template #leading>
<p class="text-sm text-[var(--ui-text-muted)]">
<p class="text-sm text-(--ui-text-muted)">
https://
</p>
</template>

View File

@@ -13,7 +13,7 @@ const maxLength = 15
<template #trailing>
<div
id="character-count"
class="text-xs text-[var(--ui-text-muted)] tabular-nums"
class="text-xs text-(--ui-text-muted) tabular-nums"
aria-live="polite"
role="status"
>

View File

@@ -4,8 +4,8 @@ const value = ref('')
<template>
<UInput v-model="value" placeholder="" :ui="{ base: 'peer' }">
<label class="pointer-events-none absolute left-0 -top-2.5 text-[var(--ui-text-highlighted)] text-xs font-medium px-1.5 transition-all peer-focus:-top-2.5 peer-focus:text-[var(--ui-text-highlighted)] peer-focus:text-xs peer-focus:font-medium peer-placeholder-shown:text-sm peer-placeholder-shown:text-[var(--ui-text-dimmed)] peer-placeholder-shown:top-1.5 peer-placeholder-shown:font-normal">
<span class="inline-flex bg-[var(--ui-bg)] px-1">Email address</span>
<label class="pointer-events-none absolute left-0 -top-2.5 text-(--ui-text-highlighted) text-xs font-medium px-1.5 transition-all peer-focus:-top-2.5 peer-focus:text-(--ui-text-highlighted) peer-focus:text-xs peer-focus:font-medium peer-placeholder-shown:text-sm peer-placeholder-shown:text-(--ui-text-dimmed) peer-placeholder-shown:top-1.5 peer-placeholder-shown:font-normal">
<span class="inline-flex bg-(--ui-bg) px-1">Email address</span>
</label>
</UInput>
</template>

View File

@@ -51,7 +51,7 @@ const text = computed(() => {
variant="link"
size="sm"
:icon="show ? 'i-lucide-eye-off' : 'i-lucide-eye'"
aria-label="show ? 'Hide password' : 'Show password'"
:aria-label="show ? 'Hide password' : 'Show password'"
:aria-pressed="show"
aria-controls="password"
@click="show = !show"
@@ -77,7 +77,7 @@ const text = computed(() => {
v-for="(req, index) in strength"
:key="index"
class="flex items-center gap-0.5"
:class="req.met ? 'text-[var(--ui-success)]' : 'text-[var(--ui-text-muted)]'"
:class="req.met ? 'text-(--ui-success)' : 'text-(--ui-text-muted)'"
>
<UIcon :name="req.met ? 'i-lucide-circle-check' : 'i-lucide-circle-x'" class="size-4 shrink-0" />

View File

@@ -1,6 +1,6 @@
<script setup lang="ts">
const show = ref(false)
const password = ref('password')
const password = ref('')
</script>
<template>
@@ -16,7 +16,7 @@ const password = ref('password')
variant="link"
size="sm"
:icon="show ? 'i-lucide-eye-off' : 'i-lucide-eye'"
aria-label="show ? 'Hide password' : 'Show password'"
:aria-label="show ? 'Hide password' : 'Show password'"
:aria-pressed="show"
aria-controls="password"
@click="show = !show"

View File

@@ -51,7 +51,8 @@ const items = [
]
},
{
label: 'GitHub'
label: 'GitHub',
icon: 'i-simple-icons-github'
}
]
</script>
@@ -61,7 +62,7 @@ const items = [
:items="items"
class="w-full justify-center"
:ui="{
viewport: 'sm:w-[var(--reka-navigation-menu-viewport-width)]',
viewport: 'sm:w-(--reka-navigation-menu-viewport-width)',
childList: 'sm:w-96',
childLinkDescription: 'text-balance line-clamp-2'
}"
@@ -73,11 +74,11 @@ const items = [
</li>
<li v-for="child in item.children" :key="child.label">
<ULink class="text-sm text-left rounded-md p-3 transition-colors hover:bg-[var(--ui-bg-elevated)]/50">
<p class="font-medium text-[var(--ui-text-highlighted)]">
<ULink class="text-sm text-left rounded-md p-3 transition-colors hover:bg-(--ui-bg-elevated)/50">
<p class="font-medium text-(--ui-text-highlighted)">
{{ child.label }}
</p>
<p class="text-[var(--ui-text-muted)] line-clamp-2">
<p class="text-(--ui-text-muted) line-clamp-2">
{{ child.description }}
</p>
</ULink>

View File

@@ -8,7 +8,7 @@ const open = ref(false)
<template #content>
<div class="flex items-center gap-4 mb-4">
<h2 class="text-[var(--ui-text-highlighted)] font-semibold">
<h2 class="text-(--ui-text-highlighted) font-semibold">
Popover non-dismissible
</h2>

View File

@@ -33,7 +33,7 @@ const { data: users, status } = await useFetch('https://jsonplaceholder.typicode
<template #item-label="{ item }">
{{ item.label }}
<span class="text-[var(--ui-text-muted)]">
<span class="text-(--ui-text-muted)">
{{ item.email }}
</span>
</template>

View File

@@ -100,7 +100,7 @@ const columnFilters = ref([{
<template>
<div class="flex flex-col flex-1 w-full">
<div class="flex px-4 py-3.5 border-b border-[var(--ui-border-accented)]">
<div class="flex px-4 py-3.5 border-b border-(--ui-border-accented)">
<UInput
:model-value="(table?.tableApi?.getColumn('email')?.getFilterValue() as string)"
class="max-w-sm"

View File

@@ -130,7 +130,7 @@ function getHeader(column: Column<Payment>, label: string) {
variant: 'ghost',
label,
icon: isSorted ? (isSorted === 'asc' ? 'i-lucide-arrow-up-narrow-wide' : 'i-lucide-arrow-down-wide-narrow') : 'i-lucide-arrow-up-down',
class: '-mx-2.5 data-[state=open]:bg-[var(--ui-bg-elevated)]'
class: '-mx-2.5 data-[state=open]:bg-(--ui-bg-elevated)'
}))
}

View File

@@ -100,7 +100,7 @@ const columnVisibility = ref({
<template>
<div class="flex flex-col flex-1 w-full">
<div class="flex justify-end px-4 py-3.5 border-b border-[var(--ui-border-accented)]">
<div class="flex justify-end px-4 py-3.5 border-b border-(--ui-border-accented)">
<UDropdownMenu
:items="table?.tableApi?.getAllColumns().filter(column => column.getCanHide()).map(column => ({
label: upperFirst(column.id),

View File

@@ -263,7 +263,7 @@ function randomize() {
</script>
<template>
<div class="flex-1 divide-y divide-[var(--ui-border-accented)] w-full">
<div class="flex-1 divide-y divide-(--ui-border-accented) w-full">
<div class="flex items-center gap-2 px-4 py-3.5 overflow-x-auto">
<UInput
:model-value="(table?.tableApi?.getColumn('email')?.getFilterValue() as string)"
@@ -310,7 +310,7 @@ function randomize() {
</template>
</UTable>
<div class="px-4 py-3.5 text-sm text-[var(--ui-text-muted)]">
<div class="px-4 py-3.5 text-sm text-(--ui-text-muted)">
{{ table?.tableApi?.getFilteredSelectedRowModel().rows.length || 0 }} of
{{ table?.tableApi?.getFilteredRowModel().rows.length || 0 }} row(s) selected.
</div>

View File

@@ -35,7 +35,7 @@ const columns: TableColumn<User>[] = [{
size: 'lg'
}),
h('div', undefined, [
h('p', { class: 'font-medium text-[var(--ui-text-highlighted)]' }, row.original.name),
h('p', { class: 'font-medium text-(--ui-text-highlighted)' }, row.original.name),
h('p', { class: '' }, `@${row.original.username}`)
])
])

View File

@@ -90,14 +90,12 @@ const columns: TableColumn<Payment>[] = [{
}
}]
const table = useTemplateRef('table')
const globalFilter = ref('45')
</script>
<template>
<div class="flex flex-col flex-1 w-full">
<div class="flex px-4 py-3.5 border-b border-[var(--ui-border-accented)]">
<div class="flex px-4 py-3.5 border-b border-(--ui-border-accented)">
<UInput
v-model="globalFilter"
class="max-w-sm"

View File

@@ -0,0 +1,174 @@
<script setup lang="ts">
import { getPaginationRowModel } from '@tanstack/vue-table'
import type { TableColumn } from '@nuxt/ui'
const table = useTemplateRef('table')
type Payment = {
id: string
date: string
email: string
amount: number
}
const data = ref<Payment[]>([{
id: '4600',
date: '2024-03-11T15:30:00',
email: 'james.anderson@example.com',
amount: 594
}, {
id: '4599',
date: '2024-03-11T10:10:00',
email: 'mia.white@example.com',
amount: 276
}, {
id: '4598',
date: '2024-03-11T08:50:00',
email: 'william.brown@example.com',
amount: 315
}, {
id: '4597',
date: '2024-03-10T19:45:00',
email: 'emma.davis@example.com',
amount: 529
}, {
id: '4596',
date: '2024-03-10T15:55:00',
email: 'ethan.harris@example.com',
amount: 639
}, {
id: '4595',
date: '2024-03-10T13:20:00',
email: 'sophia.miller@example.com',
amount: 428
}, {
id: '4594',
date: '2024-03-10T11:05:00',
email: 'noah.wilson@example.com',
amount: 673
}, {
id: '4593',
date: '2024-03-09T22:15:00',
email: 'olivia.jones@example.com',
amount: 382
}, {
id: '4592',
date: '2024-03-09T20:30:00',
email: 'liam.taylor@example.com',
amount: 547
}, {
id: '4591',
date: '2024-03-09T18:45:00',
email: 'ava.thomas@example.com',
amount: 291
}, {
id: '4590',
date: '2024-03-09T16:20:00',
email: 'lucas.martin@example.com',
amount: 624
}, {
id: '4589',
date: '2024-03-09T14:10:00',
email: 'isabella.clark@example.com',
amount: 438
}, {
id: '4588',
date: '2024-03-09T12:05:00',
email: 'mason.rodriguez@example.com',
amount: 583
}, {
id: '4587',
date: '2024-03-09T10:30:00',
email: 'sophia.lee@example.com',
amount: 347
}, {
id: '4586',
date: '2024-03-09T08:15:00',
email: 'ethan.walker@example.com',
amount: 692
}, {
id: '4585',
date: '2024-03-08T23:40:00',
email: 'amelia.hall@example.com',
amount: 419
}, {
id: '4584',
date: '2024-03-08T21:25:00',
email: 'oliver.young@example.com',
amount: 563
}, {
id: '4583',
date: '2024-03-08T19:50:00',
email: 'aria.king@example.com',
amount: 328
}, {
id: '4582',
date: '2024-03-08T17:35:00',
email: 'henry.wright@example.com',
amount: 647
}, {
id: '4581',
date: '2024-03-08T15:20:00',
email: 'luna.lopez@example.com',
amount: 482
}])
const columns: TableColumn<Payment>[] = [{
accessorKey: 'id',
header: '#',
cell: ({ row }) => `#${row.getValue('id')}`
}, {
accessorKey: 'date',
header: 'Date',
cell: ({ row }) => {
return new Date(row.getValue('date')).toLocaleString('en-US', {
day: 'numeric',
month: 'short',
hour: '2-digit',
minute: '2-digit',
hour12: false
})
}
}, {
accessorKey: 'email',
header: 'Email'
}, {
accessorKey: 'amount',
header: () => h('div', { class: 'text-right' }, 'Amount'),
cell: ({ row }) => {
const amount = Number.parseFloat(row.getValue('amount'))
const formatted = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'EUR'
}).format(amount)
return h('div', { class: 'text-right font-medium' }, formatted)
}
}]
const pagination = ref({
pageIndex: 0,
pageSize: 5
})
</script>
<template>
<div class="w-full space-y-4 pb-4">
<UTable
ref="table"
v-model:pagination="pagination"
:data="data"
:columns="columns"
:pagination-options="{
getPaginationRowModel: getPaginationRowModel()
}"
class="flex-1"
/>
<div class="flex justify-center border-t border-(--ui-border) pt-4">
<UPagination
:default-page="(table?.tableApi?.getState().pagination.pageIndex || 0) + 1"
:items-per-page="table?.tableApi?.getState().pagination.pageSize"
:total="table?.tableApi?.getFilteredRowModel().rows.length"
@update:page="(p) => table?.tableApi?.setPageIndex(p - 1)"
/>
</div>
</div>
</template>

View File

@@ -111,7 +111,7 @@ const expanded = ref({ 1: true })
v-model:expanded="expanded"
:data="data"
:columns="columns"
:ui="{ tr: 'data-[expanded=true]:bg-[var(--ui-bg-elevated)]/50' }"
:ui="{ tr: 'data-[expanded=true]:bg-(--ui-bg-elevated)/50' }"
class="flex-1"
>
<template #expanded="{ row }">

View File

@@ -113,7 +113,7 @@ const rowSelection = ref({ 1: true })
:columns="columns"
/>
<div class="px-4 py-3.5 border-t border-[var(--ui-border-accented)] text-sm text-[var(--ui-text-muted)]">
<div class="px-4 py-3.5 border-t border-(--ui-border-accented) text-sm text-(--ui-text-muted)">
{{ table?.tableApi?.getFilteredSelectedRowModel().rows.length || 0 }} of
{{ table?.tableApi?.getFilteredRowModel().rows.length || 0 }} row(s) selected.
</div>

View File

@@ -97,7 +97,7 @@ function getDropdownActions(user: User): DropdownMenuItem[][] {
<div class="flex items-center gap-3">
<UAvatar :src="`https://i.pravatar.cc/120?img=${row.original.id}`" size="lg" />
<div>
<p class="font-medium text-[var(--ui-text-highlighted)]">
<p class="font-medium text-(--ui-text-highlighted)">
{{ row.original.name }}
</p>
<p>

View File

@@ -26,7 +26,7 @@ const state = reactive({
<template>
<UTabs :items="items" variant="link" class="gap-4 w-full" :ui="{ trigger: 'flex-1' }">
<template #account="{ item }">
<p class="text-[var(--ui-text-muted)] mb-4">
<p class="text-(--ui-text-muted) mb-4">
{{ item.description }}
</p>
@@ -43,7 +43,7 @@ const state = reactive({
</template>
<template #password="{ item }">
<p class="text-[var(--ui-text-muted)] mb-4">
<p class="text-(--ui-text-muted) mb-4">
{{ item.description }}
</p>

View File

@@ -0,0 +1,27 @@
<script setup lang="ts">
const toast = useToast()
const props = defineProps<{
orientation: 'horizontal' | 'vertical'
}>()
function showToast() {
toast.add({
title: 'Uh oh! Something went wrong.',
orientation: props.orientation,
actions: [{
icon: 'i-lucide-refresh-cw',
label: 'Retry',
color: 'neutral',
variant: 'outline',
onClick: (e) => {
e?.stopPropagation()
}
}]
})
}
</script>
<template>
<UButton label="Show toast" color="neutral" variant="outline" @click="showToast" />
</template>

View File

@@ -7,10 +7,10 @@ const appConfig = useAppConfig()
<UFormField
label="toaster.duration"
size="sm"
class="inline-flex ring ring-[var(--ui-border-accented)] rounded-[var(--ui-radius)]"
class="inline-flex ring ring-(--ui-border-accented) rounded-(--ui-radius)"
:ui="{
wrapper: 'bg-[var(--ui-bg-elevated)]/50 rounded-l-[var(--ui-radius)] flex border-r border-[var(--ui-border-accented)]',
label: 'text-[var(--ui-text-muted)] px-2 py-1.5',
wrapper: 'bg-(--ui-bg-elevated)/50 rounded-l-(--ui-radius) flex border-r border-(--ui-border-accented)',
label: 'text-(--ui-text-muted) px-2 py-1.5',
container: 'mt-0'
}"
>
@@ -18,7 +18,7 @@ const appConfig = useAppConfig()
v-model="appConfig.toaster.duration"
color="neutral"
variant="soft"
:ui="{ base: 'rounded-[var(--ui-radius)] rounded-l-none min-w-12' }"
:ui="{ base: 'rounded-(--ui-radius) rounded-l-none min-w-12' }"
/>
</UFormField>
</div>

View File

@@ -7,10 +7,10 @@ const appConfig = useAppConfig()
<UFormField
label="toaster.expand"
size="sm"
class="inline-flex ring ring-[var(--ui-border-accented)] rounded-[var(--ui-radius)]"
class="inline-flex ring ring-(--ui-border-accented) rounded-(--ui-radius)"
:ui="{
wrapper: 'bg-[var(--ui-bg-elevated)]/50 rounded-l-[var(--ui-radius)] flex border-r border-[var(--ui-border-accented)]',
label: 'text-[var(--ui-text-muted)] px-2 py-1.5',
wrapper: 'bg-(--ui-bg-elevated)/50 rounded-l-(--ui-radius) flex border-r border-(--ui-border-accented)',
label: 'text-(--ui-text-muted) px-2 py-1.5',
container: 'mt-0'
}"
>
@@ -19,7 +19,7 @@ const appConfig = useAppConfig()
:items="[true, false]"
color="neutral"
variant="soft"
class="rounded-[var(--ui-radius)] rounded-l-none min-w-12"
class="rounded-(--ui-radius) rounded-l-none min-w-12"
:search-input="false"
/>
</UFormField>

View File

@@ -10,10 +10,10 @@ const appConfig = useAppConfig()
<UFormField
label="toaster.position"
size="sm"
class="inline-flex ring ring-[var(--ui-border-accented)] rounded-[var(--ui-radius)]"
class="inline-flex ring ring-(--ui-border-accented) rounded-(--ui-radius)"
:ui="{
wrapper: 'bg-[var(--ui-bg-elevated)]/50 rounded-l-[var(--ui-radius)] flex border-r border-[var(--ui-border-accented)]',
label: 'text-[var(--ui-text-muted)] px-2 py-1.5',
wrapper: 'bg-(--ui-bg-elevated)/50 rounded-l-(--ui-radius) flex border-r border-(--ui-border-accented)',
label: 'text-(--ui-text-muted) px-2 py-1.5',
container: 'mt-0'
}"
>
@@ -22,7 +22,7 @@ const appConfig = useAppConfig()
:items="positions"
color="neutral"
variant="soft"
class="rounded-[var(--ui-radius)] rounded-l-none min-w-12"
class="rounded-(--ui-radius) rounded-l-none min-w-12"
:search-input="false"
/>
</UFormField>

View File

@@ -1,3 +1,65 @@
<script setup lang="ts">
import colors from 'tailwindcss/colors'
import { omit } from '#ui/utils'
const appConfig = useAppConfig()
const colorMode = useColorMode()
const neutralColors = ['slate', 'gray', 'zinc', 'neutral', 'stone']
const neutral = computed({
get() {
return appConfig.ui.colors.neutral
},
set(option) {
appConfig.ui.colors.neutral = option
window.localStorage.setItem('nuxt-ui-neutral', appConfig.ui.colors.neutral)
}
})
const colorsToOmit = ['inherit', 'current', 'transparent', 'black', 'white', ...neutralColors]
const primaryColors = Object.keys(omit(colors, colorsToOmit as any))
const primary = computed({
get() {
return appConfig.ui.colors.primary
},
set(option) {
appConfig.ui.colors.primary = option
window.localStorage.setItem('nuxt-ui-primary', appConfig.ui.colors.primary)
setBlackAsPrimary(false)
}
})
const radiuses = [0, 0.125, 0.25, 0.375, 0.5]
const radius = computed({
get() {
return appConfig.theme.radius
},
set(option) {
appConfig.theme.radius = option
window.localStorage.setItem('nuxt-ui-radius', String(appConfig.theme.radius))
}
})
const modes = [
{ label: 'light', icon: appConfig.ui.icons.light },
{ label: 'dark', icon: appConfig.ui.icons.dark },
{ label: 'system', icon: appConfig.ui.icons.system }
]
const mode = computed({
get() {
return colorMode.value
},
set(option) {
colorMode.preference = option
}
})
function setBlackAsPrimary(value: boolean) {
appConfig.theme.blackAsPrimary = value
window.localStorage.setItem('nuxt-ui-black-as-primary', String(value))
}
</script>
<template>
<UPopover :ui="{ content: 'w-72 px-6 py-4 flex flex-col gap-4' }">
<template #default="{ open }">
@@ -7,7 +69,7 @@
:variant="open ? 'soft' : 'ghost'"
square
aria-label="Color picker"
:ui="{ leadingIcon: 'text-[var(--ui-primary)]' }"
:ui="{ leadingIcon: 'text-(--ui-primary)' }"
/>
</template>
@@ -18,12 +80,22 @@
</legend>
<div class="grid grid-cols-3 gap-1 -mx-2">
<ThemePickerButton
chip="primary"
label="Black"
:selected="appConfig.theme.blackAsPrimary"
@click="setBlackAsPrimary(true)"
>
<template #leading>
<span class="inline-block w-2 h-2 rounded-full bg-black dark:bg-white" />
</template>
</ThemePickerButton>
<ThemePickerButton
v-for="color in primaryColors"
:key="color"
:label="color"
:chip="color"
:selected="primary === color"
:selected="!appConfig.theme.blackAsPrimary && primary === color"
@click="primary = color"
/>
</div>
@@ -68,12 +140,12 @@
Theme
</legend>
<div class="flex gap-1 -mx-2">
<div class="grid grid-cols-3 gap-1 -mx-2">
<ThemePickerButton
v-for="m in modes"
:key="m.label"
v-bind="m"
:selected="mode === m.label"
:selected="colorMode.preference === m.label"
@click="mode = m.label"
/>
</div>
@@ -81,60 +153,3 @@
</template>
</UPopover>
</template>
<script setup lang="ts">
import colors from 'tailwindcss/colors'
import { omit } from '#ui/utils'
const appConfig = useAppConfig()
const colorMode = useColorMode()
// Computed
const neutralColors = ['slate', 'gray', 'zinc', 'neutral', 'stone']
const neutral = computed({
get() {
return appConfig.ui.colors.neutral
},
set(option) {
appConfig.ui.colors.neutral = option
window.localStorage.setItem('nuxt-ui-neutral', appConfig.ui.colors.neutral)
}
})
const colorsToOmit = ['inherit', 'current', 'transparent', 'black', 'white', ...neutralColors]
const primaryColors = Object.keys(omit(colors, colorsToOmit as any))
const primary = computed({
get() {
return appConfig.ui.colors.primary
},
set(option) {
appConfig.ui.colors.primary = option
window.localStorage.setItem('nuxt-ui-primary', appConfig.ui.colors.primary)
}
})
const radiuses = [0, 0.125, 0.25, 0.375, 0.5]
const radius = computed({
get() {
return appConfig.theme.radius
},
set(option) {
appConfig.theme.radius = option
window.localStorage.setItem('nuxt-ui-radius', String(appConfig.theme.radius))
}
})
const modes = [
{ label: 'light', icon: appConfig.ui.icons.light },
{ label: 'dark', icon: appConfig.ui.icons.dark }
]
const mode = computed({
get() {
return colorMode.value
},
set(option) {
colorMode.preference = option
}
})
</script>

View File

@@ -1,25 +1,3 @@
<template>
<UButton
size="sm"
color="neutral"
:icon="icon"
:label="label"
:variant="selected ? 'soft' : 'outline'"
class="capitalize ring-[var(--ui-border)] rounded-[var(--ui-radius)] text-[11px]"
>
<template v-if="chip" #leading>
<span
class="inline-block w-2 h-2 rounded-full"
:class="`bg-[var(--color-light)] dark:bg-[var(--color-dark)]`"
:style="{
'--color-light': `var(--color-${chip}-500)`,
'--color-dark': `var(--color-${chip}-400)`
}"
/>
</template>
</UButton>
</template>
<script setup lang="ts">
defineProps<{
label: string
@@ -28,3 +6,28 @@ defineProps<{
selected?: boolean
}>()
</script>
<template>
<UButton
size="sm"
color="neutral"
variant="outline"
:icon="icon"
:label="label"
class="capitalize ring-(--ui-border) rounded-[calc(var(--ui-radius))] text-[11px]"
:class="[selected ? 'bg-(--ui-bg-elevated)' : 'hover:bg-(--ui-bg-elevated)/50']"
>
<template v-if="chip" #leading>
<slot name="leading">
<span
class="inline-block size-2 rounded-full"
:class="`bg-(--color-light) dark:bg-(--color-dark)`"
:style="{
'--color-light': `var(--color-${chip}-500)`,
'--color-dark': `var(--color-${chip}-400)`
}"
/>
</slot>
</template>
</UButton>
</template>

View File

@@ -14,10 +14,25 @@ function processNavigationItem(item: ContentNavigationItem, parent?: ContentNavi
}
}
function processNavigationItemIcon(item: ContentNavigationItem) {
let icon = item.icon
if (item.path.startsWith('/components')) {
icon = item.module === 'ui-pro' ? 'i-lucide-panels-top-left' : 'i-lucide-box'
}
if (item.path.startsWith('/composables')) {
icon = 'i-lucide-square-function'
}
return {
...item,
icon
}
}
export const useContentNavigation = (navigation: Ref<ContentNavigationItem[] | undefined>) => {
const { framework, module } = useSharedData()
const mappedNavigation = computed(() => navigation.value?.map(item => processNavigationItem(item)))
const filteredNavigation = computed(() => mappedNavigation.value?.map((item) => {
return {
...item,
@@ -29,12 +44,15 @@ export const useContentNavigation = (navigation: Ref<ContentNavigationItem[] | u
return false
}
return true
})
})?.map(processNavigationItemIcon)
}
}))
return {
mappedNavigation,
mappedNavigation: computed(() => mappedNavigation.value?.map(item => ({
...item,
children: item.children?.map((child: any) => ({ ...child, icon: undefined }))
}))),
filteredNavigation
}
}

View File

@@ -0,0 +1,56 @@
export function useLinks() {
const route = useRoute()
return computed(() => [{
label: 'Docs',
icon: 'i-lucide-square-play',
to: '/getting-started',
active: route.path.startsWith('/getting-started')
}, {
label: 'Components',
icon: 'i-lucide-square-code',
to: '/components',
active: route.path.startsWith('/components')
}, {
label: 'Pro',
icon: 'i-lucide-panels-top-left',
to: '/pro',
active: route.path.startsWith('/pro'),
orientation: 'vertical',
children: [{
icon: 'i-lucide-sparkles',
label: 'Features',
description: 'A collection of premium Vue components.',
to: '/pro'
}, {
icon: 'i-lucide-credit-card',
label: 'Pricing',
description: 'Free in development, buy when ready to launch.',
to: '/pro/pricing',
active: route.path.startsWith('/pro/pricing')
}, {
icon: 'i-lucide-panels-top-left',
label: 'Templates',
description: 'Official templates made with Nuxt UI Pro.',
to: '/pro/templates'
}, {
icon: 'i-lucide-circle-check',
label: 'Activate',
description: 'Enable Nuxt UI Pro in your production projects.',
to: '/pro/activate'
}]
}, {
label: 'Figma',
icon: 'i-lucide-figma',
to: '/figma'
}, {
label: 'Roadmap',
icon: 'i-lucide-map',
to: '/roadmap'
}, {
label: 'Releases',
icon: 'i-lucide-rocket',
to: 'https://github.com/nuxt/ui/releases',
target: '_blank'
}].filter(Boolean))
}

View File

@@ -10,7 +10,13 @@ export function useSharedData() {
icon: 'i-simple-icons-vuedotjs',
value: 'vue',
disabled: module.value === 'ui-pro',
onSelect: () => framework.value = 'vue'
onSelect: () => {
if (module.value === 'ui-pro') {
return
}
framework.value = 'vue'
}
}].map(f => ({ ...f, active: framework.value === f.value })))
const module = useCookie('nuxt-ui-module', { default: () => 'ui' })
@@ -24,7 +30,13 @@ export function useSharedData() {
icon: 'i-lucide-panels-top-left',
value: 'ui-pro',
disabled: framework.value === 'vue',
onSelect: () => module.value = 'ui-pro'
onSelect: () => {
if (framework.value === 'vue') {
return
}
module.value = 'ui-pro'
}
}].map(m => ({ ...m, active: module.value === m.value })))
return {

View File

@@ -7,7 +7,6 @@ const props = defineProps<{
error: NuxtError
}>()
const route = useRoute()
const appConfig = useAppConfig()
const colorMode = useColorMode()
@@ -26,34 +25,10 @@ const searchTerm = ref('')
// useTrackEvent('Search', { props: { query: `${query} - ${searchTerm.value?.commandPaletteRef.results.length} results` } })
// }, 500))
const links = computed(() => [{
label: 'Docs',
icon: 'i-lucide-square-play',
to: '/getting-started',
active: route.path.startsWith('/getting-started')
}, {
label: 'Components',
icon: 'i-lucide-square-code',
to: '/components',
active: route.path.startsWith('/components')
}, {
label: 'Roadmap',
icon: 'i-lucide-map',
to: '/roadmap'
}, {
label: 'Figma',
icon: 'i-lucide-figma',
to: 'https://www.figma.com/community/file/1288455405058138934',
target: '_blank'
}, {
label: 'Releases',
icon: 'i-lucide-rocket',
to: 'https://github.com/nuxt/ui/releases',
target: '_blank'
}].filter(Boolean))
const links = useLinks()
const color = computed(() => colorMode.value === 'dark' ? (colors as any)[appConfig.ui.colors.neutral][900] : 'white')
const radius = computed(() => `:root { --ui-radius: ${appConfig.theme.radius}rem; }`)
const blackAsPrimary = computed(() => appConfig.theme.blackAsPrimary ? `:root { --ui-primary: black; } .dark { --ui-primary: white; }` : ':root {}')
useHead({
meta: [
@@ -64,7 +39,8 @@ useHead({
{ rel: 'icon', type: 'image/svg+xml', href: '/icon.svg' }
],
style: [
{ innerHTML: radius, id: 'nuxt-ui-radius', tagPriority: -2 }
{ innerHTML: radius, id: 'nuxt-ui-radius', tagPriority: -2 },
{ innerHTML: blackAsPrimary, id: 'nuxt-ui-black-as-primary', tagPriority: -2 }
],
htmlAttrs: {
lang: 'en'
@@ -113,7 +89,7 @@ provide('navigation', mappedNavigation)
items: modules
}]"
:navigation="filteredNavigation"
:fuse="{ resultLimit: 42 }"
:fuse="{ resultLimit: 100 }"
/>
</ClientOnly>
</UApp>

View File

@@ -87,12 +87,12 @@ const communityLinks = computed(() => [{
to: `https://github.com/nuxt/${page.value?.module === 'ui-pro' ? 'ui-pro' : 'ui'}`,
target: '_blank'
}, {
icon: 'i-heroicons-lifebuoy',
icon: 'i-lucide-life-buoy',
label: 'Contribution',
to: '/getting-started/contribution'
}, {
label: 'Roadmap',
icon: 'i-heroicons-map',
icon: 'i-lucide-map',
to: '/roadmap'
}])

View File

@@ -0,0 +1,292 @@
title: Nuxt UI Figma Design Kits
description: Bridge the gap between designers and developers using professional-grade components. The official Nuxt UI & Nuxt UI Pro design kits for Figma mirrors the development library for perfect consistency.
headline: Used and loved by 2,000 designers and teams.
hero:
title: From [Figma]{#figma} to [Nuxt]{#nuxt}, faster.
description: From wireframe to production in no time with the official Nuxt UI & Nuxt UI Pro design kits for Figma. Start free with the Nuxt UI Kit, or upgrade to Nuxt UI Pro for premium components, layouts, and enhanced design-to-code efficiency.
image: /figma/hero.png
links:
- label: Purchase Pro Kit
to: 'https://nuxt.lemonsqueezy.com/buy/17213c49-621b-4c2c-9478-3a50a099003d'
trailing-icon: i-lucide-arrow-right
target: _blank
- label: Free Figma Kit
to: 'https://go.nuxt.com/figma'
icon: i-logos-figma
color: neutral
variant: outline
target: _blank
features1:
features:
- title: Advanced Figma Features
description: Components, Local Variables, Auto Layout, Variants and more.
icon: i-logos-figma
- title: Instant Theming
description: Customize your design system instantly using local variables and tokens.
icon: i-lucide-swatch-book
- title: Two Powerful Design Kits
description: Start with essential components, or unlock Pro for complete blocks and templates.
icon: i-lucide-files
cta1:
title: Everything you need in a [single file]{class="text-(--ui-primary)"}.
description: Design and development in perfect sync with our [Free](https://www.figma.com/community/file/1288455405058138934/nuxt-ui-v3-official-design-kit-free) and Pro files. Developers can implement designs faster, while designers work with production-ready components.
section1:
title: Customize in a few clicks to fit your needs
description: Control your entire design system with Figma Variables. Update primitive tokens once and watch your changes spread across the entire system.
reverse: true
features:
- title: Style with color variables powered by Tailwind CSS colors
icon: i-simple-icons-tailwindcss
- title: Apply over 500+ local variables across your entire file
icon: i-lucide-layers-2
- title: Build with unified tokens for consistency
icon: i-lucide-bolt
tabs:
- label: Define your tokens
src: /pro/figma/local-variables.png
width: 656
height: 342
alt: Define local variables in the Nuxt UI Figma design kit
- label: Use them in your design
src: /pro/figma/local-variables-result.png
width: 656
height: 342
alt: Use color variables in the Nuxt UI Figma design kit
links:
- label: Preview UI Pro Design Kit
to: 'https://go.nuxt.com/figma-pro'
target: _blank
icon: i-logos-figma
color: neutral
variant: outline
section2:
title: One component, endless possibilities
description: Create unlimited variations through nested components and swappable instances. Every element is fully themeable with props and slots, giving you complete control.
features:
- title: Choose between 17K+ components and variants
icon: i-lucide-component
- title: Customize designs with swap instance
icon: i-lucide-square-dashed-mouse-pointer
- title: Switch between light and dark modes in one click
icon: i-lucide-moon
image:
src: /pro/figma/component.png
width: 656
height: 374
alt: A component in the Nuxt UI Figma design kit
links:
- label: Preview UI Pro Design Kit
to: 'https://go.nuxt.com/figma-pro'
target: _blank
icon: i-logos-figma
color: neutral
variant: outline
section3:
title: Perfect match with development
description: Our Figma kit perfectly matches Nuxt UI Pro components, ensuring complete alignment between design and development.
reverse: true
features:
- title: Match development standards using the same props and tokens
icon: i-lucide-square-code
- title: Access Nuxt UI components through direct links
icon: i-lucide-link
- title: Work together as design and dev teams share one component language
icon: i-lucide-handshake
image:
src: /pro/figma/nuxt-ui-figma-to-code.png
width: 656
height: 370
alt: A screenshot of Nuxt UI Code & Figma Kit
links:
- label: Preview UI Pro Design Kit
to: 'https://go.nuxt.com/figma-pro'
icon: i-logos-figma
color: neutral
variant: outline
target: _blank
features2:
features:
- title: Ready-to-use Templates
description: Production-ready templates for marketing sites, documentation, and more included.
icon: i-lucide-panels-top-left
- title: Well-Documented System
description: Complete guides for designers and developers to master your design system.
icon: i-lucide-book-open-text
- title: Icons Pack
description: Complete Lucide icon library included - 1500+ ready components.
icon: i-lucide-smile
section4:
title: Start designing now.
description: '**From download to deployment in simple steps.** :br Get instant access to production-ready components and start creating.'
links:
- label: Get access now
to: 'https://nuxt.lemonsqueezy.com/buy/17213c49-621b-4c2c-9478-3a50a099003d'
trailing-icon: i-lucide-arrow-right
- label: Preview UI Pro Design Kit
to: 'https://go.nuxt.com/figma-pro'
icon: i-logos-figma
color: neutral
variant: outline
target: _blank
steps:
- title: Download & Import
description: After purchasing, just extract the ZIP file and drag & drop it directly into Figma.
image:
src: /pro/figma/step-1.png
alt: Import the Nuxt UI Pro Figma design kit
width: 314
height: 230
- title: Customize to your brand
description: Set your colors, typography, and styles to match your brand identity in minutes.
image:
src: /pro/figma/step-2.png
alt: Customize the Nuxt UI Pro Figma design kit
width: 314
height: 230
- title: Design your website
description: Design beautiful interfaces with production-ready components. Drag, drop, and customize.
image:
src: /pro/figma/step-3.png
alt: Design your website with the Nuxt UI Pro Figma design kit
width: 314
height: 230
- title: Share it with your developers
description: Perfect development handoff with components that match Nuxt UI's structure exactly.
image:
src: /pro/figma/step-4.png
alt: Share it with your developers with the Nuxt UI Pro Figma design kit
width: 314
height: 230
pricing:
title: Pricing plan that scale with you.
description: Start for free with Nuxt UI components, or unlock the complete Nuxt UI Pro design kit with a one-time purchase.
plans:
- title: Free Design Kit
description: Start with all Nuxt UI components and tokens.
price: FREE
features:
- '**Nuxt UI only components**'
- 40+ fully customizable components
- Figma Local Variables for colors, typography, and effects
- Light and Dark mode ready
- Lucide icons (1500+ icons) integration
- Regular updates
button:
label: Open in Figma
icon: i-logos-figma
to: https://go.nuxt.com/figma
color: neutral
terms: Used by 17,000+ designers.
- title: Solo License
description: Design faster with all Nuxt UI Pro components.
price: $149
billing_period: one-time payment
billing_cycle: plus local taxes
class: bg-(--ui-bg-elevated)/50
features:
- '**1 Designer**'
- Nuxt UI & Nuxt UI Pro Components
- 'Templates: Landing, Documentation, etc'
- Quick Start with Step-by-step Guides
- Use on Unlimited Projects
- Lifetime Free Updates
button:
label: Buy now
to: https://nuxt.lemonsqueezy.com/buy/17213c49-621b-4c2c-9478-3a50a099003d
extraButton:
label: Preview in Figma
to: 'https://go.nuxt.com/figma-pro'
target: _blank
icon: i-logos-figma
- title: Team License
description: Everything you need to deliver faster as a team.
price: $349
billing_period: one-time payment
billing_cycle: plus local taxes
class: bg-(--ui-bg-elevated)/50
features:
- '**Up to 20 Designers**'
- Nuxt UI & Nuxt UI Pro Components
- 'Templates: Landing, Documentation, etc'
- Step-by-step guides to help you start
- Use on unlimited projects
- Lifetime free updates
button:
label: Buy now
to: https://nuxt.lemonsqueezy.com/buy/2979099c-b7a0-4ba1-90e0-a0d60509b92d
extraButton:
label: Preview in Figma
to: 'https://go.nuxt.com/figma-pro'
target: _blank
icon: i-logos-figma
customers:
title: Used by 2,000+ developers & designers around the world.
items:
- src: /pro/logos/springfieldclinic.svg
alt: Springfield Clinic
- src: /pro/logos/churnkey.svg
alt: Churnkey
- src: /pro/logos/bosch.svg
alt: BOSCH
- src: /pro/logos/blizzard.svg
alt: Blizzard
- src: /pro/logos/bodet.svg
alt: Bodet
- src: /pro/logos/win.svg
alt: WinReality
- src: /pro/logos/tower.svg
alt: Tower Research
- src: /pro/logos/liegeairport.svg
alt: Liege Airport
- src: /pro/logos/wuniversity.svg
alt: University of Washington
- src: /pro/logos/funda.svg
alt: Funda
- src: /pro/logos/exxonmobil.svg
alt: ExxonMobil
- src: /pro/logos/mainpost.svg
alt: Main Post
- src: /pro/logos/insep.svg
alt: INSEP
- src: /pro/logos/applause.svg
alt: Applause
- src: /pro/logos/instadapp.svg
alt: Instadapp
faq:
title: Frequently Asked Questions
description: If you can't find what you're looking for, email our support team and if you're lucky someone will get back to you.
items:
- label: Can I use the UI kit on a free Figma account?
content: Yes. You don't need Figma's paid plan to use our UI kits.
defaultOpen: true
- label: Do you have a free trial?
content: We don't offer a free trial for the Pro Figma Kit, you can [preview it](https://go.nuxt.com/figma-pro).
- label: How do I access the files after purchasing?
content: After purchasing, just extract the ZIP file and drag & drop it directly into Figma.
- label: Can I upgrade my Solo license to the Team license?
content: Yes! Email us at design@nuxt.com with your details and we'll send you a discount code.
- label: Can I use the UI Kit license for commercial projects?
content: Yes, the license allows you to sell your designs that utilize the UI Kit implementations.
- label: Can I create multiple projects for multiple clients?
content: Yes, you can create multiple projects for multiple clients with the same license, there is no limit to the number of projects you can create.
- label: Can I include UI Kit in an open source project?
content: No, the license does not allow you to include the UI Kit in an open source project where the design files are publicly accessible.
- label: How do I contact you?
content: Email us at design@nuxt.com with your details and we'll help you out.
- label: What is your refund policy?
content: As the Figma Pro Kit is a digital product packaged as a zip file, we cannot offer refunds once the purchase is made.
- label: Do you have a Figma to Code plugin?
content: >
We recommend the open source [TeamPad Dev](https://github.com/ecomfe/tempad-dev) inspect panel with the [TeamPad Dev Nuxt UI Plugin](https://github.com/Justineo/tempad-dev-plugin-nuxt-ui):
1. Install the [TeamPad Dev Chrome Extension](https://chromewebstore.google.com/detail/tempad-dev/lgoeakbaikpkihoiphamaeopmliaimpc)
2. Open your Figma file with Nuxt UI components (reload the page if you don't see the TeamPad Dev panel)
3. Install the `@nuxt` in TeamPad Dev's plugins section
4. Select any Nuxt UI component and inspect the code it generates
![TeamPad Dev Nuxt UI Plugin](/pro/figma/teampad-dev-nuxt-ui-plugin.gif){.w-full .rounded .mb-2 .max-w-[636px]}
*Right now, only Nuxt UI components are supported, but the code of the plugin is [open source](https://github.com/Justineo/tempad-dev-plugin-nuxt-ui) and anyone can contribute to it.*

View File

@@ -0,0 +1,288 @@
<script setup lang="ts">
// @ts-expect-error yaml is not typed
import page from '.figma.yml'
import { animate } from 'motion'
import { joinURL } from 'ufo'
const { url } = useSiteConfig()
useSeoMeta({
title: page.title,
description: page.description,
ogTitle: page.title,
ogDescription: page.description,
ogImage: joinURL(url, '/pro/figma/og-image.png')
})
const video = ref<HTMLVideoElement | null>(null)
const played = ref(false)
onMounted(async () => {
// Animate cursors
await new Promise(resolve => setTimeout(resolve, 1000))
const figmaWordPosition = document.querySelector('#figma')?.getBoundingClientRect()
const nuxtWordPosition = document.querySelector('#nuxt')?.getBoundingClientRect()
const initialScrollX = window.scrollX
const initialScrollY = window.scrollY
if (figmaWordPosition && nuxtWordPosition) {
animate('#cursor1', { left: Math.round(Math.random() * window.outerWidth), top: Math.round(Math.random() * window.outerHeight) }, { duration: 0.1 })
.then(() => animate('#cursor1', { opacity: 1 }, { duration: 0.3 }))
.then(() => {
return animate('#cursor1', {
left: Math.round(figmaWordPosition.left + initialScrollX + figmaWordPosition.width / 2),
top: Math.round(figmaWordPosition.top + initialScrollY - figmaWordPosition.height / 4)
}, { duration: 1.5, delay: 0.2, ease: 'easeInOut' })
})
.then(() => animate('#cursor1', { scale: 0.8 }, { duration: 0.1, ease: 'easeOut' }))
.then(() => animate('#cursor1', { scale: 1 }, { duration: 0.1, ease: 'easeOut' }))
.then(() => animate('#figma', { color: 'var(--ui-info)' }, { duration: 0.3, ease: 'easeOut' }))
.then(() => animate('#cursor1', { left: Math.round(figmaWordPosition.left + initialScrollX + figmaWordPosition.width), top: Math.round(figmaWordPosition.top + initialScrollY) }, { duration: 0.6, ease: 'easeInOut' }))
animate('#cursor2', { left: Math.round(Math.random() * window.outerWidth), top: Math.round(Math.random() * window.outerHeight) }, { duration: 0.1, delay: 0.6 })
.then(() => animate('#cursor2', { opacity: 1 }, { duration: 0.3 }))
.then(() => {
return animate('#cursor2', {
left: Math.round(nuxtWordPosition.left + initialScrollX + nuxtWordPosition.width / 2),
top: Math.round(nuxtWordPosition.top + initialScrollY - nuxtWordPosition.height / 4)
}, { duration: 1.5, delay: 0.2, ease: 'easeInOut' })
})
.then(() => animate('#cursor2', { scale: 0.8 }, { duration: 0.1, ease: 'easeOut' }))
.then(() => animate('#cursor2', { scale: 1 }, { duration: 0.1, ease: 'easeOut' }))
.then(() => animate('#nuxt', { color: 'var(--ui-success)' }, { duration: 0.3, ease: 'easeOut' }))
.then(() => animate('#cursor2', { left: Math.round(nuxtWordPosition.left + initialScrollX + nuxtWordPosition.width), top: Math.round(nuxtWordPosition.top + initialScrollY) }, { duration: 0.6, ease: 'easeInOut' }))
}
})
</script>
<template>
<div class="relative">
<div id="cursor1" class="absolute z-10 pointer-events-none" :style="{ opacity: 0 }">
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 24 24" class="absolute top-0 left-0 drop-shadow-[0_1px_2px_rgb(0,0,0,0.25)] text-white dark:text-(--ui-bg)">
<path
fill="var(--ui-info)"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.5"
d="M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z"
/>
</svg>
<UBadge color="info" class="absolute top-[18px] left-[18px] py-1 px-1 rounded-sm font-semibold leading-none">
Sarah
</UBadge>
</div>
<div id="cursor2" class="absolute z-10 pointer-events-none" :style="{ opacity: 0 }">
<svg xmlns="http://www.w3.org/2000/svg" width="26" height="26" viewBox="0 0 24 24" class="absolute top-0 left-0 drop-shadow-[0_1px_2px_rgb(0,0,0,0.25)] text-white dark:text-(--ui-bg)">
<path
fill="var(--ui-success)"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.5"
d="M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z"
/>
</svg>
<UBadge color="success" class="absolute top-[18px] left-[18px] py-1 px-1 rounded-sm font-semibold leading-none">
Sebastien
</UBadge>
</div>
<UPageHero
:links="page.hero.links"
class="relative"
:ui="{
container: 'relative !pb-0'
}"
>
<template #title>
<MDC :value="page.hero.title" unwrap="p" />
</template>
<template #description>
<MDC :value="page.hero.description" unwrap="p" />
</template>
<!-- <img src="/pro/figma/nuxt-ui-figma.png" alt="Screnshot of the Nuxt UI Figma design kit" class="w-full h-auto border border-(--ui-border) border-b-0"> -->
<div class="relative">
<video
ref="video"
:controls="played"
playsinline
src="https://res.cloudinary.com/nuxt/video/upload/v1739267662/ui-pro/video4_aobki0.mp4"
poster="https://res.cloudinary.com/nuxt/video/upload/so_0/v1739267662/ui-pro/video4_aobki0.jpg"
:class="{ grayscale: !played }"
/>
<div v-if="!played" class="group cursor-pointer absolute inset-0 flex items-center justify-center backdrop-blur-xs" @click="video?.play(); played = true">
<UButton
icon="i-heroicons-play-20-solid"
size="xl"
color="neutral"
variant="solid"
class="group-hover:scale-105 transition-transform cursor-pointer drop-shadow-xl"
aria-label="Play video"
:ui="{
base: 'p-4'
}"
>
Watch 1 min demo
</UButton>
</div>
</div>
<div aria-hidden="true" class="absolute z-[-1] border-x border-(--ui-border) inset-0 mx-4 sm:mx-6 lg:mx-8" />
</UPageHero>
<UPageSection v-bind="page.features1" :ui="{ container: 'py-16 sm:py-16 lg:py-16', features: 'mt-0' }" class="border-y border-(--ui-border)" />
<UPageCTA
v-if="page.cta1"
variant="naked"
:ui="{
container: 'lg:grid-cols-0 !gap-0 px-4 sm:px-6 lg:px-8',
wrapper: 'grid grid-cols-1 lg:grid-cols-2',
description: 'lg:mt-0' }"
orientation="horizontal"
class="rounded-none bg-gradient-to-b from-(--ui-bg-muted) to-(--ui-bg)"
>
<template #title>
<MDC :value="page.cta1.title" unwrap="p" />
</template>
<template #description>
<MDC :value="page.cta1.description" unwrap="p" />
</template>
</UPageCTA>
<UPageSection v-bind="page.section1" orientation="horizontal" :ui="{ container: 'py-16 sm:py-16 lg:py-16' }">
<UTabs :items="(page.section1.tabs as any[])" size="sm" color="neutral" :unmount-on-hide="false">
<template #content="{ item }">
<NuxtImg
:width="item.width"
:height="item.height"
:src="item.src"
:alt="item.alt"
class="w-full h-auto rounded-[calc(var(--ui-radius)*2)]"
lazy
/>
</template>
</UTabs>
</UPageSection>
<UPageSection v-bind="page.section2" orientation="horizontal" :ui="{ container: 'py-16 sm:py-16 lg:py-16' }">
<NuxtImg
v-if="page.section2.image"
v-bind="page.section2.image"
class="w-full h-auto rounded-[calc(var(--ui-radius)*2)]"
lazy
/>
</UPageSection>
<UPageSection v-bind="page.section3" orientation="horizontal" :ui="{ container: 'py-16 sm:pt-16 lg:pt-16' }">
<NuxtImg
v-if="page.section3.image"
v-bind="page.section3.image"
class="w-full h-auto rounded-[calc(var(--ui-radius)*2)]"
lazy
/>
</UPageSection>
<USeparator />
<UPageSection
v-bind="page.section4"
orientation="vertical"
:ui="{
title: 'sm:text-left',
description: 'sm:text-left',
links: 'sm:justify-start',
container: 'relative !pb-0',
wrapper: 'sm:pl-8'
}"
>
<template #description>
<MDC :value="page.section4.description" unwrap="p" />
</template>
<div aria-hidden="true" class="absolute z-[-1] border-x border-(--ui-border) inset-0 mx-4 sm:mx-6 lg:mx-8" />
<ul class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 items-start justify-center border border-(--ui-border) border-b-0 sm:divide-x divide-y lg:divide-y-0 divide-(--ui-border)">
<li v-for="(step, index) in page?.section4.steps" :key="step.title" class="flex flex-col gap-y-4 justify-start group h-full p-4">
<NuxtImg
v-if="step.image"
v-bind="step.image"
class="rounded-(--ui-radius)"
lazy
/>
<div>
<h2 class="font-semibold inline-flex items-center gap-x-1">
<UBadge :label="index + 1" size="sm" color="neutral" variant="subtle" class="rounded-full tabular-nums" /> {{ step.title }}
</h2>
<p class="text-(--ui-text-muted) text-sm">
{{ step.description }}
</p>
</div>
</li>
</ul>
</UPageSection>
<UPageSection v-bind="page.features2" :ui="{ container: 'py-16 sm:py-16 lg:py-16', features: 'mt-0' }" class="border-y border-(--ui-border)" />
<UPageSection
v-if="page.pricing"
:title="page.pricing.title"
:description="page.pricing.description"
orientation="vertical"
:ui="{
title: 'sm:text-left',
description: 'sm:text-left',
links: 'sm:justify-start',
container: 'relative !pb-0',
wrapper: 'sm:pl-8'
}"
>
<div aria-hidden="true" class="absolute z-[-1] border-x border-(--ui-border) inset-0 mx-4 sm:mx-6 lg:mx-8" />
<UPricingPlans compact class="-space-x-px">
<UPricingPlan
v-for="(plan, index) in page.pricing.plans"
:key="index"
:title="plan.title"
:description="plan.description"
:price="plan.price"
:billing-period="plan.billing_period"
:billing-cycle="plan.billing_cycle"
:highlight="plan.highlight"
:features="plan.features"
:button="plan.button"
:terms="plan.terms"
class="rounded-none"
:class="plan.class"
>
<template #features>
<li v-for="(feature, i) in plan.features" :key="i" class="flex items-center gap-2 min-w-0">
<UIcon name="i-lucide-circle-check" class="size-5 shrink-0 text-(--ui-primary)" />
<MDC :value="feature" unwrap="p" tag="span" class="text-sm truncate text-(--ui-text-accented)" />
</li>
</template>
<template #button>
<div class="flex flex-col w-full items-center gap-2">
<UButton v-bind="plan.button" block size="lg" />
<UButton
v-if="plan.extraButton"
v-bind="plan.extraButton"
block
size="lg"
variant="outline"
color="neutral"
/>
</div>
</template>
</UPricingPlan>
</UPricingPlans>
</UPageSection>
<UPageCTA v-if="page.customers" :title="page.customers.title" :ui="{ title: '!text-base font-medium', container: 'sm:py-12 sm:gap-8' }" variant="outline" class="rounded-none">
<UPageMarquee pause-on-hover :ui="{ root: '[--duration:40s]' }">
<img
v-for="(logo, index) in page.customers.items"
:key="index"
v-bind="logo"
class="h-6 shrink-0 max-w-[140px] filter invert dark:invert-0"
>
</UPageMarquee>
</UPageCTA>
<UPageSection v-bind="page.faq" :ui="{ container: 'relative' }">
<div aria-hidden="true" class="hidden lg:block absolute z-[-1] border-x border-(--ui-border) inset-0 mx-4 sm:mx-6 lg:mx-8" />
<UPageAccordion
multiple
:items="(page.faq.items as any[])"
class="max-w-4xl mx-auto"
>
<template #body="{ item }">
<MDC :value="item.content" unwrap="p" />
</template>
</UPageAccordion>
</UPageSection>
</div>
</template>

View File

@@ -0,0 +1,217 @@
title: Nuxt UI Pro Pricing
description: Start for free in development mode, then upgrade to a paid plan to unlock the full features of Nuxt UI Pro when you are ready to launch.
pricing:
headline: Pricing
title: Upgrade to Nuxt UI [Pro]{class="text-(--ui-primary)"}.
description: On top of 40+ open source components from Nuxt UI, Pro gives you access to 50+ premium Vue components to create beautiful & responsive Nuxt applications in minutes. It includes all primitives to build landing pages, documentations, blogs, dashboards or entire SaaS products.
freePlan:
title: Free in development
description: Try Nuxt UI Pro for free in development, no credit card required. Upgrade when ready to deploy.
variant: soft
orientation: horizontal
button:
label: Get started for Free
to: '/getting-started/installation/pro/nuxt'
color: 'neutral'
variant: 'outline'
figma:
title: Figma Kit Pro
description: Get all Nuxt UI Pro components in a Figma kit to design your next application before coding. Everything you need, from wire-framing to high-fidelity web integration.
variant: soft
orientation: horizontal
price: $149 - $349
terms: Solo & Team licenses available.
features:
- 1700+ components & variants from Nuxt UI & UI Pro
- 'Variables: primary, neutral, fonts, rounded, shadows, etc.'
- Light & dark mode support
- 'Templates: Starter, Landing, Docs, SaaS and Dashboard'
- Auto-layout & responsive ready
- Tailwind CSS assets & icons included
- Free [preview available](https://www.figma.com/design/mxXR9binOSLU3rYKZZRPXs/PREVIEW---NuxtUIPro-V3-BETA?m=auto&t=c4598Wr0rZwKPs5M-1)
- Includes Nuxt UI [Figma Kit](https://www.figma.com/community/file/1288455405058138934)
button:
label: Explore Figma Kit Pricing
to: 'https://nuxt.lemonsqueezy.com/buy/17213c49-621b-4c2c-9478-3a50a099003d'
color: 'neutral'
plans:
- title: Solo
description: Tailored for indie hackers, freelancers and solo founders.
price: $249
billing_period: one-time payment
billing_cycle: plus local taxes
features:
- One developer
- Unlimited projects
- Access to the GitHub repository
- Unlimited minor & patch updates
- Lifetime access
button:
label: Buy now
to: https://nuxt.lemonsqueezy.com/buy/057dacb2-87ba-4dc1-9256-59ee5b3bd394
- title: Startup
description: Best suited for small teams, startups and agencies.
price: $499
billing_period: one-time payment
billing_cycle: plus local taxes
features:
- Up to 5 developers
- Unlimited projects
- Access to the GitHub repository
- Unlimited minor & patch updates
- Lifetime access
button:
label: Buy now
to: https://nuxt.lemonsqueezy.com/buy/2e042a33-7e76-4dda-bd68-e353c182e571
highlight: true
- title: Organization
description: Ideal for larger teams and organizations.
price: $999
billing_period: one-time payment
billing_cycle: plus local taxes
features:
- Up to 20 developers
- Unlimited projects
- Everything in Startup
- Prioritized feature requests
- Unlimited minor & patch updates
- Lifetime access
button:
label: Buy now
to: https://nuxt.lemonsqueezy.com/buy/2979099c-b7a0-4ba1-90e0-a0d60509b92d
logos:
- src: /pro/logos/springfieldclinic.svg
alt: Springfield Clinic
- src: /pro/logos/churnkey.svg
alt: Churnkey
- src: /pro/logos/bosch.svg
alt: BOSCH
- src: /pro/logos/blizzard.svg
alt: Blizzard
- src: /pro/logos/bodet.svg
alt: Bodet
- src: /pro/logos/win.svg
alt: WinReality
- src: /pro/logos/tower.svg
alt: Tower Research
- src: /pro/logos/liegeairport.svg
alt: Liege Airport
- src: /pro/logos/wuniversity.svg
alt: University of Washington
- src: /pro/logos/funda.svg
alt: Funda
- src: /pro/logos/exxonmobil.svg
alt: ExxonMobil
- src: /pro/logos/mainpost.svg
alt: Main Post
- src: /pro/logos/insep.svg
alt: INSEP
- src: /pro/logos/applause.svg
alt: Applause
- src: /pro/logos/instadapp.svg
alt: Instadapp
testimonials:
title: What people are saying
description: Nuxt UI Pro is already trusted by 2,000+ users and teams around the world.
items:
- quote: "We were using a SaaS service for the docs site, but were left unfulfilled. We put in the effort to do it in house, with UI Pro and not only did we get complimented by a prospect on our site, but they wanted to know our platform."
user:
name: 'Anthony Bettini'
description: 'CEO and founder of VulnCheck'
to: 'https://www.linkedin.com/in/anthonybettini/'
target: _blank
avatar:
src: 'https://media.licdn.com/dms/image/v2/C4E03AQEY3pmXsH8hDg/profile-displayphoto-shrink_200_200/profile-displayphoto-shrink_200_200/0/1519741249602?e=1743638400&v=beta&t=lw2K6vS0OOCZWGtHY1buJVkRItQCa4OQw0vzAhhpJk8'
- quote: "Wow, Nuxt UI Pro is a total game-changer! I'm seriously impressed with the quality, attention to detail, and the insane variety of components you get. It's like hitting the jackpot for any developer. I've saved countless hours that I would've spent stressing over making my apps look good, with amazing accessible UX, and instead, I've been able to focus on the real deal building the app itself. It's an instant buy for me, every single time. No second thoughts!"
user:
name: 'Yaz Jallad'
description: 'Founder Ninjaparade Digital'
to: 'https://twitter.com/ninjaparade/'
target: _blank
avatar:
src: 'https://pbs.twimg.com/profile_images/1824690890222485504/lQ7v1AGt_400x400.jpg'
- quote: "Nuxt UI Pro saves 100s of hours of dev and design time while delivering a clean professional look on any device."
user:
name: 'Kevin Olson'
description: 'Founder of Fume.app'
to: 'https://github.com/acidjazz'
target: _blank
avatar:
src: 'https://ipx.nuxt.com/f_auto,s_40x40/gh_avatar/acidjazz'
srcset: 'https://ipx.nuxt.com/f_auto,s_80x80/gh_avatar/acidjazz 2x'
- quote: "I decided to replace my custom-built components with a component library and chose Nuxt UI Pro. It only took me a few hours, and the new UI looks more professional. Integrating the library is easy; the components are well-documented and highly customizable. I can only recommend it; this library is my new choice for new SaaS products."
user:
name: 'Michael Hoffmann'
description: 'Senior Frontend Developer'
to: 'https://mokkapps.de/'
target: _blank
avatar:
src: 'https://ipx.nuxt.com/f_auto,s_40x40/gh_avatar/mokkapps'
srcset: 'https://ipx.nuxt.com/f_auto,s_80x80/gh_avatar/mokkapps 2x'
- quote: "Nuxt UI Pro is my go to component library. Out-of-the-box it handles all of the UI demands I throw at it while looking great. The customisation is really worth thought out, allowing you to override components in a breeze. Always amazed at the improvements dropped in each update as well, the team is doing an amazing job."
user:
name: 'Harlan Wilton'
description: 'Nuxt core team member'
to: 'https://github.com/harlan-zw'
target: _blank
avatar:
src: 'https://ipx.nuxt.com/f_auto,s_40x40/gh_avatar/harlan-zw'
srcset: 'https://ipx.nuxt.com/f_auto,s_80x80/gh_avatar/harlan-zw 2x'
- quote: "I jumped at the chance to buy the Nuxt team's new UI kit as soon as I saw it. While I'm already a fan of Nuxt UI, the pro version takes it to a whole new level and lets me paste entire blocks into all my projects, saving me a ton of time."
user:
name: 'Thomas Sanlis'
description: 'Freelance developer and designer'
to: 'https://twitter.com/T_Zahil'
target: _blank
avatar:
src: 'https://pbs.twimg.com/profile_images/1374040164180299791/ACw4G3nZ_400x400.jpg'
- quote: "Nuxt UI has allowed me to develop my SaaS without any prior mockups. The design quality of their components and the intelligence of the DX meant that I was able to try many different layouts for my application until I found the perfect UX for my users. Nuxt UI is the ui-kit I would have dreamed of building myself, and Nuxt UI Pro makes things even easier when you want to go further with your SaaS. Kudos to the team."
user:
name: 'Benjamin Code'
description: 'YouTuber and SaaS builder'
to: 'https://twitter.com/benjamincode'
target: _blank
avatar:
src: 'https://pbs.twimg.com/profile_images/1607353032420769793/I8qQSUfQ_400x400.jpg'
- quote: "Nuxt UI Pro is my preferred choice for everything, from a POC to a web platform. It's ready to use out-of-the-box and assists me in crafting pixel-perfect UIs. It saves me a significant amount of time while remaining highly customizable. Give it a try, and you won't be let down."
user:
name: 'Estéban Soubiran'
description: 'Web developer and UnJS member'
to: 'https://twitter.com/soubiran_'
target: _blank
avatar:
src: 'https://pbs.twimg.com/profile_images/1801649350319218689/aS_X_iTm_400x400.jpg'
- quote: "As someone who builds a lot of projects, Nuxt UI Pro has been a game-changer. It's not just about saving time it's about having components that are thoughtfully designed and just work. The developer experience is exceptional, and I can focus on building features instead of tweaking UI components."
user:
name: 'Hugo Richard'
description: 'Frontend Engineer at NuxtLabs'
to: 'https://twitter.com/hugorcd__'
target: _blank
avatar:
src: 'https://ipx.nuxt.com/f_auto,s_40x40/gh_avatar/hugorcd'
srcset: 'https://ipx.nuxt.com/f_auto,s_80x80/gh_avatar/hugorcd 2x'
faq:
title: Frequently Asked Questions
description: If you can't find what you're looking for, email our support team and if you're lucky someone will get back to you.
items:
- label: What is the difference between Nuxt UI Pro and Nuxt UI?
content: Nuxt UI Pro is a collection of premium Vue components, composables and utils built on top of Nuxt UI. It includes advanced responsive components ([Header](/components/header), [PageHero](/components/page-hero), [PricingPlan](/components/pricing-plan), [BlogPost](/components/blog-post), etc.) designed ot help you build web applications faster.
defaultOpen: true
- label: Do you have a free trial?
content: We have much better than a free trial, you can use Nuxt UI Pro for free in development mode. Once you are ready to deploy your application, you can purchase a license.
- label: What do I get with my license?
content: Once you purchase a license, you will receive a license key to [activate](/pro/activate) by inviting the team members to our private GitHub repository. On top of having access to the source code and private roadmap, the license key will allow you to [build your project to production](/getting-started/license#build) with the `nuxt build` command.
- label: Can I use Nuxt UI Pro for Open Source projects?
content: Yes, you can use Nuxt UI Pro for your open source projects as well as your commercial projects as long as you don't sell Nuxt UI Pro as a product and that you don't share your license key.
- label: What does “Unlimited minor & patch updates” include?
content: We add new components and improvements to Nuxt UI Pro as we get new ideas and feedback, you will receive these updates for the major version you purchased. :br **Your license key will work forever for the major version.** We may release a major version including more advanced components and features in the future, you will be able to upgrade to this version with a generous discount.
- label: I purchased Nuxt UI Pro previous versions, do I need to purchase the version 3?
content: '**The version 3 is a free upgrade**, so the license you bought on previous versions will be valid for v3.'
- label: What does “lifetime access” means?
content: Nuxt UI Pro is a one-time purchase, with no recurring subscription. You will have access to all assets of Nuxt UI Pro forever.
- label: Do you have discounts for students or non-profits?
content: Yes, we offer a 50% discount for students using Nuxt UI Pro purely for educational purposes. Contact us at ui-pro@nuxt.com with your details and we'll send you a discount code.
- label: Do you offer technical support?
content: Once you sign up you get access to our private GitHub repository, where you can ask questions, report bugs or feature requests and get help from other customers. If you require more specialised support or consultancy, contact us at ui-pro@nuxt.com.
- label: What is your refund policy?
content: If you are not satisfied with Nuxt UI Pro, let us know within 14 days of your purchase at ui-pro@nuxt.com and we'll refund your money.

View File

@@ -0,0 +1,174 @@
title: Build faster with Nuxt UI Pro.
description: A collection of premium Vue components, composables and utils built on top of Nuxt UI, oriented on structure and layout and designed to be used as building blocks for your application.
hero:
title: Build faster with Nuxt UI [Pro]{class="text-(--ui-primary)"}.
description: A collection of premium Vue components, composables and utils built on top of Nuxt UI. :br Focused on structure and layout, these **responsive components** are designed to be the perfect **building blocks for your next idea**.
links:
- label: Get started
icon: i-lucide-arrow-right
trailing: true
to: /getting-started/installation/pro/nuxt
size: xl
- label: Purchase a license
size: xl
color: neutral
variant: outline
to: /pro/pricing
features:
title: Create stunning Vue applications faster.
description: Nuxt UI Pro comes packed with powerful features to help you build modern, performant, accessible and responsive Nuxt applications at record speed. From pre-built UI sections to Figma design kits, every detail is crafted to speed up your development and deliver a polished user experience.
features:
- title: 40+ Ready-to-use Sections
description: Pre-built UI components for landing pages, documentation, blogs, dashboards, and more—ready to use out of the box.
icon: i-lucide-layout-grid
- title: Auto Dark Mode
description: Seamlessly adapts to user preferences with a built-in dark mode switch—no extra configuration needed.
icon: i-lucide-moon
- title: Blazing-fast Performance
description: Optimized for Nuxt 3 with minimal bundle size, lightning-fast rendering, and best practices in performance.
icon: i-lucide-zap
- title: SEO & Accessibility Ready
description: Built with proper semantic HTML, structured data, and accessibility in mind for better rankings and usability.
icon: i-lucide-search-check
- title: Fully Customizable UI
description: Modify colors, fonts, spacing, and layouts with Tailwind CSS and Nuxt UIs design tokens to match your brand identity.
icon: i-lucide-settings-2
- title: Nuxt Content Support
description: Write content with Markdown and MDC, making it easy to build documentation, blogs, and knowledge bases.
icon: i-simple-icons-markdown
- title: Vue-only mode
description: Enjoy the benefits of Nuxt UI Pro without Nuxt. Integrate it seamlessly into your Vue 3 + Vite projects and build modern UIs with ease.
icon: i-simple-icons-vuedotjs
- title: Built-in Internationalization (i18n)
description: Easily localize your site with built-in support for multiple languages and right-to-left (RTL) layouts.
icon: i-lucide-globe
- title: Figma Design Kits
description: Match your development workflow with Nuxt UI & UI Pro Figma UI kits, ensuring a fast transition from design to code.
icon: i-simple-icons-figma
authorQuote:
quote: Nuxt UI, born from a desire to improve Vue component development, is the go-to library for building modern web interfaces. We aim to provide you with a comprehensive set of tools to create and customize your next UI while maintaining the best developer experience.
user:
name: Benjamin Canac
description: Author of Nuxt UI
to: https://github.com/benjamincanac
avatar:
src: https://github.com/benjamincanac.png
sections:
- title: The freedom to build anything
description: Nuxt UI Pro ships with an extensive set of advanced components that cover a wide range of use-cases. Carefully crafted to reduce boilerplate code without sacrificing flexibility.
id: features
features:
- name: Fully customizable
description: Like Nuxt UI, change the style of any component from your App Config or customize them specifically through the ui prop.
icon: i-lucide-pencil-ruler
- name: Slots for everything
description: Each component leverages the power of Vue's slots to give you the flexibility to build anything.
icon: i-lucide-code
- name: Responsive by design
description: Nuxt UI Pro components aims to structure your content, they are responsive by design and will adapt to any screen size.
icon: i-lucide-layout
links:
- label: Explore components
to: /components
trailingIcon: i-lucide-arrow-right
code: |
```vue [app.vue]
<script setup lang="ts">
const links = [
{ to: '/', label: 'Home' },
{ to: '/about', label: 'About' },
{ to: '/contact', label: 'Contact' }
]
</script>
<template>
<UApp>
<UHeader :links="links" />
<UPageHero title="Hello World" />
<UPageSection title="Features">
<UPageGrid>
<UPageCard title="First Card" />
<UPageCard title="Second Card" />
<UPageCard title="Third Card" />
</UPageGrid>
</UPageSection>
<UFooter />
</UApp>
</template>
```
- title: The flexibility to control your data
description: Although you can use any data source you want, Nuxt UI Pro is fully integrated with Nuxt Content and provides additional features when the module is detected.
reverse: true
features:
- name: 'Write Markdown with ease'
description: Nuxt UI Pro overrides Nuxt Content prose components to make them awesome but also adds new ones like Callout, CodeGroup, Field, etc.
icon: i-simple-icons-markdown
- name: Full-Text Search out of the box
description: 'Nuxt UI Pro ships with a ready to use command palette component. No need to setup Algolia DocSearch anymore.'
icon: i-lucide-search
links:
- label: Nuxt Content integration
to: /getting-started/content
icon: i-lucide-arrow-right
trailing: true
code: |
```vue [pages/\[...slug\\].vue]
<script setup lang="ts">
const route = useRoute()
const { data: page } = await useAsyncData(route.path, () => queryCollection('content').path(route.path).first())
</script>
<template>
<UPage>
<UPageHeader :title="page.title" :description="page.description" :links="page.links" />
<UPageBody>
<ContentRenderer v-if="page.body" :value="page" />
</UPageBody>
<template #right>
<UContentToc :links="page.body.toc.links" />
</template>
</UPage>
</template>
```
templates:
headline: Templates
title: Kickstart with Nuxt UI Pro in seconds
description: Choose from a variety of templates to get started with Nuxt UI Pro in seconds. Each template is designed to help you build beautiful and responsive Nuxt applications in minutes.
items:
- title: Landing
description: A template for building a landing page with Nuxt UI Pro.
icon: i-lucide-layout
to: 'https://landing-template.nuxt.dev/'
image: '/pro/templates/landing.png'
- title: Saas
description: A template for building a SaaS application with Nuxt UI Pro.
icon: i-lucide-cloud
to: 'https://saas-template.nuxt.dev/'
image: '/pro/templates/saas.png'
- title: Docs
description: A template for building a documentation site with Nuxt UI Pro.
icon: i-lucide-book
to: 'https://docs-template.nuxt.dev/'
image: '/pro/templates/docs.png'
- title: Dashboard
description: A template for building a dashboard with Nuxt UI Pro.
icon: i-lucide-chart-bar
to: 'https://dashboard-template.nuxt.dev/'
image: '/pro/templates/dashboard.png'
cta:
title: Start with Nuxt UI Pro today!
description: Nuxt UI Pro is free in development, but you need a license to use it in production.
links:
- label: Purchase a license
to: '/pro/pricing'
icon: i-lucide-shopping-cart
- label: License
to: '/getting-started/license'
trailingIcon: i-lucide-circle-help
variant: subtle

View File

@@ -0,0 +1,112 @@
title: Official Nuxt UI Pro Templates
description: 'Ready to use templates powered by our premium Vue components and Nuxt Content. The templates are responsive, accessible and easy to customize so you can get started in no time.'
hero:
title: Official Nuxt UI [Pro]{.text-(--ui-primary)} Templates
description: 'Ready to use templates powered by our premium Vue components and Nuxt Content.<br class="hidden lg:block"> The templates are responsive, accessible and easy to customize so you can get started in no time.'
navigation: false
links:
- label: Get started
to: /getting-started/installation/pro/nuxt#use-an-official-template
color: neutral
size: xl
trailingIcon: i-lucide-arrow-right
- label: Purchase a license
size: xl
color: neutral
variant: outline
to: /pro/pricing
templates:
- title: 'Landing'
description: "A landing page template you can use as a starting point for your next idea. You can change the content easily in [`content/index.yml`](https://github.com/nuxt-ui-pro/landing/blob/v3/content/index.yml)."
thumbnail:
dark: https://assets.hub.nuxt.com/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2xhbmRpbmctdGVtcGxhdGUubnV4dC5kZXYiLCJpYXQiOjE3Mzk0NjMzNzV9.ja2nUDVOoIFvyaMmg9Jn51uNMoYYt4WA1KWUQBWwUPo.jpg?theme=dark
light: https://assets.hub.nuxt.com/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2xhbmRpbmctdGVtcGxhdGUubnV4dC5kZXYiLCJpYXQiOjE3Mzk0NjMzNzV9.ja2nUDVOoIFvyaMmg9Jn51uNMoYYt4WA1KWUQBWwUPo.jpg?theme=light
features:
- title: Full responsive
icon: i-lucide-smartphone
- title: Features, Pricing, Testimonials and FAQ sections
icon: i-lucide-rows-3
- title: Write content in YAML
icon: i-simple-icons-yaml
links:
- label: Live preview
to: https://landing-template.nuxt.dev
target: _blank
trailingIcon: i-lucide-arrow-up-right
color: neutral
- label: Use this template
to: https://github.com/nuxt-ui-pro/landing/tree/v3
target: _blank
icon: i-simple-icons-github
color: neutral
variant: outline
- title: 'Docs'
description: "A ready-to-use documentation template integrated with [Nuxt Content](https://content.nuxt.com). You can start writing your docs right away inside the [`content/`](https://github.com/nuxt-ui-pro/docs/tree/v3/content) directory."
thumbnail:
dark: https://assets.hub.nuxt.com/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2RvY3MtdGVtcGxhdGUubnV4dC5kZXYiLCJpYXQiOjE3Mzk0NjM0MTd9.ltVAqPgKG38O01X1zl6MXfrJc55nf9OewXNFjpZ_2JY.jpg?theme=dark
light: https://assets.hub.nuxt.com/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2RvY3MtdGVtcGxhdGUubnV4dC5kZXYiLCJpYXQiOjE3Mzk0NjM0MTd9.ltVAqPgKG38O01X1zl6MXfrJc55nf9OewXNFjpZ_2JY.jpg?theme=light
features:
- title: Write pages in Markdown
icon: i-simple-icons-markdown
- title: Generated navigation & table of contents
icon: i-lucide-text
- title: Full-text search out of the box
icon: i-lucide-search
links:
- label: Live preview
to: https://docs-template.nuxt.dev
target: _blank
trailingIcon: i-lucide-arrow-up-right
color: neutral
- label: Use this template
to: https://github.com/nuxt-ui-pro/docs/tree/v3
target: _blank
variant: outline
icon: i-simple-icons-github
color: neutral
- title: 'SaaS'
description: "A fully built SaaS application to launch your next project. It includes a landing page, a pricing page, a documentation and a blog which can customized easily from the `content/` directory."
features:
- title: Includes Landing & Docs sections
icon: i-lucide-grid-2x2-plus
- title: Customizable command palette
icon: i-lucide-command
- title: Authentication pages (login, register)
icon: i-lucide-user-round-check
links:
- label: Live preview (soon)
to: https://saas-template.nuxt.dev
target: _blank
trailingIcon: i-lucide-arrow-up-right
color: neutral
disabled: true
- label: Use this template (soon)
to: https://github.com/nuxt-ui-pro/saas/tree/v3
target: _blank
variant: outline
icon: i-simple-icons-github
color: neutral
disabled: true
- title: 'Dashboard'
description: "A template to illustrate how to build your own dashboard with the 15+ latest Nuxt UI Pro components, designed specifically to create a consistent look and feel."
features:
- title: Mix with SaaS template for a complete solution
icon: i-lucide-puzzle
- title: Includes custom components for charts, date pickers, etc.
icon: i-lucide-bar-chart-big
- title: Resizable multi-column layout
icon: i-lucide-columns-3
links:
- label: Live preview (soon)
to: https://dashboard-template.nuxt.dev
target: _blank
trailingIcon: i-lucide-arrow-up-right
color: neutral
disabled: true
- label: Use this template (soon)
to: https://github.com/nuxt-ui-pro/dashboard/tree/v3
target: _blank
icon: i-simple-icons-github
color: neutral
variant: outline
disabled: true

View File

@@ -0,0 +1,115 @@
<script setup lang="ts">
import { z } from 'zod'
import type { FormSubmitEvent } from '@nuxt/ui'
const title = 'Activate your Nuxt UI Pro License'
const description = 'Enable Nuxt UI Pro in your production projects by activating your license key received by email and get invited to the GitHub private repository.'
const route = useRoute()
useSeoMeta({
title,
description,
ogTitle: `${title} - Nuxt UI Pro`,
ogDescription: description
})
defineOgImageComponent('Docs', {
headline: 'Pro'
})
const schema = z.object({
license: z.string().length(36, 'Invalid license key'),
username: z.string().min(1, 'Required')
})
type Schema = z.output<typeof schema>
const state = reactive<Partial<Schema>>({
license: '',
username: ''
})
const activating = ref(false)
const successMessage = ref()
const errorMessage = ref('')
async function submit(event: FormSubmitEvent<any>) {
activating.value = true
errorMessage.value = ''
successMessage.value = ''
try {
const res: { activationsLeft: number, activationsTotal: number } = await $fetch<{ activationsLeft: number, activationsTotal: number }>('https://api.nuxtlabs.com/ui-pro/activate', {
method: 'POST',
body: {
key: event.data.license,
username: event.data.username
}
})
successMessage.value = 'License activated!'
if (res.activationsTotal > 1) {
successMessage.value += ` ${res.activationsLeft} activation${res.activationsLeft > 1 ? 's' : ''} left.`
}
state.username = ''
} catch (err) {
// @ts-expect-error this is not properly typed
errorMessage.value = err.data?.message || err.message
}
activating.value = false
}
onMounted(() => {
if (route.query.license_key && !state.license) {
state.license = route.query.license_key as string
}
})
</script>
<template>
<UPageHero headline="License Activation" :title="title" :description="description">
<template #top>
<div class="absolute z-[-1] rounded-full bg-(--ui-primary) blur-[300px] size-60 sm:size-80 transform -translate-x-1/2 left-1/2 -translate-y-80" />
<StarsBg />
</template>
<div>
<UCard class="lg:w-1/2 m-auto backdrop-blur-sm">
<UForm
:schema="schema"
:validate-on="['blur']"
:state="state"
class="space-y-4"
@submit="submit"
>
<UFormField label="License Key" name="license">
<UInput v-model="state.license" autocomplete="off" :ui="{ root: 'flex' }" />
</UFormField>
<UFormField label="GitHub Username" name="username">
<UInput v-model="state.username" autocomplete="off" :ui="{ root: 'flex' }" />
</UFormField>
<UButton type="submit" :loading="activating" :disabled="state.license?.length !== 36 || !state.username">
Activate the license
</UButton>
<UAlert v-if="successMessage" color="success" variant="subtle" :title="successMessage">
<template #description>
The GitHub invitation to <NuxtLink to="https://github.com/nuxt/ui-pro/invitations" external target="_blank" class="font-bold text-primary hover:underline">
Nuxt UI Pro repository
</NuxtLink> has been sent and
you can now use your license key in your projects, checkout the
<NuxtLink class="font-bold underline" to="/pro/getting-started/installation">
installation guide
</NuxtLink>
</template>
</UAlert>
<UAlert v-else-if="errorMessage" color="error" variant="subtle" :title="errorMessage" />
</UForm>
</UCard>
<p class="text-sm text-center text-neutral-500 dark:text-neutral-400 my-4">
If you purchased a license with multiple seats, activate the license key for each of your team members.
</p>
</div>
</UPageHero>
</template>

View File

@@ -0,0 +1,111 @@
<script setup lang="ts">
// @ts-expect-error yaml is not typed
import page from '.content/pro.yml'
useSeoMeta({
title: page.title,
ogTitle: page.title,
description: page.description,
ogDescription: page.description
})
defineOgImageComponent('Docs', {
headline: 'Pro'
})
</script>
<template>
<div class="relative">
<UPageHero
:links="page.hero.links"
class="relative"
orientation="horizontal"
>
<template #title>
<MDC :value="page.hero.title" unwrap="p" />
</template>
<template #description>
<MDC :value="page.hero.description" unwrap="p" />
</template>
<template #top>
<div class="absolute z-[-1] rounded-full bg-(--ui-primary) blur-[300px] size-60 sm:size-80 transform -translate-x-1/2 left-1/2 -translate-y-80" />
<StarsBg />
</template>
<PromotionalVideo />
</UPageHero>
<UPageSection
v-bind="page.features"
:ui="{ title: 'text-left', description: 'text-left' }"
/>
<UPageCTA
:description="page.authorQuote.quote"
variant="soft"
class="rounded-none"
:ui="{ container: 'sm:py-12 lg:py-12 sm:gap-8', description: 'before:content-[open-quote] after:content-[close-quote]' }"
>
<UUser
v-bind="page.authorQuote.user"
size="xl"
class="justify-center"
/>
</UPageCTA>
<UPageSection
v-for="(section, index) in page.sections"
:key="index"
v-bind="section"
orientation="horizontal"
>
<MDC :value="section.code" />
</UPageSection>
<UPageSection
id="templates"
v-bind="page.templates"
class="overflow-hidden"
>
<UCarousel
v-slot="{ item }"
loop
arrows
dots
:autoplay="{ delay: 3000 }"
:items="(page.templates.items as any[])"
:ui="{ item: 'basis-1/2', container: 'py-2' }"
>
<UPageCard
:to="item.to"
:description="item.description"
class="group"
:ui="{ container: 'p-4 sm:p-4', title: 'flex items-center gap-1' }"
>
<template #title>
<UIcon :name="item.icon" />
<span>
{{ item.title }}
</span>
</template>
<img
:src="item.image"
:alt="item.title"
class="rounded-lg grayscale group-hover:grayscale-0 transition-all duration-200 ease-in-out"
>
</UPageCard>
</UCarousel>
</UPageSection>
<USeparator />
<UPageCTA
v-bind="page.cta"
variant="naked"
class="overflow-hidden"
>
<div class="absolute rounded-full dark:bg-(--ui-primary) blur-[250px] size-40 sm:size-50 transform -translate-x-1/2 left-1/2 -translate-y-80" />
<StarsBg />
</UPageCTA>
</div>
</template>

View File

@@ -0,0 +1,114 @@
<script setup lang="ts">
// @ts-expect-error yaml is not typed
import page from '.content/pricing.yml'
useSeoMeta({
title: page.title,
ogTitle: page.title,
description: page.description,
ogDescription: page.description
})
defineOgImageComponent('Docs', {
headline: 'Pro'
})
</script>
<template>
<div class="relative">
<UPageHero
class="relative"
:description="page.pricing.description"
>
<template #title>
<MDC :value="page.pricing.title" unwrap="p" />
</template>
<template #top>
<div class="absolute z-[-1] rounded-full bg-(--ui-primary) blur-[300px] size-60 sm:size-80 transform -translate-x-1/2 left-1/2 -translate-y-80" />
<StarsBg />
</template>
<UContainer>
<UPricingPlan
v-bind="page.pricing.freePlan"
class="mb-16"
/>
<UPricingPlans
class="mb-16"
scale
>
<UPricingPlan
v-for="(plan, index) in page.pricing.plans"
:key="index"
:title="plan.title"
:description="plan.description"
:price="plan.price"
:billing-period="plan.billing_period"
:billing-cycle="plan.billing_cycle"
:highlight="plan.highlight"
:scale="plan.highlight"
variant="soft"
:features="plan.features"
:button="plan.button"
/>
</UPricingPlans>
<UPricingPlan
v-bind="page.pricing.figma"
>
<template #features>
<li v-for="(feature, index) in page.pricing.figma.features" :key="index" class="flex items-center gap-2 min-w-0">
<UIcon name="i-lucide-circle-check" class="size-5 text-(--ui-primary) shrink-0" />
<MDC :value="feature" unwrap="p" class="text-sm truncate text-(--ui-text-toned)" />
</li>
</template>
</UPricingPlan>
</UContainer>
</UPageHero>
<UPageSection
id="testimonials"
v-bind="page.testimonials"
>
<UPageMarquee pause-on-hover :ui="{ root: '[--duration:40s]' }">
<img
v-for="(logo, index) in page.logos"
:key="index"
v-bind="logo"
class="h-6 shrink-0 max-w-[140px] filter invert dark:invert-0"
>
</UPageMarquee>
<UContainer>
<UPageColumns class="xl:columns-4">
<UPageCard
v-for="(testimonial, index) in page.testimonials.items"
:key="index"
variant="subtle"
:description="testimonial.quote"
:ui="{ description: 'before:content-[open-quote] after:content-[close-quote]' }"
>
<template #footer>
<UUser
v-bind="testimonial.user"
size="xl"
/>
</template>
</UPageCard>
</UPageColumns>
</UContainer>
</UPageSection>
<UPageSection
id="faq"
v-bind="page.faq"
class="scroll-mt-(--ui-header-height)"
>
<UPageAccordion
multiple
:items="(page.faq.items as any[])"
class="max-w-4xl mx-auto"
>
<template #body="{ item }">
<MDC :value="item.content" unwrap="p" />
</template>
</UPageAccordion>
</UPageSection>
</div>
</template>

View File

@@ -0,0 +1,67 @@
<script setup lang="ts">
// @ts-expect-error yaml is not typed
import page from '.content/templates.yml'
useSeoMeta({
title: page.title,
description: page.description,
ogTitle: page.title,
ogDescription: page.description
})
defineOgImageComponent('Docs', {
headline: 'Pro'
})
</script>
<!-- eslint-disable vue/no-v-html -->
<template>
<div class="relative">
<UPageHero :links="page.links">
<template #top>
<div class="absolute z-[-1] rounded-full bg-(--ui-primary) blur-[300px] size-60 sm:size-80 transform -translate-x-1/2 left-1/2 -translate-y-80" />
<StarsBg />
</template>
<template #title>
<MDC :value="page.hero.title" unwrap="p" />
</template>
<template #description>
<MDC :value="page.hero.description" unwrap="p" />
</template>
</UPageHero>
<UPageSection
v-for="(template, index) in page.templates"
:key="index"
:title="template.title"
:links="template.links"
:features="template.features"
orientation="horizontal"
reverse
class="*:!pt-0"
:ui="{ title: 'lg:text-4xl' }"
>
<template #description>
<MDC :value="template.description" unwrap="p" />
</template>
<UColorModeImage
v-if="template.thumbnail"
v-bind="template.thumbnail"
class="w-full h-auto rounded-(--ui-radius) border border-(--ui-border)"
width="656"
height="369"
/>
<UCarousel
v-else-if="template.images"
v-slot="{ item }"
:items="(template.images as any[])"
dots
>
<NuxtImg v-bind="item" class="w-full h-full object-cover" width="576" height="360" />
</UCarousel>
<Placeholder v-else class="w-full h-full aspect-video" />
</UPageSection>
</div>
</template>

View File

@@ -0,0 +1,31 @@
<script setup lang="ts">
const { data: page } = await useAsyncData('terms', () => queryCollection('content').path('/pro/terms').first())
if (!page.value) {
throw createError({ statusCode: 404, statusMessage: 'Page not found', fatal: true })
}
const title = page.value.title
const description = page.value.description
useSeoMeta({
title,
description,
ogTitle: `${title} - Nuxt UI Pro`,
ogDescription: description
})
defineOgImageComponent('Docs', {
headline: 'Pro'
})
</script>
<template>
<UContainer>
<UPage v-if="page">
<UPageHeader :title="page.title" :description="page.description" />
<UPageBody prose>
<ContentRenderer v-if="page.body" :value="page" />
</UPageBody>
</UPage>
</UContainer>
</template>

Some files were not shown because too many files have changed in this diff Show More