@bridge-ui/vue 0.16.0 → 0.17.1

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.
Files changed (61) hide show
  1. package/ai/skills/bridge-ui-components/SKILL.md +2 -1
  2. package/dist/Actions/Snackbar/createBridgeSnackbarApi.js +1 -1
  3. package/dist/Actions/actionHostRegistry.d.ts +2 -1
  4. package/dist/Actions/actionHostRegistry.js +11 -7
  5. package/dist/Components/Chart/Chart.vue_vue_type_script_setup_true_lang.js +7 -7
  6. package/dist/Components/Chart/composables/useChart.js +16 -14
  7. package/dist/Components/DataTable/DataTable.vue.d.ts +5 -3
  8. package/dist/Components/DataTable/DataTable.vue_vue_type_script_setup_true_lang.js +114 -101
  9. package/dist/Components/DataTable/composables/useDataTable.d.ts +4 -2
  10. package/dist/Components/DataTable/composables/useDataTable.js +293 -273
  11. package/dist/Components/DataTable/dataTable.types.d.ts +35 -2
  12. package/dist/Components/Drawer/Drawer.vue_vue_type_script_setup_true_lang.js +4 -3
  13. package/dist/Components/Drawer/composables/useDrawer.js +68 -67
  14. package/dist/Components/Menu/Menu.vue_vue_type_script_setup_true_lang.js +3 -5
  15. package/dist/Components/Modal/Modal.vue_vue_type_script_setup_true_lang.js +4 -3
  16. package/dist/Components/Modal/composables/useModal.js +129 -119
  17. package/dist/Components/Pagination/Pagination.vue.d.ts +6 -0
  18. package/dist/Components/Pagination/Pagination.vue_vue_type_script_setup_true_lang.js +23 -11
  19. package/dist/Components/Pagination/composables/usePagination.d.ts +3 -3
  20. package/dist/Components/Pagination/composables/usePagination.js +95 -84
  21. package/dist/Components/Pagination/pagination.types.d.ts +30 -2
  22. package/dist/Components/Resizable/Resizable.js +5 -0
  23. package/dist/Components/Resizable/Resizable.vue.d.ts +17 -0
  24. package/dist/Components/Resizable/Resizable.vue_vue_type_script_setup_true_lang.js +30 -0
  25. package/dist/Components/Resizable/composables/useResizable.d.ts +18 -0
  26. package/dist/Components/Resizable/composables/useResizable.js +195 -0
  27. package/dist/Components/Resizable/index.d.ts +4 -0
  28. package/dist/Components/Resizable/index.js +4 -0
  29. package/dist/Components/Resizable/resizable.types.d.ts +53 -0
  30. package/dist/Components/Resizable/resizableInjectionKey.d.ts +111 -0
  31. package/dist/Components/Resizable/resizableInjectionKey.js +4 -0
  32. package/dist/Components/ResizableHandle/ResizableHandle.js +5 -0
  33. package/dist/Components/ResizableHandle/ResizableHandle.vue.d.ts +14 -0
  34. package/dist/Components/ResizableHandle/ResizableHandle.vue_vue_type_script_setup_true_lang.js +31 -0
  35. package/dist/Components/ResizableHandle/composables/useResizableHandle.d.ts +35 -0
  36. package/dist/Components/ResizableHandle/composables/useResizableHandle.js +85 -0
  37. package/dist/Components/ResizableHandle/index.d.ts +3 -0
  38. package/dist/Components/ResizableHandle/index.js +3 -0
  39. package/dist/Components/ResizableHandle/resizableHandle.types.d.ts +58 -0
  40. package/dist/Components/ResizablePanel/ResizablePanel.js +5 -0
  41. package/dist/Components/ResizablePanel/ResizablePanel.vue.d.ts +24 -0
  42. package/dist/Components/ResizablePanel/ResizablePanel.vue_vue_type_script_setup_true_lang.js +39 -0
  43. package/dist/Components/ResizablePanel/composables/useResizablePanel.d.ts +21 -0
  44. package/dist/Components/ResizablePanel/composables/useResizablePanel.js +87 -0
  45. package/dist/Components/ResizablePanel/index.d.ts +3 -0
  46. package/dist/Components/ResizablePanel/index.js +3 -0
  47. package/dist/Components/ResizablePanel/resizablePanel.types.d.ts +71 -0
  48. package/dist/Components/Snackbar/composables/useSnackbar.js +140 -146
  49. package/dist/Components/Tooltip/Tooltip.vue_vue_type_script_setup_true_lang.js +4 -6
  50. package/dist/Utils/LoadingSpin.js +5 -0
  51. package/dist/Utils/LoadingSpin.vue.d.ts +3 -0
  52. package/dist/Utils/LoadingSpin.vue_vue_type_script_setup_true_lang.js +21 -0
  53. package/dist/augments.d.ts +15 -0
  54. package/dist/index.d.ts +6 -0
  55. package/dist/index.js +70 -63
  56. package/docs/README.md +1 -0
  57. package/docs/components/Chart.md +3 -1
  58. package/docs/components/DataTable.md +19 -0
  59. package/docs/components/Pagination.md +17 -5
  60. package/docs/components/Resizable.md +224 -0
  61. package/package.json +2 -2
