@bagelink/vue 1.15.575 → 1.15.577
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/dist/components/Dropdown.vue.d.ts.map +1 -1
- package/dist/index.cjs +41 -41
- package/dist/index.mjs +4140 -4136
- package/dist/plugins/bagel.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/Dropdown.vue +3 -2
- package/src/plugins/bagel.ts +6 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bagel.d.ts","sourceRoot":"","sources":["../../src/plugins/bagel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,CAAA;AACjC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAErD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAA;AAKzF,OAAO,EAAc,OAAO,EAAE,MAAM,SAAS,CAAA;AAI7C,OAAO,2BAA2B,CAAA;AAElC,MAAM,WAAW,YAAY;IAC5B,iCAAiC;IACjC,IAAI,CAAC,EAAE,sBAAsB,CAAA;IAC7B,KAAK,CAAC,EAAE,iBAAiB,CAAA;IACzB,8EAA8E;IAC9E,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,CAAA;CACxC;AAED,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"bagel.d.ts","sourceRoot":"","sources":["../../src/plugins/bagel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,CAAA;AACjC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAErD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kDAAkD,CAAA;AAKzF,OAAO,EAAc,OAAO,EAAE,MAAM,SAAS,CAAA;AAI7C,OAAO,2BAA2B,CAAA;AAElC,MAAM,WAAW,YAAY;IAC5B,iCAAiC;IACjC,IAAI,CAAC,EAAE,sBAAsB,CAAA;IAC7B,KAAK,CAAC,EAAE,iBAAiB,CAAA;IACzB,8EAA8E;IAC9E,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,CAAA;CACxC;AAED,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,YAAY,CAmCzC,CAAA;AAGD,OAAO,EAAE,OAAO,EAAE,CAAA"}
|
package/package.json
CHANGED
|
@@ -77,7 +77,8 @@ let openedViaKeyboard = false
|
|
|
77
77
|
// old module-level counter reset per SSR render, producing duplicate ids like
|
|
78
78
|
// `bgl-dd-1` on multiple dropdowns (an a11y failure: duplicate ARIA IDs).
|
|
79
79
|
const bglId = `bgl-dd-${useId()}`
|
|
80
|
-
const
|
|
80
|
+
const POPOVER_ROOT = '#bagelink-popover-root'
|
|
81
|
+
const teleportTarget = ref<string | Element>(POPOVER_ROOT)
|
|
81
82
|
|
|
82
83
|
const { isMobile } = useDevice()
|
|
83
84
|
|
|
@@ -145,7 +146,7 @@ async function internalShow() {
|
|
|
145
146
|
if (props.disabled || isOpen()) return
|
|
146
147
|
|
|
147
148
|
hasOpened.value = true
|
|
148
|
-
teleportTarget.value = triggerWrapRef.value?.closest('dialog[open]') ??
|
|
149
|
+
teleportTarget.value = triggerWrapRef.value?.closest('dialog[open]') ?? POPOVER_ROOT
|
|
149
150
|
|
|
150
151
|
if (props.showGroup && groupRegistry.has(props.showGroup)) {
|
|
151
152
|
groupRegistry.get(props.showGroup)!.forEach(fn => fn())
|
package/src/plugins/bagel.ts
CHANGED
|
@@ -23,6 +23,12 @@ export interface BagelOptions {
|
|
|
23
23
|
|
|
24
24
|
export const BagelVue: Plugin<BagelOptions> = {
|
|
25
25
|
install: (app, options = {}) => {
|
|
26
|
+
if (typeof document !== 'undefined' && !document.getElementById('bagelink-popover-root')) {
|
|
27
|
+
const root = document.createElement('div')
|
|
28
|
+
root.id = 'bagelink-popover-root'
|
|
29
|
+
document.body.appendChild(root)
|
|
30
|
+
}
|
|
31
|
+
|
|
26
32
|
// Install directives
|
|
27
33
|
app.directive('click-outside', clickOutside)
|
|
28
34
|
app.directive('ripple', ripple)
|