@soft-stech/bootsman-ui-shadcn 2.0.20 → 2.0.22

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 (45) hide show
  1. package/dist/BuiPaginationCommon.vue_vue_type_script_setup_true_lang-BOuWIF4c.js +179 -0
  2. package/dist/BuiScrollArea.vue_vue_type_script_setup_true_lang-lyWD8KAT.js +144 -0
  3. package/dist/{BuiScrollBar.vue_vue_type_script_setup_true_lang-cV0od8j0.js → BuiScrollBar.vue_vue_type_script_setup_true_lang-BCvjzEmb.js} +4 -4
  4. package/dist/BuiTable.vue_vue_type_script_setup_true_lang-BQRl7YR1.js +37 -0
  5. package/dist/{BuiTableEmpty.vue_vue_type_script_setup_true_lang-Da4qHIWo.js → BuiTableEmpty.vue_vue_type_script_setup_true_lang-CuffOAuP.js} +1 -1
  6. package/dist/BuiTableRow.vue_vue_type_script_setup_true_lang-BQnadEa7.js +51 -0
  7. package/dist/components/input/index.js +22 -22
  8. package/dist/components/pagination/BuiPaginationCommon.js +1 -1
  9. package/dist/components/pagination/BuiPaginationCommon.vue.d.ts +4 -0
  10. package/dist/components/pagination/index.js +1 -1
  11. package/dist/components/scroll-area/BuiScrollArea.js +1 -1
  12. package/dist/components/scroll-area/BuiScrollArea.vue.d.ts +256 -2
  13. package/dist/components/scroll-area/BuiScrollBar.js +1 -1
  14. package/dist/components/scroll-area/index.js +2 -2
  15. package/dist/components/table/BuiDataTable.vue.d.ts +9 -4
  16. package/dist/components/table/BuiTable.js +1 -1
  17. package/dist/components/table/BuiTable.vue.d.ts +1487 -2
  18. package/dist/components/table/BuiTableEmpty.js +1 -1
  19. package/dist/components/table/BuiTableRow.js +1 -1
  20. package/dist/components/table/index.d.ts +1 -0
  21. package/dist/components/table/index.js +726 -663
  22. package/dist/index.js +6 -6
  23. package/dist/lib/useGlobalCursor.d.ts +4 -0
  24. package/dist/lib/useGlobalCursor.js +15 -0
  25. package/dist/lib/useResizeColumns.d.ts +3812 -0
  26. package/dist/lib/useResizeColumns.js +97 -79
  27. package/dist/style.css +1 -1
  28. package/package.json +1 -1
  29. package/src/components/input/BuiInput.vue +1 -1
  30. package/src/components/pagination/BuiPaginationCommon.vue +16 -4
  31. package/src/components/scroll-area/BuiScrollArea.vue +9 -2
  32. package/src/components/scroll-area/BuiScrollBar.vue +4 -4
  33. package/src/components/table/BuiDataTable.vue +152 -34
  34. package/src/components/table/BuiTable.vue +12 -3
  35. package/src/components/table/BuiTableRow.vue +6 -0
  36. package/src/components/table/index.ts +2 -0
  37. package/src/lib/useGlobalCursor.ts +17 -0
  38. package/src/lib/useResizeColumns.ts +151 -42
  39. package/src/stories/BuiDataTable.stories.ts +13 -0
  40. package/src/stories/components/BuiDataTableStory.vue +4 -4
  41. package/src/stories/components/BuiDataTableWithScrollStory.vue +292 -0
  42. package/dist/BuiPaginationCommon.vue_vue_type_script_setup_true_lang-DhSRYKth.js +0 -170
  43. package/dist/BuiScrollArea.vue_vue_type_script_setup_true_lang-XkIzRs-G.js +0 -141
  44. package/dist/BuiTable.vue_vue_type_script_setup_true_lang-Dd_dkcy4.js +0 -30
  45. package/dist/BuiTableRow.vue_vue_type_script_setup_true_lang-BJk8Yk1B.js +0 -54
