@bridge-ui/vue 0.23.0 → 0.24.0
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/ai/skills/bridge-ui-overlays/SKILL.md +4 -2
- package/dist/Components/ColorField/composables/useColorField.js +1 -1
- package/dist/Components/DateField/composables/useDateField.js +1 -1
- package/dist/Components/DateRangeField/composables/useDateRangeField.js +1 -1
- package/dist/Components/DateTimeField/composables/useDateTimeField.js +1 -1
- package/dist/Components/DateTimeRangeField/composables/useDateTimeRangeField.js +1 -1
- package/dist/Components/Drawer/Drawer.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/Components/Drawer/composables/useDrawer.d.ts +1 -0
- package/dist/Components/Drawer/composables/useDrawer.js +96 -90
- package/dist/Components/Menu/composables/useMenu.d.ts +8 -8
- package/dist/Components/Menu/composables/useMenu.js +81 -195
- package/dist/Components/Modal/Modal.vue_vue_type_script_setup_true_lang.js +7 -7
- package/dist/Components/Modal/composables/useModal.d.ts +1 -0
- package/dist/Components/Modal/composables/useModal.js +120 -114
- package/dist/Components/Popover/Popover.js +4 -0
- package/dist/Components/Popover/Popover.vue.d.ts +39 -0
- package/dist/Components/Popover/Popover.vue_vue_type_script_setup_true_lang.js +100 -0
- package/dist/Components/Popover/composables/popoverParts.d.ts +52 -0
- package/dist/Components/Popover/composables/popoverParts.js +35 -0
- package/dist/Components/Popover/composables/usePopover.d.ts +68 -0
- package/dist/Components/Popover/composables/usePopover.js +119 -0
- package/dist/Components/Popover/composables/usePopoverBase.d.ts +130 -0
- package/dist/Components/Popover/composables/usePopoverBase.js +210 -0
- package/dist/Components/Popover/index.d.ts +4 -0
- package/dist/Components/Popover/index.js +3 -0
- package/dist/Components/Popover/popover.types.d.ts +207 -0
- package/dist/Components/Resizable/composables/useResizable.js +85 -85
- package/dist/Components/Snackbar/Snackbar.vue.d.ts +1 -1
- package/dist/Components/TimeField/composables/useTimeField.js +1 -1
- package/dist/Components/TimeRangeField/composables/useTimeRangeField.js +1 -1
- package/dist/augments.d.ts +5 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +78 -76
- package/docs/README.md +1 -0
- package/docs/components/Menu.md +4 -0
- package/docs/components/Popover.md +210 -0
- package/package.json +2 -2
|
@@ -17,8 +17,8 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {
|
|
|
17
17
|
"onLeave-complete"?: (() => any) | undefined;
|
|
18
18
|
}>, {
|
|
19
19
|
teleportTo: false | string;
|
|
20
|
-
progressbar: boolean;
|
|
21
20
|
position: import('@bridge-ui/core/Utils').MergeProps<import('@bridge-ui/core/Tokens').SnackbarPosition, import('./snackbar.types').SnackbarPositionOverrides>;
|
|
21
|
+
progressbar: boolean;
|
|
22
22
|
closeButton: boolean;
|
|
23
23
|
duration: false | number;
|
|
24
24
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -105,7 +105,7 @@ function C(C, w, T) {
|
|
|
105
105
|
G.inputBind.value.onFocus?.(e), H(!0);
|
|
106
106
|
},
|
|
107
107
|
onKeydown: (e) => {
|
|
108
|
-
G.inputBind.value.onKeydown?.(e), e.key === "Escape" && H(!1);
|
|
108
|
+
G.inputBind.value.onKeydown?.(e), e.key === "Escape" && (A.value && e.preventDefault(), H(!1));
|
|
109
109
|
}
|
|
110
110
|
}, void 0, G.inputBind.value)), te = l(() => N.value.overlay), ne = l(() => {
|
|
111
111
|
let e = N.value.customProps?.menu;
|
|
@@ -103,7 +103,7 @@ function C(h, C, w) {
|
|
|
103
103
|
B.inputBind.value.onFocus?.(e), L(!0);
|
|
104
104
|
},
|
|
105
105
|
onKeydown: (e) => {
|
|
106
|
-
B.inputBind.value.onKeydown?.(e), e.key === "Escape" && L(!1);
|
|
106
|
+
B.inputBind.value.onKeydown?.(e), e.key === "Escape" && (O.value && e.preventDefault(), L(!1));
|
|
107
107
|
}
|
|
108
108
|
}, void 0, B.inputBind.value)), X = l(() => j.value.overlay), Z = l(() => ({
|
|
109
109
|
modal: j.value.customProps?.modal,
|
package/dist/augments.d.ts
CHANGED
|
@@ -32,6 +32,7 @@ import { ModalClasses, ModalProps } from './Components/Modal';
|
|
|
32
32
|
import { NumberFieldClasses, NumberFieldProps } from './Components/NumberField';
|
|
33
33
|
import { OtpFieldClasses, OtpFieldProps } from './Components/OtpField';
|
|
34
34
|
import { PasswordFieldClasses, PasswordFieldProps } from './Components/PasswordField';
|
|
35
|
+
import { PopoverClasses, PopoverProps } from './Components/Popover';
|
|
35
36
|
import { ProgressClasses, ProgressProps } from './Components/Progress';
|
|
36
37
|
import { RadioClasses, RadioProps } from './Components/Radio';
|
|
37
38
|
import { ResizableClasses, ResizableProps } from './Components/Resizable/resizable.types';
|
|
@@ -180,6 +181,10 @@ declare module "@bridge-ui/core/Config" {
|
|
|
180
181
|
classes: PasswordFieldClasses;
|
|
181
182
|
defaultProps: Partial<Pick<PasswordFieldProps, "size" | "color" | "rounded" | "variant" | "showErrorIcon" | "hideErrorMessage" | "showDescriptionOnError">>;
|
|
182
183
|
}
|
|
184
|
+
interface PopoverConfigOverrides {
|
|
185
|
+
classes: PopoverClasses;
|
|
186
|
+
defaultProps: Partial<Pick<PopoverProps, "arrow" | "shadow" | "rounded">>;
|
|
187
|
+
}
|
|
183
188
|
interface ProgressConfigOverrides {
|
|
184
189
|
classes: ProgressClasses;
|
|
185
190
|
defaultProps: Partial<Pick<ProgressProps, "size" | "color" | "rounded" | "variant">>;
|
package/dist/index.d.ts
CHANGED
|
@@ -110,6 +110,8 @@ export { Pagination, usePagination } from './Components/Pagination';
|
|
|
110
110
|
export type { PaginationClasses, PaginationColorOverrides, PaginationCustomProps, PaginationEmits, PaginationOwnProps, PaginationProps, PaginationRoundedOverrides, PaginationSizeOverrides, PaginationSlots, PaginationVariantOverrides, } from './Components/Pagination';
|
|
111
111
|
export { PasswordField, usePasswordField } from './Components/PasswordField';
|
|
112
112
|
export type { PasswordFieldClasses, PasswordFieldCustomProps, PasswordFieldOwnProps, PasswordFieldProps, PasswordFieldSlots, } from './Components/PasswordField';
|
|
113
|
+
export { Popover, usePopover } from './Components/Popover';
|
|
114
|
+
export type { PopoverClasses, PopoverCustomProps, PopoverEmits, PopoverOptions, PopoverOwnProps, PopoverProps, PopoverRoundedOverrides, PopoverShadowOverrides, PopoverSlots, } from './Components/Popover';
|
|
113
115
|
export { Progress, useProgress } from './Components/Progress';
|
|
114
116
|
export type { ProgressClasses, ProgressColorOverrides, ProgressCustomProps, ProgressOwnProps, ProgressProps, ProgressRoundedOverrides, ProgressSizeOverrides, ProgressVariantOverrides, } from './Components/Progress';
|
|
115
117
|
export { Radio, useRadio } from './Components/Radio';
|
package/dist/index.js
CHANGED
|
@@ -117,79 +117,81 @@ import { usePagination as ft } from "./Components/Pagination/composables/usePagi
|
|
|
117
117
|
import pt from "./Components/Pagination/Pagination.js";
|
|
118
118
|
import { usePasswordField as mt } from "./Components/PasswordField/composables/usePasswordField.js";
|
|
119
119
|
import ht from "./Components/PasswordField/PasswordField.js";
|
|
120
|
-
import {
|
|
121
|
-
import _t from "./Components/
|
|
122
|
-
import vt from "./
|
|
123
|
-
import
|
|
124
|
-
import
|
|
125
|
-
import xt from "./
|
|
126
|
-
import {
|
|
127
|
-
import
|
|
128
|
-
import wt from "./Components/Resizable/
|
|
129
|
-
import {
|
|
130
|
-
import Et from "./Components/
|
|
131
|
-
import {
|
|
132
|
-
import Ot from "./Components/
|
|
133
|
-
import kt from "./Components/
|
|
134
|
-
import At from "./Components/
|
|
135
|
-
import
|
|
136
|
-
import
|
|
137
|
-
import {
|
|
138
|
-
import {
|
|
139
|
-
import {
|
|
140
|
-
import {
|
|
141
|
-
import {
|
|
142
|
-
import Rt from "./Components/Sidebar/
|
|
143
|
-
import zt from "./Components/Sidebar/
|
|
144
|
-
import Bt from "./Components/Sidebar/
|
|
145
|
-
import
|
|
146
|
-
import Ht from "./Components/
|
|
147
|
-
import Ut from "./Components/
|
|
148
|
-
import Wt from "./Components/
|
|
149
|
-
import Gt from "./Components/Sidebar/
|
|
150
|
-
import
|
|
151
|
-
import qt from "./Components/
|
|
152
|
-
import {
|
|
153
|
-
import Yt from "./Components/
|
|
154
|
-
import {
|
|
155
|
-
import Zt from "./Components/
|
|
156
|
-
import {
|
|
157
|
-
import $t from "./Components/
|
|
158
|
-
import {
|
|
159
|
-
import tn from "./Components/
|
|
160
|
-
import {
|
|
161
|
-
import rn from "./Components/
|
|
162
|
-
import {
|
|
163
|
-
import on from "./Components/
|
|
164
|
-
import {
|
|
165
|
-
import
|
|
166
|
-
import ln from "./Components/
|
|
167
|
-
import {
|
|
168
|
-
import dn from "./Components/
|
|
169
|
-
import {
|
|
170
|
-
import pn from "./Components/
|
|
171
|
-
import {
|
|
172
|
-
import hn from "./Components/
|
|
173
|
-
import {
|
|
174
|
-
import _n from "./Components/
|
|
175
|
-
import {
|
|
176
|
-
import yn from "./Components/
|
|
177
|
-
import {
|
|
178
|
-
import xn from "./Components/
|
|
179
|
-
import {
|
|
180
|
-
import
|
|
181
|
-
import wn from "./Components/
|
|
182
|
-
import Tn from "./Components/
|
|
183
|
-
import
|
|
184
|
-
import
|
|
185
|
-
import On from "./Components/
|
|
186
|
-
import kn from "./Components/
|
|
187
|
-
import
|
|
188
|
-
import
|
|
189
|
-
import Mn from "./Components/ToggleGroup/
|
|
190
|
-
import {
|
|
191
|
-
import Pn from "./Components/
|
|
192
|
-
import {
|
|
193
|
-
import
|
|
194
|
-
import {
|
|
195
|
-
|
|
120
|
+
import { usePopover as gt } from "./Components/Popover/composables/usePopover.js";
|
|
121
|
+
import _t from "./Components/Popover/Popover.js";
|
|
122
|
+
import { useRadio as vt } from "./Components/Radio/composables/useRadio.js";
|
|
123
|
+
import yt from "./Components/Radio/Radio.js";
|
|
124
|
+
import bt from "./Provider/BridgeUIProvider.js";
|
|
125
|
+
import { createBridgeUI as xt } from "./Provider/createBridgeUI.js";
|
|
126
|
+
import { useRating as St } from "./Components/Rating/composables/useRating.js";
|
|
127
|
+
import Ct from "./Components/Rating/Rating.js";
|
|
128
|
+
import { RESIZABLE_INJECTION_KEY as wt } from "./Components/Resizable/resizableInjectionKey.js";
|
|
129
|
+
import { useResizable as Tt } from "./Components/Resizable/composables/useResizable.js";
|
|
130
|
+
import Et from "./Components/Resizable/Resizable.js";
|
|
131
|
+
import { useResizableHandle as Dt } from "./Components/ResizableHandle/composables/useResizableHandle.js";
|
|
132
|
+
import Ot from "./Components/ResizableHandle/ResizableHandle.js";
|
|
133
|
+
import { useResizablePanel as kt } from "./Components/ResizablePanel/composables/useResizablePanel.js";
|
|
134
|
+
import At from "./Components/ResizablePanel/ResizablePanel.js";
|
|
135
|
+
import jt from "./Components/Select/Select.js";
|
|
136
|
+
import Mt from "./Components/Select/SelectOption.js";
|
|
137
|
+
import { useSidebar as Nt } from "./Components/Sidebar/composables/useSidebar.js";
|
|
138
|
+
import { useSidebarInset as Pt } from "./Components/Sidebar/composables/useSidebarInset.js";
|
|
139
|
+
import { useSidebarList as Ft } from "./Components/Sidebar/composables/useSidebarList.js";
|
|
140
|
+
import { useSidebarListItem as It } from "./Components/Sidebar/composables/useSidebarListItem.js";
|
|
141
|
+
import { useSidebarProvider as Lt } from "./Components/Sidebar/composables/useSidebarProvider.js";
|
|
142
|
+
import { useSidebarShell as Rt } from "./Components/Sidebar/composables/useSidebarShell.js";
|
|
143
|
+
import { useSidebarTrigger as zt } from "./Components/Sidebar/composables/useSidebarTrigger.js";
|
|
144
|
+
import Bt from "./Components/Sidebar/Sidebar.js";
|
|
145
|
+
import Vt from "./Components/Sidebar/SidebarInset.js";
|
|
146
|
+
import Ht from "./Components/Sidebar/SidebarList.js";
|
|
147
|
+
import { useTooltip as Ut } from "./Components/Tooltip/composables/useTooltip.js";
|
|
148
|
+
import Wt from "./Components/Tooltip/Tooltip.js";
|
|
149
|
+
import Gt from "./Components/Sidebar/SidebarListItem.js";
|
|
150
|
+
import Kt from "./Components/Sidebar/SidebarProvider.js";
|
|
151
|
+
import qt from "./Components/Sidebar/SidebarTrigger.js";
|
|
152
|
+
import { useSkeleton as Jt } from "./Components/Skeleton/composables/useSkeleton.js";
|
|
153
|
+
import Yt from "./Components/Skeleton/Skeleton.js";
|
|
154
|
+
import { useSlider as Xt } from "./Components/Slider/composables/useSlider.js";
|
|
155
|
+
import Zt from "./Components/Slider/Slider.js";
|
|
156
|
+
import { useSnackbar as Qt } from "./Components/Snackbar/composables/useSnackbar.js";
|
|
157
|
+
import $t from "./Components/Snackbar/Snackbar.js";
|
|
158
|
+
import { useSpinner as en } from "./Components/Spinner/composables/useSpinner.js";
|
|
159
|
+
import tn from "./Components/Spinner/Spinner.js";
|
|
160
|
+
import { useStep as nn } from "./Components/Step/composables/useStep.js";
|
|
161
|
+
import rn from "./Components/Step/Step.js";
|
|
162
|
+
import { useStepper as an } from "./Components/Stepper/composables/useStepper.js";
|
|
163
|
+
import on from "./Components/Stepper/Stepper.js";
|
|
164
|
+
import { useSwitch as sn } from "./Components/Switch/composables/useSwitch.js";
|
|
165
|
+
import cn from "./Components/Switch/Switch.js";
|
|
166
|
+
import { TABS_INJECTION_KEY as ln } from "./Components/Tabs/tabsInjectionKey.js";
|
|
167
|
+
import { useTab as un } from "./Components/Tab/composables/useTab.js";
|
|
168
|
+
import dn from "./Components/Tab/Tab.js";
|
|
169
|
+
import { useTabItem as fn } from "./Components/TabItem/composables/useTabItem.js";
|
|
170
|
+
import pn from "./Components/TabItem/TabItem.js";
|
|
171
|
+
import { useTabList as mn } from "./Components/TabList/composables/useTabList.js";
|
|
172
|
+
import hn from "./Components/TabList/TabList.js";
|
|
173
|
+
import { useTabPanel as gn } from "./Components/TabPanel/composables/useTabPanel.js";
|
|
174
|
+
import _n from "./Components/TabPanel/TabPanel.js";
|
|
175
|
+
import { useTabs as vn } from "./Components/Tabs/composables/useTabs.js";
|
|
176
|
+
import yn from "./Components/Tabs/Tabs.js";
|
|
177
|
+
import { useTextarea as bn } from "./Components/Textarea/composables/useTextarea.js";
|
|
178
|
+
import xn from "./Components/Textarea/Textarea.js";
|
|
179
|
+
import { useTextField as Sn } from "./Components/TextField/composables/useTextField.js";
|
|
180
|
+
import Cn from "./Components/TextField/TextField.js";
|
|
181
|
+
import { useTimeField as wn } from "./Components/TimeField/composables/useTimeField.js";
|
|
182
|
+
import { useTimePicker as Tn } from "./Components/TimePicker/composables/useTimePicker.js";
|
|
183
|
+
import En from "./Components/TimePicker/TimePicker.js";
|
|
184
|
+
import Dn from "./Components/TimeField/TimeField.js";
|
|
185
|
+
import { useTimeRangeField as On } from "./Components/TimeRangeField/composables/useTimeRangeField.js";
|
|
186
|
+
import { useTimeRangePicker as kn } from "./Components/TimeRangePicker/composables/useTimeRangePicker.js";
|
|
187
|
+
import An from "./Components/TimeRangePicker/TimeRangePicker.js";
|
|
188
|
+
import jn from "./Components/TimeRangeField/TimeRangeField.js";
|
|
189
|
+
import { TOGGLE_GROUP_INJECTION_KEY as Mn } from "./Components/ToggleGroup/toggleGroupInjectionKey.js";
|
|
190
|
+
import { useToggleGroup as Nn } from "./Components/ToggleGroup/composables/useToggleGroup.js";
|
|
191
|
+
import Pn from "./Components/ToggleGroup/ToggleGroup.js";
|
|
192
|
+
import { useToggleItem as Fn } from "./Components/ToggleItem/composables/useToggleItem.js";
|
|
193
|
+
import In from "./Components/ToggleItem/ToggleItem.js";
|
|
194
|
+
import { SEMANTIC_ICON_NAMES as Ln, interpolateMessage as Rn, resolveMessage as zn, selectPluralMessage as Bn } from "@bridge-ui/core/Adapters";
|
|
195
|
+
import { cn as Vn } from "@bridge-ui/core/Utils";
|
|
196
|
+
import { BRIDGE_UI_DEFAULT_GLOBAL as Hn, mergeBridgeUIComponents as Un, mergeBridgeUIGlobal as Wn, resolveBridgeUIOptions as Gn } from "@bridge-ui/core/Config";
|
|
197
|
+
export { c as ACCORDION_INJECTION_KEY, p as Accordion, g as AccordionItem, x as ActionFooter, T as Alert, Y as Autocomplete, X as AutocompleteOption, Z as Avatar, Hn as BRIDGE_UI_DEFAULT_GLOBAL, v as BUTTON_GROUP_INJECTION_KEY, $ as Badge, ee as BaseField, ae as Breadcrumb, ie as BreadcrumbItem, bt as BridgeUIProvider, b as Button, se as ButtonGroup, he as Calendar, ue as CalendarDate, fe as CalendarMonth, ye as CalendarRange, me as CalendarYear, xe as Card, Ce as Carousel, Te as CarouselSlide, ke as Checkbox, k as Chip, Ne as ColorField, Me as ColorPicker, Le as DateField, Ie as DatePicker, Ve as DateRangeField, Be as DateRangePicker, qe as DateTimeField, Ke as DateTimePicker, Ze as DateTimeRangeField, Xe as DateTimeRangePicker, ve as Divider, I as Drawer, $e as EmptyState, V as FieldOverlay, rt as FileUpload, nt as FileUploadItem, De as FormControl, M as FormField, at as Heading, h as Icon, j as Label, st as Link, U as List, W as ListItem, G as ListSection, J as Listbox, R as Menu, B as Modal, lt as NumberField, dt as OtpField, pt as Pagination, ht as PasswordField, _t as Popover, q as Progress, wt as RESIZABLE_INJECTION_KEY, yt as Radio, Ct as Rating, Et as Resizable, Ot as ResizableHandle, At as ResizablePanel, Ln as SEMANTIC_ICON_NAMES, jt as Select, Mt as SelectOption, Bt as Sidebar, Vt as SidebarInset, Ht as SidebarList, Gt as SidebarListItem, Kt as SidebarProvider, qt as SidebarTrigger, Yt as Skeleton, Zt as Slider, $t as Snackbar, tn as Spinner, rn as Step, on as Stepper, cn as Switch, ln as TABS_INJECTION_KEY, Mn as TOGGLE_GROUP_INJECTION_KEY, dn as Tab, pn as TabItem, hn as TabList, _n as TabPanel, yn as Tabs, w as Text, Cn as TextField, xn as Textarea, Dn as TimeField, Ge as TimePanel, En as TimePicker, jn as TimeRangeField, An as TimeRangePicker, Pn as ToggleGroup, In as ToggleItem, Wt as Tooltip, Vn as cn, xt as createBridgeUI, Rn as interpolateMessage, Un as mergeBridgeUIComponents, Wn as mergeBridgeUIGlobal, Gn as resolveBridgeUIOptions, zn as resolveMessage, Bn as selectPluralMessage, t as setDateAdapterForTests, r as setI18nAdapterForTests, o as setIconAdapterForTests, f as useAccordion, m as useAccordionItem, _ as useActionFooter, S as useAlert, Q as useBadge, te as useBaseField, ne as useBreadcrumb, re as useBreadcrumbItem, l as useBreakpoint, e as useBridgeUI, u as useBridgeUIComponent, d as useBridgeUIMergedRegistryClasses, y as useButton, oe as useButtonGroup, ce as useCalendar, le as useCalendarDate, de as useCalendarMonth, ge as useCalendarRange, pe as useCalendarYear, be as useCard, Se as useCarousel, we as useCarouselSlide, Oe as useCheckbox, O as useChip, Ae as useColorField, je as useColorPicker, n as useDateAdapter, Pe as useDateField, Fe as useDatePicker, Re as useDateRangeField, ze as useDateRangePicker, He as useDateTimeField, Ue as useDateTimePicker, Je as useDateTimeRangeField, Ye as useDateTimeRangePicker, _e as useDivider, F as useDrawer, Qe as useEmptyState, P as useFieldOverlay, et as useFileUpload, tt as useFileUploadItem, Ee as useFormControl, E as useFormField, it as useHeading, i as useI18nAdapter, s as useIconAdapter, A as useLabel, ot as useLink, H as useList, N as useListbox, D as useListboxNavigation, L as useMenu, z as useModal, ct as useNumberField, ut as useOtpField, ft as usePagination, mt as usePasswordField, gt as usePopover, K as useProgress, vt as useRadio, St as useRating, Tt as useResizable, Dt as useResizableHandle, kt as useResizablePanel, a as useResolveMessage, Nt as useSidebar, Pt as useSidebarInset, Ft as useSidebarList, It as useSidebarListItem, Lt as useSidebarProvider, Rt as useSidebarShell, zt as useSidebarTrigger, Jt as useSkeleton, Xt as useSlider, Qt as useSnackbar, en as useSpinner, nn as useStep, an as useStepper, sn as useSwitch, un as useTab, fn as useTabItem, mn as useTabList, gn as useTabPanel, vn as useTabs, C as useText, Sn as useTextField, bn as useTextarea, wn as useTimeField, We as useTimePanel, Tn as useTimePicker, On as useTimeRangeField, kn as useTimeRangePicker, Nn as useToggleGroup, Fn as useToggleItem, Ut as useTooltip };
|
package/docs/README.md
CHANGED
|
@@ -58,6 +58,7 @@ Component reference for **Vue**. This folder ships with the npm package.
|
|
|
58
58
|
- [OtpField](./components/OtpField.md)
|
|
59
59
|
- [Pagination](./components/Pagination.md)
|
|
60
60
|
- [PasswordField](./components/PasswordField.md)
|
|
61
|
+
- [Popover](./components/Popover.md)
|
|
61
62
|
- [Progress](./components/Progress.md)
|
|
62
63
|
- [Radio](./components/Radio.md)
|
|
63
64
|
- [Rating](./components/Rating.md)
|
package/docs/components/Menu.md
CHANGED
|
@@ -58,6 +58,10 @@ import { Menu } from "@bridge-ui/vue/Components/Menu";
|
|
|
58
58
|
</Menu>
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
+
Without a `trigger` slot no root element renders, so extra attributes are not applied: use `classes.content` / `customProps.content` to style or tag the menu panel.
|
|
62
|
+
|
|
63
|
+
Put an external button that toggles the menu inside the `anchorEl` element: pressing it then closes the menu instead of closing and reopening it.
|
|
64
|
+
|
|
61
65
|
## Props
|
|
62
66
|
|
|
63
67
|
| Prop | Type | Default | Description |
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
# Popover
|
|
2
|
+
|
|
3
|
+
Anchored, non-modal floating panel for free-form content: filters, short forms, profile cards. Control with `v-model`.
|
|
4
|
+
|
|
5
|
+
Use `Menu` for a list of actions (arrow keys move between items) and `Tooltip` for short hover text. Popover keeps the keyboard for its fields: Tab moves through them and arrow / Home / End stay inside inputs.
|
|
6
|
+
|
|
7
|
+
## Import
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import { Popover } from "@bridge-ui/vue/Components/Popover";
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Examples
|
|
14
|
+
|
|
15
|
+
### Usage
|
|
16
|
+
|
|
17
|
+
```vue
|
|
18
|
+
<Popover v-model="open" title="Filters">
|
|
19
|
+
<template #trigger>
|
|
20
|
+
<Button>Filters</Button>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<Checkbox end-label="Only active" />
|
|
24
|
+
</Popover>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Form with ActionFooter
|
|
28
|
+
|
|
29
|
+
The default slot receives `close`.
|
|
30
|
+
|
|
31
|
+
```vue
|
|
32
|
+
<Popover v-model="open" title="Edit name">
|
|
33
|
+
<template #trigger>
|
|
34
|
+
<Button>Edit name</Button>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<template #default="{ close }">
|
|
38
|
+
<div class="flex flex-col gap-3">
|
|
39
|
+
<TextField label="Name" v-model="name" />
|
|
40
|
+
|
|
41
|
+
<div class="flex justify-end gap-2">
|
|
42
|
+
<ActionFooter
|
|
43
|
+
v-on:cancel="close"
|
|
44
|
+
v-on:apply="
|
|
45
|
+
save(name);
|
|
46
|
+
close();
|
|
47
|
+
"
|
|
48
|
+
/>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</template>
|
|
52
|
+
</Popover>
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Arrow and placement
|
|
56
|
+
|
|
57
|
+
```vue
|
|
58
|
+
<Popover arrow v-model="open" placement="top">
|
|
59
|
+
<template #trigger>
|
|
60
|
+
<Button>Details</Button>
|
|
61
|
+
</template>
|
|
62
|
+
|
|
63
|
+
<Text>Last synced 5 minutes ago.</Text>
|
|
64
|
+
</Popover>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Custom title
|
|
68
|
+
|
|
69
|
+
The `title` slot labels the dialog.
|
|
70
|
+
|
|
71
|
+
```vue
|
|
72
|
+
<Popover v-model="open">
|
|
73
|
+
<template #trigger>
|
|
74
|
+
<Button>Account</Button>
|
|
75
|
+
</template>
|
|
76
|
+
|
|
77
|
+
<template #title>
|
|
78
|
+
<span class="text-primary-600 dark:text-primary-400">Account</span>
|
|
79
|
+
</template>
|
|
80
|
+
|
|
81
|
+
<Text>Signed in as jane@example.com</Text>
|
|
82
|
+
</Popover>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Without a title
|
|
86
|
+
|
|
87
|
+
Label the dialog with `aria-label` on the content.
|
|
88
|
+
|
|
89
|
+
```vue
|
|
90
|
+
<Popover
|
|
91
|
+
v-model="open"
|
|
92
|
+
:custom-props="{ content: { 'aria-label': 'Profile' } }"
|
|
93
|
+
>
|
|
94
|
+
<template #trigger>
|
|
95
|
+
<Avatar alt="Jane Doe" />
|
|
96
|
+
</template>
|
|
97
|
+
|
|
98
|
+
<ProfileCard />
|
|
99
|
+
</Popover>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Persistent
|
|
103
|
+
|
|
104
|
+
Escape, click-away and focus leaving do not close it; close from the content.
|
|
105
|
+
|
|
106
|
+
```vue
|
|
107
|
+
<Popover persistent v-model="open">
|
|
108
|
+
<template #trigger>
|
|
109
|
+
<Button>Open</Button>
|
|
110
|
+
</template>
|
|
111
|
+
|
|
112
|
+
<template #default="{ close }">
|
|
113
|
+
<Button v-on:click="close">Done</Button>
|
|
114
|
+
</template>
|
|
115
|
+
</Popover>
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### anchorEl
|
|
119
|
+
|
|
120
|
+
```vue
|
|
121
|
+
<div ref="anchorRef">
|
|
122
|
+
<Button v-on:click="open = true">External anchor</Button>
|
|
123
|
+
</div>
|
|
124
|
+
|
|
125
|
+
<Popover v-model="open" :anchor-el="anchorRef">
|
|
126
|
+
<Text>Anchored to an element outside the Popover.</Text>
|
|
127
|
+
</Popover>
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Without a `trigger` slot no root element renders, so extra attributes are not applied: use `classes.content` / `customProps.content` to style or tag the popover panel.
|
|
131
|
+
|
|
132
|
+
A Popover (or Menu) opened from inside a Menu keeps that menu open when its opener is inside the menu panel: the `trigger` slot, or `anchorEl` when there is no trigger. Otherwise, opening it closes the menu.
|
|
133
|
+
|
|
134
|
+
### Classes
|
|
135
|
+
|
|
136
|
+
```vue
|
|
137
|
+
<Popover
|
|
138
|
+
arrow
|
|
139
|
+
v-model="open"
|
|
140
|
+
title="Styled"
|
|
141
|
+
:classes="{
|
|
142
|
+
content: 'w-80',
|
|
143
|
+
title: 'uppercase tracking-wide',
|
|
144
|
+
arrow: 'bg-primary-50 dark:bg-primary-950',
|
|
145
|
+
}"
|
|
146
|
+
>
|
|
147
|
+
<template #trigger>
|
|
148
|
+
<Button>Open</Button>
|
|
149
|
+
</template>
|
|
150
|
+
|
|
151
|
+
<Text>Custom part classes.</Text>
|
|
152
|
+
</Popover>
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Props
|
|
156
|
+
|
|
157
|
+
| Prop | Type | Default | Description |
|
|
158
|
+
| ------------------- | ------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
159
|
+
| `anchorEl` | `HTMLElement \| null` | — | Element that anchors the popover. When set, it is used for positioning and click-away instead of the `trigger` slot wrapper. Not merged into Bridge defaults. |
|
|
160
|
+
| `arrow` | `boolean` | `false` | Whether to show an arrow pointing at the anchor. |
|
|
161
|
+
| `classes` | `PopoverClasses` | — | Part classes: `root`, `trigger`, `content`, `title`, `arrow`. |
|
|
162
|
+
| `closeOnClickAway` | `boolean` | `true` | Whether the popover closes when clicking outside the trigger and content. |
|
|
163
|
+
| `closeOnEscape` | `boolean` | `true` | Whether the popover closes on escape key press. |
|
|
164
|
+
| `closeOnFocusOut` | `boolean` | `true` | Whether the popover closes when focus moves outside the trigger and content. |
|
|
165
|
+
| `customProps` | `PopoverCustomProps` | — | Props forwarded to each part (`root`, `trigger`, `content`, `title`, `arrow`). |
|
|
166
|
+
| `disableAutoFocus` | `boolean` | `false` | When true, the popover does not move focus into the content on open. |
|
|
167
|
+
| `disableScrollLock` | `boolean` | `true` | When true, body scroll is not locked while the popover is open. |
|
|
168
|
+
| `keepMounted` | `boolean` | `false` | When true, the popover stays mounted in the DOM after closing (hidden). |
|
|
169
|
+
| `matchWidth` | `boolean` | `false` | When true, the content width matches the trigger / anchor. |
|
|
170
|
+
| `offset` | `number` | 8 | Gap between the anchor and the content (px). |
|
|
171
|
+
| `onShowChange` | `(show: boolean) => void` | — | Called when `show` should change (controlled state without `v-model`). |
|
|
172
|
+
| `persistent` | `boolean` | `false` | When true, escape, click-away and focus leaving do not close the popover. |
|
|
173
|
+
| `placement` | `PositionPlacement` | "bottom-start" | Preferred placement of the content relative to the anchor. |
|
|
174
|
+
| `rounded` | `PopoverRounded` | "md" | The roundedness of the content. |
|
|
175
|
+
| `shadow` | `PopoverShadow` | "md" | The shadow to apply to the content. |
|
|
176
|
+
| `strategy` | `PositionStrategy` | "fixed" | CSS position strategy for the content. |
|
|
177
|
+
| `teleportTo` | `string \| false` | "body" | Where to portal the content. Pass `false` to render in place (keeps the natural Tab order after the trigger). |
|
|
178
|
+
| `title` | `string` | — | Heading rendered at the top of the content. Labels the dialog (`aria-labelledby`); without it, pass `aria-label` via `customProps.content`. The `title` slot wins. |
|
|
179
|
+
|
|
180
|
+
### v-model
|
|
181
|
+
|
|
182
|
+
| Prop / Event | Type | Default | Description |
|
|
183
|
+
| ------------------- | -------------------------- | ------- | ---------------------------------------------------------------------------- |
|
|
184
|
+
| `modelValue` | `boolean` | `false` | Whether the popover is open. Bound with `v-model`. |
|
|
185
|
+
| `update:modelValue` | `(value: boolean) => void` | — | Emitted when `v-model` should update. Listen with `v-on:update:model-value`. |
|
|
186
|
+
|
|
187
|
+
## Slots
|
|
188
|
+
|
|
189
|
+
| Slot | Props | Description |
|
|
190
|
+
| --------- | ----------------------- | ------------------------------------------- |
|
|
191
|
+
| `default` | `{ close: () => void }` | The popover content. |
|
|
192
|
+
| `title` | — | Custom heading content (labels the dialog). |
|
|
193
|
+
| `trigger` | — | The element that opens the popover. |
|
|
194
|
+
|
|
195
|
+
## Events
|
|
196
|
+
|
|
197
|
+
| Event | Payload | Description |
|
|
198
|
+
| ------------ | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
199
|
+
| `v-on:close` | — | Emitted when the user dismisses the popover (Escape, click-away or focus leaving), or when content calls `close`. Not emitted when the parent sets `v-model` to `false` directly. |
|
|
200
|
+
|
|
201
|
+
## Accessibility
|
|
202
|
+
|
|
203
|
+
- Content is `role="dialog"` (non-modal: no focus trap, no scroll lock by default). The trigger wrapper has `aria-haspopup="dialog"`, `aria-expanded` and `aria-controls`.
|
|
204
|
+
- Opening moves focus to the first focusable element (or the content itself). Escape closes the top-most layer. Closing while focus is inside the content (Escape or `close`) returns focus to the trigger; a click outside leaves focus where the pointer put it.
|
|
205
|
+
- Clicks inside layers opened from the content (a `Select` list, a nested `Menu`) do not close the popover.
|
|
206
|
+
- Opening a popover closes any open `Menu`.
|
|
207
|
+
|
|
208
|
+
## Related components
|
|
209
|
+
|
|
210
|
+
Menu, Tooltip, Modal, ActionFooter, Button
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.24.0",
|
|
5
5
|
"author": "BridgeUI",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"name": "@bridge-ui/vue",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
}
|
|
114
114
|
},
|
|
115
115
|
"dependencies": {
|
|
116
|
-
"@bridge-ui/core": "^0.
|
|
116
|
+
"@bridge-ui/core": "^0.24.0",
|
|
117
117
|
"clsx": "^2.1.1",
|
|
118
118
|
"es-toolkit": "^1.52.0",
|
|
119
119
|
"tailwind-merge": "^3.7.0"
|