Compare commits

..

439 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
Hugo Richard
f0297e02d0 docs(modal/slideover): improve programmatic examples (#3131) 2025-01-17 17:43:40 +01:00
Chandara H. Wei
64421a190f feat(locale): add Khmer language (#3119)
Co-authored-by: Hugo Richard <hugo.richard@epitech.eu>
2025-01-17 16:46:01 +01:00
Benjamin Canac
3af77ccca1 cli: fix component template import 2025-01-17 13:08:59 +01:00
Benjamin Canac
a3a562b699 docs(app): improve module and framework reactivity 2025-01-17 00:01:06 +01:00
Benjamin Canac
3159a89436 docs(deps): update @nuxt/content 2025-01-16 23:52:33 +01:00
Benjamin Canac
ba1dd13173 fix(Button): wrong avatar size with block prop 2025-01-16 16:49:43 +01:00
Benjamin Canac
3fc2210e03 feat(NavigationMenu): add collapsed prop 2025-01-16 16:34:36 +01:00
Benjamin Canac
931211a634 fix(NavigationMenu): highlight open items on horizontal orientation only 2025-01-16 16:09:08 +01:00
Benjamin Canac
27fdc8e260 feat(NavigationMenu): handle label type in items
Resolves #2993
2025-01-16 15:56:14 +01:00
Benjamin Canac
1e88512bef chore(ContextMenu/DropdownMenu): remove useless pointer-events-auto
Revert parts of #2881
2025-01-16 12:38:34 +01:00
Benjamin Canac
533ccec110 fix(colors): move css variables to base layer
Resolves #3075
2025-01-16 12:22:25 +01:00
Benjamin Canac
86e1888474 docs(deps): update 2025-01-15 18:26:59 +01:00
Farnabaz
12a1ab00df docs(deps): update @nuxt/content (#3108) 2025-01-15 17:55:18 +01:00
Benjamin Canac
b64b24f65a docs(deps): update @nuxt/ui-pro 2025-01-15 16:09:03 +01:00
Benjamin Canac
b8276020b3 docs(deps): update @nuxt/ui-pro 2025-01-15 14:12:19 +01:00
Benjamin Canac
75f7064b40 feat(css): add light variant to reverse colors 2025-01-15 14:00:37 +01:00
Alex
51e5e65be7 refactor(ColorPicker)!: migrate from color to colortranslator (#3097) 2025-01-14 15:01:47 +01:00
Hugo Richard
6df9a1a44b docs(contribution): add guide (#3076)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-01-14 14:21:38 +01:00
Alex
ec5d5c98a2 docs(SupportedLanguages): easti flag (#3099) 2025-01-14 11:31:38 +01:00
Romain Hamel
de9ecb1d76 fix(Form)!: include nested state in submit data (#3028) 2025-01-14 10:49:39 +01:00
Hugo Richard
865a47f125 docs(ComponentSlots): support custom slug (#3096) 2025-01-14 10:31:41 +01:00
Sigve Hansen
9ccfe8fbb3 feat(locale): add Norwegian Bokmål language (#3095) 2025-01-14 10:28:49 +01:00
Israel Ortuño
1bf370e6fd fix(locale): year translation missing ñ in es (#3090) 2025-01-13 22:49:58 +01:00
Sébastien Chopin
3309ef60b2 docs(getting-started): add nuxt devtools video & learnvue video 2025-01-13 18:56:48 +01:00
Daniele Nicosia
a6cc7bf53b docs(calendar/command-palette): fix external links (#3087) 2025-01-13 17:45:26 +01:00
Benjamin Canac
e2cee110b4 docs(deps): update @nuxt/ui-pro 2025-01-13 17:44:28 +01:00
Benjamin Canac
01b7547ccc docs(app): move watch before surround 2025-01-13 16:15:05 +01:00
Alex
e7c10bcb0d fix(Alert): allow actions wrap (#3083) 2025-01-13 14:46:45 +01:00
Benjamin Canac
1d54fd3e2d chore(release): v3.0.0-alpha.11 2025-01-13 11:54:49 +01:00
Alex
f85b0985bd fix(components): enable pointer events on menus (#2881)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-01-13 11:44:23 +01:00
kyyy
c902a40f7c fix(SelectMenu): handle resetSearchTermOnBlur manually (#3082)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-01-13 11:26:16 +01:00
Romain Hamel
1a54ab231b refactor(Form): rename validation functions and vars for clarity (#3029)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-01-13 11:19:29 +01:00
Benjamin Canac
9d0f8617b2 docs(deps): update @nuxt/content 2025-01-13 11:05:18 +01:00
renovate[bot]
23493af406 chore(deps): lock file maintenance (v3) (#3081)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-13 10:46:56 +01:00
Benjamin Canac
582fe87d70 docs(Header): remove meta_g shortcut 2025-01-13 10:46:15 +01:00
Benjamin Canac
c957bbf9a1 chore(renovate): ignore vue-tsc for v2 2025-01-13 10:37:43 +01:00
renovate[bot]
965e1aacaf chore(deps): update all non-major dependencies (v3) (#3061)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-13 10:35:54 +01:00
renovate[bot]
1ba2e185b2 chore(deps): update devdependency unplugin-vue-components to v28 (v3) (#3049)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-12 23:46:01 +01:00
renovate[bot]
53afc40481 chore(deps): update devdependency unplugin-auto-import to v19 (v3) (#3048)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-12 23:33:56 +01:00
Chiahong
5c2c55ff08 fix(locale): improve Traditional Chinese translation (#3051)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-01-10 18:49:09 +01:00
Benjamin Canac
39a3d2592c chore(deps): update @nuxt/ui-pro 2025-01-10 18:25:08 +01:00
Benjamin Canac
ee4c33cb1a docs(app): wrong links for ui-pro in community section 2025-01-10 18:25:08 +01:00
Malik-Jouda
d5dba0ebc9 fix(CommandPalette/SelectMenu): missing translations (#3057) 2025-01-10 18:20:47 +01:00
Benjamin Canac
a3dbf7c27d docs(installation): improve starter sections 2025-01-10 15:33:54 +01:00
Benjamin Canac
a3cf25f5cd docs(installation): add playground links 2025-01-10 14:12:39 +01:00
Benjamin Canac
02c8988a7a chore(github): add vue template link to bug-report-v3 2025-01-10 13:31:24 +01:00
Benjamin Canac
046785359e docs(vue): add vue-router in installation sections
Related to #2764
2025-01-10 13:07:14 +01:00
renovate[bot]
85b8553893 chore(deps): update tailwindcss to v4.0.0-beta.9 (v3) (#3059)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-10 11:15:49 +01:00
Maxime Pauvert
5288f87e0b chore(readme): change github v2 link (#3060)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-01-09 23:02:52 +01:00
Maxime Pauvert
25a71aa3ae docs(header): update GitHub link for @nuxt/ui-pro (#3058) 2025-01-09 19:03:34 +01:00
Benjamin Canac
a3bae03a20 chore(github): disable playground on pull requests 2025-01-09 17:30:30 +01:00
Benjamin Canac
01ce7e2d14 docs(deps): update @nuxt/ui-pro 2025-01-09 15:32:10 +01:00
renovate[bot]
11a3f03a7f chore(deps): update all non-major dependencies (v3) (#3033)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-09 15:15:44 +01:00
Estéban
0531211ee5 test(ContextMenu): fix snapshots (#3055)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-01-09 15:14:24 +01:00
Benjamin Canac
039788a044 docs(deps): update @nuxt/ui-pro 2025-01-09 12:51:06 +01:00
Benjamin Canac
9aa6812423 chore(package): move style before import 2025-01-09 12:34:00 +01:00
Benjamin Canac
3107039b56 Revert "chore(deps): update typescript"
This reverts commit 1c4bae8c86.
2025-01-09 12:30:21 +01:00
Benjamin Canac
c79acc15b0 Revert "chore(deps): update @nuxt/module-builder"
This reverts commit 71e98a4024.
2025-01-09 12:29:53 +01:00
Benjamin Canac
15b411de4a Revert "build: remove cjs support"
This reverts commit 0128c1c9e0.
2025-01-09 12:28:23 +01:00
Benjamin Canac
410b7db201 docs(deps): revert @nuxt/ui-pro 2025-01-09 12:13:00 +01:00
kyyy
5a443944ae fix(InputMenu): removing tag does not change modelValue (#3054)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-01-09 11:53:03 +01:00
Benjamin Canac
82ade16fd0 docs(deps): update @nuxt/ui-pro 2025-01-09 11:10:18 +01:00
Benjamin Canac
af736b0c6a docs(ComponentCode): handle metas for prose components 2025-01-09 11:02:29 +01:00
Benjamin Canac
30ba53e20b feat(module): allow tv customization through app.config (#2938) 2025-01-08 17:26:20 +01:00
Benjamin Canac
4e482750cb docs(content): remove some badges 2025-01-08 16:22:45 +01:00
Bitcreep
01bf99eec8 feat(locale): add Estonian language (#3036)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-01-08 16:19:27 +01:00
renovate[bot]
446a9f7d31 chore(deps): update devdependency @release-it/conventional-changelog to v10 (v3) (#3046)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-08 16:18:45 +01:00
Hugo Richard
638808c32c docs(app): handle prose components (#3030)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-01-08 16:17:50 +01:00
Benjamin Canac
6a81db2b9c docs(nuxt.config): use oss license 2025-01-08 11:19:22 +01:00
Benjamin Canac
1f71d74899 docs(app): display pro tag on all links 2025-01-08 10:55:07 +01:00
Benjamin Canac
cc50ef6ccd docs(ComponentCode): improve defaults for booleans 2025-01-07 15:08:31 +01:00
Benjamin Canac
4344e36664 fix(Accordion/Collapsible/NavigationMenu/Tabs): define unmountOnHide default 2025-01-07 15:08:06 +01:00
Benjamin Canac
cc523a3d23 chore(github): update workflows 2025-01-07 12:15:51 +01:00
Benjamin Canac
d7981ab2d5 chore(github): update workflows 2025-01-07 12:07:16 +01:00
Benjamin Canac
697994e15d playground: add @nuxthub/core module 2025-01-07 12:07:07 +01:00
Benjamin Canac
18b2c51282 docs(nuxt.config): disable hub.cache 2025-01-07 12:06:51 +01:00
Benjamin Canac
a68f57c5d2 chore(github): update workflows 2025-01-07 11:55:15 +01:00
Benjamin Canac
2050bed050 chore(github): update workflows 2025-01-07 11:32:20 +01:00
nuxthub-admin[bot]
9bf93575a7 ci: add nuxthub workflow 2025-01-07 10:27:07 +00:00
Benjamin Canac
5c19c79350 chore(github): update workflows 2025-01-07 11:25:31 +01:00
Benjamin Canac
fd5a529565 chore(github): update workflows 2025-01-07 11:17:12 +01:00
nuxthub-admin[bot]
61389b8b5a ci: add nuxthub workflow 2025-01-07 10:11:16 +00:00
Benjamin Canac
ef7ecd242f fix(NavigationMenu): remove w-full on root slot
Resolves #3000
2025-01-06 18:53:11 +01:00
Romain Hamel
41dc11ceef fix(FormField): restore eager-validation prop behavior (#3031)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-01-06 18:52:23 +01:00
renovate[bot]
00b3c86584 chore(deps): update devdependency release-it to v18 (v3) (#3027)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-06 17:37:12 +01:00
renovate[bot]
8c88912a8f chore(deps): update all non-major dependencies (v3) (#2985)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2025-01-06 17:17:03 +01:00
Benjamin Canac
0128c1c9e0 build: remove cjs support 2025-01-06 16:58:40 +01:00
Benjamin Canac
254bf3a65f chore(deps): refresh lock 2025-01-06 16:31:27 +01:00
Benjamin Canac
5ac25b5a84 chore(deps): dedupe 2025-01-06 16:26:14 +01:00
Benjamin Canac
71e98a4024 chore(deps): update @nuxt/module-builder 2025-01-06 16:25:29 +01:00
renovate[bot]
561fcd0b19 chore(deps): update dependency pathe to v2 (v3) (#3017)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-06 12:47:12 +01:00
Benjamin Canac
1c4bae8c86 chore(deps): update typescript 2025-01-06 12:41:09 +01:00
Benjamin Canac
0903e80b03 chore(deps): update unplugin & vite 2025-01-06 12:35:55 +01:00
Benjamin Canac
fae9895836 chore(deps): dedupe 2025-01-06 12:23:35 +01:00
Benjamin Canac
f19308d401 cli(templates): remove leading space in docs 2025-01-06 12:22:23 +01:00
Benjamin Canac
2f19136fd8 docs(ComponentExample): round width in iframe params 2025-01-06 12:22:23 +01:00
Pontus Aurdal
0201a3de75 feat(locale): add Swedish language (#3012) 2025-01-06 10:42:49 +01:00
Pontus Aurdal
c770ae124e feat(locale): add Finnish language (#3013) 2025-01-06 10:41:55 +01:00
Dinar, Permadi
a18ad84edf feat(locale): add Indonesian language (#3024) 2025-01-06 10:41:32 +01:00
renovate[bot]
64f85a029f chore(deps): update nuxt framework to ^3.15.1 (v3) (#2970)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-06 10:24:23 +01:00
Benjamin Canac
d4653e3c02 docs(deps): update @nuxt/ui-pro 2024-12-27 15:54:53 +01:00
Benjamin Canac
546a82c4c9 docs(examples): remove justify-center 2024-12-27 15:28:35 +01:00
Benjamin Canac
e878115a73 docs(ComponentExample): add iframeMobile prop 2024-12-27 15:28:22 +01:00
Benjamin Canac
91da9aa83a docs(deps): update @nuxt/ui-pro 2024-12-27 12:52:37 +01:00
Benjamin Canac
9759320438 fix(NavigationMenu): arrow styles after reka-ui migration 2024-12-27 12:45:13 +01:00
Benjamin Canac
4f05b1aac9 fix(Stepper): correct item value type 2024-12-27 11:21:34 +01:00
Horu
ffba108291 feat(locale): add Viet language (#2986) 2024-12-26 15:43:42 +01:00
Benjamin Canac
5550d184bb docs(SupportedLanguages): improve 2024-12-26 10:59:21 +01:00
Nateetorn Preansri
c8cd06e92d feat(locale): add Thai language (#2980) 2024-12-26 10:44:03 +01:00
zannias
b326a14fb0 feat(locale): add Greek language (#2975) 2024-12-25 14:11:04 +01:00
Benjamin Canac
5183582a90 fix(templates): allow any string in colors autocomplete
Related to #2143

Co-Authored-By: Inesh Bose <56732164+ineshbose@users.noreply.github.com>
2024-12-24 16:56:22 +01:00
Benjamin Canac
ac54c7523c docs(deps): update @nuxt/ui-pro 2024-12-24 16:39:53 +01:00
renovate[bot]
4c0bdf38fc chore(deps): update devdependency vue-tsc to ^2.2.0 (v3) (#2966)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2024-12-24 16:16:21 +01:00
Benjamin Canac
c223281763 chore(Progress): remove $slots usage 2024-12-24 12:41:32 +01:00
renovate[bot]
7f09299de5 chore(deps): update all non-major dependencies (v3) (#2961)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-23 18:38:52 +01:00
renovate[bot]
6510e1e47d chore(deps): update dependency nuxt-og-image to v4 (v3) (#2749)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-23 18:36:23 +01:00
Sébastien Chopin
2202d05119 docs: improve seo for vue components & composables (#2959) 2024-12-23 18:32:24 +01:00
Benjamin Canac
7eea62899c cli: update templates 2024-12-23 12:24:21 +01:00
Benjamin Canac
f66e272b63 docs(deps): update @nuxt/ui-pro 2024-12-23 12:24:20 +01:00
Benjamin Canac
23550c2263 chore(Carousel/Stepper): move orientation from defaultVariants to withDefaults 2024-12-23 12:23:28 +01:00
Mick Lawitzke
d6179912de chore: make zod imports tree-shakeable (#2846) 2024-12-23 12:13:37 +01:00
renovate[bot]
78be40a286 chore(deps): lock file maintenance (v3) (#2958)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-23 10:57:45 +01:00
renovate[bot]
c2d777625f chore(deps): update all non-major dependencies (v3) (#2917)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-23 10:46:33 +01:00
rigtigeEmil
e1d385a175 feat(locale): add Danish language (#2952) 2024-12-22 16:33:44 +01:00
Bruno Belloni
1b3c919222 feat(CommandPalette): add autofocus prop (#2942) 2024-12-20 12:21:05 +01:00
Benjamin Canac
0f37aca317 chore(github): add codesandbox template to v3 bug report 2024-12-19 23:15:37 +01:00
Hugo Richard
7f64198a70 fix(Avatar): bind $attrs on AvatarFallback (#2933) 2024-12-19 13:00:31 +01:00
Benjamin Canac
6f8087f44b chore(github): update issue templates 2024-12-18 18:25:51 +01:00
Benjamin Canac
6974f23645 docs(content): lint fix 2024-12-18 18:07:33 +01:00
Benjamin Canac
f3f4edae28 docs(ComponentExample): handle iframe container on mobile 2024-12-18 15:52:09 +01:00
Iván Máximiliano, Lo Giudice
7302a846a9 fix(vue): head injection (#2929) 2024-12-18 14:58:13 +01:00
Benjamin Canac
2c99bb80c7 fix(templates): infer variants types in generated theme 2024-12-18 13:03:23 +01:00
Benjamin Canac
607792ea25 docs(theme): improve callouts code-blocks spacing 2024-12-17 18:14:03 +01:00
Benjamin Canac
1b6dda1ea9 docs(SupportedLanguages): map ukraine flag 2024-12-17 18:14:03 +01:00
renovate[bot]
6520790ff7 chore(deps): update tailwindcss to v4.0.0-beta.8 (v3) (#2898)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-17 16:25:48 +01:00
Benjamin Canac
ad8db69990 docs(deps): update @nuxt/ui-pro 2024-12-17 15:40:59 +01:00
Benjamin Canac
242ff3b0ed docs(app): remove header toggle negative margin 2024-12-17 15:34:37 +01:00
Benjamin Canac
e931880671 fix(NavigationMenu): highlight border on children only with vertical orientation 2024-12-17 15:33:59 +01:00
Benjamin Canac
82d63446a1 fix(NavigationMenu): unbind link on collapsible trigger with vertical orientation 2024-12-17 14:05:03 +01:00
Iván Máximiliano, Lo Giudice
9b4694f8d9 fix(unplugin): invalid url schema on windows (#2899) 2024-12-16 17:28:22 +01:00
Everton
4c5a4fb526 fix(DropdownMenu/ContextMenu): correct bindings of checkbox items (#2921)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2024-12-16 15:13:36 +01:00
Benjamin Canac
6fb426fc17 fix(Modal/Popover/Slideover)!: rename prevent-close to dismissible + uniformize docs 2024-12-16 13:11:10 +01:00
Benjamin Canac
fdaff6630f chore(Modal/Slideover): remove unnecessary code to handle toasts 2024-12-16 12:57:22 +01:00
Benjamin Canac
0285bf33fa chore(deps): update @nuxt/content 2024-12-16 12:51:36 +01:00
Ilya Buligin
5efae599b6 feat(locale): add Ukrainian language (#2908)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2024-12-16 11:38:54 +01:00
Benjamin Canac
908f2b569a chore(deps): update @nuxt/ui-pro 2024-12-16 11:34:25 +01:00
Benjamin Canac
52b561dbed chore(deps): update @nuxt/content 2024-12-16 11:32:03 +01:00
renovate[bot]
34ec90c974 chore(deps): lock file maintenance (v3) (#2914)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-16 10:49:46 +01:00
renovate[bot]
194f3b6f03 chore(deps): update all non-major dependencies (v3) (#2865)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-16 10:21:19 +01:00
Dominique BILLET
2e17fb68de fix(defineShortcuts): handle extract when using onSelect or onClick (#2896) 2024-12-14 19:12:32 +01:00
Benjamin Canac
babfcdcb02 chore(deps): set debug resolution and refresh lock 2024-12-13 15:12:28 +01:00
Benjamin Canac
2fc43d66d5 test: update vue snapshots 2024-12-13 14:37:47 +01:00
Benjamin Canac
d9967f5e28 feat(Badge): rework sizes 2024-12-13 12:57:32 +01:00
Benjamin Canac
cef16cd49d docs(ComponentCode): fix number inputs 2024-12-13 12:47:47 +01:00
Benjamin Canac
0b86f4315e docs(app): improve navigation badge display 2024-12-13 12:43:15 +01:00
Benjamin Canac
bfb9b5200c docs(deps): update @nuxt/ui-pro 2024-12-13 12:42:59 +01:00
Benjamin Canac
aa3b38fc39 docs(deps): update @nuxt/content 2024-12-13 12:35:26 +01:00
Benjamin Canac
ae33adb900 chore(NavigationMenu): improve badge tsdoc 2024-12-13 11:43:39 +01:00
Benjamin Canac
f97d2e3b88 fix(Badge): reduce radius on sm size 2024-12-13 11:43:30 +01:00
Benjamin Canac
473194fbaf fix(Stepper): wrong item in title & description slots
Resolves #2888
2024-12-13 00:04:27 +01:00
Benjamin Canac
33fb2cad0b chore(cli): add title in docs template 2024-12-12 17:30:00 +01:00
Benjamin Canac
8d3f0fdc39 chore(deps): dedupe & set unimport resolution 2024-12-12 15:04:00 +01:00
Benjamin Canac
3167fda517 docs(ComponentCode): ignore boolean theme variants 2024-12-12 12:08:20 +01:00
Benjamin Canac
7ebd8d813d docs(getting-started): improve accessibility 2024-12-11 18:26:06 +01:00
Benjamin Canac
b40b73129c docs(deps): update @nuxt/ui-pro 2024-12-11 17:27:26 +01:00
Benjamin Canac
93ea5b958e docs(ComponentProps): consistent quotes in default 2024-12-11 17:26:38 +01:00
Benjamin Canac
76db00db7a docs(ComponentExample): improve iframe display 2024-12-11 16:23:02 +01:00
Benjamin Canac
3445078cab chore(Alert/CommandPalette): improve close tsdoc 2024-12-11 16:22:32 +01:00
Sébastien Chopin
f179f8588a docs(ComponentCode): add overflow hidden 2024-12-11 12:52:13 +01:00
Sébastien Chopin
5a6a165a8d docs(ComponentExample): add overflow hidden and props as search params 2024-12-11 12:43:48 +01:00
Benjamin Canac
7ee733e82b docs(ComponentExample): add code slot 2024-12-11 12:25:54 +01:00
Benjamin Canac
a0b8b93a5a docs(ComponentExample): add iframe prop 2024-12-11 12:13:37 +01:00
Benjamin Canac
52e2a4d68f chore(cli): improve 2024-12-11 11:44:51 +01:00
Sébastien Chopin
efd104a10f docs(app): improve aside navigation (#2875)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2024-12-11 11:15:05 +01:00
Sébastien Chopin
d8d56d909b docs(ComponentCode): force string for label when items used as boolean 2024-12-11 10:59:15 +01:00
Benjamin Canac
d5f9cc27a4 docs(deps): update @nuxt/ui-pro 2024-12-10 17:01:16 +01:00
Benjamin Canac
db9ac5778f docs(avatar): improve usage 2024-12-10 15:17:39 +01:00
Benjamin Canac
e73f38d1d1 docs(app): add target _blank only on external links 2024-12-10 15:17:39 +01:00
Benjamin Canac
206366a70e docs(ComponentProps): ignore viewTransition by default 2024-12-10 15:17:39 +01:00
Sébastien Chopin
88a5a7055d docs: update nuxt ui pro icon 2024-12-10 14:27:35 +01:00
Benjamin Canac
b2f68dcf81 docs(components): consistent writing 2024-12-10 12:59:01 +01:00
Benjamin Canac
edad9b7f5c chore(Chip): improve inset prop tsdoc 2024-12-10 12:13:32 +01:00
Benjamin Canac
c5a8914483 docs(ComponentCode): handle pro theme 2024-12-10 12:11:55 +01:00
Benjamin Canac
57f4d613e6 docs(ComponentCode): better slots handling 2024-12-10 11:06:51 +01:00
Cory Deppen
c186169562 docs(getting-started): update path to settings.json (#2870) 2024-12-10 00:39:23 +01:00
Benjamin Canac
31b8c56ff7 docs(ComponentCode): handle pro prop 2024-12-09 18:19:18 +01:00
Benjamin Canac
cc1e32edf5 docs(deps): update @nuxt/content 2024-12-09 17:42:33 +01:00
Sébastien Chopin
9fc42bab2e docs(ComponentProps): add support for name as prop 2024-12-09 16:06:17 +01:00
Benjamin Canac
1acf99390d docs(deps): update @nuxt/ui-pro 2024-12-09 15:21:42 +01:00
Benjamin Canac
bf45094f89 docs(app): display icon in navigation for ui-pro components 2024-12-09 15:13:18 +01:00
Benjamin Canac
eaddb8cb33 docs(nuxt.config): ignore pro components in component meta 2024-12-09 15:05:40 +01:00
Benjamin Canac
51de839aca docs(deps): update @nuxt/ui-pro 2024-12-09 12:07:34 +01:00
Benjamin Canac
83c2b70d98 chore(release): v3.0.0-alpha.10 2024-12-09 11:11:40 +01:00
Benjamin Canac
3b9ca2263d fix(CommandPalette): keep ignoreFilter groups at their place (#2833) 2024-12-09 10:17:54 +01:00
renovate[bot]
6636543256 chore(deps): update all non-major dependencies (v3) (#2848)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-09 10:17:25 +01:00
Malik-Jouda
f98b91c22a fix(ColorPicker): handle RTL mode (#2858) 2024-12-09 10:17:05 +01:00
Benjamin Canac
857238ff14 chore(deps): update reka-ui 2024-12-08 11:02:40 +01:00
Christophe Carvalho Vilas-Boas
8b5d412fd7 feat(locale): add Portuguese language (#2855) 2024-12-07 01:09:00 +01:00
renovate[bot]
ed44d9d101 chore(deps): update devdependency @nuxt/test-utils to ^3.15.1 (v3) (#2839)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-07 01:08:21 +01:00
renovate[bot]
5a900e460b chore(deps): update tailwindcss to v4.0.0-beta.6 (v3) (#2853)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-07 00:55:35 +01:00
Christophe Carvalho Vilas-Boas
4b241ba3c3 fix(types): handle array of strings in AppConfig (#2854) 2024-12-07 00:55:11 +01:00
Benjamin Canac
80befc107c fix(defineShortcuts): return useEventListener to unregister the listener
Resolves #2031
2024-12-06 23:37:22 +01:00
Benjamin Canac
6c946dc0e7 docs(deps): update @nuxt/ui-pro 2024-12-06 17:39:13 +01:00
Benjamin Canac
2d81c02356 docs(Header): use Drawer as menu 2024-12-06 17:20:21 +01:00
Benjamin Canac
d3b3b9bef3 docs(installation): add app section 2024-12-06 17:20:21 +01:00
Benjamin Canac
b7ba2c7759 fix(Modal): prevent from going out of screen
Resolves #2711
2024-12-06 17:20:21 +01:00
Malik-Jouda
198d04de51 fix(Stepper): handle RTL mode (#2844) 2024-12-06 15:08:39 +01:00
renovate[bot]
16e0339e7a chore(deps): update all non-major dependencies (v3) (#2820)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-06 11:18:34 +01:00
Benjamin Canac
6f1f9f4d81 docs(app): update module & framework select 2024-12-05 23:36:02 +01:00
Benjamin Canac
46f4e5a24d docs(app): redirect when module changes
Resolves #2840
2024-12-05 23:26:44 +01:00
Benjamin Canac
b983ea2aec docs(app): hide github link on mobile 2024-12-05 19:13:26 +01:00
Benjamin Canac
bd4abfa880 docs(app): improve module select padding 2024-12-05 19:12:01 +01:00
Benjamin Canac
c1ff978370 fix(Tabs): truncate not working 2024-12-05 19:11:51 +01:00
Benjamin Canac
984bb0899c docs(app): use tabs to switch framework & module (#2837) 2024-12-05 19:01:40 +01:00
Benjamin Canac
a938d24f90 fix(Tabs): prevent hover on disabled 2024-12-05 18:15:03 +01:00
Benjamin Canac
0f8c398673 docs: handle @nuxt/ui-pro components display 2024-12-05 16:43:12 +01:00
Benjamin Canac
695224f91f chore(ContextMenu/DropdownMenu/NavigationMenu): consistent trailing slot 2024-12-05 16:29:28 +01:00
Benjamin Canac
4b653ef773 feat(NavigationMenu): handle item.trailingIcon display 2024-12-05 16:29:28 +01:00
Benjamin Canac
816bb69deb fix(Stepper): missing import 2024-12-05 15:22:25 +01:00
Benjamin Canac
5a7c3b13d3 docs(SupportedLanguages): improve emojis 2024-12-05 15:16:41 +01:00
Benjamin Canac
b741ef3313 feat(Avatar): add default slot for fallback 2024-12-05 15:16:28 +01:00
Benjamin Canac
bc80a0121f chore(ColorPicker): use reka-ui 2024-12-05 14:47:48 +01:00
Alex
e475b6438d feat(ColorPicker): implement component (#2670)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2024-12-05 14:11:43 +01:00
Benjamin Canac
3e283117d2 docs(app): missing target _blank on links 2024-12-05 12:21:50 +01:00
Romain Hamel
6484d010a1 feat(Stepper): new component (#2733)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2024-12-05 12:20:45 +01:00
renovate[bot]
d539109357 chore(deps): update tailwindcss to v4.0.0-beta.5 (v3) (#2791)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-04 21:32:35 +01:00
Benjamin Canac
01c3934403 docs: add @nuxt/ui-pro source (#2775) 2024-12-04 21:15:07 +01:00
Benjamin Canac
e79103131f chore(deps): dedupe 2024-12-04 14:46:24 +01:00
Benjamin Canac
37f05e2ba8 docs(deps): update @nuxt/ui-pro 2024-12-03 16:43:39 +01:00
Benjamin Canac
81ac076219 feat(module)!: migrate to reka-ui (#2448) 2024-12-03 16:11:32 +01:00
phbe
c440c91a29 fix(locale): improve German translation (#2826) 2024-12-03 16:06:18 +01:00
sam
b7ff7d8aa6 feat(locale): add Brazilian Portuguese language (#2825) 2024-12-03 13:53:25 +01:00
Jakub Jelínek
68a10f09d5 feat(locale): add Slovak language (#2821) 2024-12-02 17:38:11 +01:00
Christian López C
004a577467 feat(Table): handle meta.class on th and td (#2790)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2024-12-02 13:43:08 +01:00
renovate[bot]
f712135576 chore(deps): lock file maintenance (v3) (#2818)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-02 11:24:16 +01:00
Benjamin Canac
e2aaf5ba21 chore(renovate): ignore typescript 2024-12-02 11:05:26 +01:00
renovate[bot]
d65c7376d9 chore(deps): update all non-major dependencies (v3) (#2754)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2024-12-02 11:03:49 +01:00
Benjamin Canac
f04c2082ad docs(Header): move dropdown out of link 2024-11-30 11:48:13 +01:00
Benjamin Canac
bda6098db3 docs(app): improve navigation 2024-11-29 17:28:19 +01:00
Benjamin Canac
8344d852a5 docs(deps): update @nuxt/content & @nuxt/ui-pro 2024-11-29 17:28:10 +01:00
Benjamin Canac
6bd8a06871 docs(Header): replace badge by dropdown 2024-11-29 16:46:20 +01:00
Benjamin Canac
148b02464d fix(components): specify collisionPadding to all menus 2024-11-29 16:39:35 +01:00
Benjamin Canac
1240a3b604 docs(deps): update @nuxt/content 2024-11-29 16:15:49 +01:00
Benjamin Canac
e3b8d0e60e docs(deps): update @nuxt/content 2024-11-29 16:01:33 +01:00
Benjamin Canac
0d41210c91 docs: improve callout links 2024-11-29 12:41:31 +01:00
Guillaume Chau
bc2bcb30d9 fix(icons): make loading icon clockwise (#2797)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
2024-11-28 15:18:14 +01:00
Aaron Dewes
ed2722257a fix(ContextMenu): remove close animation (#2798) 2024-11-28 14:56:18 +01:00
Romain Hamel
f06fbafc1e fix(devtools): error with renderer when colorMode is disabled (#2792) 2024-11-28 10:51:55 +01:00
Kotering
ecc4755a17 feat(locale): add Japanese language (#2794) 2024-11-28 10:25:37 +01:00
Benjamin Canac
9b58ce05f0 chore(icons): sort 2024-11-27 20:22:45 +01:00
Sébastien Chopin
a481410c5f docs(installation):add UI template instructions 2024-11-27 16:36:57 +01:00
Benjamin Canac
cd7ab3b2b9 docs(theme): fix framework-only usage 2024-11-27 15:55:30 +01:00
Benjamin Canac
9a17f90985 docs(app): hide links slot 2024-11-27 15:17:27 +01:00
Alex
3496b2d541 docs(content): consistent callouts links style (#2786) 2024-11-27 14:28:19 +01:00
Sandro Circi
a6c22052e1 fix(Link): partial query match for Vue (#2787) 2024-11-27 14:27:47 +01:00
Benjamin Canac
6eb0bbbe1b docs(app): update error 2024-11-27 12:39:51 +01:00
Benjamin Canac
a2512f680d feat(css): use color-scheme utilities on body 2024-11-27 12:37:29 +01:00
Benjamin Canac
4eb79021ed chore(renovate): update
Co-Authored-By: Sébastien Chopin <seb@nuxt.com>
2024-11-27 12:37:01 +01:00
renovate[bot]
8a45c25df3 chore(deps): update vueuse monorepo to v12 (v3) (major) (#2784)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-27 12:11:58 +01:00
Dafitra
004fa1ebcb refactor(App): remove default locale handling (#2760) 2024-11-27 10:35:12 +01:00
Malik-Jouda
0f648024e0 feat(Calendar): add icon props (#2778) 2024-11-26 18:31:25 +01:00
Benjamin Canac
e7995e7a0b docs(app): improve framework hydration (#2780)
Co-authored-by: Sébastien Chopin <seb@nuxt.com>
2024-11-26 18:23:26 +01:00
581 changed files with 36806 additions and 25389 deletions

View File

@@ -2,11 +2,6 @@ name: "🐛 Bug report (v3)"
description: Report a bug to help us improve the module (v3 only).
labels: ["triage", "bug", "v3"]
body:
- type: markdown
attributes:
value: |
> [!IMPORTANT]
> As Nuxt UI v3 is currently in alpha, we recommend thorough testing before using it in production environments. We're actively working on stabilization and welcome feedback from early adopters to improve the library.
- type: markdown
attributes:
value: |
@@ -49,7 +44,7 @@ body:
id: reproduction
attributes:
label: Reproduction
description: Please provide a reproduction link. A minimal [reproduction is required](https://antfu.me/posts/why-reproductions-are-required) unless you are absolutely sure that the issue is obvious and the provided information is enough to understand the problem. If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "needs reproduction" label. If no reproduction is provided we might close it.
description: Please provide a reproduction link using the Nuxt template https://codesandbox.io/p/devbox/nuxt-ui3-n3sxks or the Vue template https://codesandbox.io/p/devbox/nuxt-ui3-vue-4h5gqn. A minimal [reproduction is required](https://antfu.me/posts/why-reproductions-are-required) unless you are absolutely sure that the issue is obvious and the provided information is enough to understand the problem. If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "needs reproduction" label. If no reproduction is provided we might close it.
placeholder: https://github.com/my/reproduction
validations:
required: true

View File

@@ -28,7 +28,7 @@ body:
id: version
attributes:
label: Version
placeholder: v2.8.0
placeholder: v2.20.0
validations:
required: true
- type: textarea

View File

@@ -0,0 +1,20 @@
name: "🚀 Feature request (v3)"
description: Suggest an idea or enhancement for the module (v3 only).
labels: ["triage", "enhancement", "v3"]
body:
- type: markdown
attributes:
value: |
Before requesting a feature, please make sure that you have read through our [v3 documentation](https://ui3.nuxt.dev/) and existing [issues](https://github.com/nuxt/ui/issues?q=is%3Aissue%20is%3Aopen%20sort%3Aupdated-desc%20label%3Av3).
- type: textarea
id: description
attributes:
label: Description
description: A clear and concise description of what you think would be an helpful addition to the module, including the possible use cases and alternatives you have considered. If you have a working prototype or module that implements it, please include a link.
validations:
required: true
- type: textarea
id: additonal
attributes:
label: Additional context
description: If applicable, add any other context or screenshots here.

View File

@@ -6,15 +6,6 @@ body:
attributes:
value: |
Before requesting a feature, please make sure that you have read through our [documentation](https://ui.nuxt.com) and existing [issues](https://github.com/nuxt/ui/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc).
- type: dropdown
id: version
attributes:
label: For what version of Nuxt UI are you suggesting this?
options:
- v2.x
- v3.0.0-alpha.x
validations:
required: true
- type: textarea
id: description
attributes:

14
.github/ISSUE_TEMPLATE/question-v3.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
name: "💬 Question (v3)"
description: Ask a question about the module (v3 only).
labels: ["question", "v3"]
body:
- type: markdown
attributes:
value: |
Before asking a question, please make sure that you have read through our [v3 documentation](https://ui3.nuxt.dev/) and existing [issues](https://github.com/nuxt/ui/issues?q=is%3Aissue%20is%3Aopen%20sort%3Aupdated-desc%20label%3Av3).
- type: textarea
id: description
attributes:
label: Description
validations:
required: true

View File

@@ -6,15 +6,6 @@ body:
attributes:
value: |
Before asking a question, please make sure that you have read through our [documentation](https://ui.nuxt.com) and existing [issues](https://github.com/nuxt/ui/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc).
- type: dropdown
id: version
attributes:
label: For what version of Nuxt UI are you asking this question?
options:
- v2.x
- v3.0.0-alpha.x
validations:
required: true
- type: textarea
id: description
attributes:

51
.github/workflows/docs.yml vendored Normal file
View File

@@ -0,0 +1,51 @@
name: docs
on: push
jobs:
deploy:
runs-on: ${{ matrix.os }}
environment:
name: ${{ github.ref == 'refs/heads/v3' && 'production' || 'preview' }}
url: ${{ steps.deploy.outputs.deployment-url }}
permissions:
contents: read
id-token: write
strategy:
matrix:
os: [ubuntu-latest] # macos-latest, windows-latest
node: [22]
env:
NUXT_GITHUB_TOKEN: ${{ secrets.NUXT_GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Prepare build
run: pnpm run dev:prepare
- name: Build application
run: pnpm run docs:build
- name: Deploy to NuxtHub
uses: nuxt-hub/action@v1
id: deploy
with:
project-key: ui-7eg3
directory: docs/dist

View File

@@ -1,4 +1,4 @@
name: ci-v3
name: module
on:
push:
@@ -9,7 +9,7 @@ on:
- v3
jobs:
ci:
build:
runs-on: ${{ matrix.os }}
permissions:
@@ -19,7 +19,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest] # macos-latest, windows-latest
node: [20]
node: [22]
env:
NUXT_GITHUB_TOKEN: ${{ secrets.NUXT_GITHUB_TOKEN }}

53
.github/workflows/playground.yml vendored Normal file
View File

@@ -0,0 +1,53 @@
name: playground
on:
push:
branches:
- v3
jobs:
deploy:
runs-on: ${{ matrix.os }}
environment:
name: ${{ github.ref == 'refs/heads/v3' && 'production' || 'preview' }}
url: ${{ steps.deploy.outputs.deployment-url }}
permissions:
contents: read
id-token: write
strategy:
matrix:
os: [ubuntu-latest] # macos-latest, windows-latest
node: [22]
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Prepare build
run: pnpm run dev:prepare
- name: Build application
run: pnpm run dev:build
env:
NITRO_PRESET: cloudflare-pages
- name: Deploy to NuxtHub
uses: nuxt-hub/action@v1
id: deploy
with:
project-key: ui3-playground-pb9b
directory: playground/dist

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,195 @@
# 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
* **Modal/Popover/Slideover:** rename `prevent-close` to `dismissible` + uniformize docs
### Features
* **Badge:** rework sizes ([d9967f5](https://github.com/nuxt/ui/commit/d9967f5e282d41f4000d5451efed7254b4c1608c))
* **CommandPalette:** add `autofocus` prop ([#2942](https://github.com/nuxt/ui/issues/2942)) ([1b3c919](https://github.com/nuxt/ui/commit/1b3c919222a4002d84dd968f93bcf9d615e412bc))
* **locale:** add Danish language ([#2952](https://github.com/nuxt/ui/issues/2952)) ([e1d385a](https://github.com/nuxt/ui/commit/e1d385a17545f8091c8d2459842fe4c39b8c9399))
* **locale:** add Estonian language ([#3036](https://github.com/nuxt/ui/issues/3036)) ([01bf99e](https://github.com/nuxt/ui/commit/01bf99eec8c2fd0e3dbe1271be152844e401287a))
* **locale:** add Finnish language ([#3013](https://github.com/nuxt/ui/issues/3013)) ([c770ae1](https://github.com/nuxt/ui/commit/c770ae124e626682935475dc6a164aacd1408c01))
* **locale:** add Greek language ([#2975](https://github.com/nuxt/ui/issues/2975)) ([b326a14](https://github.com/nuxt/ui/commit/b326a14fb0e62edc8e55599c16f934f54f95aa42))
* **locale:** add Indonesian language ([#3024](https://github.com/nuxt/ui/issues/3024)) ([a18ad84](https://github.com/nuxt/ui/commit/a18ad84edfe6b3f444d379f24defeecb63e5cdb9))
* **locale:** add Swedish language ([#3012](https://github.com/nuxt/ui/issues/3012)) ([0201a3d](https://github.com/nuxt/ui/commit/0201a3de757db426c877ef2761de8e9d7493983e))
* **locale:** add Thai language ([#2980](https://github.com/nuxt/ui/issues/2980)) ([c8cd06e](https://github.com/nuxt/ui/commit/c8cd06e92dab208271ab7b7f6806793eea1e8969))
* **locale:** add Ukrainian language ([#2908](https://github.com/nuxt/ui/issues/2908)) ([5efae59](https://github.com/nuxt/ui/commit/5efae599b642e65ec8ccaf2361b69abe993a0173))
* **locale:** add Viet language ([#2986](https://github.com/nuxt/ui/issues/2986)) ([ffba108](https://github.com/nuxt/ui/commit/ffba108291f321471650ca9060ea264f41482648))
* **module:** allow `tv` customization through `app.config` ([#2938](https://github.com/nuxt/ui/issues/2938)) ([30ba53e](https://github.com/nuxt/ui/commit/30ba53e20b3b91909c2c8162f35b13b6ad305d13))
### Bug Fixes
* **Accordion/Collapsible/NavigationMenu/Tabs:** define `unmountOnHide` default ([4344e36](https://github.com/nuxt/ui/commit/4344e366647e9618c21fe800b43d2b4ae2611226))
* **Avatar:** bind `$attrs` on `AvatarFallback` ([#2933](https://github.com/nuxt/ui/issues/2933)) ([7f64198](https://github.com/nuxt/ui/commit/7f64198a70104436f39f2f9d8527df0508fd84f6))
* **Badge:** reduce radius on `sm` size ([f97d2e3](https://github.com/nuxt/ui/commit/f97d2e3b88d1ba9be5f7e2916c6502e38ac4d4c1))
* **CommandPalette/SelectMenu:** missing translations ([#3057](https://github.com/nuxt/ui/issues/3057)) ([d5dba0e](https://github.com/nuxt/ui/commit/d5dba0ebc98594906ef1d9428da11d44317b70fc))
* **components:** enable pointer events on menus ([#2881](https://github.com/nuxt/ui/issues/2881)) ([f85b098](https://github.com/nuxt/ui/commit/f85b0985bdd6f51aff41acc6f86dd02db9832b24))
* **defineShortcuts:** handle extract when using `onSelect` or `onClick` ([#2896](https://github.com/nuxt/ui/issues/2896)) ([2e17fb6](https://github.com/nuxt/ui/commit/2e17fb68dee7e7bb27750c816d27b62249a1247b))
* **DropdownMenu/ContextMenu:** correct bindings of `checkbox` items ([#2921](https://github.com/nuxt/ui/issues/2921)) ([4c5a4fb](https://github.com/nuxt/ui/commit/4c5a4fb5265c36a39e551b8ee43b86e9ebd3d064))
* **FormField:** restore `eager-validation` prop behavior ([#3031](https://github.com/nuxt/ui/issues/3031)) ([41dc11c](https://github.com/nuxt/ui/commit/41dc11ceefd8f505fbc5214fe61f12483b0da4a2))
* **InputMenu:** removing `tag` does not change `modelValue` ([#3054](https://github.com/nuxt/ui/issues/3054)) ([5a44394](https://github.com/nuxt/ui/commit/5a443944ae622c8f4a893e0a18a80026ea9c1fe0))
* **locale:** improve Traditional Chinese translation ([#3051](https://github.com/nuxt/ui/issues/3051)) ([5c2c55f](https://github.com/nuxt/ui/commit/5c2c55ff08fbc16c869ad382e5fe5ac9fcc791de))
* **Modal/Popover/Slideover:** rename `prevent-close` to `dismissible` + uniformize docs ([6fb426f](https://github.com/nuxt/ui/commit/6fb426fc17d6d524e7d0503c2c8f3610f60b954d))
* **NavigationMenu:** `arrow` styles after `reka-ui` migration ([9759320](https://github.com/nuxt/ui/commit/97593204384669c479b85932024317a300ce29d8))
* **NavigationMenu:** highlight border on children only with `vertical` orientation ([e931880](https://github.com/nuxt/ui/commit/e93188067172d357a7724f937aeec70a0dabe611))
* **NavigationMenu:** remove `w-full` on root slot ([ef7ecd2](https://github.com/nuxt/ui/commit/ef7ecd242f4550838dbe3a45e33855afff89f506)), closes [#3000](https://github.com/nuxt/ui/issues/3000)
* **NavigationMenu:** unbind link on collapsible trigger with `vertical` orientation ([82d6344](https://github.com/nuxt/ui/commit/82d63446a12445accbca9131a83806994631761b))
* **SelectMenu:** handle `resetSearchTermOnBlur` manually ([#3082](https://github.com/nuxt/ui/issues/3082)) ([c902a40](https://github.com/nuxt/ui/commit/c902a40f7c0ce5ceb4624bbe2bbdfa09c87f7c75))
* **Stepper:** correct item `value` type ([4f05b1a](https://github.com/nuxt/ui/commit/4f05b1aac9af096cdc9404395d25d2261522a1db))
* **Stepper:** wrong `item` in `title` & `description` slots ([473194f](https://github.com/nuxt/ui/commit/473194fbaf2a9d21e2acb67d16715c412528d7d2)), closes [#2888](https://github.com/nuxt/ui/issues/2888)
* **templates:** allow any string in colors autocomplete ([5183582](https://github.com/nuxt/ui/commit/5183582a90c0d86bd986ef0f280bc58e740c6458)), closes [#2143](https://github.com/nuxt/ui/issues/2143)
* **templates:** infer variants types in generated theme ([2c99bb8](https://github.com/nuxt/ui/commit/2c99bb80c72fdbde9cd2ff3ad7caae0be632b864))
* **unplugin:** invalid url schema on windows ([#2899](https://github.com/nuxt/ui/issues/2899)) ([9b4694f](https://github.com/nuxt/ui/commit/9b4694f8d9b0fc244e805a7bfb2795d5131f7d18))
* **vue:** head injection ([#2929](https://github.com/nuxt/ui/issues/2929)) ([7302a84](https://github.com/nuxt/ui/commit/7302a846a9c394373c47def12dca00274e58f269))
### Reverts
* Revert "chore(deps): update `typescript`" ([3107039](https://github.com/nuxt/ui/commit/3107039b560cef973c117a251e4407ca5e615a72))
* Revert "chore(deps): update `@nuxt/module-builder`" ([c79acc1](https://github.com/nuxt/ui/commit/c79acc15b00f23b189821ebe2f4430e900cac34f))
* Revert "build: remove `cjs` support" ([15b411d](https://github.com/nuxt/ui/commit/15b411de4a6a7d322a3dea5703a5a5464c4e709a))
## [3.0.0-alpha.10](https://github.com/nuxt/ui/compare/v3.0.0-alpha.9...v3.0.0-alpha.10) (2024-12-09)
### ⚠ BREAKING CHANGES
* **module:** migrate to `reka-ui` (#2448)
* **Form:** resolve async validation in yup & issue directly mutate state (#2702)
### Features
* **Avatar:** add `default` slot for fallback ([b741ef3](https://github.com/nuxt/ui/commit/b741ef3313bb894beaed0eaa7323ee3d951bf935))
* **Calendar:** add `icon` props ([#2778](https://github.com/nuxt/ui/issues/2778)) ([0f64802](https://github.com/nuxt/ui/commit/0f648024e0468d34c1499bb5b5d2ed32e0e7de4f))
* **Calendar:** implement component ([#2618](https://github.com/nuxt/ui/issues/2618)) ([2e9aeb5](https://github.com/nuxt/ui/commit/2e9aeb5f05e94d63ea453c4f07a3e84ee2a02773))
* **ColorPicker:** implement component ([#2670](https://github.com/nuxt/ui/issues/2670)) ([e475b64](https://github.com/nuxt/ui/commit/e475b6438d405e4695ffb19155d456534d16b897))
* **CommandPalette:** add `active` field on items for consistency ([3765537](https://github.com/nuxt/ui/commit/37655377e9675982e2fce422bdd79ea651424548))
* **css:** use `color-scheme` utilities on body ([a2512f6](https://github.com/nuxt/ui/commit/a2512f680dc0df7add48bc17ef3be30d579be782))
* **i18n:** add Dutch locale ([#2728](https://github.com/nuxt/ui/issues/2728)) ([3baddfd](https://github.com/nuxt/ui/commit/3baddfd12186a68cc302f31cf0934cb9cf48060d))
* **i18n:** add Turkish locale ([#2716](https://github.com/nuxt/ui/issues/2716)) ([de8228e](https://github.com/nuxt/ui/commit/de8228e504affd1a57106101f5168a33702d4d53))
* **locale:** add Brazilian Portuguese language ([#2825](https://github.com/nuxt/ui/issues/2825)) ([b7ff7d8](https://github.com/nuxt/ui/commit/b7ff7d8aa63c41cf7afbecaa31824e098ea291af))
* **locale:** add Japanese language ([#2794](https://github.com/nuxt/ui/issues/2794)) ([ecc4755](https://github.com/nuxt/ui/commit/ecc4755a17874e59e06e70307a40dfd3fb3f20a0))
* **locale:** add Portuguese language ([#2855](https://github.com/nuxt/ui/issues/2855)) ([8b5d412](https://github.com/nuxt/ui/commit/8b5d412fd70b14a53cffa9129f5edd8a40e0f2e8))
* **locale:** add Slovak language ([#2821](https://github.com/nuxt/ui/issues/2821)) ([68a10f0](https://github.com/nuxt/ui/commit/68a10f09d5f164f2f5f07e65297e29fa2d939425))
* **locale:** translate Korean ([#2703](https://github.com/nuxt/ui/issues/2703)) ([2cbf83e](https://github.com/nuxt/ui/commit/2cbf83eb8484ad9abebd6ca01ad344918570af5b))
* **module:** migrate to `reka-ui` ([#2448](https://github.com/nuxt/ui/issues/2448)) ([81ac076](https://github.com/nuxt/ui/commit/81ac076219c3d7ef151f641414a0fbeca2da0bdd))
* **NavigationMenu:** handle `item.trailingIcon` display ([4b653ef](https://github.com/nuxt/ui/commit/4b653ef7735d9d2dfea65260433ade05eb3d3bd7))
* **Stepper:** new component ([#2733](https://github.com/nuxt/ui/issues/2733)) ([6484d01](https://github.com/nuxt/ui/commit/6484d010a1eee6f5d86968e4701b945953089b17))
* **Table:** handle `meta.class` on `th` and `td` ([#2790](https://github.com/nuxt/ui/issues/2790)) ([004a577](https://github.com/nuxt/ui/commit/004a5774678da24ccc267e96697c6088c51d5eea))
### Bug Fixes
* **Breadcrumb:** missing `aria-hidden` on presentation items ([a7a1227](https://github.com/nuxt/ui/commit/a7a1227c93110727e24f822fa50b547eb66bb16e)), closes [#2725](https://github.com/nuxt/ui/issues/2725)
* **Calendar:** handle icons in RTL mode ([#2770](https://github.com/nuxt/ui/issues/2770)) ([e7b69b7](https://github.com/nuxt/ui/commit/e7b69b7d6f0ebb3c578b9f58bcddf8ad36e6c6ce))
* **Calendar:** omit `as` / `asChild` props ([9478fc0](https://github.com/nuxt/ui/commit/9478fc076846d4a7fef13e63bdc274cd8d161063))
* **ColorPicker:** handle RTL mode ([#2858](https://github.com/nuxt/ui/issues/2858)) ([f98b91c](https://github.com/nuxt/ui/commit/f98b91c22ae21071a25f69cc8682eb6197a54c5a))
* **CommandPalette:** keep `ignoreFilter` groups at their place ([#2833](https://github.com/nuxt/ui/issues/2833)) ([3b9ca22](https://github.com/nuxt/ui/commit/3b9ca2263de1b936639b1b20ad0baf1cb059fda5))
* **components:** apply class on `trigger` instead of `content` when present ([a6ecef0](https://github.com/nuxt/ui/commit/a6ecef0f0d87a8dff4e4cb9ec507058ec94ed82b)), closes [#2132](https://github.com/nuxt/ui/issues/2132)
* **components:** specify collisionPadding to all menus ([148b024](https://github.com/nuxt/ui/commit/148b02464d47ada421313327585924b17f4e3f2d))
* **ContextMenu:** remove close animation ([#2798](https://github.com/nuxt/ui/issues/2798)) ([ed27222](https://github.com/nuxt/ui/commit/ed2722257a22c770eda811fbad58980bcef9dad5))
* **defineShortcuts:** return `useEventListener` to unregister the listener ([80befc1](https://github.com/nuxt/ui/commit/80befc107c6c6e7ab99dbe12376976babf315158)), closes [#2031](https://github.com/nuxt/ui/issues/2031)
* **devtools:** error with renderer when `colorMode` is disabled ([#2792](https://github.com/nuxt/ui/issues/2792)) ([f06fbaf](https://github.com/nuxt/ui/commit/f06fbafc1e709c7b4e54e2ba40d44c5770685a5d))
* **Form:** resolve async validation in yup & issue directly mutate state ([#2702](https://github.com/nuxt/ui/issues/2702)) ([c9806da](https://github.com/nuxt/ui/commit/c9806da6d850ea50ff8d2f11a1fbc5a43459b71f))
* **icons:** make `loading` icon clockwise ([#2797](https://github.com/nuxt/ui/issues/2797)) ([bc2bcb3](https://github.com/nuxt/ui/commit/bc2bcb30d97e2e873c4c7d535f82a4980cd35b02))
* **Link:** partial query match for Vue ([#2787](https://github.com/nuxt/ui/issues/2787)) ([a6c2205](https://github.com/nuxt/ui/commit/a6c22052e1c70e4ce6b2c7f783667a7f8c6cafa4))
* **locale:** improve German translation ([#2826](https://github.com/nuxt/ui/issues/2826)) ([c440c91](https://github.com/nuxt/ui/commit/c440c91a29fc1acd281a7f9d9b0cf74f5341553d))
* **Modal:** prevent from going out of screen ([b7ba2c7](https://github.com/nuxt/ui/commit/b7ba2c7759485ddb0a8bae589e4b6536ac9b1c96)), closes [#2711](https://github.com/nuxt/ui/issues/2711)
* **NavigationMenu:** wrong badge class ([86f2b48](https://github.com/nuxt/ui/commit/86f2b4856cc6beaf0440795500a5c74f9af04f36)), closes [#2766](https://github.com/nuxt/ui/issues/2766)
* **Progress:** handle `horizontal` animation in RTL mode ([#2723](https://github.com/nuxt/ui/issues/2723)) ([0baa3a0](https://github.com/nuxt/ui/commit/0baa3a06d449ab97093c451bd16215cf83c39447))
* **Stepper:** handle RTL mode ([#2844](https://github.com/nuxt/ui/issues/2844)) ([198d04d](https://github.com/nuxt/ui/commit/198d04de51d16ec7fcaa546370e4f67aa73bfee0))
* **Stepper:** missing import ([816bb69](https://github.com/nuxt/ui/commit/816bb69debdbf83f36c3ed3627985142e62b7dd1))
* **Table:** handle `loading` animation in RTL mode ([#2771](https://github.com/nuxt/ui/issues/2771)) ([b1550d5](https://github.com/nuxt/ui/commit/b1550d58adfeb09977619ad3ff7e776782a89603))
* **Tabs:** prevent hover on disabled ([a938d24](https://github.com/nuxt/ui/commit/a938d24f90431494c2da89411c301a228ab8d3f7))
* **Tabs:** truncate not working ([c1ff978](https://github.com/nuxt/ui/commit/c1ff978370fb343950837b380ccf02a33db53ccb))
* **types:** handle array of strings in AppConfig ([#2854](https://github.com/nuxt/ui/issues/2854)) ([4b241ba](https://github.com/nuxt/ui/commit/4b241ba3c32f4456252768b664488799a8278f0e))
* **useLocale:** update locale import to enable tree shaking ([#2735](https://github.com/nuxt/ui/issues/2735)) ([3bccb67](https://github.com/nuxt/ui/commit/3bccb6782a601e686df5d0ee405d738572f182e1))
## [3.0.0-alpha.9](https://github.com/nuxt/ui/compare/v3.0.0-alpha.8...v3.0.0-alpha.9) (2024-11-19)
### Features

View File

@@ -7,10 +7,10 @@
[![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 [Radix Vue](https://www.radix-vue.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) for Nuxt UI v2.
> You are on the `v3` development branch, check out the [dev branch](https://github.com/nuxt/ui/tree/dev) for Nuxt UI v2.
## Documentation
@@ -74,11 +74,18 @@ export default defineConfig({
```ts [main.ts]
import { createApp } from 'vue'
import { createRouter, createWebHistory } from 'vue-router'
import ui from '@nuxt/ui/vue-plugin'
import App from './App.vue'
const app = createApp(App)
const router = createRouter({
routes: [],
history: createWebHistory()
})
app.use(router)
app.use(ui)
app.mount('#app')
@@ -99,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)
- [radix-vue/radix-vue](https://github.com/radix-vue/radix-vue)
- [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

@@ -32,6 +32,10 @@ export default defineCommand({
content: {
type: 'boolean',
description: 'Create a content component (with --pro).'
},
template: {
type: 'string',
description: 'Only generate template.'
}
},
async setup({ args }) {
@@ -53,6 +57,10 @@ export default defineCommand({
const path = resolve('.')
for (const template of Object.keys(templates)) {
if (args.template && template !== args.template) {
continue
}
const { filename, contents } = templates[template](args)
if (!contents) {
continue
@@ -70,6 +78,10 @@ export default defineCommand({
consola.success(`🪄 Generated ${filePath}!`)
}
if (args.template) {
return
}
const themePath = resolve(path, `src/theme/${args.prose ? 'prose/' : ''}${args.content ? 'content/' : ''}index.ts`)
await appendFile(themePath, `export { default as ${camelCase(name)} } from './${kebabCase(name)}'`)
await sortFile(themePath)

View File

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

View File

@@ -30,14 +30,14 @@ const component = ({ name, primitive, pro, prose, content }) => {
contents: primitive
? `
<script lang="ts">
import { tv } from 'tailwind-variants'
import type { AppConfig } from '@nuxt/schema'
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 {
/**
@@ -55,9 +55,9 @@ export interface ${upperName}Slots {
</script>
<script setup lang="ts">
import { Primitive } from 'radix-vue'
import { Primitive } from 'reka-ui'
const props = withDefaults(defineProps<${upperName}Props>(), { as: 'div' })
const props = defineProps<${upperName}Props>()
defineSlots<${upperName}Slots>()
const ui = ${camelName}()
@@ -71,15 +71,16 @@ const ui = ${camelName}()
`
: `
<script lang="ts">
import { tv, type VariantProps } from 'tailwind-variants'
import type { ${upperName}RootProps, ${upperName}RootEmits } from 'radix-vue'
import type { VariantProps } from 'tailwind-variants'
import type { ${upperName}RootProps, ${upperName}RootEmits } from 'reka-ui'
import type { AppConfig } from '@nuxt/schema'
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}>
@@ -94,7 +95,7 @@ export interface ${upperName}Slots {}
</script>
<script setup lang="ts">
import { ${upperName}Root, useForwardPropsEmits } from 'radix-vue'
import { ${upperName}Root, useForwardPropsEmits } from 'reka-ui'
import { reactivePick } from '@vueuse/core'
const props = defineProps<${upperName}Props>()
@@ -149,7 +150,7 @@ import ComponentRender from '../${content ? '../' : ''}component-render'
describe('${upperName}', () => {
it.each([
// Props
['with as', { props: { as: 'div' } }],
['with as', { props: { as: 'section' } }],
['with class', { props: { class: '' } }],
['with ui', { props: { ui: {} } }],
// Slots
@@ -163,20 +164,24 @@ describe('${upperName}', () => {
}
}
const doc = ({ name, pro }) => {
const docs = ({ name, pro, primitive }) => {
const kebabName = kebabCase(name)
const upperName = splitByCase(name).map(p => upperFirst(p)).join('')
return {
filename: `docs/content/${pro ? 'pro' : '3.components'}/${kebabName}.md`,
filename: `docs/content/3.components/${kebabName}.md`,
contents: `---
description:
links: ${pro
title: ${upperName}
description: ''${pro
? `
module: ui-pro`
: ''}
links:${primitive
? ''
: `
- label: ${upperName}
icon: i-custom-radix-vue
to: https://www.radix-vue.com/components/${kebabName}.html`}
icon: i-custom-reka-ui
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
@@ -190,19 +195,19 @@ links: ${pro
### Props
:component-props
:component-props${pro ? '{pro}' : ''}
### Slots
:component-slots
:component-slots${pro ? '{pro}' : ''}
### Emits
:component-emits
:component-emits${pro ? '{pro}' : ''}
## Theme
:component-theme
:component-theme${pro ? '{pro}' : ''}
`
}
}
@@ -212,5 +217,5 @@ export default {
component,
theme,
test,
doc
docs
}

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

@@ -43,9 +43,9 @@ const code = computed(() => {
const slotsTemplate = props.themeSlots
? genPropValue(Object.keys(props.themeSlots).filter(key => key !== 'base').reduce((acc, key) => {
acc[key] = genPropValue(props.themeSlots?.[key])
return acc
}, {} as Record<string, string>))
acc[key] = genPropValue(props.themeSlots?.[key])
return acc
}, {} as Record<string, string>))
: undefined
const extraTemplate = [
@@ -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

@@ -1,5 +1,5 @@
<script lang="ts">
import { z } from 'zod'
import * as z from 'zod'
export const arrayInputSchema = z.object({
kind: z.literal('array'),

View File

@@ -1,5 +1,5 @@
<script lang="ts">
import { z } from 'zod'
import * as z from 'zod'
export const booleanInputSchema = z.literal('boolean').or(z.object({
kind: z.literal('enum'),

View File

@@ -1,5 +1,5 @@
<script lang="ts">
import { z } from 'zod'
import * as z from 'zod'
export const numberInputSchema = z.literal('number')
export type NumberInputSchema = z.infer<typeof numberInputSchema>

View File

@@ -1,5 +1,5 @@
<script lang="ts">
import { z } from 'zod'
import * as z from 'zod'
export const objectInputSchema = z.object({
kind: z.literal('object'),
@@ -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,5 +1,5 @@
<script lang="ts">
import { z } from 'zod'
import * as z from 'zod'
export const stringEnumInputSchema = z.object({
kind: z.literal('enum'),

View File

@@ -1,5 +1,5 @@
<script lang="ts">
import { z } from 'zod'
import * as z from 'zod'
export const stringInputSchema = z.literal('string').or(z.string().transform(t => t.split('|').find(s => s.trim() === 'string')).pipe(z.string()))

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

@@ -11,9 +11,9 @@
},
"dependencies": {
"@nuxt/ui": "latest",
"knitwork": "^1.1.0",
"nuxt": "^3.14.1592",
"prettier": "^3.3.3",
"zod": "^3.23.8"
"knitwork": "^1.2.0",
"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'
@@ -7,7 +7,7 @@ const route = useRoute()
const appConfig = useAppConfig()
const colorMode = useColorMode()
const { data: navigation } = await useAsyncData('navigation', () => queryCollectionNavigation('content'))
const { data: navigation } = await useAsyncData('navigation', () => queryCollectionNavigation('content', ['framework', 'module']))
const { data: files } = useLazyAsyncData('search', () => queryCollectionSearchSections('content'), {
server: false
})
@@ -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'
@@ -73,49 +50,18 @@ useServerSeoMeta({
twitterCard: 'summary_large_image'
})
const { framework, frameworks } = useSharedData()
const { frameworks, modules } = useSharedData()
const { mappedNavigation, filteredNavigation } = useContentNavigation(navigation)
const groups = computed(() => {
return [{
id: 'framework',
label: 'Framework',
items: frameworks.value
}]
})
function filterFrameworkItems(items: any[]) {
return items?.filter(item => !item.framework || item.framework === framework.value)
}
function processNavigationItem(item: any): any {
if (item.shadow) {
const matchingChild = filterFrameworkItems(item.children)?.[0]
return matchingChild
? {
...matchingChild,
title: item.title,
children: matchingChild.children ? processNavigationItem(matchingChild) : undefined
}
: item
}
return {
...item,
children: item.children?.length ? filterFrameworkItems(item.children)?.map(processNavigationItem) : undefined
}
}
const filteredNavigation = computed(() => navigation.value?.map(processNavigationItem))
provide('navigation', filteredNavigation)
provide('navigation', mappedNavigation)
</script>
<template>
<UApp :toaster="appConfig.toaster">
<NuxtLoadingIndicator color="#FFF" />
<NuxtLoadingIndicator color="var(--ui-primary)" :height="2" />
<template v-if="!route.path.startsWith('/examples')">
<Banner />
<!-- <Banner /> -->
<Header :links="links" />
</template>
@@ -131,9 +77,17 @@ provide('navigation', filteredNavigation)
<LazyUContentSearch
v-model:search-term="searchTerm"
:files="files"
:groups="groups"
:groups="[{
id: 'framework',
label: 'Framework',
items: frameworks
}, {
id: 'module',
label: 'Module',
items: modules
}]"
:navigation="filteredNavigation"
:fuse="{ resultLimit: 42 }"
:fuse="{ resultLimit: 100 }"
/>
</ClientOnly>
</template>
@@ -141,30 +95,5 @@ provide('navigation', filteredNavigation)
</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);
}
/* 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

@@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 90 90">
<g transform="translate(0,90) scale(0.1,-0.1)" fill="#9b59b6" stroke="none">
<path d="M385 796 c-17 -12 -18 -19 -7 -109 20 -164 25 -158 -75 -77 -50 39 -97 70 -110 70 -26 0 -73 -72 -73 -112 0 -23 10 -30 103 -68 56 -24 106 -46 110 -50 4 -4 -32 -22 -80 -40 -146 -54 -155 -66 -108 -147 19 -31 32 -43 49 -43 13 0 61 29 109 65 99 75 94 80 75 -72 -11 -90 -10 -97 7 -109 24 -18 106 -18 130 0 17 12 18 19 7 109 -19 152 -24 147 75 72 47 -36 96 -65 109 -65 16 0 30 13 48 44 47 81 39 92 -107 147 -48 18 -84 36 -80 39 5 4 54 26 111 50 92 38 102 45 102 68 0 41 -47 112 -74 112 -13 0 -59 -29 -109 -70 -100 -81 -95 -86 -75 77 11 90 10 97 -7 109 -10 8 -40 14 -65 14 -25 0 -55 -6 -65 -14z" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 756 B

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

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

@@ -1,25 +1,28 @@
<script setup lang="ts">
const { framework, frameworks } = useSharedData()
const value = ref<string | undefined>(undefined)
onMounted(() => {
value.value = framework.value
})
watch(framework, () => {
value.value = framework.value
})
</script>
<template>
<UDropdownMenu
v-slot="{ open }"
:modal="false"
<UTabs
v-model="value"
:items="frameworks"
:ui="{ content: 'w-(--radix-dropdown-menu-trigger-width)' }"
>
<UButton
color="neutral"
variant="outline"
v-bind="frameworks.find(f => f.value === framework)"
block
trailing-icon="i-lucide-chevron-down"
:class="[open && 'bg-[var(--ui-bg-elevated)]']"
:ui="{
trailingIcon: ['transition-transform duration-200', open ? 'rotate-180' : undefined].filter(Boolean).join(' ')
}"
class="-mx-2 w-[calc(100%+1rem)]"
/>
</UDropdownMenu>
:content="false"
color="neutral"
:ui="{
indicator: 'bg-(--ui-bg)',
trigger: 'px-1 data-[state=active]:text-(--ui-text-highlighted)'
}"
size="xs"
@update:model-value="(framework = $event as string)"
/>
</template>

View File

@@ -7,26 +7,50 @@ const props = defineProps<{
}>()
const config = useRuntimeConfig().public
const { module } = useSharedData()
const value = ref<string | undefined>(module.value)
watch(module, () => {
value.value = module.value
})
onMounted(() => {
value.value = module.value
})
const navigation = inject<Ref<ContentNavigationItem[]>>('navigation')
const items = computed(() => props.links.map(({ icon, ...link }) => link))
defineShortcuts({
meta_g: () => {
window.open('https://github.com/nuxt/ui/tree/v3', '_blank')
}
})
</script>
<template>
<UHeader :ui="{ left: 'min-w-0' }">
<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)]" aria-label="Nuxt UI">
<Logo class="w-auto h-6 shrink-0" />
<UBadge :label="`v${config.version}`" variant="subtle" size="sm" class="-mb-[2px] rounded-[var(--ui-radius)] font-semibold inline-block truncate" />
<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>
<UDropdownMenu
v-slot="{ open }"
:modal="false"
:items="[{ label: `v${config.version}`, active: true, color: 'primary', checked: true, type: 'checkbox' }, { label: module === 'ui-pro' ? 'v1.5' : 'v2.19', to: module === 'ui-pro' ? 'https://ui.nuxt.com/pro' : 'https://ui.nuxt.com' }]"
:ui="{ content: 'w-(--reka-dropdown-menu-trigger-width) min-w-0' }"
size="xs"
>
<UButton
:label="`v${config.version}`"
variant="subtle"
trailing-icon="i-lucide-chevron-down"
size="xs"
class="-mb-[6px] font-semibold rounded-full truncate"
:class="[open && 'bg-(--ui-primary)/15 ']"
:ui="{
trailingIcon: ['transition-transform duration-200', open ? 'rotate-180' : undefined].filter(Boolean).join(' ')
}"
/>
</UDropdownMenu>
</template>
<UNavigationMenu :items="items" variant="link" />
@@ -38,11 +62,11 @@ defineShortcuts({
<UContentSearchButton />
</UTooltip>
<UTooltip text="Open on GitHub" :kbds="['meta', 'G']">
<UTooltip text="Open on GitHub" class="hidden lg:flex">
<UButton
color="neutral"
variant="ghost"
to="https://github.com/nuxt/ui"
:to="`https://github.com/nuxt/${value}`"
target="_blank"
icon="i-simple-icons-github"
aria-label="GitHub"
@@ -50,14 +74,25 @@ defineShortcuts({
</UTooltip>
</template>
<template #content>
<UNavigationMenu orientation="vertical" :items="links" class="-ml-2.5" />
<template #body>
<UNavigationMenu orientation="vertical" :items="links" class="-mx-2.5" />
<USeparator type="dashed" class="my-4" />
<USeparator type="dashed" class="mt-4 mb-6" />
<FrameworkSelect class="mb-4" />
<div class="flex flex-col gap-2 w-[calc(100%+1.25rem)] mb-5.5 -mx-2.5">
<FrameworkSelect />
<ModuleSelect />
</div>
<UContentNavigation :navigation="navigation" highlight />
<UContentNavigation :navigation="navigation" highlight :ui="{ linkTrailingBadge: 'font-semibold uppercase' }">
<template #link-title="{ link }">
<span class="inline-flex items-center gap-0.5">
{{ link.title }}
<sup v-if="link.module === 'ui-pro' && link.path.startsWith('/components')" class="text-[8px] font-medium text-(--ui-primary)">PRO</sup>
</span>
</template>
</UContentNavigation>
</template>
</UHeader>
</template>

View File

@@ -0,0 +1,22 @@
<script setup lang="ts">
defineProps<{
collapsed?: boolean
}>()
</script>
<template>
<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)" />
<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

@@ -0,0 +1,28 @@
<script setup lang="ts">
const { module, modules } = useSharedData()
const value = ref<string | undefined>(undefined)
onMounted(() => {
value.value = module.value
})
watch(module, () => {
value.value = module.value
})
</script>
<template>
<UTabs
v-model="value"
:items="modules"
:content="false"
color="neutral"
:ui="{
indicator: 'bg-(--ui-bg)',
trigger: 'px-1 data-[state=active]:text-(--ui-text-highlighted)'
}"
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

@@ -5,6 +5,7 @@ import { upperFirst, camelCase, kebabCase } from 'scule'
import { hash } from 'ohash'
import { CalendarDate } from '@internationalized/date'
import * as theme from '#build/ui'
import * as themePro from '#build/ui-pro'
import { get, set } from '#ui/utils'
interface Cast {
@@ -40,6 +41,9 @@ const castMap: Record<string, Cast> = {
}
const props = defineProps<{
pro?: boolean
prose?: boolean
prefix?: string
/** Override the slug taken from the route */
slug?: string
class?: any
@@ -71,14 +75,32 @@ const props = defineProps<{
* A list of line numbers to highlight in the code block
*/
highlights?: number[]
/**
* Whether to add overflow-hidden to wrapper
*/
overflowHidden?: boolean
}>()
const route = useRoute()
const { $prettier } = useNuxtApp()
const camelName = camelCase(props.slug ?? route.params.slug?.[route.params.slug.length - 1] ?? '')
const name = `U${upperFirst(camelName)}`
const component = defineAsyncComponent(() => import(`#ui/components/${upperFirst(camelName)}.vue`))
const name = `${props.prose ? 'Prose' : 'U'}${upperFirst(camelName)}`
const component = defineAsyncComponent(() => {
if (props.pro) {
if (props.prefix) {
return import(`#ui-pro/components/${props.prefix}/${upperFirst(camelName)}.vue`)
}
if (props.prose) {
return import(`#ui-pro/components/prose/${upperFirst(camelName)}.vue`)
}
return import(`#ui-pro/components/${upperFirst(camelName)}.vue`)
}
return import(`#ui/components/${upperFirst(camelName)}.vue`)
})
const componentProps = reactive({
...Object.fromEntries(Object.entries(props.props || {}).map(([key, value]) => {
@@ -104,7 +126,7 @@ function setComponentProp(name: string, value: any) {
set(componentProps, name, value)
}
const componentTheme = (theme as any)[camelName]
const componentTheme = ((props.pro ? props.prose ? themePro.prose : themePro : theme) as any)[camelName]
const meta = await fetchComponentMeta(name as any)
function mapKeys(obj: object, parentKey = ''): any {
@@ -127,16 +149,18 @@ const options = computed(() => {
const propItems = get(props.items, key, [])
const items = propItems.length
? propItems.map((item: any) => ({
value: item,
label: item
}))
value: item,
label: String(item)
}))
: prop?.type === 'boolean' || prop?.type === 'boolean | undefined'
? [{ value: true, label: 'true' }, { value: false, label: 'false' }]
: Object.keys(componentTheme?.variants?.[key] || {}).map(variant => ({
value: variant,
label: variant,
chip: key.toLowerCase().endsWith('color') ? { color: variant } : undefined
}))
: Object.keys(componentTheme?.variants?.[key] || {}).filter((variant) => {
return variant !== 'true' && variant !== 'false'
}).map(variant => ({
value: variant,
label: variant,
chip: key.toLowerCase().endsWith('color') ? { color: variant } : undefined
}))
return {
name: key,
@@ -150,6 +174,30 @@ const options = computed(() => {
const code = computed(() => {
let code = ''
if (props.prose) {
code += `\`\`\`mdc
::${camelName}`
const proseProps = Object.entries(componentProps).map(([key, value]) => {
if (value === undefined || value === null || value === '' || props.hide?.includes(key)) {
return
}
return `${key}="${value}"`
}).filter(Boolean).join(' ')
if (proseProps.length) {
code += `{${proseProps}}`
}
code += `
${props.slots?.default}
::
\`\`\``
return code
}
if (props.collapse) {
code += `::code-collapse
`
@@ -163,7 +211,7 @@ const code = computed(() => {
`
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})
`
@@ -191,23 +239,23 @@ const code = computed(() => {
}
const prop = meta?.meta?.props?.find((prop: any) => prop.name === key)
const propDefault = prop && (prop.default ?? prop.tags?.find(tag => tag.name === 'defaultValue')?.text ?? componentTheme?.defaultVariants?.[prop.name])
const name = kebabCase(key)
if (typeof value === 'boolean') {
if (value && prop?.default === 'true') {
if (value && (propDefault === 'true' || propDefault === '`true`' || propDefault === true)) {
continue
}
if (!value && (!prop?.default || prop.default === 'false')) {
if (!value && (!propDefault || propDefault === 'false' || propDefault === '`false`' || propDefault === false)) {
continue
}
code += value ? ` ${name}` : ` :${key}="false"`
code += value ? ` ${name}` : ` :${name}="false"`
} else if (typeof value === 'object') {
const parsedValue = !props.external?.includes(key) ? json5.stringify(value, null, 2).replace(/,([ |\t\n]+[}|\])])/g, '$1') : key
code += ` :${name}="${parsedValue}"`
} else {
const propDefault = prop && (prop.default ?? prop.tags?.find(tag => tag.name === 'defaultValue')?.text ?? componentTheme?.defaultVariants?.[prop.name])
if (propDefault === value) {
continue
}
@@ -225,7 +273,7 @@ const code = computed(() => {
code += `
<template #${key}>
${value}
</template>`
</template>\n`
}
}
code += (Object.keys(props.slots).length > 1 ? '\n' : '') + `</${name}>`
@@ -268,27 +316,26 @@ 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'
}"
>
<USelectMenu
<USelect
v-if="option.items?.length"
:model-value="getComponentProp(option.name)"
:items="option.items"
value-key="value"
color="neutral"
variant="soft"
class="rounded-[var(--ui-radius)] rounded-l-none min-w-12"
:search-input="false"
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)"
@@ -303,26 +350,26 @@ const { data: ast } = await useAsyncData(`component-code-${name}-${hash({ props:
class="size-2"
/>
</template>
</USelectMenu>
</USelect>
<UInput
v-else
:type="option.type?.includes('number') ? 'number' : 'text'"
:type="option.type?.includes('number') && typeof getComponentProp(option.name) === 'number' ? 'number' : 'text'"
: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]">
<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]>
<MDCSlot :name="slot" unwrap="p">
<slot :name="slot" mdc-unwrap="p">
{{ slots?.[slot] }}
</MDCSlot>
</slot>
</template>
</component>
</div>

View File

@@ -1,10 +1,14 @@
<script setup lang="ts">
import { upperFirst, camelCase } from 'scule'
const props = defineProps<{
prose?: boolean
}>()
const route = useRoute()
const camelName = camelCase(route.params.slug?.[route.params.slug.length - 1] ?? '')
const name = `U${upperFirst(camelName)}`
const name = props.prose ? `Prose${upperFirst(camelName)}` : `U${upperFirst(camelName)}`
const meta = await fetchComponentMeta(name as any)
</script>

View File

@@ -1,10 +1,21 @@
<script setup lang="ts">
import { camelCase } from 'scule'
import { useElementSize } from '@vueuse/core'
import { get, set } from '#ui/utils'
const props = withDefaults(defineProps<{
name: string
class?: any
/**
* Whether to render the component in an iframe
* @defaultValue false
*/
iframe?: boolean | { [key: string]: any }
/**
* Whether to display the component in a mobile-sized iframe viewport
* @defaultValue false
*/
iframeMobile?: boolean
props?: { [key: string]: any }
/**
* Whether to format the code with Prettier
@@ -42,6 +53,10 @@ const props = withDefaults(defineProps<{
* A list of line numbers to highlight in the code block
*/
highlights?: number[]
/**
* Whether to add overflow-hidden to wrapper
*/
overflowHidden?: boolean
}>(), {
preview: true,
source: true
@@ -49,9 +64,13 @@ const props = withDefaults(defineProps<{
const slots = defineSlots<{
options(props?: {}): any
code(props?: {}): any
}>()
const el = ref<HTMLElement | null>(null)
const { $prettier } = useNuxtApp()
const { width } = useElementSize(el)
const camelName = camelCase(props.name)
@@ -112,13 +131,26 @@ const optionsValues = ref(props.options?.reduce((acc, option) => {
}
return acc
}, {} as Record<string, any>) || {})
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 class="my-5">
<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 }]">
<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
@@ -127,10 +159,10 @@ const optionsValues = ref(props.options?.reduce((acc, option) => {
: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'
}"
>
@@ -142,7 +174,7 @@ const optionsValues = ref(props.options?.reduce((acc, option) => {
: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' }"
@@ -163,18 +195,30 @@ const optionsValues = ref(props.options?.reduce((acc, option) => {
: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>
</div>
<div class="flex justify-center p-4" :class="props.class">
<iframe
v-if="iframe"
v-bind="typeof iframe === 'object' ? iframe : {}"
:src="`/examples/${name}?${urlSearchParams}`"
class="relative w-full"
:class="[props.class, !iframeMobile && 'lg:left-1/2 lg:-translate-x-1/2 lg:w-[1024px]']"
/>
<div v-else class="flex justify-center p-4" :class="props.class">
<component :is="camelName" v-bind="{ ...componentProps, ...optionsValues }" />
</div>
</div>
</template>
<MDCRenderer v-if="ast && props.source" :body="ast.body" :data="ast.data" class="[&_pre]:!rounded-t-none [&_div.my-5]:!mt-0" />
<template v-if="props.source">
<div v-if="!!slots.code" class="[&_pre]:!rounded-t-none [&_div.my-5]:!mt-0">
<slot name="code" />
</div>
<MDCRenderer v-else-if="ast" :body="ast.body" :data="ast.data" class="[&_pre]:!rounded-t-none [&_div.my-5]:!mt-0" />
</template>
</div>
</template>

View File

@@ -2,9 +2,13 @@
import { upperFirst, camelCase } from 'scule'
import type { ComponentMeta } from 'vue-component-meta'
import * as theme from '#build/ui'
import * as themePro from '#build/ui-pro'
const props = withDefaults(defineProps<{
name?: string
ignore?: string[]
pro?: boolean
prose?: boolean
}>(), {
ignore: () => [
'activeClass',
@@ -23,17 +27,18 @@ const props = withDefaults(defineProps<{
'exactQuery',
'exactHash',
'external',
'onClick'
'onClick',
'viewTransition'
]
})
const route = useRoute()
const camelName = camelCase(route.params.slug?.[route.params.slug.length - 1] ?? '')
const name = `U${upperFirst(camelName)}`
const camelName = camelCase(props.name ?? route.params.slug?.[route.params.slug.length - 1] ?? '')
const componentName = props.prose ? `Prose${upperFirst(camelName)}` : `U${upperFirst(camelName)}`
const componentTheme = (theme as any)[camelName]
const meta = await fetchComponentMeta(name as any)
const componentTheme = ((props.pro ? props.prose ? themePro.prose : themePro : theme) as any)[camelName]
const meta = await fetchComponentMeta(componentName as any)
const metaProps: ComputedRef<ComponentMeta['props']> = computed(() => {
if (!meta?.meta?.props?.length) {
@@ -43,7 +48,17 @@ const metaProps: ComputedRef<ComponentMeta['props']> = computed(() => {
return meta.meta.props.filter((prop) => {
return !props.ignore?.includes(prop.name)
}).map((prop) => {
prop.default = prop.default ?? prop.tags?.find(tag => tag.name === 'defaultValue')?.text ?? componentTheme?.defaultVariants?.[prop.name]
if (prop.default) {
prop.default = prop.default.replace(' as never', '').replace(/^"(.*)"$/, '\'$1\'')
} else {
const tag = prop.tags?.find(tag => tag.name === 'defaultValue')?.text
if (tag) {
prop.default = tag
} else if (componentTheme?.defaultVariants?.[prop.name]) {
prop.default = typeof componentTheme?.defaultVariants?.[prop.name] === 'string' ? `'${componentTheme?.defaultVariants?.[prop.name]}'` : componentTheme?.defaultVariants?.[prop.name]
}
}
// @ts-expect-error - Type is not correct
prop.type = !prop.type.startsWith('boolean') && prop.schema?.kind === 'enum' && Object.keys(prop.schema.schema)?.length ? Object.values(prop.schema.schema).map(schema => schema?.type ? schema.type : schema).join(' | ') : prop.type
return prop
@@ -97,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

@@ -1,10 +1,15 @@
<script setup lang="ts">
import { upperFirst, camelCase } from 'scule'
const props = defineProps<{
prose?: boolean
slug?: string
}>()
const route = useRoute()
const camelName = camelCase(route.params.slug?.[route.params.slug.length - 1] ?? '')
const name = `U${upperFirst(camelName)}`
const camelName = camelCase(props.slug ?? route.params.slug?.[route.params.slug.length - 1] ?? '')
const name = `${props.prose ? 'Prose' : 'U'}${upperFirst(camelName)}`
const meta = await fetchComponentMeta(name as any)
</script>
@@ -31,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,18 +1,30 @@
<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'
const props = defineProps<{
pro?: boolean
prose?: boolean
slug?: string
extra?: string[]
}>()
const route = useRoute()
const { framework } = useSharedData()
const name = camelCase(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)
const computedTheme = computed(() => props.pro ? props.prose ? themePro.prose : themePro : theme)
const strippedTheme = computed(() => {
const strippedTheme = {
...(theme as any)[name]
...(computedTheme.value as any)[camelName]
}
if (strippedTheme?.compoundVariants) {
@@ -49,23 +61,43 @@ const strippedTheme = computed(() => {
})
const component = computed(() => {
const baseKey = props.pro ? 'uiPro' : 'ui'
const content = props.prose
? { prose: { [camelName]: strippedTheme.value } }
: { [camelName]: strippedTheme.value }
if (props.extra?.length) {
props.extra.forEach((extra) => {
const target = props.prose ? content.prose! : content
target[extra as keyof typeof target] = computedTheme.value[extra as keyof typeof computedTheme.value]
})
}
return {
ui: {
[name]: strippedTheme.value
}
[baseKey]: content
}
})
const { data: ast } = await useAsyncData(`component-theme-${name}-${framework.value}`, 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
${framework.value === 'nuxt'
? `
::code-collapse{class="nuxt-only"}
\`\`\`ts [app.config.ts]
export default defineAppConfig(${json5.stringify(component.value, null, 2).replace(/,([ |\t\n]+[}|\])])/g, '$1')})
\`\`\`\
`
: `
::
::code-collapse{class="vue-only"}
\`\`\`ts [vite.config.ts]
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
@@ -81,12 +113,12 @@ 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,7 +1,12 @@
<script setup lang="ts">
const { framework } = useSharedData()
import { Slot } from 'reka-ui'
</script>
<template>
<slot :name="framework" />
<Slot class="nuxt-only">
<slot name="nuxt" />
</Slot>
<Slot class="vue-only">
<slot name="vue" />
</Slot>
</template>

View File

@@ -2,13 +2,13 @@
import json5 from 'json5'
import icons from '../../../../src/theme/icons'
const { framework } = useSharedData()
const appConfig = useAppConfig()
const { framework, module } = useSharedData()
const { data: ast } = await useAsyncData(`icons-theme-${framework.value}`, async () => {
const { data: ast } = await useAsyncData(`icons-theme`, async () => {
const md = `
::code-collapse
${framework.value === 'nuxt'
? `
::code-collapse{class="ui-only nuxt-only"}
\`\`\`ts [app.config.ts]
export default defineAppConfig(${json5.stringify({
ui: {
@@ -16,8 +16,27 @@ export default defineAppConfig(${json5.stringify({
}
}, null, 2).replace(/,([ |\t\n]+[}|\])])/g, '$1')})
\`\`\`\
`
: `
::
::code-collapse{class="ui-pro-only nuxt-only"}
\`\`\`ts [app.config.ts]
export default defineAppConfig(${json5.stringify({
ui: {
icons: appConfig.ui.icons
}
}, null, 2).replace(/,([ |\t\n]+[}|\])])/g, '$1')})
\`\`\`\
::
::caution{class="ui-pro-only vue-only"}
Nuxt UI Pro v3 does not support Vue yet.
::
::code-collapse{class="vue-only"}
\`\`\`ts [vite.config.ts]
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
@@ -37,12 +56,12 @@ export default defineConfig({
]
})
\`\`\`
`}
::
`
return parseMarkdown(md)
}, { watch: [framework] })
}, { watch: [framework, module] })
</script>
<template>

View File

@@ -0,0 +1,12 @@
<script setup lang="ts">
import { Slot } from 'reka-ui'
</script>
<template>
<Slot class="ui-only">
<slot name="ui" />
</Slot>
<Slot class="ui-pro-only">
<slot name="ui-pro" />
</Slot>
</template>

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

@@ -1,27 +1,39 @@
<script setup lang="ts">
import type { Locale } from '@nuxt/ui'
import * as locales from '@nuxt/ui/locale'
type LocaleKey = keyof typeof locales
type LocaleComputed = Locale & { flag: string }
const props = withDefaults(defineProps<{
default?: string
}>(), {
default: 'en'
})
const countries = await $fetch('/api/locales.json')
const getLocaleKeys = Object.keys(locales) as LocaleKey[]
const localesList = getLocaleKeys.map<LocaleComputed>((code) => {
const locale: Locale = locales[code]
return {
...locale,
flag: countries[locale.code] || ''
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',
km: 'kh',
ko: 'kr',
nb: 'no',
sv: 'se',
uk: 'ua',
vi: 'vn'
}
})
const baseLanguage = locale.split('-')[0]?.toLowerCase() || locale
const countryCode = languageToCountry[baseLanguage] || locale.replace(/^.*-/, '').slice(0, 2)
return countryCode.toUpperCase()
.split('')
.map(char => String.fromCodePoint(0x1F1A5 + char.charCodeAt(0)))
.join('')
}
</script>
<!-- eslint-disable vue/singleline-html-element-content-newline -->
@@ -31,9 +43,12 @@ const localesList = getLocaleKeys.map<LocaleComputed>((code) => {
By default, the <ProseCode>{{ props.default }}</ProseCode> locale is used.
</ProseP>
<div class="grid gap-6 grid-cols-2 md:grid-cols-3">
<div v-for="locale in localesList" :key="locale.code">
<div v-for="locale in locales" :key="locale.code">
<div class="flex gap-3 items-center">
<UAvatar :text="locale.flag" size="xl" />
<UAvatar size="xl">
{{ getEmojiFlag(locale.code) }}
</UAvatar>
<div class="text-sm">
<div class="font-semibold">{{ locale.name }}</div>
<div class="mt-1">Code: <ProseCode class="text-xs">{{ locale.code }}</ProseCode></div>

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 'radix-vue/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 'radix-vue/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

@@ -0,0 +1,19 @@
<script setup lang="ts">
const color = ref('#00C16A')
const chip = computed(() => ({ backgroundColor: color.value }))
</script>
<template>
<UPopover>
<UButton label="Choose color" color="neutral" variant="outline">
<template #leading>
<span :style="chip" class="size-3 rounded-full" />
</template>
</UButton>
<template #content>
<UColorPicker v-model="color" class="p-2" />
</template>
</UPopover>
</template>

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

@@ -14,7 +14,7 @@ const groups = computed(() => [{
id: 'users',
label: searchTerm.value ? `Users matching “${searchTerm.value}”...` : 'Users',
items: users.value || [],
filter: false
ignoreFilter: true
}])
</script>

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

@@ -11,8 +11,8 @@ const items = [
level: 2
},
{
id: '/getting-started#radix-vue-3',
label: 'Radix Vue',
id: '/getting-started#reka-ui-radix-vue',
label: 'Reka UI',
level: 3
},
{

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,13 +60,12 @@ const users = [
to: 'https://github.com/noook',
target: '_blank',
avatar: {
src: 'https://github.com/noook.png',
alt: 'noook'
src: 'https://github.com/noook.png'
}
}
]
const searchTerm = ref('')
const searchTerm = ref('B')
function onSelect() {
searchTerm.value = ''

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-ccw" 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

@@ -13,7 +13,7 @@ const groups = computed(() => [{
id: 'users',
label: searchTerm.value ? `Users matching “${searchTerm.value}”...` : 'Users',
items: users.value || [],
filter: false
ignoreFilter: true
}])
</script>

View File

@@ -0,0 +1,21 @@
<script setup lang="ts">
const open = ref(false)
</script>
<template>
<UDrawer v-model:open="open" :dismissible="false" :ui="{ header: 'flex items-center justify-between' }">
<UButton label="Open" color="neutral" variant="subtle" trailing-icon="i-lucide-chevron-up" />
<template #header>
<h2 class="text-(--ui-text-highlighted) font-semibold">
Drawer non-dismissible
</h2>
<UButton color="neutral" variant="ghost" icon="i-lucide-x" @click="open = false" />
</template>
<template #body>
<Placeholder class="h-48" />
</template>
</UDrawer>
</template>

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,5 +1,5 @@
<script setup lang="ts">
import { z } from 'zod'
import * as z from 'zod'
import type { FormSubmitEvent } from '@nuxt/ui'
const schema = z.object({

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

@@ -1,10 +1,10 @@
<script setup lang="ts">
import { z } from 'zod'
import * as z from 'zod'
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 { z } from 'zod'
import * as z from 'zod'
import type { FormSubmitEvent } from '@nuxt/ui'
const schema = z.object({

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 { z } from 'zod'
import type { FormSubmitEvent } from '#ui/types'
import * as z from 'zod'
import type { FormSubmitEvent } from '@nuxt/ui'
const schema = z.object({
email: z.string().email('Invalid email'),

View File

@@ -0,0 +1,20 @@
<script setup lang="ts">
const items = ref(['Backlog', 'Todo', 'In Progress', 'Done'])
const value = ref('Backlog')
function onCreate(item: string) {
items.value.push(item)
value.value = item
}
</script>
<template>
<UInputMenu
v-model="value"
create-item
:items="items"
class="w-48"
@create="onCreate"
/>
</template>

View File

@@ -16,7 +16,7 @@ const { data: users, status } = await useFetch('https://jsonplaceholder.typicode
<UInputMenu
:items="users || []"
:loading="status === 'pending'"
:filter="['label', 'email']"
:filter-fields="['label', 'email']"
icon="i-lucide-user"
placeholder="Select user"
class="w-80"
@@ -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

@@ -20,7 +20,7 @@ const { data: users, status } = await useFetch('https://jsonplaceholder.typicode
v-model:search-term="searchTerm"
:items="users || []"
:loading="status === 'pending'"
:filter="false"
ignore-filter
icon="i-lucide-user"
placeholder="Select user"
>

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

@@ -13,7 +13,7 @@ const groups = computed(() => [{
id: 'users',
label: searchTerm.value ? `Users matching “${searchTerm.value}”...` : 'Users',
items: users.value || [],
filter: false
ignoreFilter: true
}])
</script>

View File

@@ -4,12 +4,21 @@ const modal = useModal()
defineProps<{
count: number
}>()
const emit = defineEmits(['success'])
function onSuccess() {
emit('success')
}
</script>
<template>
<UModal :title="`This modal was opened programmatically ${count} times`">
<template #footer>
<UButton color="neutral" label="Close" @click="modal.close()" />
<div class="flex gap-2">
<UButton color="neutral" label="Close" @click="modal.close()" />
<UButton label="Success" @click="onSuccess" />
</div>
</template>
</UModal>
</template>

View File

@@ -3,6 +3,7 @@ import { LazyModalExample } from '#components'
const count = ref(0)
const toast = useToast()
const modal = useModal()
function open() {
@@ -10,7 +11,13 @@ function open() {
modal.open(LazyModalExample, {
description: 'And you can even provide a description!',
count: count.value
count: count.value,
onSuccess() {
toast.add({
title: 'Success !',
id: 'modal-success'
})
}
})
}
</script>

View File

@@ -51,7 +51,8 @@ const items = [
]
},
{
label: 'GitHub'
label: 'GitHub',
icon: 'i-simple-icons-github'
}
]
</script>
@@ -59,9 +60,9 @@ const items = [
<template>
<UNavigationMenu
:items="items"
class="justify-center"
class="w-full justify-center"
:ui="{
viewport: 'sm:w-[var(--radix-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

@@ -19,7 +19,7 @@ const items = [
</script>
<template>
<UNavigationMenu :items="items" class="justify-center">
<UNavigationMenu :items="items" class="w-full justify-center">
<template #components-trailing>
<UBadge label="44" variant="subtle" size="sm" />
</template>

View File

@@ -111,5 +111,5 @@ defineShortcuts({
</script>
<template>
<UNavigationMenu v-model="active" :items="items" class="justify-center" />
<UNavigationMenu v-model="active" :items="items" class="w-full justify-center" />
</template>

View File

@@ -0,0 +1,21 @@
<script setup lang="ts">
const open = ref(false)
</script>
<template>
<UPopover v-model:open="open" :dismissible="false" :ui="{ content: 'p-4' }">
<UButton label="Open" color="neutral" variant="subtle" />
<template #content>
<div class="flex items-center gap-4 mb-4">
<h2 class="text-(--ui-text-highlighted) font-semibold">
Popover non-dismissible
</h2>
<UButton color="neutral" variant="ghost" icon="i-lucide-x" @click="open = false" />
</div>
<Placeholder class="size-full min-h-48" />
</template>
</UPopover>
</template>

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