@@ -0,0 +1,179 @@
1
+ import { defineComponent as A, computed as h, createBlock as V, openBlock as x, unref as r, normalizeProps as w, guardReactiveProps as B, withCtx as p, renderSlot as E, mergeModels as L, useModel as I, createVNode as n, createElementVNode as S, createElementBlock as y, createCommentVNode as b, toDisplayString as _, createTextVNode as M, Fragment as R, renderList as k } from "vue";
2
+ import { BuiInput as z } from "./components/input/index.js";
3
+ import "vee-validate";
4
+ import { i as N, P as q } from "./PaginationRoot-Xehp56La.js";
5
+ import { u as U } from "./useForwardExpose-DmyWSR4F.js";
6
+ import { P as j } from "./Primitive-EBuBc72_.js";
7
+ import "@vueuse/core";
8
+ import "./colorUtils-BgA4kYw8.js";
9
+ import { _ as C } from "./BuiSelect.vue_vue_type_script_setup_true_lang-BYtbdIZS.js";
10
+ import { _ as F } from "./BuiSelectValue.vue_vue_type_script_setup_true_lang-C3SieHyq.js";
11
+ import { _ as D } from "./BuiSelectTrigger.vue_vue_type_script_setup_true_lang-YgwOKyQg.js";
12
+ import { _ as T } from "./BuiSelectContent.vue_vue_type_script_setup_true_lang-DedLPTOu.js";
13
+ import { _ as $ } from "./BuiSelectItem.vue_vue_type_script_setup_true_lang-LEr6XwVT.js";
14
+ import { _ as G } from "./BuiPaginationFirst.vue_vue_type_script_setup_true_lang-CQIWuH4J.js";
15
+ import { _ as H } from "./BuiPaginationLast.vue_vue_type_script_setup_true_lang-DPHBc8bO.js";
16
+ import { _ as J } from "./BuiPaginationNext.vue_vue_type_script_setup_true_lang-CiVMJM-x.js";
17
+ import { _ as K } from "./BuiPaginationPrev.vue_vue_type_script_setup_true_lang-C95kepR5.js";
18
+ function d(a, o) {
19
+ const e = o - a + 1;
20
+ return Array.from({ length: e }, (m, u) => u + a);
21
+ }
22
+ function O(a) {
23
+ return a.map((o) => typeof o == "number" ? {
24
+ type: "page",
25
+ value: o
26
+ } : { type: "ellipsis" });
27
+ }
28
+ const v = "ellipsis";
29
+ function Q(a, o, e, m) {
30
+ const t = o, g = Math.max(a - e, 1), f = Math.min(a + e, t);
31
+ if (m) {
32
+ const i = Math.min(2 * e + 5, o) - 2, c = g > 3 && Math.abs(t - i - 1 + 1) > 2 && Math.abs(g - 1) > 2, l = f < t - 2 && Math.abs(t - i) > 2 && Math.abs(t - f) > 2;
33
+ if (!c && l)
34
+ return [
35
+ ...d(1, i),
36
+ v,
37
+ t
38
+ ];
39
+ if (c && !l) {
40
+ const P = d(t - i + 1, t);
41
+ return [
42
+ 1,
43
+ v,
44
+ ...P
45
+ ];
46
+ }
47
+ if (c && l) {
48
+ const P = d(g, f);
49
+ return [
50
+ 1,
51
+ v,
52
+ ...P,
53
+ v,
54
+ t
55
+ ];
56
+ }
57
+ return d(1, t);
58
+ } else {
59
+ const s = e * 2 + 1;
60
+ return o < s ? d(1, t) : a <= e + 1 ? d(1, s) : o - a <= e ? d(o - s + 1, t) : d(g, f);
61
+ }
62
+ }
63
+ var W = /* @__PURE__ */ A({
64
+ __name: "PaginationList",
65
+ props: {
66
+ asChild: {
67
+ type: Boolean,
68
+ required: !1
69
+ },
70
+ as: {
71
+ type: null,
72
+ required: !1
73
+ }
74
+ },
75
+ setup(a) {
76
+ const o = a;
77
+ U();
78
+ const e = N(), m = h(() => O(Q(e.page.value, e.pageCount.value, e.siblingCount.value, e.showEdges.value)));
79
+ return (u, t) => (x(), V(r(j), w(B(o)), {
80
+ default: p(() => [E(u.$slots, "default", { items: m.value })]),
81
+ _: 3
82
+ }, 16));
83
+ }
84
+ }), X = W;
85
+ const Y = { class: "text-muted-foreground text-sm" }, Z = { class: "text-muted-foreground text-sm" }, ve = /* @__PURE__ */ A({
86
+ __name: "BuiPaginationCommon",
87
+ props: /* @__PURE__ */ L({
88
+ total: {},
89
+ translations: {}
90
+ }, {
91
+ pageSize: { default: 10, required: !0 },
92
+ pageSizeModifiers: {},
93
+ pageIndex: { default: 1, required: !0 },
94
+ pageIndexModifiers: {},
95
+ pageAuto: { type: Boolean, default: !1, required: !0 },
96
+ pageAutoModifiers: {}
97
+ }),
98
+ emits: ["update:pageSize", "update:pageIndex", "update:pageAuto"],
99
+ setup(a) {
100
+ const o = [10, 20, 30, 40, 50], e = a, m = I(a, "pageSize"), u = I(a, "pageIndex"), t = I(a, "pageAuto"), g = h(() => Math.ceil(e.total / m.value)), f = h({
101
+ get() {
102
+ return t.value ? e.translations?.itemsPerPageAuto || "Auto" : String(m.value);
103
+ },
104
+ set(s) {
105
+ t.value = s === "auto", s === "auto" ? u.value = 1 : m.value = parseInt(s);
106
+ }
107
+ });
108
+ return (s, i) => (x(), V(r(q), {
109
+ total: e.total,
110
+ itemsPerPage: m.value,
111
+ page: u.value,
112
+ "onUpdate:page": i[2] || (i[2] = (c) => u.value = c)
113
+ }, {
114
+ default: p(({ page: c }) => [
115
+ n(r(X), { class: "relative flex items-center justify-center gap-2" }, {
116
+ default: p(() => [
117
+ S("p", Y, _(s.translations?.itemsPerPage || "Items per page"), 1),
118
+ n(r(C), {
119
+ modelValue: f.value,
120
+ "onUpdate:modelValue": i[0] || (i[0] = (l) => f.value = l)
121
+ }, {
122
+ default: p(() => [
123
+ n(r(D), { class: "mr-2 w-[70px]" }, {
124
+ default: p(() => [
125
+ n(r(F), { placeholder: f.value }, null, 8, ["placeholder"])
126
+ ]),
127
+ _: 1
128
+ }),
129
+ n(r(T), { side: "top" }, {
130
+ default: p(() => [
131
+ n(r($), {
132
+ key: "auto",
133
+ value: "auto"
134
+ }, {
135
+ default: p(() => [
136
+ M(_(e.translations?.itemsPerPageAuto || "Auto"), 1)
137
+ ]),
138
+ _: 1
139
+ }),
140
+ (x(), y(R, null, k(o, (l) => n(r($), {
141
+ key: l,
142
+ value: l.toString()
143
+ }, {
144
+ default: p(() => [
145
+ M(_(l), 1)
146
+ ]),
147
+ _: 2
148
+ }, 1032, ["value"])), 64))
149
+ ]),
150
+ _: 1
151
+ })
152
+ ]),
153
+ _: 1
154
+ }, 8, ["modelValue"]),
155
+ !t.value && g.value > 1 ? (x(), y(R, { key: 0 }, [
156
+ S("p", Z, _(s.translations?.page || "Page") + " " + _(c) + " " + _(s.translations?.of || "of") + " " + _(g.value), 1),
157
+ n(r(G)),
158
+ n(r(K)),
159
+ n(r(z), {
160
+ modelValue: u.value,
161
+ "onUpdate:modelValue": i[1] || (i[1] = (l) => u.value = l),
162
+ class: "w-28",
163
+ placeholder: "Page number"
164
+ }, null, 8, ["modelValue"]),
165
+ n(r(J)),
166
+ n(r(H))
167
+ ], 64)) : b("", !0)
168
+ ]),
169
+ _: 2
170
+ }, 1024)
171
+ ]),
172
+ _: 1
173
+ }, 8, ["total", "itemsPerPage", "page"]));
174
+ }
175
+ });
176
+ export {
177
+ X as P,
178
+ ve as _
179
+ };
@@ -0,0 +1,144 @@
1
+ import { defineComponent as f, ref as d, computed as p, watch as S, createBlock as C, createCommentVNode as k, openBlock as v, unref as r, mergeProps as _, withCtx as u, renderSlot as h, toRefs as E, onMounted as $, createElementBlock as V, Fragment as B, createElementVNode as R, createVNode as i, normalizeStyle as W, createTextVNode as X } from "vue";
2
+ import { i as w, S as H, _ as N } from "./BuiScrollBar.vue_vue_type_script_setup_true_lang-BCvjzEmb.js";
3
+ import { u as x } from "./useForwardExpose-DmyWSR4F.js";
4
+ import { P as b } from "./Primitive-EBuBc72_.js";
5
+ import { useResizeObserver as A } from "@vueuse/core";
6
+ import { u as Y } from "./useNonce-DM9DidHz.js";
7
+ import { g as q } from "./utils-DhVytAXN.js";
8
+ var P = /* @__PURE__ */ f({
9
+ __name: "ScrollAreaCornerImpl",
10
+ setup(c) {
11
+ const e = w(), t = d(0), l = d(0), n = p(() => !!t.value && !!l.value);
12
+ function o() {
13
+ const s = e.scrollbarX.value?.offsetHeight || 0;
14
+ e.onCornerHeightChange(s), l.value = s;
15
+ }
16
+ function a() {
17
+ const s = e.scrollbarY.value?.offsetWidth || 0;
18
+ e.onCornerWidthChange(s), t.value = s;
19
+ }
20
+ return A(e.scrollbarX.value, o), A(e.scrollbarY.value, a), S(() => e.scrollbarX.value, o), S(() => e.scrollbarY.value, a), (s, y) => n.value ? (v(), C(r(b), _({
21
+ key: 0,
22
+ style: {
23
+ width: `${t.value}px`,
24
+ height: `${l.value}px`,
25
+ position: "absolute",
26
+ right: r(e).dir.value === "ltr" ? 0 : void 0,
27
+ left: r(e).dir.value === "rtl" ? 0 : void 0,
28
+ bottom: 0
29
+ }
30
+ }, s.$parent?.$props), {
31
+ default: u(() => [h(s.$slots, "default")]),
32
+ _: 3
33
+ }, 16, ["style"])) : k("v-if", !0);
34
+ }
35
+ }), z = P, I = /* @__PURE__ */ f({
36
+ __name: "ScrollAreaCorner",
37
+ props: {
38
+ asChild: {
39
+ type: Boolean,
40
+ required: !1
41
+ },
42
+ as: {
43
+ type: null,
44
+ required: !1
45
+ }
46
+ },
47
+ setup(c) {
48
+ const e = c, { forwardRef: t } = x(), l = w(), n = p(() => !!l.scrollbarX.value && !!l.scrollbarY.value), o = p(() => l.type.value !== "scroll" && n.value);
49
+ return (a, s) => o.value ? (v(), C(z, _({ key: 0 }, e, { ref: r(t) }), {
50
+ default: u(() => [h(a.$slots, "default")]),
51
+ _: 3
52
+ }, 16)) : k("v-if", !0);
53
+ }
54
+ }), F = I, j = /* @__PURE__ */ f({
55
+ inheritAttrs: !1,
56
+ __name: "ScrollAreaViewport",
57
+ props: {
58
+ nonce: {
59
+ type: String,
60
+ required: !1
61
+ },
62
+ asChild: {
63
+ type: Boolean,
64
+ required: !1
65
+ },
66
+ as: {
67
+ type: null,
68
+ required: !1
69
+ }
70
+ },
71
+ setup(c, { expose: e }) {
72
+ const t = c, { nonce: l } = E(t), n = Y(l), o = w(), a = d();
73
+ $(() => {
74
+ o.onViewportChange(a.value), o.onContentChange(y.value);
75
+ }), e({ viewportElement: a });
76
+ const { forwardRef: s, currentElement: y } = x();
77
+ return (m, g) => (v(), V(B, null, [R("div", _({
78
+ ref_key: "viewportElement",
79
+ ref: a,
80
+ "data-reka-scroll-area-viewport": "",
81
+ style: {
82
+ overflowX: r(o).scrollbarXEnabled.value ? "scroll" : "hidden",
83
+ overflowY: r(o).scrollbarYEnabled.value ? "scroll" : "hidden"
84
+ }
85
+ }, m.$attrs, { tabindex: 0 }), [i(r(b), {
86
+ ref: r(s),
87
+ style: W({ minWidth: r(o).scrollbarXEnabled.value ? "fit-content" : void 0 }),
88
+ "as-child": t.asChild,
89
+ as: m.as
90
+ }, {
91
+ default: u(() => [h(m.$slots, "default")]),
92
+ _: 3
93
+ }, 8, [
94
+ "style",
95
+ "as-child",
96
+ "as"
97
+ ])], 16), i(r(b), {
98
+ as: "style",
99
+ nonce: r(n)
100
+ }, {
101
+ default: u(() => g[0] || (g[0] = [X(" /* Hide scrollbars cross-browser and enable momentum scroll for touch devices */ [data-reka-scroll-area-viewport] { scrollbar-width:none; -ms-overflow-style:none; -webkit-overflow-scrolling:touch; } [data-reka-scroll-area-viewport]::-webkit-scrollbar { display:none; } ")])),
102
+ _: 1,
103
+ __: [0]
104
+ }, 8, ["nonce"])], 64));
105
+ }
106
+ }), D = j;
107
+ const Q = /* @__PURE__ */ f({
108
+ __name: "BuiScrollArea",
109
+ props: {
110
+ type: {},
111
+ dir: {},
112
+ scrollHideDelay: {},
113
+ asChild: { type: Boolean },
114
+ as: {},
115
+ class: {}
116
+ },
117
+ setup(c, { expose: e }) {
118
+ const t = c, l = p(() => {
119
+ const { class: o, ...a } = t;
120
+ return a;
121
+ }), n = d(null);
122
+ return e({ tableWrapperRef: n }), (o, a) => (v(), C(r(H), _({
123
+ ref_key: "tableWrapperRef",
124
+ ref: n
125
+ }, l.value, {
126
+ class: r(q)("relative overflow-hidden", t.class)
127
+ }), {
128
+ default: u(() => [
129
+ i(r(D), { class: "h-full w-full rounded-[inherit]" }, {
130
+ default: u(() => [
131
+ h(o.$slots, "default")
132
+ ]),
133
+ _: 3
134
+ }),
135
+ i(N),
136
+ i(r(F))
137
+ ]),
138
+ _: 3
139
+ }, 16, ["class"]));
140
+ }
141
+ });
142
+ export {
143
+ Q as _
144
+ };
@@ -600,14 +600,14 @@ const qe = /* @__PURE__ */ y({
600
600
  });
