daisy-ui-kit 3.0.7 → 3.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/components/Collapse.vue
CHANGED
package/components/Dropdown.vue
CHANGED
|
@@ -5,6 +5,8 @@ import { onClickOutside, syncRefs, useElementHover } from '@vueuse/core'
|
|
|
5
5
|
import { randomString } from '../utils/random-string'
|
|
6
6
|
|
|
7
7
|
const props = withDefaults(defineProps<{
|
|
8
|
+
// allows passing a custom id to the dropdown. Required for SSR hydration.
|
|
9
|
+
randomId?: string
|
|
8
10
|
autoFocus?: boolean
|
|
9
11
|
|
|
10
12
|
placement?: 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end'
|
|
@@ -29,7 +31,7 @@ provide('isDropdownOpen', isOpen)
|
|
|
29
31
|
const autoFocus = ref(props.autoFocus)
|
|
30
32
|
provide('dropdownAutoFocus', autoFocus)
|
|
31
33
|
|
|
32
|
-
const randomValue = randomString(12)
|
|
34
|
+
const randomValue = props.randomId || randomString(12)
|
|
33
35
|
const wrapperId = `dropdown-wrapper-${randomValue}`
|
|
34
36
|
const id = `dropdown-${randomValue}`
|
|
35
37
|
provide('dropdownId', id)
|