@@ -1,12 +1,12 @@
1
- import { mergePartBind as e, resolveVnodeRefElement as t, useBridgeUIComponent as n, useBridgeUIMergedRegistryClasses as ee } from "../../../Utils/index.js";
2
- import { computed as r, nextTick as i, onBeforeUnmount as te, ref as a, toValue as ne, useAttrs as re, watch as o } from "vue";
3
- import { get as s } from "es-toolkit/compat";
4
- import { modalAlignProps as ie, modalBlurProps as ae, modalSizeProps as oe } from "@bridge-ui/core/Tokens";
5
- import { cn as c, mergeBridgeUILayeredClasses as l, splitComponentProps as se } from "@bridge-ui/core/Utils";
6
- import { createFocusTrap as ce, isModalBackdropClick as le } from "@bridge-ui/core/Runtime";
7
- import { LAYER_STACK_BASE_Z_INDEX as u, acquireLayerStackOrder as ue, countModalTransitionLayers as de, getLayerFocusTrapGuards as fe, getLayerStackEntry as d, getModalOverlayTransitionClass as f, getModalPanelTransitionClass as p, hasModalTransition as m, pushLayerStack as h, resolveEffectiveModalTransition as g, subscribeLayerStack as _ } from "@bridge-ui/core/Layer";
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 v = [
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 y(y, pe, b = {}) {
30
- let me = re(), x = a(!1), S = a(!1), C = a(""), w = a(null), T = !1, E = 0, D = null, O = null, k = null, A = null, j = a(u), M = a("closed"), N = r(() => ne(b.show ?? !1));
31
- function P(e) {
32
- e || b.onClose?.(), b.show && (b.show.value = e), b.onShowChange?.(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 F = r(() => se({
35
- bridgeKeys: v,
34
+ let P = n(() => u({
35
+ bridgeKeys: ye,
36
36
  props: {
37
- ...me,
38
- ...y
37
+ ..._,
38
+ ...m
39
39
  }
40
- })), { merged: I, entry: L } = n({
41
- libDefaults: pe,
40
+ })), { merged: F, entry: I } = ee({
41
+ libDefaults: h,
42
42
  componentName: "Modal",
43
- props: () => F.value.componentProps
44
- }), R = r(() => I.value.customProps), z = ee({
45
- entry: L,
46
- props: () => F.value.componentProps
47
- }), B = r(() => g(I.value.transition ?? "none")), V = r(() => m(B.value)), H = r(() => I.value.scroll ?? "body"), U = r(() => I.value.keepMounted && !x.value), he = r(() => {
48
- let e = l(ie, L.value?.tokens?.align);
49
- return s(e, I.value.align);
50
- }), ge = r(() => {
51
- let e = l(ae, L.value?.tokens?.blur);
52
- return s(e, I.value.blur);
53
- }), _e = r(() => {
54
- let e = l(oe, L.value?.tokens?.size);
55
- return s(e, I.value.size);
56
- }), ve = r(() => f(B.value)), ye = r(() => p(B.value)), W = r(() => !I.value.persistent), be = r(() => F.value.inheritedAttrs), xe = r(() => e(R.value?.root, be.value, {
57
- onTransitionend: Ee,
58
- style: { zIndex: j.value },
59
- "aria-hidden": U.value ? !0 : void 0,
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": H.value === "body",
63
- "overflow-hidden": H.value === "paper",
64
- "invisible pointer-events-none": U.value,
65
- [s(z.value, "root") ?? ""]: !0
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
- })), Se = r(() => e(R.value?.overlay, { onClick: Z }, {
67
+ })), De = n(() => e(L.value?.overlay, { onClick: Z }, {
68
68
  "data-modal-part": "overlay",
69
- "data-state": M.value,
69
+ "data-state": A.value,
70
70
  class: c({
71
71
  "fixed inset-0 bg-black/50": !0,
72
- [ge.value ?? ""]: !0,
73
- [ve.value]: V.value,
74
- [s(z.value, "overlay") ?? ""]: !0
72
+ [xe.value ?? ""]: !0,
73
+ [Ce.value]: B.value,
74
+ [o(R.value, "overlay") ?? ""]: !0
75
75
  })
76
- })), Ce = r(() => e(R.value?.wrapper, { onClick: Q }, c({
76
+ })), Oe = n(() => e(L.value?.wrapper, { onClick: Q }, c({
77
77
  "flex min-h-full w-full transform p-4": !0,
78
- [he.value ?? ""]: !0,
79
- [s(z.value, "wrapper") ?? ""]: !0
80
- }))), we = r(() => e(R.value?.panel, {
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": M.value,
85
+ "data-state": A.value,
86
86
  class: c({
87
87
  "relative w-full": !0,
88
- [_e.value ?? ""]: !0,
89
- "max-h-[calc(100dvh-2rem)] overflow-y-auto bridge-scroll-fade-y bridge-hide-scrollbar": H.value === "paper",
90
- [ye.value]: V.value,
91
- [s(z.value, "panel") ?? ""]: !0
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 G() {
95
- O?.release(), O = null;
94
+ function W() {
95
+ w?.release(), w = null;
96
96
  }
97
- function K() {
98
- if (!x.value || M.value !== "open" || !w.value) {
99
- G();
97
+ function G() {
98
+ if (!y.value || A.value !== "open" || !T.value) {
99
+ W();
100
100
  return;
101
101
  }
102
- k?.setContainer(w.value), G(), O = ce({
103
- container: w.value,
104
- disableAutoFocus: !I.value.autoFocus,
105
- disableEnforceFocus: I.value.disableEnforceFocus,
106
- disableRestoreFocus: I.value.disableRestoreFocus,
107
- ...fe(() => C.value)
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 q(e) {
111
- w.value = t(e), K();
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
- T && (T = !1, E = 0, x.value = !1, G(), N.value ? P(!1) : b.onShowChange?.(!1), M.value = "closed", I.value.keepMounted || (S.value = !1));
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 (k?.releaseScrollLock(), T = !0, !V.value) {
123
+ if (q(), E?.releaseScrollLock(), v = !0, !B.value) {
118
124
  J();
119
125
  return;
120
126
  }
121
- M.value = "closed", E = de(B.value, { hideBackdrop: I.value.hideBackdrop }), E === 0 && J();
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 Te() {
124
- if (T = !1, E = 0, !V.value) {
125
- M.value = "open";
135
+ function je() {
136
+ if (v = !1, K(), S = 0, !B.value) {
137
+ A.value = "open";
126
138
  return;
127
139
  }
128
- M.value = "closed", i(() => {
129
- requestAnimationFrame(() => {
130
- M.value = "open";
131
- });
140
+ A.value = "closed", q(), D = d(() => {
141
+ A.value = "open";
132
142
  });
133
143
  }
134
- function Ee(e) {
135
- if (!T || !S.value || M.value !== "closed") return;
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 && (--E, E <= 0 && J());
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 (W.value) {
141
- if (!V.value) {
142
- P(!1);
150
+ if (U.value) {
151
+ if (!B.value) {
152
+ N(!1);
143
153
  return;
144
154
  }
145
- S.value && Y();
155
+ b.value && Y();
146
156
  }
147
157
  }
148
158
  function Z() {
149
- I.value.closeOnOverlay !== !1 && W.value && X();
159
+ F.value.closeOnOverlay !== !1 && U.value && X();
150
160
  }
151
161
  function Q(e) {
152
- le(e) && Z();
162
+ ce(e) && Z();
153
163
  }
154
- function De() {
155
- N.value && I.value.closeOnEscape !== !1 && W.value && X();
164
+ function Ne() {
165
+ M.value && F.value.closeOnEscape !== !1 && U.value && X();
156
166
  }
157
- o(N, (e) => {
167
+ a(M, (e) => {
158
168
  if (e) {
159
- S.value = !0, x.value = !0, Te();
169
+ b.value = !0, y.value = !0, je();
160
170
  return;
161
171
  }
162
- S.value && Y();
163
- }, { immediate: !0 }), o([
164
- x,
165
- M,
166
- () => I.value.autoFocus,
167
- () => I.value.disableEnforceFocus,
168
- () => I.value.disableRestoreFocus
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
- i(() => {
171
- K();
180
+ r(() => {
181
+ G();
172
182
  });
173
183
  });
174
184
  function $() {
175
- let e = d(C.value);
176
- e && (j.value = e.zIndex);
185
+ let e = pe(x.value);
186
+ e && (O.value = e.zIndex);
177
187
  }
178
- return o(x, (e) => {
179
- e ? (D = ue(), k = h({
188
+ return a(y, (e) => {
189
+ e ? (C = ue(), E = ge({
180
190
  trapsFocus: !0,
181
- order: D,
182
- id: b.stackId,
183
- onEscape: De,
184
- container: w.value ?? void 0,
185
- lockScroll: I.value.disableScrollLock !== !0
186
- }), C.value = k.id, j.value = k.zIndex, $(), A = _($)) : (A?.(), A = null, k?.release(), k = null, D = null, C.value = "", j.value = u);
187
- }, { immediate: !0 }), te(() => {
188
- A?.(), A = null, G(), k?.release(), k = null;
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: I,
191
- mounted: S,
192
- rootBind: xe,
193
- panelBind: we,
194
- overlayBind: Se,
195
- wrapperBind: Ce,
196
- setPanelRef: q,
197
- layerStackId: C,
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 { y as useModal };
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: { type: Boolean },
28
- hasPrevious: { type: Boolean },
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: T, showPrev: E, showNext: D, rootBind: O, listBind: k, prevBind: A, nextBind: j, prevLabel: M, nextLabel: N, getItemBind: P, prevIconBind: F, nextIconBind: I, getEllipsisBind: L } = t(C, {
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(_(O))), [a("ul", f(l(_(k))), [
67
- _(E) ? (p(), i("li", y, [a("button", f(l(_(A))), [h(t.$slots, "prev", {}, () => [s(_(e), d({ icon: "chevronLeft" }, _(F)), null, 16), o(" " + g(_(M)), 1)])], 16)])) : r("", !0),
68
- (p(!0), i(n, null, m(_(T), (e, r) => (p(), i(n, { key: `${e.type}-${r}` }, [e.type === "ellipsis" ? (p(), i("li", d({
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
- }, _(L)(r)), [h(t.$slots, "ellipsis", {}, () => [c[0] ||= o("…", -1)])], 16)) : (p(), i("li", b, [a("button", d({ ref_for: !0 }, _(P)(e.page)), g(e.page), 17)]))], 64))), 128)),
72
- _(D) ? (p(), i("li", x, [a("button", f(l(_(j))), [h(t.$slots, "next", {}, () => [o(g(_(N)) + " ", 1), s(_(e), d({ icon: "chevronRight" }, _(I)), null, 16)])], 16)])) : r("", !0)
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, {}>>;