601
601
  return (r, t) => (_(), S(c(Ce), P(l.value, {
602
602
  class: c(ne)(
603
- "z-2 flex touch-none select-none transition-colors",
604
- r.orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-px",
605
- r.orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-px",
603
+ "z-10 flex touch-none transition-colors select-none",
604
+ e.orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-px",
605
+ e.orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-px",
606
606
  e.class
607
607
  )
608
608
  }), {
609
609
  default: b(() => [
610
- k(c(Re), { class: "relative flex-1 rounded-full bg-border" })
610
+ k(c(Re), { class: "bg-border relative flex-1 rounded-full" })
611
611
  ]),
612
612
  _: 1
613
613
  }, 16, ["class"]));
@@ -0,0 +1,37 @@
1
+ import { defineComponent as i, ref as s, createBlock as m, openBlock as d, unref as e, withCtx as p, renderSlot as t, createElementVNode as a, createVNode as _, normalizeClass as u } from "vue";
2
+ import { _ as b } from "./BuiScrollArea.vue_vue_type_script_setup_true_lang-lyWD8KAT.js";
3
+ import { _ as h } from "./BuiScrollBar.vue_vue_type_script_setup_true_lang-BCvjzEmb.js";
4
+ import { g as w } from "./utils-DhVytAXN.js";
5
+ const x = { class: "flex min-h-[90px] w-full grow flex-col" }, v = /* @__PURE__ */ i({
6
+ __name: "BuiTable",
7
+ props: {
8
+ class: {}
9
+ },
10
+ setup(n, { expose: c }) {
11
+ const f = n, o = s(void 0), r = s(null);
12
+ return c({ tableRef: o, scrollAreaElementRef: r }), (l, k) => (d(), m(e(b), {
13
+ ref_key: "scrollAreaElementRef",
14
+ ref: r,
15
+ class: "border-border/16 w-full grow overflow-auto rounded-sm border",
16
+ "scroll-hide-delay": 100
17
+ }, {
18
+ default: p(() => [
19
+ t(l.$slots, "columnVisibility"),
20
+ a("div", x, [
21
+ a("table", {
22
+ ref_key: "tableRef",
23
+ ref: o,
24
+ class: u(e(w)("h-full caption-top text-sm", f.class))
25
+ }, [
26
+ t(l.$slots, "default")
27
+ ], 2)
28
+ ]),
29
+ _(e(h), { orientation: "horizontal" })
30
+ ]),
31
+ _: 3
32
+ }, 512));
33
+ }
34
+ });
35
+ export {
36
+ v as _
37
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as a, createBlock as n, openBlock as r, withCtx as s, createVNode as c, normalizeClass as l, unref as p, createElementVNode as f, renderSlot as m } from "vue";
2
- import { _ as i } from "./BuiTableRow.vue_vue_type_script_setup_true_lang-BJk8Yk1B.js";
2
+ import { _ as i } from "./BuiTableRow.vue_vue_type_script_setup_true_lang-BQnadEa7.js";
3
3
  import { _ } from "./BuiTableCell.vue_vue_type_script_setup_true_lang-BzFROkZg.js";
