@bagelink/vue 1.15.571 → 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/Btn.vue.d.ts +0 -2
- package/dist/components/Btn.vue.d.ts.map +1 -1
- package/dist/components/Dropdown.vue.d.ts.map +1 -1
- package/dist/core.css +1 -1
- package/dist/index.cjs +41 -41
- package/dist/index.css +1 -1
- package/dist/index.mjs +4140 -4138
- package/dist/plugins/bagel.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Btn.vue +0 -29
- package/src/components/Dropdown.vue +3 -2
- package/src/plugins/bagel.ts +6 -0
package/package.json
CHANGED
package/src/components/Btn.vue
CHANGED
|
@@ -55,8 +55,6 @@ const props = withDefaults(
|
|
|
55
55
|
ripple?: boolean
|
|
56
56
|
fullWidth?: boolean
|
|
57
57
|
fullWidthMobile?: boolean
|
|
58
|
-
/** Allow the label to wrap onto multiple lines and grow the button vertically. */
|
|
59
|
-
multiline?: boolean
|
|
60
58
|
alignTxt?: 'center' | 'start' | 'end'
|
|
61
59
|
alignTxtMobile?: 'center' | 'start' | 'end'
|
|
62
60
|
onClick?: (e: MouseEvent) => void
|
|
@@ -226,7 +224,6 @@ const slots: SetupContext['slots'] = useSlots()
|
|
|
226
224
|
'bgl_btn_xlSize': computedSize === 'xl',
|
|
227
225
|
'bgl_btn_fullWidth': fullWidth,
|
|
228
226
|
'bgl_btn_fullWidthMobile': fullWidthMobile,
|
|
229
|
-
'bgl_btn_multiline': multiline,
|
|
230
227
|
'bgl_btn_alignStart': alignTxt === 'start',
|
|
231
228
|
'bgl_btn_alignEnd': alignTxt === 'end',
|
|
232
229
|
'bgl_btn_alignStartMobile': alignTxtMobile === 'start',
|
|
@@ -450,32 +447,6 @@ height: calc(var(--bgl-btn-height) * 1.5);
|
|
|
450
447
|
width: calc(var(--bgl-btn-height) * 1.5);
|
|
451
448
|
}
|
|
452
449
|
|
|
453
|
-
.bgl_btn.bgl_btn_multiline {
|
|
454
|
-
height: auto;
|
|
455
|
-
min-height: var(--bgl-btn-height);
|
|
456
|
-
line-height: 1.3;
|
|
457
|
-
padding-block: calc(var(--bgl-btn-padding) / 4);
|
|
458
|
-
white-space: normal;
|
|
459
|
-
overflow-wrap: anywhere;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
.bgl_btn.bgl_btn_multiline.thin,
|
|
463
|
-
.bgl_btn.bgl_btn_multiline.bgl_btn_sSize {
|
|
464
|
-
min-height: calc(var(--bgl-btn-height) * 0.7);
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
.bgl_btn.bgl_btn_multiline.bgl_btn_xsSize {
|
|
468
|
-
min-height: calc(var(--bgl-btn-height) / 2);
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
.bgl_btn.bgl_btn_multiline.bgl_btn_lSize {
|
|
472
|
-
min-height: calc(var(--bgl-btn-height) * 1.2);
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
.bgl_btn.bgl_btn_multiline.bgl_btn_xlSize {
|
|
476
|
-
min-height: calc(var(--bgl-btn-height) * 1.5);
|
|
477
|
-
}
|
|
478
|
-
|
|
479
450
|
.bgl_btn_fullWidth {
|
|
480
451
|
width: 100%;
|
|
481
452
|
}
|
|
@@ -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)
|