diff --git a/docs/components/content/examples/ContextMenuExampleArrow.vue b/docs/components/content/examples/ContextMenuExampleArrow.vue
new file mode 100644
index 00000000..1e337170
--- /dev/null
+++ b/docs/components/content/examples/ContextMenuExampleArrow.vue
@@ -0,0 +1,35 @@
+
+
+
+
+
+ Right click here
+
+
+
+
+ Menu
+
+
+
+
diff --git a/docs/components/content/examples/ContextMenuExampleOffset.vue b/docs/components/content/examples/ContextMenuExampleOffset.vue
new file mode 100644
index 00000000..34520660
--- /dev/null
+++ b/docs/components/content/examples/ContextMenuExampleOffset.vue
@@ -0,0 +1,35 @@
+
+
+
+
+
+ Right click here
+
+
+
+
+ Menu
+
+
+
+
diff --git a/docs/components/content/examples/ContextMenuExamplePlacement.vue b/docs/components/content/examples/ContextMenuExamplePlacement.vue
new file mode 100644
index 00000000..b714c616
--- /dev/null
+++ b/docs/components/content/examples/ContextMenuExamplePlacement.vue
@@ -0,0 +1,35 @@
+
+
+
+
+
+ Right click here
+
+
+
+
+ Menu
+
+
+
+
diff --git a/docs/components/content/examples/DropdownExampleArrow.vue b/docs/components/content/examples/DropdownExampleArrow.vue
new file mode 100644
index 00000000..cee7daf5
--- /dev/null
+++ b/docs/components/content/examples/DropdownExampleArrow.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
diff --git a/docs/components/content/examples/DropdownExampleOffset.vue b/docs/components/content/examples/DropdownExampleOffset.vue
new file mode 100644
index 00000000..7a648f27
--- /dev/null
+++ b/docs/components/content/examples/DropdownExampleOffset.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
diff --git a/docs/components/content/examples/DropdownExamplePlacement.vue b/docs/components/content/examples/DropdownExamplePlacement.vue
new file mode 100644
index 00000000..2b4853a1
--- /dev/null
+++ b/docs/components/content/examples/DropdownExamplePlacement.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
diff --git a/docs/components/content/examples/PopoverExampleArrow.vue b/docs/components/content/examples/PopoverExampleArrow.vue
new file mode 100644
index 00000000..a7e22773
--- /dev/null
+++ b/docs/components/content/examples/PopoverExampleArrow.vue
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
diff --git a/docs/components/content/examples/PopoverExampleOffset.vue b/docs/components/content/examples/PopoverExampleOffset.vue
new file mode 100644
index 00000000..57581071
--- /dev/null
+++ b/docs/components/content/examples/PopoverExampleOffset.vue
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
diff --git a/docs/components/content/examples/PopoverExamplePlacement.vue b/docs/components/content/examples/PopoverExamplePlacement.vue
new file mode 100644
index 00000000..a8cb5d4b
--- /dev/null
+++ b/docs/components/content/examples/PopoverExamplePlacement.vue
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
diff --git a/docs/components/content/examples/SelectMenuExampleArrow.vue b/docs/components/content/examples/SelectMenuExampleArrow.vue
new file mode 100644
index 00000000..1e458855
--- /dev/null
+++ b/docs/components/content/examples/SelectMenuExampleArrow.vue
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/docs/components/content/examples/SelectMenuExampleOffset.vue b/docs/components/content/examples/SelectMenuExampleOffset.vue
new file mode 100644
index 00000000..2dbf9290
--- /dev/null
+++ b/docs/components/content/examples/SelectMenuExampleOffset.vue
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/docs/components/content/examples/SelectMenuExamplePlacement.vue b/docs/components/content/examples/SelectMenuExamplePlacement.vue
new file mode 100644
index 00000000..6b1850a1
--- /dev/null
+++ b/docs/components/content/examples/SelectMenuExamplePlacement.vue
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/docs/content/2.elements/6.dropdown.md b/docs/content/2.elements/6.dropdown.md
index dcb8a6af..5304745c 100644
--- a/docs/content/2.elements/6.dropdown.md
+++ b/docs/content/2.elements/6.dropdown.md
@@ -32,6 +32,22 @@ Use the `mode` prop to switch between `click` and `hover` modes.
:component-example{component="dropdown-example-mode"}
+## Popper
+
+Use the `popper` prop to customize the popper instance.
+
+### Arrow
+
+:component-example{component="dropdown-example-arrow"}
+
+### Placement
+
+:component-example{component="dropdown-example-placement"}
+
+### Offset
+
+:component-example{component="dropdown-example-offset"}
+
## Slots
### `item`
diff --git a/docs/content/3.forms/4.select-menu.md b/docs/content/3.forms/4.select-menu.md
index cd7c67f6..f73dfd22 100644
--- a/docs/content/3.forms/4.select-menu.md
+++ b/docs/content/3.forms/4.select-menu.md
@@ -91,6 +91,22 @@ Try to search for something that doesn't exist in the example below.
:component-example{component="select-menu-example-creatable" :componentProps='{"class": "w-full lg:w-40"}'}
+## Popper
+
+Use the `popper` prop to customize the popper instance.
+
+### Arrow
+
+:component-example{component="select-menu-example-arrow"}
+
+### Placement
+
+:component-example{component="select-menu-example-placement"}
+
+### Offset
+
+:component-example{component="select-menu-example-offset"}
+
## Slots
### `label`
diff --git a/docs/content/6.overlays/3.popover.md b/docs/content/6.overlays/3.popover.md
index 48d994bd..d0ac7fb1 100644
--- a/docs/content/6.overlays/3.popover.md
+++ b/docs/content/6.overlays/3.popover.md
@@ -25,6 +25,22 @@ Use the `open` prop to manually control showing the panel.
:component-example{component="popover-example-open"}
+## Popper
+
+Use the `popper` prop to customize the popper instance.
+
+### Arrow
+
+:component-example{component="popover-example-arrow"}
+
+### Placement
+
+:component-example{component="popover-example-placement"}
+
+### Offset
+
+:component-example{component="popover-example-offset"}
+
## Slots
### `panel`
diff --git a/docs/content/6.overlays/4.tooltip.md b/docs/content/6.overlays/4.tooltip.md
index 511627f7..78563695 100644
--- a/docs/content/6.overlays/4.tooltip.md
+++ b/docs/content/6.overlays/4.tooltip.md
@@ -12,7 +12,7 @@ links:
## Popper
-Use the `popper` prop to customize the tootip.
+Use the `popper` prop to customize the popper instance.
### Arrow
diff --git a/docs/content/6.overlays/5.context-menu.md b/docs/content/6.overlays/5.context-menu.md
index e49d7d58..6693ccea 100644
--- a/docs/content/6.overlays/5.context-menu.md
+++ b/docs/content/6.overlays/5.context-menu.md
@@ -11,6 +11,22 @@ links:
:component-example{component="context-menu-example"}
+## Popper
+
+Use the `popper` prop to customize the popper instance.
+
+### Arrow
+
+:component-example{component="context-menu-example-arrow"}
+
+### Placement
+
+:component-example{component="context-menu-example-placement"}
+
+### Offset
+
+:component-example{component="context-menu-example-offset"}
+
## Props
:component-props
diff --git a/src/runtime/components/elements/Dropdown.vue b/src/runtime/components/elements/Dropdown.vue
index 7791df11..4a403ab6 100644
--- a/src/runtime/components/elements/Dropdown.vue
+++ b/src/runtime/components/elements/Dropdown.vue
@@ -17,28 +17,31 @@
-
-
-
-
-
-
-
-
- {{ item.label }}
-
-
- {{ shortcut }}
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+ {{ shortcut }}
+
+
+
+
+
+
+
@@ -185,6 +188,8 @@ export default defineComponent({
// eslint-disable-next-line vue/no-dupe-keys
ui,
attrs,
+ // eslint-disable-next-line vue/no-dupe-keys
+ popper,
trigger,
container,
containerStyle,
diff --git a/src/runtime/components/forms/SelectMenu.vue b/src/runtime/components/forms/SelectMenu.vue
index 010c62ed..37d5370d 100644
--- a/src/runtime/components/forms/SelectMenu.vue
+++ b/src/runtime/components/forms/SelectMenu.vue
@@ -52,64 +52,67 @@
-
-
-
-
-
-
-
-
-
-
- {{ ['string', 'number'].includes(typeof option) ? option : option[optionAttribute] }}
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ ['string', 'number'].includes(typeof option) ? option : option[optionAttribute] }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Create "{{ queryOption[optionAttribute] }}"
+
+
+
+
+
+
+ No results for "{{ query }}".
+
+
-
-
-
-
-
- Create "{{ queryOption[optionAttribute] }}"
-
-
-
-
-
-
- No results for "{{ query }}".
-
-
-
+
@@ -449,6 +452,8 @@ export default defineComponent({
// eslint-disable-next-line vue/no-dupe-keys
name,
inputId,
+ // eslint-disable-next-line vue/no-dupe-keys
+ popper,
trigger,
container,
isLeading,
diff --git a/src/runtime/components/overlays/ContextMenu.vue b/src/runtime/components/overlays/ContextMenu.vue
index 2dd98483..d7d8b588 100644
--- a/src/runtime/components/overlays/ContextMenu.vue
+++ b/src/runtime/components/overlays/ContextMenu.vue
@@ -1,8 +1,11 @@
-
@@ -85,6 +88,8 @@ export default defineComponent({
attrs,
isOpen,
wrapperClass,
+ // eslint-disable-next-line vue/no-dupe-keys
+ popper,
container
}
}
diff --git a/src/runtime/components/overlays/Popover.vue b/src/runtime/components/overlays/Popover.vue
index 19738371..ce39fb46 100644
--- a/src/runtime/components/overlays/Popover.vue
+++ b/src/runtime/components/overlays/Popover.vue
@@ -17,9 +17,12 @@
@@ -162,6 +165,8 @@ export default defineComponent({
ui,
attrs,
popover,
+ // eslint-disable-next-line vue/no-dupe-keys
+ popper,
trigger,
container,
containerStyle,
diff --git a/src/runtime/ui.config.ts b/src/runtime/ui.config.ts
index 1af8d5b2..3c87b77a 100644
--- a/src/runtime/ui.config.ts
+++ b/src/runtime/ui.config.ts
@@ -1,5 +1,14 @@
// Data
+const _popperArrowPresets = {
+ base: 'before:w-2 before:h-2',
+ ring: 'before:ring-1 before:ring-gray-200 dark:before:ring-gray-800',
+ rounded: 'before:rounded-sm',
+ background: 'before:bg-gray-200 dark:before:bg-gray-800',
+ shadow: 'before:shadow',
+ placement: 'group-data-[popper-placement*="right"]:-left-1 group-data-[popper-placement*="left"]:-right-1 group-data-[popper-placement*="top"]:-bottom-1 group-data-[popper-placement*="bottom"]:-top-1'
+}
+
export const table = {
wrapper: 'relative overflow-x-auto',
base: 'min-w-full table-fixed',
@@ -250,7 +259,7 @@ export const buttonGroup = {
export const dropdown = {
wrapper: 'relative inline-flex text-left rtl:text-right',
- container: 'z-20',
+ container: 'z-20 group',
width: 'w-48',
height: '',
background: 'bg-white dark:bg-gray-800',
@@ -291,6 +300,11 @@ export const dropdown = {
popper: {
placement: 'bottom-end',
strategy: 'fixed'
+ },
+ arrow: {
+ ..._popperArrowPresets,
+ ring: 'before:ring-1 before:ring-gray-200 dark:before:ring-gray-700',
+ background: 'before:bg-white dark:before:bg-gray-700'
}
}
@@ -525,7 +539,7 @@ export const select = {
}
export const selectMenu = {
- container: 'z-20',
+ container: 'z-20 group',
width: 'w-full',
height: 'max-h-60',
base: 'relative focus:outline-none overflow-y-auto scroll-py-1',
@@ -576,6 +590,11 @@ export const selectMenu = {
},
default: {
selectedIcon: 'i-heroicons-check-20-solid'
+ },
+ arrow: {
+ ..._popperArrowPresets,
+ ring: 'before:ring-1 before:ring-gray-200 dark:before:ring-gray-700',
+ background: 'before:bg-white dark:before:bg-gray-700'
}
}
@@ -1009,25 +1028,18 @@ export const tooltip = {
popper: {
strategy: 'fixed'
},
- arrow: {
- base: 'before:w-2 before:h-2',
- ring: 'before:ring-1 before:ring-gray-200 dark:before:ring-gray-800',
- rounded: 'before:rounded-sm',
- background: 'before:bg-white dark:before:bg-gray-900',
- shadow: 'before:shadow',
- placement: 'group-data-[popper-placement=right]:-left-1 group-data-[popper-placement=left]:-right-1 group-data-[popper-placement=top]:-bottom-1 group-data-[popper-placement=bottom]:-top-1'
- }
+ arrow: _popperArrowPresets
}
export const popover = {
wrapper: 'relative',
- container: 'z-20',
+ container: 'z-20 group',
width: '',
background: 'bg-white dark:bg-gray-900',
shadow: 'shadow-lg',
rounded: 'rounded-md',
ring: 'ring-1 ring-gray-200 dark:ring-gray-800',
- base: 'overflow-hidden focus:outline-none',
+ base: 'overflow-hidden focus:outline-none relative',
// Syntax for `` component https://vuejs.org/guide/built-ins/transition.html#css-based-transitions
transition: {
enterActiveClass: 'transition ease-out duration-200',
@@ -1039,18 +1051,19 @@ export const popover = {
},
popper: {
strategy: 'fixed'
- }
+ },
+ arrow: _popperArrowPresets
}
export const contextMenu = {
wrapper: 'relative',
- container: 'z-20',
+ container: 'z-20 group',
width: '',
background: 'bg-white dark:bg-gray-900',
shadow: 'shadow-lg',
rounded: 'rounded-md',
ring: 'ring-1 ring-gray-200 dark:ring-gray-800',
- base: 'overflow-hidden focus:outline-none',
+ base: 'overflow-hidden focus:outline-none relative',
// Syntax for `` component https://vuejs.org/guide/built-ins/transition.html#css-based-transitions
transition: {
enterActiveClass: 'transition ease-out duration-200',
@@ -1063,7 +1076,8 @@ export const contextMenu = {
popper: {
placement: 'bottom-start',
scroll: false
- }
+ },
+ arrow: _popperArrowPresets
}
export const notification = {