4
4
  import { g as u } from "./utils-DhVytAXN.js";
5
5
  const d = { class: "flex items-center justify-center py-10" }, C = /* @__PURE__ */ a({
@@ -0,0 +1,51 @@
1
+ import { defineComponent as $, createBlock as p, createElementBlock as b, openBlock as l, unref as o, withCtx as d, createVNode as c, renderSlot as a, createElementVNode as w, mergeProps as m } from "vue";
2
+ import { _ as v } from "./BuiContextMenu.vue_vue_type_script_setup_true_lang-CGtCNQsI.js";
3
+ import { _ as k } from "./BuiContextMenuTrigger.vue_vue_type_script_setup_true_lang-hfu_w_27.js";
4
+ import { g as i } from "./utils-DhVytAXN.js";
5
+ const g = ["data-row-state"], B = ["data-row-state"], E = /* @__PURE__ */ $({
6
+ inheritAttrs: !1,
7
+ __name: "BuiTableRow",
8
+ props: {
9
+ class: {}
10
+ },
11
+ emits: ["mouseenter", "mouseleave"],
12
+ setup(u, { emit: f }) {
13
+ const n = u, s = f;
14
+ return (e, t) => e.$slots.actions ? (l(), p(o(v), { key: 0 }, {
15
+ default: d(() => [
16
+ c(o(k), { "as-child": "" }, {
17
+ default: d(() => [
18
+ w("tr", m({
19
+ class: o(i)(
20
+ "border-border/8 data-[row-state=selected]:bg-accent/8 border-b transition-colors",
21
+ n.class
22
+ ),
23
+ "data-row-state": e.$attrs["data-row-state"],
24
+ onMouseenter: t[0] || (t[0] = (r) => s("mouseenter")),
25
+ onMouseleave: t[1] || (t[1] = (r) => s("mouseleave"))
26
+ }, e.$attrs), [
27
+ a(e.$slots, "default")
28
+ ], 16, g)
29
+ ]),
30
+ _: 3
31
+ }),
32
+ a(e.$slots, "actions")
33
+ ]),
34
+ _: 3
35
+ })) : (l(), b("tr", m({
36
+ key: 1,
37
+ class: o(i)(
38
+ "border-border/8 data-[row-state=selected]:bg-accent/8 border-b transition-colors",
39
+ n.class
40
+ ),
41
+ "data-row-state": e.$attrs["data-row-state"],
42
+ onMouseenter: t[2] || (t[2] = (r) => s("mouseenter")),
43
+ onMouseleave: t[3] || (t[3] = (r) => s("mouseleave"))
44
+ }, e.$attrs), [
45
+ a(e.$slots, "default")
46
+ ], 16, B));
47
+ }
48
+ });
49
+ export {
50
+ E as _
51
+ };
@@ -1,5 +1,5 @@
1
1
  import { h as B, F as O, g as _, _ as R, j as S } from "../../utils-DhVytAXN.js";
2
- import { defineComponent as x, inject as z, toRef as A, ref as v, useTemplateRef as X, createElementBlock as w, withDirectives as E, openBlock as i, createBlock as g, createCommentVNode as T, createElementVNode as h, unref as a, normalizeClass as k, isRef as F, vModelText as G, withCtx as y, createVNode as n, vModelDynamic as H, computed as $, mergeProps as D, createTextVNode as K, toDisplayString as L, mergeModels as Y, useModel as q, watch as I, normalizeStyle as M } from "vue";
2
+ import { defineComponent as x, inject as z, toRef as A, ref as v, useTemplateRef as X, createElementBlock as w, withDirectives as E, openBlock as d, createBlock as g, createCommentVNode as T, createElementVNode as h, unref as a, normalizeClass as k, isRef as F, vModelText as G, withCtx as y, createVNode as n, vModelDynamic as H, computed as $, mergeProps as D, createTextVNode as K, toDisplayString as L, mergeModels as Y, useModel as q, watch as I, normalizeStyle as M } from "vue";
3
3
  import { useVModel as J, useElementBounding as U } from "@vueuse/core";
4
4
  import { c as Q, d as P } from "../../colorUtils-BgA4kYw8.js";
5
5
  import { BuiBadge as W } from "../badge/index.js";
@@ -70,7 +70,7 @@ const re = B("palette", [
70
70
  ]), ne = {
71
71
  key: 0,
72
72
  class: "group relative flex flex-row items-center"
73
- }, ie = ["readonly", "disabled", "placeholder"], de = ["readonly", "disabled", "placeholder", "type"], C = /* @__PURE__ */ x({
73
+ }, de = ["readonly", "disabled", "placeholder"], ie = ["readonly", "disabled", "placeholder", "type"], C = /* @__PURE__ */ x({
74
74
  __name: "BuiInput",
75
75
  props: {
76
76
  defaultValue: {},
@@ -83,8 +83,8 @@ const re = B("palette", [
83
83
  type: {}
84
84
  },
85
85
  emits: ["update:modelValue"],
86
- setup(d, { emit: o }) {
87
- const e = d, t = J(e, "modelValue", o, {
86
+ setup(i, { emit: o }) {
87
+ const e = i, t = J(e, "modelValue", o, {
88
88
  passive: !0,
89
89
  defaultValue: e.defaultValue
90
90
  }), u = z(O, A(!1)), l = v(!1), s = X("searchInput"), c = () => {
@@ -96,7 +96,7 @@ const re = B("palette", [
96
96
  }, j = () => {
97
97
  s.value && (s.value.focus(), t.value = "");
98
98
  };
99
- return (m, b) => e.type === "search" ? (i(), w("div", ne, [
99
+ return (m, b) => e.type === "search" ? (d(), w("div", ne, [
100
100
  E(h("input", {
101
101
  ref_key: "searchInput",
102
102
  ref: s,
@@ -116,13 +116,13 @@ const re = B("palette", [
116
116
  onFocus: c,
117
117
  onBlur: r,
118
118
  onKeydown: f
119
- }, null, 42, ie), [
119
+ }, null, 42, de), [
120
120
  [G, a(t)]
121
121
  ]),
122
- a(t) && a(t).toString().length > 0 ? (i(), g(R, {
122
+ a(t) && a(t).toString().length > 0 ? (d(), g(R, {
123
123
  key: 0,
124
124
  variant: "none",
125
- class: "hover:text-primary text-foreground invisible absolute top-2 right-2 h-fit w-fit p-[1px] group-hover:visible",
125
+ class: "hover:text-primary text-foreground absolute top-2 right-2 h-fit w-fit p-[1px]",
126
126
  onClick: j
127
127
  }, {
128
128
  default: y(() => [
@@ -133,7 +133,7 @@ const re = B("palette", [
133
133
  ]),
134
134
  _: 1
135
135
  })) : T("", !0)
136
- ])) : E((i(), w("input", {
136
+ ])) : E((d(), w("input", {
137
137
  key: 1,
138
138
  "onUpdate:modelValue": b[1] || (b[1] = (V) => F(t) ? t.value = V : null),
139
139
  class: k(a(_)(a(N)({ variant: m.variant }), e.class ?? "")),
@@ -144,7 +144,7 @@ const re = B("palette", [
144
144
  onFocus: c,
145
145
  onBlur: r,
146
146
  onKeydown: f
147
- }, null, 42, de)), [
147
+ }, null, 42, ie)), [
148
148
  [H, a(t)]
149
149
  ]);
150
150
  }
@@ -156,13 +156,13 @@ const re = B("palette", [
156
156
  showPasswordTranslation: {},
157
157
  hidePasswordTranslation: {}
158
158
  },
159
- setup(d) {
160
- const o = d, e = v(o.defaultValue ?? "password");
159
+ setup(i) {
160
+ const o = i, e = v(o.defaultValue ?? "password");
161
161
  function p() {
162
162
  e.value === "password" ? e.value = "text" : e.value = "password";
163
163
  }
164
164
  const t = $(() => o.showPasswordTranslation ?? "Show password"), u = $(() => o.hidePasswordTranslation ?? "Hide password");
165
- return (l, s) => (i(), w("div", ue, [
165
+ return (l, s) => (d(), w("div", ue, [
166
166
  n(a(C), D(l.$attrs, {
167
167
  type: e.value,
168
168
  class: a(_)(l.$attrs.class ?? "", "pr-8")
@@ -175,10 +175,10 @@ const re = B("palette", [
175
175
  "aria-pressed": e.value !== "password"
176
176
  }, {
177
177
  default: y(() => [
178
- e.value === "password" ? (i(), g(a(se), {
178
+ e.value === "password" ? (d(), g(a(se), {
179
179
  key: 0,
180
180
  class: "pointer-events-none h-4 w-4 shrink-0 cursor-pointer"
181
- })) : (i(), g(a(oe), {
181
+ })) : (d(), g(a(oe), {
182
182
  key: 1,
183
183
  class: "pointer-events-none h-4 w-4 shrink-0 cursor-pointer"
184
184
  }))
@@ -193,13 +193,13 @@ const re = B("palette", [
193
193
  props: {
194
194
  badge: {}
195
195
  },
196
- setup(d) {
197
- const o = d, e = v(null), { width: p } = U(e);
198
- return (t, u) => (i(), w("div", ce, [
196
+ setup(i) {
197
+ const o = i, e = v(null), { width: p } = U(e);
198
+ return (t, u) => (d(), w("div", ce, [
199
199
  n(a(C), D(t.$attrs, {
200
200
  style: { paddingRight: a(p) + pe + "px" }
201
201
  }), null, 16, ["style"]),
202
- o.badge ? (i(), g(W, {
202
+ o.badge ? (d(), g(W, {
203
203
  key: 0,
204
204
  ref_key: "badgeEl",
205
205
  ref: e,
@@ -224,13 +224,13 @@ const re = B("palette", [
224
224
  modelModifiers: {}
225
225
  }),
226
226
  emits: ["update:modelValue"],
227
- setup(d) {
228
- const o = d, e = q(d, "modelValue", void 0), p = v(null), { width: t } = U(p), u = () => e.value && P.test(e.value) ? e.value : o.defaultValue && P.test(o.defaultValue) ? o.defaultValue : "#FFFFFF", l = v(u().substring(1)), s = v(u());
227
+ setup(i) {
228
+ const o = i, e = q(i, "modelValue", void 0), p = v(null), { width: t } = U(p), u = () => e.value && P.test(e.value) ? e.value : o.defaultValue && P.test(o.defaultValue) ? o.defaultValue : "#FFFFFF", l = v(u().substring(1)), s = v(u());
229
229
  return I(l, () => {
230
230
  Q.test(l.value) && (e.value = `#${l.value}`, s.value = `#${l.value}`);
231
231
  }), I(s, () => {
232
232
  e.value = s.value, l.value = s.value.substring(1);
233
- }), (c, r) => (i(), g(a(Z), null, {
233
+ }), (c, r) => (d(), g(a(Z), null, {
234
234
  default: y(() => [
235
235
  n(a(ee), null, {
236
236
  default: y(() => [
@@ -1,4 +1,4 @@
1
- import { _ as f } from "../../BuiPaginationCommon.vue_vue_type_script_setup_true_lang-DhSRYKth.js";
1
+ import { _ as f } from "../../BuiPaginationCommon.vue_vue_type_script_setup_true_lang-BOuWIF4c.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -4,6 +4,7 @@ type __VLS_Props = {
4
4
  total: number;
5
5
  translations?: {
6
6
  itemsPerPage: string;
7
+ itemsPerPageAuto: string;
7
8
  page: string;
8
9
  of: string;
9
10
  };
@@ -11,12 +12,15 @@ type __VLS_Props = {
11
12
  type __VLS_PublicProps = {
12
13
  'pageSize': PageSize;
13
14
  'pageIndex': number;
15
+ 'pageAuto': boolean | undefined;
14
16
  } & __VLS_Props;
15
17
  declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
16
18
  "update:pageSize": (value: 10 | 20 | 50 | 30 | 40) => any;
17
19
  "update:pageIndex": (value: number) => any;
20
+ "update:pageAuto": (value: boolean | undefined) => any;
18
21
  }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
19
22
  "onUpdate:pageSize"?: ((value: 10 | 20 | 50 | 30 | 40) => any) | undefined;
20
23
  "onUpdate:pageIndex"?: ((value: number) => any) | undefined;
24
+ "onUpdate:pageAuto"?: ((value: boolean | undefined) => any) | undefined;
21
25
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
22
26
  export default _default;
@@ -1,4 +1,4 @@
1
- import { _ as o, P as t } from "../../BuiPaginationCommon.vue_vue_type_script_setup_true_lang-DhSRYKth.js";
1
+ import { _ as o, P as t } from "../../BuiPaginationCommon.vue_vue_type_script_setup_true_lang-BOuWIF4c.js";
2
2
  import { _ as r } from "../../BuiPaginationFirst.vue_vue_type_script_setup_true_lang-CQIWuH4J.js";
3
3
  import { _ as P } from "../../BuiPaginationLast.vue_vue_type_script_setup_true_lang-DPHBc8bO.js";
4
4
  import { _ as m } from "../../BuiPaginationNext.vue_vue_type_script_setup_true_lang-CiVMJM-x.js";
@@ -1,4 +1,4 @@
1
- import { _ as f } from "../../BuiScrollArea.vue_vue_type_script_setup_true_lang-XkIzRs-G.js";
1
+ import { _ as f } from "../../BuiScrollArea.vue_vue_type_script_setup_true_lang-lyWD8KAT.js";
2
2
  export {
3
3
  f as default
4
4
  };