@bridge-ui/vue 0.17.1 → 0.17.3

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.
@@ -193,7 +193,7 @@ function _(p, _, v, y) {
193
193
  }))), Pe = r(() => n(T.value?.end, {}, g({
194
194
  "flex min-w-72 flex-1 flex-col px-2.5 pb-2.5": !0,
195
195
  [E.value.end ?? ""]: !0
196
- }))), Fe = r(() => g({ "absolute inset-0 z-10 flex flex-col bg-white p-2.5 dark:bg-dark-900": !0 })), Z = r(() => n(T.value?.selector, {
196
+ }))), Fe = r(() => g({ "absolute inset-0 z-10 flex flex-col bg-white p-2.5 dark:bg-dark-800": !0 })), Z = r(() => n(T.value?.selector, {
197
197
  type: "button",
198
198
  disabled: C.value.disabled
199
199
  }, g({
@@ -66,7 +66,7 @@ function g(g, _) {
66
66
  class: p({
67
67
  "pointer-events-none absolute z-20 flex min-w-32 flex-col": !0,
68
68
  "rounded-md border border-dark-200 bg-white text-dark-700 shadow-lg": !0,
69
- "dark:border-dark-700 dark:bg-dark-900 dark:text-dark-100": !0,
69
+ "dark:border-dark-700 dark:bg-dark-800 dark:text-dark-100": !0,
70
70
  [y.value.tokenClasses.tooltip ?? ""]: !0,
71
71
  [c(w.value, "root") ?? ""]: !0
72
72
  })
@@ -111,7 +111,7 @@ function E(f, E, D, O) {
111
111
  let t = e.shiftKey ? .1 : .01;
112
112
  e.key === "ArrowLeft" || e.key === "ArrowDown" ? (e.preventDefault(), Z({ a: z.value.a - t })) : (e.key === "ArrowRight" || e.key === "ArrowUp") && (e.preventDefault(), Z({ a: z.value.a + t }));
113
113
  }, me = a(() => t(P.value?.root, F.value, x({
114
- "flex flex-col overflow-hidden bg-white shadow-lg dark:bg-dark-900": !0,
114
+ "flex flex-col overflow-hidden bg-white shadow-lg dark:bg-dark-800": !0,
115
115
  "w-full": M.value.fill,
116
116
  "w-72": !M.value.fill,
117
117
  [K.value]: !0,
@@ -26,7 +26,7 @@ import { cn as D } from "@bridge-ui/core/Utils";
26
26
  //#region src/Components/DataTable/DataTable.vue?vue&type=script&setup=true&lang.ts
27
27
  var ye = { class: "min-w-0 flex-1" }, be = { class: "flex shrink-0 items-center gap-2" }, xe = {
28
28
  key: 0,
29
- class: "inline-flex items-center rounded-lg border border-dark-200 bg-white p-0.5 dark:border-dark-700 dark:bg-dark-900"
29
+ class: "inline-flex items-center rounded-lg border border-dark-200 bg-white p-0.5 dark:border-dark-700 dark:bg-dark-800"
30
30
  }, O = { class: "relative" }, k = {
31
31
  key: 1,
32
32
  class: "flex w-full min-w-0 items-center gap-1.5"
@@ -128,7 +128,7 @@ var ye = { class: "min-w-0 flex-1" }, be = { class: "flex shrink-0 items-center
128
128
  "update:columnSearch"
129
129
  ],
130
130
  setup(m) {
131
- let g = m, N = ve(), P = e(), F = T(m, "page"), ke = T(m, "perPage"), I = T(m, "search"), Ae = T(m, "expanded"), je = T(m, "selection"), Me = T(m, "cursor"), Ne = T(m, "filters"), Pe = T(m, "sorting"), Fe = T(m, "hiddenColumns"), Ie = T(m, "columnSearch"), { merged: L, rowViews: Le, rootBind: Re, emptyBind: ze, showEmpty: R, frameBind: Be, showPager: Ve, tableProps: He, footerBind: Ue, loadingBar: z, showSearch: B, getHeadBind: We, headerViews: Ge, loadingBind: Ke, onToggleRow: qe, toolbarBind: Je, getCellBind: V, columnCount: H, cursorPaged: Ye, showPerPage: Xe, showToolbar: Ze, selectedBind: Qe, showSelected: $e, getHeadAlign: et, getCellAlign: U, onTogglePage: tt, onToggleSort: nt, summaryCells: W, showFooterBar: rt, expandEnabled: it, loadingBarBind: at, paginationBind: ot, selectAllState: G, onChangeSearch: st, onToggleExpand: ct, visibilityItems: lt, perPageSlotProps: K, selectedSlotProps: q, resolvedPageCount: J, selectionMultiple: Y, visibilityEnabled: ut, paginationSlotProps: X, onCommitColumnFilter: dt, onHiddenColumnsChange: ft } = r(g, {
131
+ let g = m, N = ve(), P = e(), F = T(m, "page"), ke = T(m, "perPage"), I = T(m, "search"), Ae = T(m, "expanded"), je = T(m, "selection"), Me = T(m, "cursor"), Ne = T(m, "filters"), Pe = T(m, "sorting"), Fe = T(m, "hiddenColumns"), Ie = T(m, "columnSearch"), { merged: L, rowViews: Le, rootBind: Re, emptyBind: ze, showEmpty: R, frameBind: Be, showPager: Ve, tableProps: He, footerBind: Ue, loadingBar: z, showSearch: B, getHeadBind: We, headerViews: Ge, loadingBind: Ke, onToggleRow: qe, toolbarBind: Je, getCellBind: V, columnCount: H, cursorPaged: Ye, showPerPage: Xe, showToolbar: Ze, selectedBind: Qe, showSelected: $e, getHeadAlign: et, getCellAlign: U, onTogglePage: tt, onToggleSort: nt, summaryCells: W, showFooterBar: rt, expandEnabled: it, footerBarBind: at, loadingBarBind: ot, paginationBind: st, selectAllState: G, onChangeSearch: ct, onToggleExpand: lt, visibilityItems: ut, perPageSlotProps: K, selectedSlotProps: q, resolvedPageCount: J, selectionMultiple: Y, visibilityEnabled: dt, paginationSlotProps: X, onCommitColumnFilter: ft, onHiddenColumnsChange: pt } = r(g, {
132
132
  size: "md",
133
133
  full: !0,
134
134
  rounded: "lg",
@@ -152,14 +152,14 @@ var ye = { class: "min-w-0 flex-1" }, be = { class: "flex shrink-0 items-center
152
152
  selection: je,
153
153
  columnSearch: Ie,
154
154
  hiddenColumns: Fe
155
- }), Z = c(() => L.value.size === "lg" ? "md" : "sm"), pt = c(() => P("{{selected}} of {{total}} row(s) selected.", q.value.selectedCount, {
155
+ }), Z = c(() => L.value.size === "lg" ? "md" : "sm"), mt = c(() => P("{{selected}} of {{total}} row(s) selected.", q.value.selectedCount, {
156
156
  total: q.value.totalCount,
157
157
  selected: q.value.selectedCount
158
- })), mt = c(() => P("Page {{page}} of {{count}}", {
158
+ })), ht = c(() => P("Page {{page}} of {{count}}", {
159
159
  page: X.value.page,
160
160
  count: X.value.count
161
161
  }));
162
- function ht(e, t) {
162
+ function gt(e, t) {
163
163
  let n = N[`item.${t.id}`] ?? N.item;
164
164
  return n ? n({
165
165
  id: t.id,
@@ -172,15 +172,15 @@ var ye = { class: "min-w-0 flex-1" }, be = { class: "flex shrink-0 items-center
172
172
  set: (e) => {
173
173
  F.value = e;
174
174
  }
175
- }), gt = c(() => K.value.options.map((e) => ({
175
+ }), _t = c(() => K.value.options.map((e) => ({
176
176
  value: e,
177
177
  label: String(e)
178
178
  })));
179
- function _t(e) {
179
+ function vt(e) {
180
180
  let t = Number(e);
181
181
  !Number.isFinite(t) || t < 1 || K.value.onPerPageChange(t);
182
182
  }
183
- let vt = c(() => {
183
+ let yt = c(() => {
184
184
  let e = L.value.customProps?.perPage?.customProps;
185
185
  return {
186
186
  ...e,
@@ -190,12 +190,12 @@ var ye = { class: "min-w-0 flex-1" }, be = { class: "flex shrink-0 items-center
190
190
  ...e?.listbox
191
191
  }
192
192
  };
193
- }), yt = _e(), $ = (e) => e.node ?? null;
193
+ }), bt = _e(), $ = (e) => e.node ?? null;
194
194
  return (e, r) => (b(), d("div", y(h(w(Re))), [w(Ze) ? (b(), d("div", y(_({ key: 0 }, w(Je))), [f("div", ye, [S(e.$slots, "toolbar")]), f("div", be, [
195
- w(ut) ? (b(), d("div", xe, [p(oe, {
196
- items: w(lt),
195
+ w(dt) ? (b(), d("div", xe, [p(oe, {
196
+ items: w(ut),
197
197
  overlay: w(L).columnsOverlay,
198
- onChange: w(ft),
198
+ onChange: w(pt),
199
199
  "show-footer": w(L).columnsShowFooter
200
200
  }, null, 8, [
201
201
  "items",
@@ -206,7 +206,7 @@ var ye = { class: "min-w-0 flex-1" }, be = { class: "flex shrink-0 items-center
206
206
  S(e.$slots, "toolbarActions"),
207
207
  w(B) ? S(e.$slots, "search", {}, () => [p(le, {
208
208
  "model-value": I.value ?? "",
209
- "onUpdate:modelValue": w(st),
209
+ "onUpdate:modelValue": w(ct),
210
210
  "field-props": w(L).customProps?.search
211
211
  }, null, 8, [
212
212
  "model-value",
@@ -253,7 +253,7 @@ var ye = { class: "min-w-0 flex-1" }, be = { class: "flex shrink-0 items-center
253
253
  searchable: e.searchable,
254
254
  multiple: e.filterMultiple,
255
255
  "search-value": e.searchQuery,
256
- onApply: (t, n) => w(dt)(e.id, t, n)
256
+ onApply: (t, n) => w(ft)(e.id, t, n)
257
257
  }, null, 8, [
258
258
  "column-id",
259
259
  "active",
@@ -277,7 +277,7 @@ var ye = { class: "min-w-0 flex-1" }, be = { class: "flex shrink-0 items-center
277
277
  colspan: w(H),
278
278
  classes: { root: "relative h-0 border-0 p-0 after:hidden" }
279
279
  }, {
280
- default: E(() => [f("div", y(h(w(at))), [S(e.$slots, "loading", {}, () => [p(w(ee), _({
280
+ default: E(() => [f("div", y(h(w(ot))), [S(e.$slots, "loading", {}, () => [p(w(ee), _({
281
281
  size: "xs",
282
282
  rounded: "none"
283
283
  }, w(L).customProps?.progress), null, 16)])], 16)]),
@@ -311,7 +311,7 @@ var ye = { class: "min-w-0 flex-1" }, be = { class: "flex shrink-0 items-center
311
311
  kind: "row",
312
312
  value: t.id,
313
313
  size: Z.value,
314
- name: w(yt),
314
+ name: w(bt),
315
315
  checked: t.selected,
316
316
  multiple: w(Y),
317
317
  "radio-props": w(L).customProps?.radio,
@@ -331,7 +331,7 @@ var ye = { class: "min-w-0 flex-1" }, be = { class: "flex shrink-0 items-center
331
331
  type: "button",
332
332
  "aria-expanded": t.expanded,
333
333
  "aria-label": w(P)("Expand row"),
334
- onClick: (e) => w(ct)(t.id, !t.expanded),
334
+ onClick: (e) => w(lt)(t.id, !t.expanded),
335
335
  class: "inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-sm leading-none hover:bg-dark-500/10 dark:hover:bg-dark-500/15"
336
336
  }, [f("span", { class: v([{ "rotate-90": t.expanded }, "inline-flex transition-transform duration-200 motion-reduce:transition-none"]) }, [p(w(n), {
337
337
  size: "sm",
@@ -341,7 +341,7 @@ var ye = { class: "min-w-0 flex-1" }, be = { class: "flex shrink-0 items-center
341
341
  tooltip: e.tooltip,
342
342
  ellipsis: e.ellipsis
343
343
  }, {
344
- default: E(() => [p($, { node: ht(t, e) }, null, 8, ["node"])]),
344
+ default: E(() => [p($, { node: gt(t, e) }, null, 8, ["node"])]),
345
345
  _: 2
346
346
  }, 1032, ["tooltip", "ellipsis"]))]),
347
347
  _: 2
@@ -386,16 +386,16 @@ var ye = { class: "min-w-0 flex-1" }, be = { class: "flex shrink-0 items-center
386
386
  _: 3
387
387
  }, 16), w(L).loading ? (b(), d("div", _({ key: 0 }, w(Ke), { "aria-hidden": w(z) || void 0 }), [w(z) ? u("", !0) : S(e.$slots, "loading", {}, () => [p(ie)], void 0, 0)], 16, we)) : u("", !0)]),
388
388
  w(t)(w(N), "footer") ? (b(), d("div", y(_({ key: 0 }, w(Ue))), [S(e.$slots, "footer")], 16)) : u("", !0),
389
- w(rt) ? (b(), d("div", y(_({ key: 1 }, w(ot))), [
390
- w($e) ? (b(), d("div", y(_({ key: 0 }, w(Qe))), [S(e.$slots, "selected", y(h(w(q))), () => [ge(C(pt.value), 1)])], 16)) : u("", !0),
389
+ w(rt) ? (b(), d("div", y(_({ key: 1 }, w(at))), [f("div", y(h(w(st))), [
390
+ w($e) ? (b(), d("div", y(_({ key: 0 }, w(Qe))), [S(e.$slots, "selected", y(h(w(q))), () => [ge(C(mt.value), 1)])], 16)) : u("", !0),
391
391
  w(Xe) ? S(e.$slots, "perPage", y(h(w(K))), () => [f("div", Te, [f("span", Ee, C(w(P)("Rows per page")), 1), p(w(re), _({ size: "sm" }, w(L).customProps?.perPage, {
392
392
  overlay: "menu",
393
393
  clearable: !1,
394
394
  "hide-error-message": "",
395
- options: gt.value,
396
- "custom-props": vt.value,
395
+ options: _t.value,
396
+ "custom-props": yt.value,
397
397
  "model-value": w(K).perPage,
398
- "onUpdate:modelValue": _t,
398
+ "onUpdate:modelValue": vt,
399
399
  "aria-label": w(P)("Rows per page"),
400
400
  classes: {
401
401
  ...w(L).customProps?.perPage?.classes,
@@ -408,7 +408,7 @@ var ye = { class: "min-w-0 flex-1" }, be = { class: "flex shrink-0 items-center
408
408
  "aria-label",
409
409
  "classes"
410
410
  ])])], void 0, 1) : u("", !0),
411
- w(Ve) ? (b(), d("div", De, [w(J) !== void 0 && !w(t)(w(N), "pagination") ? (b(), d("span", Oe, C(mt.value), 1)) : u("", !0), S(e.$slots, "pagination", y(h(w(X))), () => [w(Ye) ? (b(), l(w(ne), _({
411
+ w(Ve) ? (b(), d("div", De, [w(J) !== void 0 && !w(t)(w(N), "pagination") ? (b(), d("span", Oe, C(ht.value), 1)) : u("", !0), S(e.$slots, "pagination", y(h(w(X))), () => [w(Ye) ? (b(), l(w(ne), _({
412
412
  key: 0,
413
413
  size: "sm"
414
414
  }, w(L).customProps?.cursorPagination, {
@@ -430,7 +430,7 @@ var ye = { class: "min-w-0 flex-1" }, be = { class: "flex shrink-0 items-center
430
430
  "onUpdate:modelValue": r[0] ||= (e) => Q.value = e,
431
431
  count: w(J)
432
432
  }), null, 16, ["modelValue", "count"]))])])) : u("", !0)
433
- ], 16)) : u("", !0)
433
+ ], 16)], 16)) : u("", !0)
434
434
  ], 16)], 16));
435
435
  }
436
436
  });
@@ -22,15 +22,15 @@ var f = ["aria-label"], p = { class: "inline-flex h-6 w-5 shrink-0 flex-col item
22
22
  icon: "chevronUp",
23
23
  class: s(l(d)({
24
24
  "-mb-1": !0,
25
- "text-dark-800 dark:text-dark-100": o.sort === "ascending",
26
- "text-dark-300 dark:text-dark-600": o.sort !== "ascending"
25
+ "opacity-100": o.sort === "ascending",
26
+ "opacity-35": o.sort !== "ascending"
27
27
  }))
28
28
  }, null, 8, ["class"]), a(l(t), {
29
29
  size: "lg",
30
30
  icon: "chevronDown",
31
31
  class: s(l(d)({
32
- "text-dark-800 dark:text-dark-100": o.sort === "descending",
33
- "text-dark-300 dark:text-dark-600": o.sort !== "descending"
32
+ "opacity-100": o.sort === "descending",
33
+ "opacity-35": o.sort !== "descending"
34
34
  }))
35
35
  }, null, 8, ["class"])])], 8, f));
36
36
  }
@@ -537,13 +537,14 @@ export declare function useDataTable<T extends Record<string, unknown>>(props: D
537
537
  summaryCells: import('vue').ComputedRef<DataTableCellView[] | null>;
538
538
  showFooterBar: import('vue').ComputedRef<boolean>;
539
539
  expandEnabled: import('vue').ComputedRef<boolean>;
540
+ footerBarBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
541
+ class: string;
542
+ }, "class", import('vue').HTMLAttributes | undefined, {}>>;
540
543
  onChangeSearch: (query: string) => void;
541
544
  loadingBarBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
542
545
  class: string;
543
546
  }, "class", {}, {}>>;
544
547
  paginationBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
545
- onVnodeMounted: (vnode: VNode) => void;
546
- onVnodeUnmounted: () => void;
547
548
  class: string;
548
549
  }, "class", {}, {}>>;
549
550
  selectAllState: import('vue').ComputedRef<{