@bridge-ui/vue 0.15.0 → 0.17.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/AGENTS.md +1 -1
- package/ai/README.md +1 -1
- package/ai/llms.txt +0 -1
- package/ai/skills/bridge-ui-components/SKILL.md +3 -1
- package/ai/skills/bridge-ui-setup/SKILL.md +8 -8
- package/dist/Actions/Snackbar/BridgeSnackbarItem.vue_vue_type_script_setup_true_lang.js +42 -44
- package/dist/Actions/actionHostRegistry.d.ts +2 -1
- package/dist/Actions/actionHostRegistry.js +11 -7
- package/dist/Adapters/index.d.ts +0 -1
- package/dist/Adapters/index.js +1 -2
- package/dist/Components/Accordion/composables/useAccordion.js +1 -1
- package/dist/Components/Autocomplete/composables/useAutocomplete.js +248 -258
- package/dist/Components/Chart/Chart.js +5 -0
- package/dist/Components/Chart/Chart.vue.d.ts +14 -0
- package/dist/Components/Chart/Chart.vue_vue_type_script_setup_true_lang.js +52 -0
- package/dist/Components/Chart/chart.types.d.ts +126 -0
- package/dist/Components/Chart/chartInjectionKey.d.ts +94 -0
- package/dist/Components/Chart/chartInjectionKey.js +10 -0
- package/dist/Components/Chart/composables/useChart.d.ts +40 -0
- package/dist/Components/Chart/composables/useChart.js +344 -0
- package/dist/Components/Chart/echartsChart.d.ts +14 -0
- package/dist/Components/Chart/echartsChart.js +199 -0
- package/dist/Components/Chart/index.d.ts +4 -0
- package/dist/Components/Chart/index.js +4 -0
- package/dist/Components/ChartAxis/ChartAxis.js +5 -0
- package/dist/Components/ChartAxis/ChartAxis.vue.d.ts +7 -0
- package/dist/Components/ChartAxis/ChartAxis.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/Components/ChartAxis/chartAxis.types.d.ts +56 -0
- package/dist/Components/ChartAxis/composables/useChartAxis.d.ts +5 -0
- package/dist/Components/ChartAxis/composables/useChartAxis.js +28 -0
- package/dist/Components/ChartAxis/index.d.ts +3 -0
- package/dist/Components/ChartAxis/index.js +3 -0
- package/dist/Components/ChartLegend/ChartLegend.js +5 -0
- package/dist/Components/ChartLegend/ChartLegend.vue.d.ts +6 -0
- package/dist/Components/ChartLegend/ChartLegend.vue_vue_type_script_setup_true_lang.js +33 -0
- package/dist/Components/ChartLegend/chartLegend.types.d.ts +71 -0
- package/dist/Components/ChartLegend/composables/useChartLegend.d.ts +16 -0
- package/dist/Components/ChartLegend/composables/useChartLegend.js +98 -0
- package/dist/Components/ChartLegend/index.d.ts +3 -0
- package/dist/Components/ChartLegend/index.js +3 -0
- package/dist/Components/ChartSeries/ChartSeries.js +5 -0
- package/dist/Components/ChartSeries/ChartSeries.vue.d.ts +4 -0
- package/dist/Components/ChartSeries/ChartSeries.vue_vue_type_script_setup_true_lang.js +24 -0
- package/dist/Components/ChartSeries/chartSeries.types.d.ts +37 -0
- package/dist/Components/ChartSeries/composables/useChartSeries.d.ts +10 -0
- package/dist/Components/ChartSeries/composables/useChartSeries.js +29 -0
- package/dist/Components/ChartSeries/index.d.ts +3 -0
- package/dist/Components/ChartSeries/index.js +3 -0
- package/dist/Components/ChartTooltip/ChartTooltip.js +5 -0
- package/dist/Components/ChartTooltip/ChartTooltip.vue.d.ts +11 -0
- package/dist/Components/ChartTooltip/ChartTooltip.vue_vue_type_script_setup_true_lang.js +25 -0
- package/dist/Components/ChartTooltip/chartTooltip.types.d.ts +82 -0
- package/dist/Components/ChartTooltip/composables/useChartTooltip.d.ts +15 -0
- package/dist/Components/ChartTooltip/composables/useChartTooltip.js +110 -0
- package/dist/Components/ChartTooltip/index.d.ts +3 -0
- package/dist/Components/ChartTooltip/index.js +3 -0
- package/dist/Components/DataTable/DataTable.vue.d.ts +5 -3
- package/dist/Components/DataTable/DataTable.vue_vue_type_script_setup_true_lang.js +138 -117
- package/dist/Components/DataTable/DataTableCellContent.vue.d.ts +1 -5
- package/dist/Components/DataTable/DataTableCellContent.vue_vue_type_script_setup_true_lang.js +24 -25
- package/dist/Components/DataTable/composables/useDataTable.d.ts +5 -3
- package/dist/Components/DataTable/composables/useDataTable.js +294 -272
- package/dist/Components/DataTable/composables/useDataTablePagination.js +1 -1
- package/dist/Components/DataTable/dataTable.types.d.ts +35 -2
- package/dist/Components/Drawer/composables/useDrawer.js +68 -67
- package/dist/Components/Modal/composables/useModal.js +129 -119
- package/dist/Components/Pagination/Pagination.vue.d.ts +6 -0
- package/dist/Components/Pagination/Pagination.vue_vue_type_script_setup_true_lang.js +23 -11
- package/dist/Components/Pagination/composables/usePagination.d.ts +3 -3
- package/dist/Components/Pagination/composables/usePagination.js +95 -84
- package/dist/Components/Pagination/pagination.types.d.ts +30 -2
- package/dist/Components/Resizable/Resizable.js +5 -0
- package/dist/Components/Resizable/Resizable.vue.d.ts +17 -0
- package/dist/Components/Resizable/Resizable.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/Components/Resizable/composables/useResizable.d.ts +18 -0
- package/dist/Components/Resizable/composables/useResizable.js +195 -0
- package/dist/Components/Resizable/index.d.ts +4 -0
- package/dist/Components/Resizable/index.js +4 -0
- package/dist/Components/Resizable/resizable.types.d.ts +53 -0
- package/dist/Components/Resizable/resizableInjectionKey.d.ts +111 -0
- package/dist/Components/Resizable/resizableInjectionKey.js +4 -0
- package/dist/Components/ResizableHandle/ResizableHandle.js +5 -0
- package/dist/Components/ResizableHandle/ResizableHandle.vue.d.ts +14 -0
- package/dist/Components/ResizableHandle/ResizableHandle.vue_vue_type_script_setup_true_lang.js +31 -0
- package/dist/Components/ResizableHandle/composables/useResizableHandle.d.ts +35 -0
- package/dist/Components/ResizableHandle/composables/useResizableHandle.js +85 -0
- package/dist/Components/ResizableHandle/index.d.ts +3 -0
- package/dist/Components/ResizableHandle/index.js +3 -0
- package/dist/Components/ResizableHandle/resizableHandle.types.d.ts +58 -0
- package/dist/Components/ResizablePanel/ResizablePanel.js +5 -0
- package/dist/Components/ResizablePanel/ResizablePanel.vue.d.ts +24 -0
- package/dist/Components/ResizablePanel/ResizablePanel.vue_vue_type_script_setup_true_lang.js +39 -0
- package/dist/Components/ResizablePanel/composables/useResizablePanel.d.ts +21 -0
- package/dist/Components/ResizablePanel/composables/useResizablePanel.js +87 -0
- package/dist/Components/ResizablePanel/index.d.ts +3 -0
- package/dist/Components/ResizablePanel/index.js +3 -0
- package/dist/Components/ResizablePanel/resizablePanel.types.d.ts +71 -0
- package/dist/Components/RichTextEditor/RichTextEditor.vue.d.ts +1 -1
- package/dist/Components/RichTextEditor/RichTextEditor.vue_vue_type_script_setup_true_lang.js +17 -17
- package/dist/Components/RichTextEditor/composables/useRichTextEditor.d.ts +2 -2
- package/dist/Components/RichTextEditor/composables/useRichTextEditor.js +67 -73
- package/dist/Components/RichTextEditor/richTextEditor.types.d.ts +1 -1
- package/dist/Components/RichTextEditor/tiptapEditor.d.ts +111 -0
- package/dist/Components/RichTextEditor/tiptapEditor.js +121 -0
- package/dist/Components/Select/composables/useSelect.js +147 -157
- package/dist/Components/Snackbar/Snackbar.vue.d.ts +1 -1
- package/dist/Components/Snackbar/Snackbar.vue_vue_type_script_setup_true_lang.js +6 -7
- package/dist/Components/Snackbar/composables/useSnackbar.js +140 -146
- package/dist/Components/Stepper/composables/useStepper.js +1 -1
- package/dist/Components/Table/composables/useTableCell.d.ts +1 -1
- package/dist/Components/Tabs/composables/useTabs.js +1 -1
- package/dist/Components/ToggleGroup/composables/useToggleGroup.js +3 -3
- package/dist/augments.d.ts +34 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.js +187 -183
- package/dist/theme.css +1 -1
- package/docs/README.md +4 -3
- package/docs/components/BridgeUIProvider.md +0 -17
- package/docs/components/Chart.md +252 -0
- package/docs/components/DataTable.md +19 -0
- package/docs/components/Pagination.md +17 -5
- package/docs/components/Resizable.md +224 -0
- package/docs/components/RichTextEditor.md +2 -23
- package/package.json +27 -6
- package/dist/Adapters/RichText/index.d.ts +0 -1
- package/dist/Adapters/RichText/index.js +0 -2
- package/dist/Adapters/RichText/mockRichTextAdapter.d.ts +0 -5
- package/dist/Adapters/RichText/useRichTextAdapter.d.ts +0 -12
- package/dist/Adapters/RichText/useRichTextAdapter.js +0 -13
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { mergePartBind as e, resolveVnodeRefElement as t, useBridgeUIComponent as
|
|
2
|
-
import { computed as
|
|
3
|
-
import { get as
|
|
4
|
-
import { modalAlignProps as
|
|
5
|
-
import { cn as c, mergeBridgeUILayeredClasses as l, splitComponentProps as
|
|
6
|
-
import { createFocusTrap as
|
|
7
|
-
import { LAYER_STACK_BASE_Z_INDEX as
|
|
1
|
+
import { mergePartBind as e, resolveVnodeRefElement as t, useBridgeUIComponent as ee, useBridgeUIMergedRegistryClasses as te } from "../../../Utils/index.js";
|
|
2
|
+
import { computed as n, nextTick as r, onBeforeUnmount as ne, ref as i, toValue as re, useAttrs as ie, watch as a } from "vue";
|
|
3
|
+
import { get as o } from "es-toolkit/compat";
|
|
4
|
+
import { modalAlignProps as ae, modalBlurProps as oe, modalSizeProps as s } from "@bridge-ui/core/Tokens";
|
|
5
|
+
import { cn as c, mergeBridgeUILayeredClasses as l, splitComponentProps as u } from "@bridge-ui/core/Utils";
|
|
6
|
+
import { createFocusTrap as se, isModalBackdropClick as ce, requestAfterNextPaint as d } from "@bridge-ui/core/Runtime";
|
|
7
|
+
import { LAYER_STACK_BASE_Z_INDEX as f, MODAL_LEAVE_FALLBACK_MS as le, acquireLayerStackOrder as ue, countModalTransitionLayers as de, getLayerFocusTrapGuards as fe, getLayerStackEntry as pe, getModalOverlayTransitionClass as me, getModalPanelTransitionClass as he, hasModalTransition as p, pushLayerStack as ge, resolveEffectiveModalTransition as _e, subscribeLayerStack as ve } from "@bridge-ui/core/Layer";
|
|
8
8
|
//#region src/Components/Modal/composables/useModal.ts
|
|
9
|
-
var
|
|
9
|
+
var ye = [
|
|
10
10
|
"blur",
|
|
11
11
|
"size",
|
|
12
12
|
"align",
|
|
@@ -26,178 +26,188 @@ var v = [
|
|
|
26
26
|
"disableEnforceFocus",
|
|
27
27
|
"disableRestoreFocus"
|
|
28
28
|
];
|
|
29
|
-
function
|
|
30
|
-
let
|
|
31
|
-
function
|
|
32
|
-
e ||
|
|
29
|
+
function m(m, h, g = {}) {
|
|
30
|
+
let _ = ie(), v = !1, y = i(!1), b = i(!1), x = i(""), S = 0, C = null, w = null, T = i(null), E = null, D = null, O = i(f), k = null, A = i("closed"), j = null, M = n(() => re(g.show ?? !1));
|
|
31
|
+
function N(e) {
|
|
32
|
+
e || g.onClose?.(), g.show && (g.show.value = e), g.onShowChange?.(e);
|
|
33
33
|
}
|
|
34
|
-
let
|
|
35
|
-
bridgeKeys:
|
|
34
|
+
let P = n(() => u({
|
|
35
|
+
bridgeKeys: ye,
|
|
36
36
|
props: {
|
|
37
|
-
...
|
|
38
|
-
...
|
|
37
|
+
..._,
|
|
38
|
+
...m
|
|
39
39
|
}
|
|
40
|
-
})), { merged:
|
|
41
|
-
libDefaults:
|
|
40
|
+
})), { merged: F, entry: I } = ee({
|
|
41
|
+
libDefaults: h,
|
|
42
42
|
componentName: "Modal",
|
|
43
|
-
props: () =>
|
|
44
|
-
}),
|
|
45
|
-
entry:
|
|
46
|
-
props: () =>
|
|
47
|
-
}),
|
|
48
|
-
let e = l(
|
|
49
|
-
return
|
|
50
|
-
}),
|
|
51
|
-
let e = l(
|
|
52
|
-
return
|
|
53
|
-
}),
|
|
54
|
-
let e = l(
|
|
55
|
-
return
|
|
56
|
-
}),
|
|
57
|
-
onTransitionend:
|
|
58
|
-
style: { zIndex:
|
|
59
|
-
"aria-hidden":
|
|
43
|
+
props: () => P.value.componentProps
|
|
44
|
+
}), L = n(() => F.value.customProps), R = te({
|
|
45
|
+
entry: I,
|
|
46
|
+
props: () => P.value.componentProps
|
|
47
|
+
}), z = n(() => _e(F.value.transition ?? "none")), B = n(() => p(z.value)), V = n(() => F.value.scroll ?? "body"), H = n(() => F.value.keepMounted && !y.value), be = n(() => {
|
|
48
|
+
let e = l(ae, I.value?.tokens?.align);
|
|
49
|
+
return o(e, F.value.align);
|
|
50
|
+
}), xe = n(() => {
|
|
51
|
+
let e = l(oe, I.value?.tokens?.blur);
|
|
52
|
+
return o(e, F.value.blur);
|
|
53
|
+
}), Se = n(() => {
|
|
54
|
+
let e = l(s, I.value?.tokens?.size);
|
|
55
|
+
return o(e, F.value.size);
|
|
56
|
+
}), Ce = n(() => me(z.value)), we = n(() => he(z.value)), U = n(() => !F.value.persistent), Te = n(() => P.value.inheritedAttrs), Ee = n(() => e(L.value?.root, Te.value, {
|
|
57
|
+
onTransitionend: Me,
|
|
58
|
+
style: { zIndex: O.value },
|
|
59
|
+
"aria-hidden": H.value ? !0 : void 0,
|
|
60
60
|
class: c({
|
|
61
61
|
"fixed inset-0": !0,
|
|
62
|
-
"overflow-y-auto":
|
|
63
|
-
"overflow-hidden":
|
|
64
|
-
"invisible pointer-events-none":
|
|
65
|
-
[
|
|
62
|
+
"overflow-y-auto": V.value === "body",
|
|
63
|
+
"overflow-hidden": V.value === "paper",
|
|
64
|
+
"invisible pointer-events-none": H.value,
|
|
65
|
+
[o(R.value, "root") ?? ""]: !0
|
|
66
66
|
})
|
|
67
|
-
})),
|
|
67
|
+
})), De = n(() => e(L.value?.overlay, { onClick: Z }, {
|
|
68
68
|
"data-modal-part": "overlay",
|
|
69
|
-
"data-state":
|
|
69
|
+
"data-state": A.value,
|
|
70
70
|
class: c({
|
|
71
71
|
"fixed inset-0 bg-black/50": !0,
|
|
72
|
-
[
|
|
73
|
-
[
|
|
74
|
-
[
|
|
72
|
+
[xe.value ?? ""]: !0,
|
|
73
|
+
[Ce.value]: B.value,
|
|
74
|
+
[o(R.value, "overlay") ?? ""]: !0
|
|
75
75
|
})
|
|
76
|
-
})),
|
|
76
|
+
})), Oe = n(() => e(L.value?.wrapper, { onClick: Q }, c({
|
|
77
77
|
"flex min-h-full w-full transform p-4": !0,
|
|
78
|
-
[
|
|
79
|
-
[
|
|
80
|
-
}))),
|
|
78
|
+
[be.value ?? ""]: !0,
|
|
79
|
+
[o(R.value, "wrapper") ?? ""]: !0
|
|
80
|
+
}))), ke = n(() => e(L.value?.panel, {
|
|
81
81
|
role: "dialog",
|
|
82
82
|
"aria-modal": !0
|
|
83
83
|
}, {
|
|
84
84
|
"data-modal-part": "panel",
|
|
85
|
-
"data-state":
|
|
85
|
+
"data-state": A.value,
|
|
86
86
|
class: c({
|
|
87
87
|
"relative w-full": !0,
|
|
88
|
-
[
|
|
89
|
-
"max-h-[calc(100dvh-2rem)] overflow-y-auto bridge-scroll-fade-y bridge-hide-scrollbar":
|
|
90
|
-
[
|
|
91
|
-
[
|
|
88
|
+
[Se.value ?? ""]: !0,
|
|
89
|
+
"max-h-[calc(100dvh-2rem)] overflow-y-auto bridge-scroll-fade-y bridge-hide-scrollbar": V.value === "paper",
|
|
90
|
+
[we.value]: B.value,
|
|
91
|
+
[o(R.value, "panel") ?? ""]: !0
|
|
92
92
|
})
|
|
93
93
|
}));
|
|
94
|
-
function
|
|
95
|
-
|
|
94
|
+
function W() {
|
|
95
|
+
w?.release(), w = null;
|
|
96
96
|
}
|
|
97
|
-
function
|
|
98
|
-
if (!
|
|
99
|
-
|
|
97
|
+
function G() {
|
|
98
|
+
if (!y.value || A.value !== "open" || !T.value) {
|
|
99
|
+
W();
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
|
-
|
|
103
|
-
container:
|
|
104
|
-
disableAutoFocus: !
|
|
105
|
-
disableEnforceFocus:
|
|
106
|
-
disableRestoreFocus:
|
|
107
|
-
...fe(() =>
|
|
102
|
+
E?.setContainer(T.value), W(), w = se({
|
|
103
|
+
container: T.value,
|
|
104
|
+
disableAutoFocus: !F.value.autoFocus,
|
|
105
|
+
disableEnforceFocus: F.value.disableEnforceFocus,
|
|
106
|
+
disableRestoreFocus: F.value.disableRestoreFocus,
|
|
107
|
+
...fe(() => x.value)
|
|
108
108
|
});
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
|
|
110
|
+
function Ae(e) {
|
|
111
|
+
T.value = t(e), G();
|
|
112
|
+
}
|
|
113
|
+
function K() {
|
|
114
|
+
j !== null && (clearTimeout(j), j = null);
|
|
115
|
+
}
|
|
116
|
+
function q() {
|
|
117
|
+
D?.(), D = null;
|
|
112
118
|
}
|
|
113
119
|
function J() {
|
|
114
|
-
|
|
120
|
+
v && (v = !1, K(), S = 0, y.value = !1, W(), M.value ? N(!1) : g.onShowChange?.(!1), A.value = "closed", F.value.keepMounted || (b.value = !1));
|
|
115
121
|
}
|
|
116
122
|
function Y() {
|
|
117
|
-
if (
|
|
123
|
+
if (q(), E?.releaseScrollLock(), v = !0, !B.value) {
|
|
118
124
|
J();
|
|
119
125
|
return;
|
|
120
126
|
}
|
|
121
|
-
|
|
127
|
+
if (A.value = "closed", S = de(z.value, { hideBackdrop: F.value.hideBackdrop }), S === 0) {
|
|
128
|
+
J();
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
K(), j = setTimeout(() => {
|
|
132
|
+
j = null, S > 0 && J();
|
|
133
|
+
}, le);
|
|
122
134
|
}
|
|
123
|
-
function
|
|
124
|
-
if (
|
|
125
|
-
|
|
135
|
+
function je() {
|
|
136
|
+
if (v = !1, K(), S = 0, !B.value) {
|
|
137
|
+
A.value = "open";
|
|
126
138
|
return;
|
|
127
139
|
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
M.value = "open";
|
|
131
|
-
});
|
|
140
|
+
A.value = "closed", q(), D = d(() => {
|
|
141
|
+
A.value = "open";
|
|
132
142
|
});
|
|
133
143
|
}
|
|
134
|
-
function
|
|
135
|
-
if (!
|
|
144
|
+
function Me(e) {
|
|
145
|
+
if (!v || !b.value || A.value !== "closed") return;
|
|
136
146
|
let t = e.target;
|
|
137
|
-
(t?.dataset.modalPart === "overlay" || t?.dataset.modalPart === "panel") && e.propertyName !== "none" && e.elapsedTime !== 0 && (--
|
|
147
|
+
(t?.dataset.modalPart === "overlay" || t?.dataset.modalPart === "panel") && e.propertyName !== "none" && e.elapsedTime !== 0 && (--S, S <= 0 && J());
|
|
138
148
|
}
|
|
139
149
|
function X() {
|
|
140
|
-
if (
|
|
141
|
-
if (!
|
|
142
|
-
|
|
150
|
+
if (U.value) {
|
|
151
|
+
if (!B.value) {
|
|
152
|
+
N(!1);
|
|
143
153
|
return;
|
|
144
154
|
}
|
|
145
|
-
|
|
155
|
+
b.value && Y();
|
|
146
156
|
}
|
|
147
157
|
}
|
|
148
158
|
function Z() {
|
|
149
|
-
|
|
159
|
+
F.value.closeOnOverlay !== !1 && U.value && X();
|
|
150
160
|
}
|
|
151
161
|
function Q(e) {
|
|
152
|
-
|
|
162
|
+
ce(e) && Z();
|
|
153
163
|
}
|
|
154
|
-
function
|
|
155
|
-
|
|
164
|
+
function Ne() {
|
|
165
|
+
M.value && F.value.closeOnEscape !== !1 && U.value && X();
|
|
156
166
|
}
|
|
157
|
-
|
|
167
|
+
a(M, (e) => {
|
|
158
168
|
if (e) {
|
|
159
|
-
|
|
169
|
+
b.value = !0, y.value = !0, je();
|
|
160
170
|
return;
|
|
161
171
|
}
|
|
162
|
-
|
|
163
|
-
}, { immediate: !0 }),
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
() =>
|
|
167
|
-
() =>
|
|
168
|
-
() =>
|
|
172
|
+
b.value && Y();
|
|
173
|
+
}, { immediate: !0 }), a([
|
|
174
|
+
y,
|
|
175
|
+
A,
|
|
176
|
+
() => F.value.autoFocus,
|
|
177
|
+
() => F.value.disableEnforceFocus,
|
|
178
|
+
() => F.value.disableRestoreFocus
|
|
169
179
|
], () => {
|
|
170
|
-
|
|
171
|
-
|
|
180
|
+
r(() => {
|
|
181
|
+
G();
|
|
172
182
|
});
|
|
173
183
|
});
|
|
174
184
|
function $() {
|
|
175
|
-
let e =
|
|
176
|
-
e && (
|
|
185
|
+
let e = pe(x.value);
|
|
186
|
+
e && (O.value = e.zIndex);
|
|
177
187
|
}
|
|
178
|
-
return
|
|
179
|
-
e ? (
|
|
188
|
+
return a(y, (e) => {
|
|
189
|
+
e ? (C = ue(), E = ge({
|
|
180
190
|
trapsFocus: !0,
|
|
181
|
-
order:
|
|
182
|
-
id:
|
|
183
|
-
onEscape:
|
|
184
|
-
container:
|
|
185
|
-
lockScroll:
|
|
186
|
-
}),
|
|
187
|
-
}, { immediate: !0 }),
|
|
188
|
-
|
|
191
|
+
order: C,
|
|
192
|
+
id: g.stackId,
|
|
193
|
+
onEscape: Ne,
|
|
194
|
+
container: T.value ?? void 0,
|
|
195
|
+
lockScroll: F.value.disableScrollLock !== !0
|
|
196
|
+
}), x.value = E.id, O.value = E.zIndex, $(), k = ve($)) : (k?.(), k = null, E?.release(), E = null, C = null, x.value = "", O.value = f);
|
|
197
|
+
}, { immediate: !0 }), ne(() => {
|
|
198
|
+
K(), q(), k?.(), k = null, W(), E?.release(), E = null;
|
|
189
199
|
}), {
|
|
190
|
-
merged:
|
|
191
|
-
mounted:
|
|
192
|
-
rootBind:
|
|
193
|
-
panelBind:
|
|
194
|
-
overlayBind:
|
|
195
|
-
wrapperBind:
|
|
196
|
-
setPanelRef:
|
|
197
|
-
layerStackId:
|
|
200
|
+
merged: F,
|
|
201
|
+
mounted: b,
|
|
202
|
+
rootBind: Ee,
|
|
203
|
+
panelBind: ke,
|
|
204
|
+
overlayBind: De,
|
|
205
|
+
wrapperBind: Oe,
|
|
206
|
+
setPanelRef: Ae,
|
|
207
|
+
layerStackId: x,
|
|
198
208
|
handleOverlayClick: Z,
|
|
199
209
|
handleWrapperClick: Q
|
|
200
210
|
};
|
|
201
211
|
}
|
|
202
212
|
//#endregion
|
|
203
|
-
export {
|
|
213
|
+
export { m as useModal };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { PaginationCursor } from '@bridge-ui/core/Domain';
|
|
1
2
|
import { PaginationOwnProps, PaginationSlots } from './pagination.types';
|
|
2
3
|
type __VLS_Slots = PaginationSlots;
|
|
3
4
|
type __VLS_Props = PaginationOwnProps;
|
|
4
5
|
type __VLS_ModelProps = {
|
|
5
6
|
modelValue?: number;
|
|
7
|
+
"cursor"?: PaginationCursor;
|
|
6
8
|
};
|
|
7
9
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
10
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
@@ -10,13 +12,17 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {
|
|
|
10
12
|
previous: () => any;
|
|
11
13
|
change: (page: number) => any;
|
|
12
14
|
"update:modelValue": (...args: unknown[]) => any;
|
|
15
|
+
"update:cursor": (...args: unknown[]) => any;
|
|
13
16
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
14
17
|
onNext?: (() => any) | undefined;
|
|
15
18
|
onPrevious?: (() => any) | undefined;
|
|
16
19
|
onChange?: ((page: number) => any) | undefined;
|
|
17
20
|
"onUpdate:modelValue"?: ((...args: unknown[]) => any) | undefined;
|
|
21
|
+
"onUpdate:cursor"?: ((...args: unknown[]) => any) | undefined;
|
|
18
22
|
}>, {
|
|
19
23
|
disabled: boolean;
|
|
24
|
+
hasNext: boolean;
|
|
25
|
+
hasPrevious: boolean;
|
|
20
26
|
hideNextButton: boolean;
|
|
21
27
|
hidePrevButton: boolean;
|
|
22
28
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -19,13 +19,20 @@ var y = {
|
|
|
19
19
|
classes: {},
|
|
20
20
|
color: {},
|
|
21
21
|
count: {},
|
|
22
|
+
cursor: {},
|
|
22
23
|
customProps: {},
|
|
23
24
|
disabled: {
|
|
24
25
|
type: Boolean,
|
|
25
26
|
default: !1
|
|
26
27
|
},
|
|
27
|
-
hasNext: {
|
|
28
|
-
|
|
28
|
+
hasNext: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: void 0
|
|
31
|
+
},
|
|
32
|
+
hasPrevious: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: void 0
|
|
35
|
+
},
|
|
29
36
|
hideNextButton: {
|
|
30
37
|
type: Boolean,
|
|
31
38
|
default: !1
|
|
@@ -36,22 +43,27 @@ var y = {
|
|
|
36
43
|
},
|
|
37
44
|
mode: {},
|
|
38
45
|
modelValue: {},
|
|
46
|
+
nextCursor: {},
|
|
47
|
+
prevCursor: {},
|
|
39
48
|
rounded: {},
|
|
40
49
|
siblingCount: {},
|
|
41
50
|
size: {},
|
|
42
51
|
variant: {}
|
|
43
52
|
}, {
|
|
44
53
|
modelValue: { default: 1 },
|
|
45
|
-
modelModifiers: {}
|
|
54
|
+
modelModifiers: {},
|
|
55
|
+
cursor: {},
|
|
56
|
+
cursorModifiers: {}
|
|
46
57
|
}),
|
|
47
58
|
emits: /*@__PURE__*/ u([
|
|
48
59
|
"change",
|
|
49
60
|
"next",
|
|
50
61
|
"previous",
|
|
62
|
+
"update:cursor",
|
|
51
63
|
"update:modelValue"
|
|
52
|
-
], ["update:modelValue"]),
|
|
64
|
+
], ["update:modelValue", "update:cursor"]),
|
|
53
65
|
setup(c, { emit: u }) {
|
|
54
|
-
let S = u, C = c, w = v(c, "modelValue"), { entries:
|
|
66
|
+
let S = u, C = c, w = v(c, "modelValue"), T = v(c, "cursor"), { entries: E, showPrev: D, showNext: O, rootBind: k, listBind: A, prevBind: j, nextBind: M, prevLabel: N, nextLabel: P, getItemBind: F, prevIconBind: I, nextIconBind: L, getEllipsisBind: R } = t(C, {
|
|
55
67
|
size: "md",
|
|
56
68
|
rounded: "md",
|
|
57
69
|
color: "dark",
|
|
@@ -62,14 +74,14 @@ var y = {
|
|
|
62
74
|
boundaryCount: 1,
|
|
63
75
|
hideNextButton: !1,
|
|
64
76
|
hidePrevButton: !1
|
|
65
|
-
}, w, S);
|
|
66
|
-
return (t, c) => (p(), i("nav", f(l(_(
|
|
67
|
-
_(
|
|
68
|
-
(p(!0), i(n, null, m(_(
|
|
77
|
+
}, w, S, T);
|
|
78
|
+
return (t, c) => (p(), i("nav", f(l(_(k))), [a("ul", f(l(_(A))), [
|
|
79
|
+
_(D) ? (p(), i("li", y, [a("button", f(l(_(j))), [h(t.$slots, "prev", {}, () => [s(_(e), d({ icon: "chevronLeft" }, _(I)), null, 16), o(" " + g(_(N)), 1)])], 16)])) : r("", !0),
|
|
80
|
+
(p(!0), i(n, null, m(_(E), (e, r) => (p(), i(n, { key: `${e.type}-${r}` }, [e.type === "ellipsis" ? (p(), i("li", d({
|
|
69
81
|
key: 0,
|
|
70
82
|
ref_for: !0
|
|
71
|
-
}, _(
|
|
72
|
-
_(
|
|
83
|
+
}, _(R)(r)), [h(t.$slots, "ellipsis", {}, () => [c[0] ||= o("…", -1)])], 16)) : (p(), i("li", b, [a("button", d({ ref_for: !0 }, _(F)(e.page)), g(e.page), 17)]))], 64))), 128)),
|
|
84
|
+
_(O) ? (p(), i("li", x, [a("button", f(l(_(M))), [h(t.$slots, "next", {}, () => [o(g(_(P)) + " ", 1), s(_(e), d({ icon: "chevronRight" }, _(L)), null, 16)])], 16)])) : r("", !0)
|
|
73
85
|
], 16)], 16));
|
|
74
86
|
}
|
|
75
87
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Ref, SetupContext } from 'vue';
|
|
2
|
-
import { PaginationEntry } from '@bridge-ui/core/Domain';
|
|
2
|
+
import { PaginationCursor, PaginationEntry } from '@bridge-ui/core/Domain';
|
|
3
3
|
import { IconSize } from '@bridge-ui/core/Tokens';
|
|
4
4
|
import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core/Utils';
|
|
5
5
|
import { PaginationEmits, PaginationOwnProps, PaginationProps } from '../pagination.types';
|
|
6
6
|
type PaginationLibDefaults = LibDefaultsShape<PaginationOwnProps, "mode" | "size" | "color" | "rounded" | "variant" | "disabled" | "siblingCount" | "boundaryCount" | "hideNextButton" | "hidePrevButton">;
|
|
7
7
|
type PaginationMerged = MergeLibDefaults<PaginationOwnProps, PaginationLibDefaults>;
|
|
8
|
-
export declare function usePagination(props: PaginationOwnProps, libDefaults: PaginationLibDefaults, model: Ref<number | undefined>, emit: SetupContext<PaginationEmits>["emit"]): {
|
|
8
|
+
export declare function usePagination(props: PaginationOwnProps, libDefaults: PaginationLibDefaults, model: Ref<number | undefined>, emit: SetupContext<PaginationEmits>["emit"], cursorModel?: Ref<undefined | PaginationCursor>): {
|
|
9
9
|
page: import('vue').ComputedRef<number>;
|
|
10
10
|
slots: Readonly<{
|
|
11
11
|
[name: string]: import('vue').Slot<any> | undefined;
|
|
@@ -17,7 +17,7 @@ export declare function usePagination(props: PaginationOwnProps, libDefaults: Pa
|
|
|
17
17
|
rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
|
|
18
18
|
"aria-label": string;
|
|
19
19
|
class: string;
|
|
20
|
-
}, "class", import('vue').HTMLAttributes | undefined, Omit<PaginationProps, "color" | "mode" | "size" | "classes" | "customProps" | "disabled" | "rounded" | "variant" | "modelValue" | "count" | "boundaryCount" | "hasNext" | "hasPrevious" | "hideNextButton" | "hidePrevButton" | "siblingCount">>>;
|
|
20
|
+
}, "class", import('vue').HTMLAttributes | undefined, Omit<PaginationProps, "color" | "cursor" | "mode" | "size" | "classes" | "customProps" | "disabled" | "rounded" | "variant" | "modelValue" | "count" | "boundaryCount" | "hasNext" | "hasPrevious" | "hideNextButton" | "hidePrevButton" | "nextCursor" | "prevCursor" | "siblingCount">>>;
|
|
21
21
|
listBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
|
|
22
22
|
class: string;
|
|
23
23
|
}, "class", import('vue').HTMLAttributes | undefined, {}>>;
|