From f26f6c8168ad5e44e47ab770cee10035257841a2 Mon Sep 17 00:00:00 2001 From: Alexander Date: Thu, 31 Oct 2024 19:09:24 +0500 Subject: [PATCH] feat(InputMenu/Select/SelectMenu): `arrow` prop implementation (#2503) Co-authored-by: Benjamin Canac --- docs/content/3.components/input-menu.md | 25 +++++++++++ docs/content/3.components/select-menu.md | 27 ++++++++++++ docs/content/3.components/select.md | 32 +++++++++++++- src/runtime/components/InputMenu.vue | 6 ++- src/runtime/components/Select.vue | 5 ++- src/runtime/components/SelectMenu.vue | 6 ++- .../__snapshots__/InputMenu-vue.spec.ts.snap | 36 +++++++++++++++- .../__snapshots__/InputMenu.spec.ts.snap | 36 +++++++++++++++- .../__snapshots__/Select-vue.spec.ts.snap | 37 +++++++++++++++- .../__snapshots__/Select.spec.ts.snap | 37 +++++++++++++++- .../__snapshots__/SelectMenu-vue.spec.ts.snap | 42 ++++++++++++++++++- .../__snapshots__/SelectMenu.spec.ts.snap | 42 ++++++++++++++++++- 12 files changed, 321 insertions(+), 10 deletions(-) diff --git a/docs/content/3.components/input-menu.md b/docs/content/3.components/input-menu.md index e4781fba..dc1722b3 100644 --- a/docs/content/3.components/input-menu.md +++ b/docs/content/3.components/input-menu.md @@ -251,6 +251,31 @@ props: --- :: +### Arrow + +Use the `arrow` prop to display an arrow on the InputMenu. + +::component-code +--- +prettier: true +ignore: + - items + - modelValue + - arrow +external: + - items + - modelValue +props: + modelValue: Backlog + arrow: true + items: + - Backlog + - Todo + - In Progress + - Done +--- +:: + ### Color Use the `color` prop to change the ring color when the InputMenu is focused. diff --git a/docs/content/3.components/select-menu.md b/docs/content/3.components/select-menu.md index 7163b4c6..f45b7a4e 100644 --- a/docs/content/3.components/select-menu.md +++ b/docs/content/3.components/select-menu.md @@ -275,6 +275,33 @@ props: --- :: +### Arrow + +Use the `arrow` prop to display an arrow on the SelectMenu. + +::component-code +--- +prettier: true +ignore: + - items + - modelValue + - class + - arrow +external: + - items + - modelValue +props: + modelValue: Backlog + arrow: true + items: + - Backlog + - Todo + - In Progress + - Done + class: 'w-48' +--- +:: + ### Color Use the `color` prop to change the ring color when the SelectMenu is focused. diff --git a/docs/content/3.components/select.md b/docs/content/3.components/select.md index 26c60427..4e274def 100644 --- a/docs/content/3.components/select.md +++ b/docs/content/3.components/select.md @@ -160,7 +160,7 @@ props: ### Content -Use the `content` prop to control how the Select content is rendered, like its its `align`, `side` or `position` for example. Defaults to `popper` to match other components. +Use the `content` prop to control how the Select content is rendered, like its `align`, `side` or `position` for example. ::warning The `content.align`, `content.side`, etc. properties only apply when `content.position` is set to `popper`. @@ -209,6 +209,36 @@ props: Read more about the `content.position` prop in the [Radix Vue documentation](https://www.radix-vue.com/components/select.html#change-the-positioning-mode). :: + + ### Color Use the `color` prop to change the ring color when the Select is focused. diff --git a/src/runtime/components/InputMenu.vue b/src/runtime/components/InputMenu.vue index 6a9cbdcf..35b91b33 100644 --- a/src/runtime/components/InputMenu.vue +++ b/src/runtime/components/InputMenu.vue @@ -126,7 +126,7 @@ export interface InputMenuSlots {