From 75cf9c40c4499a50591bf3e6a9a269d99a7a7ccb Mon Sep 17 00:00:00 2001 From: Saeid Zareie <65568529+Saeid-Za@users.noreply.github.com> Date: Tue, 5 Mar 2024 14:45:30 +0330 Subject: [PATCH] docs: adding remaining usages of drawer (#380) --- .../theme/components/InlineThemePicker.vue | 54 ++++ .../theme/components/ThemeCustomizer.vue | 106 ++++++++ .../.vitepress/theme/layout/ThemingLayout.vue | 253 +++++------------- apps/www/.vitepress/theme/types/colors.ts | 13 + apps/www/.vitepress/theme/utils/codeeditor.ts | 7 +- apps/www/__registry__/index.ts | 14 + .../src/content/docs/components/combobox.md | 13 +- .../default/example/ComboboxResponsive.vue | 94 +++++++ .../new-york/example/ComboboxResponsive.vue | 94 +++++++ 9 files changed, 452 insertions(+), 196 deletions(-) create mode 100644 apps/www/.vitepress/theme/components/InlineThemePicker.vue create mode 100644 apps/www/.vitepress/theme/components/ThemeCustomizer.vue create mode 100644 apps/www/.vitepress/theme/types/colors.ts create mode 100644 apps/www/src/lib/registry/default/example/ComboboxResponsive.vue create mode 100644 apps/www/src/lib/registry/new-york/example/ComboboxResponsive.vue diff --git a/apps/www/.vitepress/theme/components/InlineThemePicker.vue b/apps/www/.vitepress/theme/components/InlineThemePicker.vue new file mode 100644 index 00000000..5a3cd7b7 --- /dev/null +++ b/apps/www/.vitepress/theme/components/InlineThemePicker.vue @@ -0,0 +1,54 @@ + + + diff --git a/apps/www/.vitepress/theme/components/ThemeCustomizer.vue b/apps/www/.vitepress/theme/components/ThemeCustomizer.vue new file mode 100644 index 00000000..a5a653ba --- /dev/null +++ b/apps/www/.vitepress/theme/components/ThemeCustomizer.vue @@ -0,0 +1,106 @@ + + + diff --git a/apps/www/.vitepress/theme/layout/ThemingLayout.vue b/apps/www/.vitepress/theme/layout/ThemingLayout.vue index e256c2f2..4159084b 100644 --- a/apps/www/.vitepress/theme/layout/ThemingLayout.vue +++ b/apps/www/.vitepress/theme/layout/ThemingLayout.vue @@ -1,35 +1,19 @@ @@ -90,6 +90,9 @@ function constructFiles(componentName: string, style: Style, sources: Record import("../src/lib/registry/default/example/ComboboxPopover.vue").then((m) => m.default), files: ["../src/lib/registry/default/example/ComboboxPopover.vue"], }, + "ComboboxResponsive": { + name: "ComboboxResponsive", + type: "components:example", + registryDependencies: ["button","command","drawer","popover"], + component: () => import("../src/lib/registry/default/example/ComboboxResponsive.vue").then((m) => m.default), + files: ["../src/lib/registry/default/example/ComboboxResponsive.vue"], + }, "CommandDemo": { name: "CommandDemo", type: "components:example", @@ -1278,6 +1285,13 @@ export const Index = { component: () => import("../src/lib/registry/new-york/example/ComboboxPopover.vue").then((m) => m.default), files: ["../src/lib/registry/new-york/example/ComboboxPopover.vue"], }, + "ComboboxResponsive": { + name: "ComboboxResponsive", + type: "components:example", + registryDependencies: ["button","command","drawer","popover"], + component: () => import("../src/lib/registry/new-york/example/ComboboxResponsive.vue").then((m) => m.default), + files: ["../src/lib/registry/new-york/example/ComboboxResponsive.vue"], + }, "CommandDemo": { name: "CommandDemo", type: "components:example", diff --git a/apps/www/src/content/docs/components/combobox.md b/apps/www/src/content/docs/components/combobox.md index ad697ef9..b00f8653 100644 --- a/apps/www/src/content/docs/components/combobox.md +++ b/apps/www/src/content/docs/components/combobox.md @@ -1,9 +1,9 @@ --- title: Combobox -description: Autocomplete input and command palette with a list of suggestions. +description: Autocomplete input and command palette with a list of suggestions. --- - +
@@ -11,14 +11,13 @@ description: Autocomplete input and command palette with a list of suggestions. [Radix Vue](https://github.com/radix-vue/radix-vue/releases/tag/v1.2.0) introduced a breaking change. You will need to wrap `ComboboxGroup` and `ComboboxItem` inside of `ComboboxList` now. - ## Installation The Combobox is built using a composition of the `` and the `` components. See installation instructions for the [Popover](/docs/components/popover#installation) and the [Command](/docs/components/command#installation) components. - + ## Usage ```vue @@ -110,6 +109,12 @@ const value = ref({}) +### Responsive + +You can create a responsive combobox by using the `` on desktop and the `` components on mobile. + + + ### Form diff --git a/apps/www/src/lib/registry/default/example/ComboboxResponsive.vue b/apps/www/src/lib/registry/default/example/ComboboxResponsive.vue new file mode 100644 index 00000000..14618874 --- /dev/null +++ b/apps/www/src/lib/registry/default/example/ComboboxResponsive.vue @@ -0,0 +1,94 @@ + + + diff --git a/apps/www/src/lib/registry/new-york/example/ComboboxResponsive.vue b/apps/www/src/lib/registry/new-york/example/ComboboxResponsive.vue new file mode 100644 index 00000000..393bc877 --- /dev/null +++ b/apps/www/src/lib/registry/new-york/example/ComboboxResponsive.vue @@ -0,0 +1,94 @@ + + +