@npm-questionpro/wick-ui-lib 2.0.0-next.26 → 2.0.0-next.28

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.
@@ -19,6 +19,7 @@ export interface IWuDataTableProps<T> extends React.TableHTMLAttributes<HTMLTabl
19
19
  HeaderAction?: React.ReactNode;
20
20
  NoDataContent?: React.ReactNode;
21
21
  stickyHeader?: boolean;
22
+ maxHeight?: number | string;
22
23
  isRowExpandable?: boolean;
23
24
  hideHeader?: boolean;
24
25
  virtualization?: {
@@ -28,4 +29,4 @@ export interface IWuDataTableProps<T> extends React.TableHTMLAttributes<HTMLTabl
28
29
  };
29
30
  tableLayout?: 'fixed' | 'auto';
30
31
  }
31
- export declare const WuDataTable: <T>({ data, columns, isLoading, variant, sort, size, rowSelection, HeaderAction, NoDataContent, stickyHeader, CustomLoader, caption, virtualization, isRowExpandable, hideHeader, tableLayout, style, className, ...props }: IWuDataTableProps<T>) => React.JSX.Element;
32
+ export declare const WuDataTable: <T>({ data, columns, isLoading, variant, sort, size, rowSelection, HeaderAction, NoDataContent, stickyHeader, maxHeight, CustomLoader, caption, virtualization, isRowExpandable, hideHeader, tableLayout, style, className, ...props }: IWuDataTableProps<T>) => React.JSX.Element;
@@ -19,6 +19,7 @@ export interface IWuTableProps<T> extends React.TableHTMLAttributes<HTMLTableEle
19
19
  pageSize: number;
20
20
  };
21
21
  stickyHeader?: boolean;
22
+ maxHeight?: number | string;
22
23
  HeaderAction?: React.ReactNode;
23
24
  CustomLoader?: React.ReactNode;
24
25
  NoDataContent?: React.ReactNode;
@@ -32,4 +33,4 @@ export interface IWuTableProps<T> extends React.TableHTMLAttributes<HTMLTableEle
32
33
  };
33
34
  tableLayout?: 'fixed' | 'auto';
34
35
  }
35
- export declare const WuTable: <T>({ data, columns, variant, size, sort, filterText, pagination, stickyHeader, HeaderAction, CustomLoader, NoDataContent, isLoading, caption, rowSelection, isRowExpandable, hideHeader, virtualization, tableLayout, style, className, ...rest }: IWuTableProps<T>) => React.JSX.Element;
36
+ export declare const WuTable: <T>({ data, columns, variant, size, sort, filterText, pagination, stickyHeader, maxHeight, HeaderAction, CustomLoader, NoDataContent, isLoading, caption, rowSelection, isRowExpandable, hideHeader, virtualization, tableLayout, style, className, ...rest }: IWuTableProps<T>) => React.JSX.Element;
@@ -11,13 +11,13 @@ import { Arrow as S, Portal as C } from "@radix-ui/react-tooltip";
11
11
  import { add as w, differenceInCalendarDays as T, format as E, isBefore as D, isSameDay as O, isToday as k, isValid as A, parse as j, parseISO as M, startOfDay as N, sub as P } from "date-fns";
12
12
  import * as F from "@radix-ui/react-popover";
13
13
  import { PopoverClose as I, PopoverTrigger as L } from "@radix-ui/react-popover";
14
- import { DayPicker as ee, getDefaultClassNames as R } from "react-day-picker";
15
- import { Slot as z } from "@radix-ui/react-slot";
16
- import { cva as B } from "class-variance-authority";
17
- import * as te from "@radix-ui/react-label";
18
- import { Input as ne } from "@base-ui/react/input";
19
- import * as re from "@radix-ui/react-checkbox";
20
- import { TableVirtuoso as ie, Virtuoso as V } from "react-virtuoso";
14
+ import { DayPicker as R, getDefaultClassNames as z } from "react-day-picker";
15
+ import { Slot as B } from "@radix-ui/react-slot";
16
+ import { cva as V } from "class-variance-authority";
17
+ import * as ee from "@radix-ui/react-label";
18
+ import { Input as te } from "@base-ui/react/input";
19
+ import * as ne from "@radix-ui/react-checkbox";
20
+ import { TableVirtuoso as re, Virtuoso as ie } from "react-virtuoso";
21
21
  import { Command as H } from "cmdk";
22
22
  import * as U from "@radix-ui/react-dropdown-menu";
23
23
  import * as W from "@radix-ui/react-dialog";
@@ -1260,7 +1260,7 @@ var Et = ({ label: e, className: t }) => {
1260
1260
  label: "Last year",
1261
1261
  value: 365
1262
1262
  }
1263
- ], Pt = B([
1263
+ ], Pt = V([
1264
1264
  "wu-inline-flex wu-items-center wu-justify-center wu-rounded",
1265
1265
  "wu-whitespace-nowrap wu-text-sm wu-leading-normal wu-font-normal",
1266
1266
  "wu-transition-colors wu-duration-300",
@@ -1324,7 +1324,7 @@ var Et = ({ label: e, className: t }) => {
1324
1324
  color: "primary"
1325
1325
  },
1326
1326
  compoundVariants: []
1327
- }), Ft = t.forwardRef(({ className: e, variant: t, size: n, color: r, asChild: i = !1, ...a }, o) => /* @__PURE__ */ _(i ? z : "button", {
1327
+ }), Ft = t.forwardRef(({ className: e, variant: t, size: n, color: r, asChild: i = !1, ...a }, o) => /* @__PURE__ */ _(i ? B : "button", {
1328
1328
  className: K(Pt({
1329
1329
  size: n,
1330
1330
  color: r,
@@ -1338,8 +1338,8 @@ Ft.displayName = "Button";
1338
1338
  //#endregion
1339
1339
  //#region src/components/calender/shadcn/calendar.tsx
1340
1340
  function It({ className: e, classNames: t, dir: n = "ltr", ...r }) {
1341
- let i = R();
1342
- return /* @__PURE__ */ _(ee, {
1341
+ let i = z();
1342
+ return /* @__PURE__ */ _(R, {
1343
1343
  showOutsideDays: r.showOutsideDays || !1,
1344
1344
  className: K("wu-p-3", e),
1345
1345
  classNames: {
@@ -1406,12 +1406,12 @@ var Vt = (e) => {
1406
1406
  },
1407
1407
  children: a && `${t?.current?.value.length}/${n}`
1408
1408
  });
1409
- }, Ut = B("wu-text-xs wu-font-normal wu-leading-none peer-disabled:wu-cursor-not-allowed peer-disabled:wu-text-gray-subtle peer-readonly:wu-text-gray-subtle peer-required:after:wu-content-['*'] peer-required:after:wu-ml-[2px] peer-required:after:wu-text-red-deep peer-aria-[required]:after:wu-content-['*'] peer-aria-[required]:after:wu-ml-[2px] peer-aria-[required]:after:wu-text-red-deep"), Wt = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ _(te.Root, {
1409
+ }, Ut = V("wu-text-xs wu-font-normal wu-leading-none peer-disabled:wu-cursor-not-allowed peer-disabled:wu-text-gray-subtle peer-readonly:wu-text-gray-subtle peer-required:after:wu-content-['*'] peer-required:after:wu-ml-[2px] peer-required:after:wu-text-red-deep peer-aria-[required]:after:wu-content-['*'] peer-aria-[required]:after:wu-ml-[2px] peer-aria-[required]:after:wu-text-red-deep"), Wt = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ _(ee.Root, {
1410
1410
  ref: n,
1411
1411
  className: K(Ut(), e),
1412
1412
  ...t
1413
1413
  }));
1414
- Wt.displayName = te.Root.displayName;
1414
+ Wt.displayName = ee.Root.displayName;
1415
1415
  //#endregion
1416
1416
  //#region src/components/formGroup/components/WuLabel.tsx
1417
1417
  var Z = (e) => /* @__PURE__ */ _(Wt, {
@@ -1571,7 +1571,7 @@ var Xt = n.memo(n.forwardRef(({ className: e, Label: t, labelPosition: r = "top"
1571
1571
  className: Jt.wuInputIcon,
1572
1572
  children: C
1573
1573
  }),
1574
- /* @__PURE__ */ _(ne, {
1574
+ /* @__PURE__ */ _(te, {
1575
1575
  ref: h,
1576
1576
  className: E,
1577
1577
  "data-variant": o,
@@ -1999,16 +1999,16 @@ var fn = n.forwardRef((e, t) => {
1999
1999
  fn.displayName = "WuCardHeader";
2000
2000
  //#endregion
2001
2001
  //#region src/base/ui/checkbox.tsx
2002
- var pn = t.forwardRef(({ className: e, partial: t, ...n }, r) => /* @__PURE__ */ _(re.Root, {
2002
+ var pn = t.forwardRef(({ className: e, partial: t, ...n }, r) => /* @__PURE__ */ _(ne.Root, {
2003
2003
  ref: r,
2004
2004
  className: K("wu-h-4 wu-w-4 wu-shrink-0 wu-rounded-[2px] wu-bg-white wu-border wu-border-gray-subtle wu-ring-offset-background focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-[1px] data-[state=checked]:wu-bg-blue-p data-[state=checked]:wu-text-white data-[state=checked]:wu-border-none data-[state=checked]:hover:wu-bg-blue-q hover:wu-bg-gray-20 hover:wu-border-blue-p wu-transition-all data-[state=checked]:disabled:wu-bg-gray-20", "disabled:wu-cursor-not-allowed disabled:wu-opacity-50 disabled:data-[state=unchecked]:wu-bg-gray-20 disabled:hover:wu-border-gray-subtle disabled:wu-border-gray-subtle", e),
2005
2005
  ...n,
2006
- children: /* @__PURE__ */ v(re.Indicator, {
2006
+ children: /* @__PURE__ */ v(ne.Indicator, {
2007
2007
  className: K("wu-flex wu-items-center wu-justify-center wu-text-current"),
2008
2008
  children: [!t && /* @__PURE__ */ _("span", { className: "wm-check wu-text-base wu-leading-4" }), t && /* @__PURE__ */ _("span", { className: "wm-check-indeterminate-small wu-text-base wu-leading-4" })]
2009
2009
  })
2010
2010
  }));
2011
- pn.displayName = re.Root.displayName;
2011
+ pn.displayName = ne.Root.displayName;
2012
2012
  //#endregion
2013
2013
  //#region src/components/checkbox/WuCheckbox.tsx
2014
2014
  var mn = n.forwardRef((e, t) => {
@@ -2037,7 +2037,7 @@ var mn = n.forwardRef((e, t) => {
2037
2037
  children: a
2038
2038
  })]
2039
2039
  });
2040
- }), hn = B("wu-flex wu-items-center wu-gap-2 wu-w-fit", { variants: { labelPosition: {
2040
+ }), hn = V("wu-flex wu-items-center wu-gap-2 wu-w-fit", { variants: { labelPosition: {
2041
2041
  left: "wu-flex-row-reverse wu-text-right",
2042
2042
  right: "wu-flex-row"
2043
2043
  } } });
@@ -2103,7 +2103,7 @@ var vn = (e, t, n, r) => d(() => {
2103
2103
  n,
2104
2104
  r.value,
2105
2105
  e
2106
- ]), yn = n.forwardRef(({ containerHeight: e = 400, list: t, callback: n, dir: r, className: i, style: a }, o) => /* @__PURE__ */ _(V, {
2106
+ ]), yn = n.forwardRef(({ containerHeight: e = 400, list: t, callback: n, dir: r, className: i, style: a }, o) => /* @__PURE__ */ _(ie, {
2107
2107
  ref: o,
2108
2108
  dir: r,
2109
2109
  className: i,
@@ -2403,22 +2403,22 @@ var qn = (e) => {
2403
2403
  enabledOptions: i
2404
2404
  };
2405
2405
  }, Yn = o(Xt), Xn = ({ data: e, accessorKey: t, value: n, defaultValue: r, Header: i, virtualizedThreshold: a = 100, isEllipse: o, placeholder: c, variant: l, dir: m, onSelect: h, Label: g, maxHeight: y = 420, multiple: b = !1, hasGroup: x = !1, selectAll: S, id: C, disabled: w, labelPosition: T = "top", className: E, onScroll: D, maxContentWidth: O, enableSearch: k = !0, noDataContent: A, selectedToTop: j = !1, ...M }) => {
2406
- let [N, P] = p(""), [F, I] = p(), [L, ee] = p(!1), [R, z] = p(!1), [B, te] = p(!1), ne = f(null), { allOptions: re, enabledOptions: ie } = d(() => x || S && !S.includeDisabled ? Jn(e) : {
2406
+ let [N, P] = p(""), [F, I] = p(), [L, R] = p(!1), [z, B] = p(!1), [V, ee] = p(!1), te = f(null), { allOptions: ne, enabledOptions: re } = d(() => x || S && !S.includeDisabled ? Jn(e) : {
2407
2407
  allOptions: e,
2408
2408
  groups: [],
2409
2409
  dividers: [],
2410
2410
  enabledOptions: []
2411
- }, [e, x]), V = d(() => {
2411
+ }, [e, x]), ie = d(() => {
2412
2412
  if (!N) return e;
2413
2413
  let n = N.toLowerCase();
2414
- return re.filter((e) => e[t.label].toLowerCase().includes(n));
2414
+ return ne.filter((e) => e[t.label].toLowerCase().includes(n));
2415
2415
  }, [
2416
2416
  N,
2417
- re,
2417
+ ne,
2418
2418
  e,
2419
2419
  t.label
2420
- ]), H = vn(j, d(() => b && S?.enable && !N && V.length > 0 ? [{ type: "all" }, ...V] : V, [
2421
- V,
2420
+ ]), H = vn(j, d(() => b && S?.enable && !N && ie.length > 0 ? [{ type: "all" }, ...ie] : ie, [
2421
+ ie,
2422
2422
  N,
2423
2423
  b
2424
2424
  ]), F, t), U = s((e) => {
@@ -2426,7 +2426,7 @@ var qn = (e) => {
2426
2426
  b ? I((r) => {
2427
2427
  let i = r || [], a = i.some((e) => e[t.value] === n) ? i.filter((e) => e[t.value] !== n) : [...i, e];
2428
2428
  return h?.(a), a;
2429
- }) : (ee(!1), I(e), h?.(e));
2429
+ }) : (R(!1), I(e), h?.(e));
2430
2430
  }, [
2431
2431
  b,
2432
2432
  t.value,
@@ -2439,26 +2439,26 @@ var qn = (e) => {
2439
2439
  } else n === void 0 ? r !== void 0 && I(r) : I(n);
2440
2440
  }, [n, r]), u(() => {
2441
2441
  if (!b) return;
2442
- let e = S?.includeDisabled ? F?.length === re.length : F?.length === ie.length;
2443
- z(e), te(F?.length > 0 && !e);
2442
+ let e = S?.includeDisabled ? F?.length === ne.length : F?.length === re.length;
2443
+ B(e), ee(F?.length > 0 && !e);
2444
2444
  }, [F, S]);
2445
2445
  let oe = s(() => {
2446
- let e = R ? [] : S?.includeDisabled ? re : ie;
2446
+ let e = z ? [] : S?.includeDisabled ? ne : re;
2447
2447
  I(e), h?.(e);
2448
2448
  }, [
2449
- R,
2449
+ z,
2450
2450
  b,
2451
+ ne,
2451
2452
  re,
2452
- ie,
2453
2453
  h,
2454
2454
  S
2455
2455
  ]);
2456
2456
  return /* @__PURE__ */ v("div", {
2457
2457
  className: K(ke(T), "wu-flex wu-combobox-container"),
2458
- ref: ne,
2458
+ ref: te,
2459
2459
  children: [/* @__PURE__ */ v(Rt, {
2460
2460
  onOpenChange: (e) => {
2461
- e && ae(), ee(e);
2461
+ e && ae(), R(e);
2462
2462
  },
2463
2463
  open: L,
2464
2464
  modal: !0,
@@ -2472,7 +2472,7 @@ var qn = (e) => {
2472
2472
  multiple: b,
2473
2473
  disabled: w,
2474
2474
  selectAll: S,
2475
- isCheckedAll: R,
2475
+ isCheckedAll: z,
2476
2476
  className: E,
2477
2477
  id: C,
2478
2478
  ...M
@@ -2513,8 +2513,8 @@ var qn = (e) => {
2513
2513
  dir: m,
2514
2514
  selectAll: S,
2515
2515
  handleSelectAll: oe,
2516
- isCheckedAll: R,
2517
- isPartialSelected: B
2516
+ isCheckedAll: z,
2517
+ isPartialSelected: V
2518
2518
  }, a);
2519
2519
  },
2520
2520
  dir: m
@@ -2537,8 +2537,8 @@ var qn = (e) => {
2537
2537
  dir: m,
2538
2538
  selectAll: S,
2539
2539
  handleSelectAll: oe,
2540
- isCheckedAll: R,
2541
- isPartialSelected: B
2540
+ isCheckedAll: z,
2541
+ isPartialSelected: V
2542
2542
  }, a);
2543
2543
  })
2544
2544
  })] })
@@ -2579,7 +2579,7 @@ var qn = (e) => {
2579
2579
  ref: n
2580
2580
  }));
2581
2581
  nr.displayName = W.Overlay.displayName;
2582
- var rr = B("wu-fixed wu-z-50 wu-gap-4 wu-p-6 wu-shadow-lg wu-transition wu-ease-in-out data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-duration-500 data-[state=open]:wu-duration-500", {
2582
+ var rr = V("wu-fixed wu-z-50 wu-gap-4 wu-p-6 wu-shadow-lg wu-transition wu-ease-in-out data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[state=closed]:wu-duration-500 data-[state=open]:wu-duration-500", {
2583
2583
  variants: { side: {
2584
2584
  top: "wu-inset-x-0 wu-top-0 wu-border-b data-[state=closed]:wu-slide-out-to-top data-[state=open]:wu-slide-in-from-top",
2585
2585
  bottom: "wu-inset-x-0 wu-bottom-0 wu-border-t data-[state=closed]:wu-slide-out-to-bottom data-[state=open]:wu-slide-in-from-bottom",
@@ -3164,39 +3164,39 @@ var Ir = n.memo(Fr), Lr = (e) => {
3164
3164
  }
3165
3165
  return a;
3166
3166
  }, Hr = (e) => {
3167
- let { data: t, accessorKey: r, value: i, Item: a, Label: o, GroupLabel: s, CustomHeader: c, CustomTrigger: l, NoDataContent: u, Chip: d, onSelect: f, onScroll: p, disabled: m, multiple: h, searchable: g, selectAll: y, virtualizedThreshold: b = 100, showGroupSeparator: x, id: S, dir: C, className: w, listClass: T, placeholder: E = "Select items...", variant: D, labelPosition: O = "top", maxContentWidth: k, maxContentHeight: A, modal: j, ...M } = e, [N, P] = n.useState(!1), [F, I] = n.useState(""), [L, ee] = n.useState(i), R = n.useMemo(() => r, [r]), z = n.useMemo(() => !g || !F ? t : Vr(t, F.toLowerCase().trim(), r), [
3167
+ let { data: t, accessorKey: r, value: i, Item: a, Label: o, GroupLabel: s, CustomHeader: c, CustomTrigger: l, NoDataContent: u, Chip: d, onSelect: f, onScroll: p, disabled: m, multiple: h, searchable: g, selectAll: y, virtualizedThreshold: b = 100, showGroupSeparator: x, id: S, dir: C, className: w, listClass: T, placeholder: E = "Select items...", variant: D, labelPosition: O = "top", maxContentWidth: k, maxContentHeight: A, modal: j, ...M } = e, [N, P] = n.useState(!1), [F, I] = n.useState(""), [L, R] = n.useState(i), z = n.useMemo(() => r, [r]), B = n.useMemo(() => !g || !F ? t : Vr(t, F.toLowerCase().trim(), r), [
3168
3168
  t,
3169
3169
  F,
3170
3170
  r.label,
3171
3171
  g
3172
- ]), B = (e) => {
3173
- h ? ee((t) => {
3172
+ ]), V = (e) => {
3173
+ h ? R((t) => {
3174
3174
  let n = e[r.value], i = Array.isArray(t) ? t : [], a = i.some((e) => e[r.value] === n) ? i.filter((e) => e[r.value] !== n) : [...i, e];
3175
3175
  return f && f(a), a;
3176
- }) : (ee(e), f && f(e), P(!1));
3177
- }, te = n.useCallback((e) => {
3176
+ }) : (R(e), f && f(e), P(!1));
3177
+ }, ee = n.useCallback((e) => {
3178
3178
  let n = e ? t : [];
3179
- ee(n), y?.onSelectAll && y.onSelectAll(e), f && f(n);
3179
+ R(n), y?.onSelectAll && y.onSelectAll(e), f && f(n);
3180
3180
  }, [
3181
3181
  t,
3182
3182
  y,
3183
3183
  f
3184
- ]), ne = (e) => Array.isArray(L) ? L.some((t) => t[r.value] === e[r.value]) : L?.[r.value] === e[r.value];
3184
+ ]), te = (e) => Array.isArray(L) ? L.some((t) => t[r.value] === e[r.value]) : L?.[r.value] === e[r.value];
3185
3185
  n.useEffect(() => {
3186
- ee(i);
3186
+ R(i);
3187
3187
  }, [i]);
3188
- let re = (e) => {
3188
+ let ne = (e) => {
3189
3189
  let t = (t, i) => {
3190
3190
  let o = r.group && Array.isArray(t[r.group]), c = x && o && i > 0 && e.length > 1;
3191
3191
  return /* @__PURE__ */ v(n.Fragment, { children: [c && /* @__PURE__ */ _(Dn, {}), /* @__PURE__ */ _(Ir, {
3192
3192
  option: t,
3193
- accessorKey: R,
3193
+ accessorKey: z,
3194
3194
  multiple: h,
3195
- onSelect: (e) => B(e),
3195
+ onSelect: (e) => V(e),
3196
3196
  dir: C,
3197
3197
  GroupLabel: s,
3198
3198
  Item: a,
3199
- isSelected: (e) => ne(e)
3199
+ isSelected: (e) => te(e)
3200
3200
  })] }, JSON.stringify(t));
3201
3201
  };
3202
3202
  return e.length > b ? /* @__PURE__ */ _(yn, {
@@ -3228,7 +3228,7 @@ var Ir = n.memo(Fr), Lr = (e) => {
3228
3228
  placeholder: E,
3229
3229
  Chip: d,
3230
3230
  className: w,
3231
- handleUnselect: B,
3231
+ handleUnselect: V,
3232
3232
  variant: D,
3233
3233
  id: S,
3234
3234
  dir: C,
@@ -3256,10 +3256,10 @@ var Ir = n.memo(Fr), Lr = (e) => {
3256
3256
  /* @__PURE__ */ _(En, { children: h && y?.enabled && !F && /* @__PURE__ */ _(Rr, {
3257
3257
  data: t,
3258
3258
  value: L,
3259
- onSelectAll: te,
3259
+ onSelectAll: ee,
3260
3260
  label: y.label
3261
3261
  }) }),
3262
- /* @__PURE__ */ _(En, { children: re(z) })
3262
+ /* @__PURE__ */ _(En, { children: ne(B) })
3263
3263
  ]
3264
3264
  })
3265
3265
  ]
@@ -3598,14 +3598,14 @@ var ii = "calc(100vh - 64px)", ai = {
3598
3598
  cleanData: r
3599
3599
  };
3600
3600
  }, gi = 100, _i = 400, vi = ({ data: e, onSelect: t, multiple: n = !1, defaultValue: r, value: i, accessorKey: a, variant: o = "flat", dir: c = "ltr", placeholder: l, Label: m, virtualizedThreshold: h = gi, maxHeight: g = _i, hasGroup: y = !1, Header: b, CustomTrigger: x, selectAll: S, disabled: C, labelPosition: w = "top", onScroll: T, maxContentWidth: E, selectedToTop: D = !1, ...O }) => {
3601
- let [k, A] = p(), j = f(null), [M, N] = p(!1), [P, F] = p(!1), { cleanData: I, enabledOptions: L } = hi(e), ee = d(() => n && S?.enable && e.length > 0 ? [{
3601
+ let [k, A] = p(), j = f(null), [M, N] = p(!1), [P, F] = p(!1), { cleanData: I, enabledOptions: L } = hi(e), R = d(() => n && S?.enable && e.length > 0 ? [{
3602
3602
  type: "all",
3603
3603
  [a.label]: S.label || "Select All"
3604
3604
  }, ...e] : e, [
3605
3605
  e,
3606
3606
  S,
3607
3607
  n
3608
- ]), R = s((e) => {
3608
+ ]), z = s((e) => {
3609
3609
  let r = e[a.value];
3610
3610
  if (n) A((n = []) => {
3611
3611
  let i = n, o = i.some((e) => e[a.value] === r) ? i.filter((e) => e[a.value] !== r) : [...i, e];
@@ -3627,13 +3627,13 @@ var ii = "calc(100vh - 64px)", ai = {
3627
3627
  }
3628
3628
  !r && !i && A(void 0), r !== void 0 && A(r), i !== void 0 && A(i);
3629
3629
  }, [r, i]);
3630
- let z = vn(D, ee, k, a), B = z.length > h;
3630
+ let B = vn(D, R, k, a), V = B.length > h;
3631
3631
  u(() => {
3632
3632
  if (!n) return;
3633
3633
  let t = S?.includeDisabled ? k?.length === e.length : k?.length === L.length;
3634
3634
  N(t), F(k?.length > 0 && !t);
3635
3635
  }, [k, S]);
3636
- let te = s(() => {
3636
+ let ee = s(() => {
3637
3637
  let n = M ? [] : S?.includeDisabled ? y ? I : e : L;
3638
3638
  A(n), t?.(n);
3639
3639
  }, [
@@ -3668,17 +3668,17 @@ var ii = "calc(100vh - 64px)", ai = {
3668
3668
  align: "start",
3669
3669
  id: O.id,
3670
3670
  style: { maxWidth: E },
3671
- children: [b, B ? /* @__PURE__ */ _(yn, {
3672
- list: z,
3671
+ children: [b, V ? /* @__PURE__ */ _(yn, {
3672
+ list: B,
3673
3673
  containerHeight: g,
3674
3674
  callback: (e, t) => /* @__PURE__ */ _(mi, {
3675
3675
  option: t,
3676
3676
  accessorKey: a,
3677
3677
  multiple: n,
3678
- onSelect: R,
3678
+ onSelect: z,
3679
3679
  value: k,
3680
3680
  dir: c,
3681
- handleSelectAll: te,
3681
+ handleSelectAll: ee,
3682
3682
  isCheckedAll: M,
3683
3683
  isPartialSelected: P
3684
3684
  }),
@@ -3691,15 +3691,15 @@ var ii = "calc(100vh - 64px)", ai = {
3691
3691
  overflow: "auto"
3692
3692
  },
3693
3693
  className: "wu-select-list",
3694
- children: z.map((e, t) => {
3694
+ children: B.map((e, t) => {
3695
3695
  let r = e, i = r[a.value], o = i == null ? `__${"type" in r ? r.type : "item"}__${t}` : String(i);
3696
3696
  return /* @__PURE__ */ _(mi, {
3697
3697
  option: r,
3698
3698
  accessorKey: a,
3699
3699
  multiple: n,
3700
- onSelect: R,
3700
+ onSelect: z,
3701
3701
  value: k,
3702
- handleSelectAll: te,
3702
+ handleSelectAll: ee,
3703
3703
  isCheckedAll: M,
3704
3704
  dir: c,
3705
3705
  isPartialSelected: P
@@ -4354,14 +4354,14 @@ var ia = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ _("div", {
4354
4354
  ...t
4355
4355
  }));
4356
4356
  ia.displayName = "SidebarGroup";
4357
- var aa = t.forwardRef(({ className: e, asChild: t = !1, ...n }, r) => /* @__PURE__ */ _(t ? z : "div", {
4357
+ var aa = t.forwardRef(({ className: e, asChild: t = !1, ...n }, r) => /* @__PURE__ */ _(t ? B : "div", {
4358
4358
  ref: r,
4359
4359
  "data-sidebar": "group-label",
4360
4360
  className: K("wu-flex wu-h-8 wu-shrink-0 wu-items-center wu-rounded-md wu-px-2 wu-text-xs wu-font-medium wu-outline-none wu-transition-[margin,opacity] wu-duration-150 wu-ease-linear focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0", "group-data-[collapsible=icon]:wu-opacity-0", e),
4361
4361
  ...n
4362
4362
  }));
4363
4363
  aa.displayName = "SidebarGroupLabel";
4364
- var oa = t.forwardRef(({ className: e, asChild: t = !1, ...n }, r) => /* @__PURE__ */ _(t ? z : "button", {
4364
+ var oa = t.forwardRef(({ className: e, asChild: t = !1, ...n }, r) => /* @__PURE__ */ _(t ? B : "button", {
4365
4365
  ref: r,
4366
4366
  "data-sidebar": "group-action",
4367
4367
  className: K("wu-absolute wu-right-3 wu-top-3.5 wu-flex wu-aspect-square wu-w-5 wu-items-center wu-justify-center wu-rounded-md wu-p-0 wu-outline-none wu-transition-transform focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0", "after:wu-absolute after:wu-inset-2 after:md:wu-hidden", "group-data-[collapsible=icon]:wu-hidden", e),
@@ -4389,7 +4389,7 @@ var la = t.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ _("li", {
4389
4389
  ...t
4390
4390
  }));
4391
4391
  la.displayName = "SidebarMenuItem";
4392
- var ua = B("wu-peer/menu-button wu-flex wu-w-full wu-items-center wu-gap-2 wu-overflow-hidden wu-rounded-md wu-p-2 wu-text-left wu-text-sm wu-outline-none wu-transition-[width,height,padding] focus-visible:wu-ring-2 disabled:wu-pointer-events-none disabled:wu-opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:wu-pr-8 aria-disabled:wu-pointer-events-none aria-disabled:wu-opacity-50 data-[active=true]:wu-font-medium group-data-[collapsible=icon]:!wu-size-8 group-data-[collapsible=icon]:!wu-p-2 [&>span:last-child]:wu-truncate [&>svg]:wu-size-4 [&>svg]:wu-shrink-0", {
4392
+ var ua = V("wu-peer/menu-button wu-flex wu-w-full wu-items-center wu-gap-2 wu-overflow-hidden wu-rounded-md wu-p-2 wu-text-left wu-text-sm wu-outline-none wu-transition-[width,height,padding] focus-visible:wu-ring-2 disabled:wu-pointer-events-none disabled:wu-opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:wu-pr-8 aria-disabled:wu-pointer-events-none aria-disabled:wu-opacity-50 data-[active=true]:wu-font-medium group-data-[collapsible=icon]:!wu-size-8 group-data-[collapsible=icon]:!wu-p-2 [&>span:last-child]:wu-truncate [&>svg]:wu-size-4 [&>svg]:wu-shrink-0", {
4393
4393
  variants: {
4394
4394
  variant: {
4395
4395
  default: "",
@@ -4406,7 +4406,7 @@ var ua = B("wu-peer/menu-button wu-flex wu-w-full wu-items-center wu-gap-2 wu-ov
4406
4406
  size: "default"
4407
4407
  }
4408
4408
  }), da = t.forwardRef(({ asChild: e = !1, isActive: t = !1, variant: n = "default", size: r = "default", tooltip: i, className: a, ...o }, s) => {
4409
- let c = e ? z : "button", { isMobile: l, state: u } = qi(), d = /* @__PURE__ */ _(c, {
4409
+ let c = e ? B : "button", { isMobile: l, state: u } = qi(), d = /* @__PURE__ */ _(c, {
4410
4410
  ref: s,
4411
4411
  "data-sidebar": "menu-button",
4412
4412
  "data-size": r,
@@ -4428,7 +4428,7 @@ var ua = B("wu-peer/menu-button wu-flex wu-w-full wu-items-center wu-gap-2 wu-ov
4428
4428
  })] })) : d;
4429
4429
  });
4430
4430
  da.displayName = "SidebarMenuButton";
4431
- var fa = t.forwardRef(({ className: e, asChild: t = !1, showOnHover: n = !1, ...r }, i) => /* @__PURE__ */ _(t ? z : "button", {
4431
+ var fa = t.forwardRef(({ className: e, asChild: t = !1, showOnHover: n = !1, ...r }, i) => /* @__PURE__ */ _(t ? B : "button", {
4432
4432
  ref: i,
4433
4433
  "data-sidebar": "menu-action",
4434
4434
  className: K("wu-absolute wu-right-1 wu-top-1.5 wu-flex wu-aspect-square wu-w-5 wu-items-center wu-justify-center wu-rounded-md wu-p-0 wu-outline-none wu-transition-transform focus-visible:wu-ring-2 [&>svg]:wu-size-4 [&>svg]:wu-shrink-0", "after:wu-absolute after:wu-inset-2 after:md:wu-hidden", "peer-data-[size=sm]/menu-button:wu-top-1", "peer-data-[size=default]/menu-button:wu-top-1.5", "peer-data-[size=lg]/menu-button:wu-top-2.5", "group-data-[collapsible=icon]:wu-hidden", n && "group-focus-within/menu-item:wu-opacity-100 group-hover/menu-item:wu-opacity-100 data-[state=open]:wu-opacity-100 md:wu-opacity-0", e),
@@ -4472,7 +4472,7 @@ var ga = t.forwardRef(({ ...e }, t) => /* @__PURE__ */ _("li", {
4472
4472
  ...e
4473
4473
  }));
4474
4474
  ga.displayName = "SidebarMenuSubItem";
4475
- var _a = t.forwardRef(({ asChild: e = !1, size: t = "md", isActive: n, className: r, ...i }, a) => /* @__PURE__ */ _(e ? z : "a", {
4475
+ var _a = t.forwardRef(({ asChild: e = !1, size: t = "md", isActive: n, className: r, ...i }, a) => /* @__PURE__ */ _(e ? B : "a", {
4476
4476
  ref: a,
4477
4477
  "data-sidebar": "menu-sub-button",
4478
4478
  "data-size": t,
@@ -4815,7 +4815,7 @@ var va = ({ children: e, Sidebar: t, className: n, defaultOpen: r = !0, open: i,
4815
4815
  ]
4816
4816
  })]
4817
4817
  });
4818
- }, Pa = B("wu-flex wu-w-fit", { variants: { labelPosition: {
4818
+ }, Pa = V("wu-flex wu-w-fit", { variants: { labelPosition: {
4819
4819
  left: "wu-flex-row wu-text-right wu-gap-2 wu-items-center",
4820
4820
  top: "wu-flex-col"
4821
4821
  } } }), $ = {
@@ -4913,7 +4913,7 @@ var Ba = n.memo(za), Va = n.memo(({ Sidebar: e, children: t, className: n, ...r
4913
4913
  Va.displayName = "WuSurveySelect";
4914
4914
  //#endregion
4915
4915
  //#region src/base/ui/toggle.tsx
4916
- var Ha = B("wu-inline-flex wu-items-center wu-justify-center wu-text-sm wu-font-medium wu-ring-offset-background wu-transition-colors hover:wu-bg-muted hover:wu-text-muted-foreground focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-2 disabled:wu-cursor-not-allowed disabled:wu-opacity-80", {
4916
+ var Ha = V("wu-inline-flex wu-items-center wu-justify-center wu-text-sm wu-font-medium wu-ring-offset-background wu-transition-colors hover:wu-bg-muted hover:wu-text-muted-foreground focus-visible:wu-outline-none focus-visible:wu-ring-2 focus-visible:wu-ring-ring focus-visible:wu-ring-offset-2 disabled:wu-cursor-not-allowed disabled:wu-opacity-80", {
4917
4917
  variants: {
4918
4918
  variant: {
4919
4919
  default: "wu-bg-transparent",
@@ -5695,7 +5695,7 @@ var Lo = ({ table: e, size: t, isRowDisabled: n, containerHeight: r = 600, sorta
5695
5695
  });
5696
5696
  return /* @__PURE__ */ _("div", {
5697
5697
  className: "wu-w-full",
5698
- children: /* @__PURE__ */ _(ie, {
5698
+ children: /* @__PURE__ */ _(re, {
5699
5699
  style: { height: r },
5700
5700
  totalCount: b.length,
5701
5701
  fixedHeaderContent: p ? void 0 : () => /* @__PURE__ */ _(Fo, {
@@ -5759,219 +5759,221 @@ var Lo = ({ table: e, size: t, isRowDisabled: n, containerHeight: r = 600, sorta
5759
5759
  }
5760
5760
  })
5761
5761
  });
5762
- }, Ro = B("", { variants: { variant: {
5762
+ }, Ro = V("", { variants: { variant: {
5763
5763
  striped: "[&_tr:nth-child(even):not([data-expanded])_td]:wu-bg-zinc-50 [&_tr:nth-child(odd)[data-expanded]:not([data-state=\"selected\"])_td]:wu-bg-zinc-50",
5764
5764
  unstyled: "",
5765
5765
  bordered: "wu-border-collapse wu-border wu-border-black/[12%] [&_th]:wu-border [&_td]:wu-border"
5766
- } } }), zo = ({ data: e, columns: t, isLoading: r = !1, variant: i = "unstyled", sort: a, size: o, rowSelection: s, HeaderAction: c, NoDataContent: l, stickyHeader: u = !1, CustomLoader: d, caption: f, virtualization: p, isRowExpandable: m, hideHeader: h = !1, tableLayout: g = "fixed", style: y, className: b, ...x }) => {
5767
- let [S, C] = n.useState(() => a?.defaultSort ?? null), { scrollContainerRef: w, isScrolledLeft: T, isScrolledRight: E, handleScroll: D } = vo(), { rowSelectionState: O, sortableColumns: k, selectedRowCount: A, columnsWithExpand: j, expanded: M, setExpanded: N, handleRowSelectionChange: P } = _o({
5766
+ } } }), zo = ({ data: e, columns: t, isLoading: r = !1, variant: i = "unstyled", sort: a, size: o, rowSelection: s, HeaderAction: c, NoDataContent: l, stickyHeader: u = !1, maxHeight: d, CustomLoader: f, caption: p, virtualization: m, isRowExpandable: h, hideHeader: g = !1, tableLayout: y = "fixed", style: b, className: x, ...S }) => {
5767
+ let [C, w] = n.useState(() => a?.defaultSort ?? null), { scrollContainerRef: T, isScrolledLeft: E, isScrolledRight: D, handleScroll: O } = vo(), { rowSelectionState: k, sortableColumns: A, selectedRowCount: j, columnsWithExpand: M, expanded: N, setExpanded: P, handleRowSelectionChange: F } = _o({
5768
5768
  data: e,
5769
5769
  columns: t,
5770
5770
  rowSelection: s,
5771
- isRowExpandable: m
5772
- }), F = we({
5771
+ isRowExpandable: h
5772
+ }), I = we({
5773
5773
  data: e,
5774
- columns: j,
5774
+ columns: M,
5775
5775
  getCoreRowModel: ye(),
5776
5776
  getPaginationRowModel: Se(),
5777
- getExpandedRowModel: m ? be() : void 0,
5777
+ getExpandedRowModel: h ? be() : void 0,
5778
5778
  manualPagination: !0,
5779
5779
  manualSorting: !0,
5780
5780
  manualFiltering: !0,
5781
5781
  enableRowSelection: s?.isRowDisabled ? (e) => !s.isRowDisabled(e.original) : !0,
5782
- enableExpanding: !!m,
5782
+ enableExpanding: !!h,
5783
5783
  state: {
5784
- sorting: S ? [{
5785
- id: S.id,
5786
- desc: S.desc
5784
+ sorting: C ? [{
5785
+ id: C.id,
5786
+ desc: C.desc
5787
5787
  }] : [],
5788
- ...s?.isEnabled ? { rowSelection: O } : {},
5789
- ...m ? { expanded: M } : {}
5788
+ ...s?.isEnabled ? { rowSelection: k } : {},
5789
+ ...h ? { expanded: N } : {}
5790
5790
  },
5791
- onRowSelectionChange: P,
5792
- ...m ? { onExpandedChange: N } : {}
5793
- }), I = mo(p?.enabled, p?.threshold, e.length), L = p?.maxHeight ?? 600;
5791
+ onRowSelectionChange: F,
5792
+ ...h ? { onExpandedChange: P } : {}
5793
+ }), L = mo(m?.enabled, m?.threshold, e.length), R = m?.maxHeight ?? 600, z = typeof d == "number" ? `${d}px` : d;
5794
5794
  return /* @__PURE__ */ _("div", {
5795
- className: K("wu-text-gray-lead wu-table-container wu-relative", !I && u && "wu-h-full"),
5796
- children: I ? /* @__PURE__ */ v("div", {
5797
- ref: w,
5798
- onScroll: D,
5795
+ className: K("wu-text-gray-lead wu-table-container wu-relative", !L && u && !z && "wu-h-full"),
5796
+ children: L ? /* @__PURE__ */ v("div", {
5797
+ ref: T,
5798
+ onScroll: O,
5799
5799
  className: K("wu-overflow-x-auto wu-w-full", Ro({ variant: i })),
5800
- children: [f && /* @__PURE__ */ _(No, {
5800
+ children: [p && /* @__PURE__ */ _(No, {
5801
5801
  className: "wu-font-light",
5802
- children: f
5802
+ children: p
5803
5803
  }), r ? /* @__PURE__ */ _("div", {
5804
5804
  className: "wu-text-center wu-h-[35vh] wu-flex wu-items-center wu-justify-center",
5805
- children: d ?? /* @__PURE__ */ _(Ke, { className: "wu-w-full" })
5806
- }) : F.getRowModel().rows?.length ? /* @__PURE__ */ _(Lo, {
5807
- table: F,
5805
+ children: f ?? /* @__PURE__ */ _(Ke, { className: "wu-w-full" })
5806
+ }) : I.getRowModel().rows?.length ? /* @__PURE__ */ _(Lo, {
5807
+ table: I,
5808
5808
  size: o,
5809
5809
  isRowDisabled: s?.isRowDisabled,
5810
- containerHeight: L,
5811
- sortableColumns: k,
5810
+ containerHeight: R,
5811
+ sortableColumns: A,
5812
5812
  HeaderAction: c,
5813
- isRowSelected: A > 0,
5813
+ isRowSelected: j > 0,
5814
5814
  manual: !0,
5815
5815
  onSort: (e) => {
5816
- C(e), a?.onSort(e);
5816
+ w(e), a?.onSort(e);
5817
5817
  },
5818
- tableLayout: g,
5819
- isScrolledLeft: T,
5820
- isScrolledRight: E,
5821
- hideHeader: h
5818
+ tableLayout: y,
5819
+ isScrolledLeft: E,
5820
+ isScrolledRight: D,
5821
+ hideHeader: g
5822
5822
  }) : /* @__PURE__ */ _("div", {
5823
5823
  className: "wu-p-4 wu-text-center",
5824
5824
  children: l
5825
5825
  })]
5826
5826
  }) : /* @__PURE__ */ _("div", {
5827
- ref: w,
5828
- onScroll: D,
5829
- className: K("wu-overflow-x-auto wu-w-full", u && "wu-overflow-y-auto wu-h-full"),
5827
+ ref: T,
5828
+ onScroll: O,
5829
+ className: K("wu-overflow-x-auto wu-w-full", u && "wu-overflow-y-auto", u && !z && "wu-h-full"),
5830
+ style: u && z ? { maxHeight: z } : void 0,
5830
5831
  children: /* @__PURE__ */ v(Eo, {
5831
- ...x,
5832
- className: K("wu-w-full", Ro({ variant: i }), b),
5832
+ ...S,
5833
+ className: K("wu-w-full", Ro({ variant: i }), x),
5833
5834
  style: {
5834
- tableLayout: g,
5835
- ...y
5835
+ tableLayout: y,
5836
+ ...b
5836
5837
  },
5837
5838
  children: [
5838
- f && /* @__PURE__ */ _(No, {
5839
+ p && /* @__PURE__ */ _(No, {
5839
5840
  className: "wu-font-light",
5840
- children: f
5841
+ children: p
5841
5842
  }),
5842
- !h && /* @__PURE__ */ _(Fo, {
5843
- table: F,
5844
- sortableColumns: k,
5843
+ !g && /* @__PURE__ */ _(Fo, {
5844
+ table: I,
5845
+ sortableColumns: A,
5845
5846
  manual: !0,
5846
5847
  onSort: (e) => {
5847
- C(e), a?.onSort(e);
5848
+ w(e), a?.onSort(e);
5848
5849
  },
5849
5850
  size: o,
5850
5851
  HeaderAction: c,
5851
- isRowSelected: A > 0,
5852
+ isRowSelected: j > 0,
5852
5853
  isStickyHeader: u,
5853
- isRowExpandable: m,
5854
- isScrolledLeft: T,
5855
- isScrolledRight: E
5854
+ isRowExpandable: h,
5855
+ isScrolledLeft: E,
5856
+ isScrolledRight: D
5856
5857
  }),
5857
5858
  /* @__PURE__ */ _(Po, {
5858
- table: F,
5859
+ table: I,
5859
5860
  size: o,
5860
5861
  NoDataContent: l,
5861
- CustomLoader: d,
5862
+ CustomLoader: f,
5862
5863
  isLoading: r,
5863
5864
  isRowDisabled: s?.isRowDisabled,
5864
- isRowExpandable: m,
5865
- isScrolledLeft: T,
5866
- isScrolledRight: E
5865
+ isRowExpandable: h,
5866
+ isScrolledLeft: E,
5867
+ isScrolledRight: D
5867
5868
  })
5868
5869
  ]
5869
5870
  })
5870
5871
  })
5871
5872
  });
5872
- }, Bo = ({ data: e, columns: t, variant: r = "unstyled", size: i = "default", sort: a, filterText: o, pagination: s, stickyHeader: c, HeaderAction: l, CustomLoader: f, NoDataContent: m, isLoading: h, caption: g, rowSelection: y, isRowExpandable: b, hideHeader: x = !1, virtualization: S, tableLayout: C = "fixed", style: w, className: T, ...E }) => {
5873
- let [D, O] = n.useState(() => a?.defaultSort ? [{
5873
+ }, Bo = ({ data: e, columns: t, variant: r = "unstyled", size: i = "default", sort: a, filterText: o, pagination: s, stickyHeader: c, maxHeight: l, HeaderAction: f, CustomLoader: m, NoDataContent: h, isLoading: g, caption: y, rowSelection: b, isRowExpandable: x, hideHeader: S = !1, virtualization: C, tableLayout: w = "fixed", style: T, className: E, ...D }) => {
5874
+ let [O, k] = n.useState(() => a?.defaultSort ? [{
5874
5875
  id: a.defaultSort.id,
5875
5876
  desc: a.defaultSort.desc
5876
- }] : []), [k, A] = p([]), [j, M] = p(s?.pageIndex ?? 0), { scrollContainerRef: N, isScrolledLeft: P, isScrolledRight: F, handleScroll: I } = vo(), { finalColumns: L, rowSelectionState: ee, sortableColumns: R, selectedRowCount: z, columnsWithExpand: B, expanded: te, setExpanded: ne, handleRowSelectionChange: re } = _o({
5877
+ }] : []), [A, j] = p([]), [M, N] = p(s?.pageIndex ?? 0), { scrollContainerRef: P, isScrolledLeft: F, isScrolledRight: I, handleScroll: L } = vo(), { finalColumns: R, rowSelectionState: z, sortableColumns: B, selectedRowCount: V, columnsWithExpand: ee, expanded: te, setExpanded: ne, handleRowSelectionChange: re } = _o({
5877
5878
  data: e,
5878
5879
  columns: t,
5879
- rowSelection: y,
5880
- isRowExpandable: b
5881
- }), ie = d(() => L.filter((e) => e.filterable).map((e) => e.accessorKey), [L]), V = we({
5880
+ rowSelection: b,
5881
+ isRowExpandable: x
5882
+ }), ie = d(() => R.filter((e) => e.filterable).map((e) => e.accessorKey), [R]), H = we({
5882
5883
  data: e,
5883
- columns: B,
5884
+ columns: ee,
5884
5885
  getCoreRowModel: ye(),
5885
5886
  getFilteredRowModel: xe(),
5886
5887
  getSortedRowModel: Ce(),
5887
5888
  getPaginationRowModel: s ? Se() : void 0,
5888
- getExpandedRowModel: b ? be() : void 0,
5889
- enableRowSelection: y?.isRowDisabled ? (e) => !y.isRowDisabled(e.original) : !0,
5890
- enableExpanding: !!b,
5889
+ getExpandedRowModel: x ? be() : void 0,
5890
+ enableRowSelection: b?.isRowDisabled ? (e) => !b.isRowDisabled(e.original) : !0,
5891
+ enableExpanding: !!x,
5891
5892
  state: {
5892
- sorting: D,
5893
- columnFilters: k,
5893
+ sorting: O,
5894
+ columnFilters: A,
5894
5895
  ...s ? { pagination: s } : {},
5895
- ...y?.isEnabled ? { rowSelection: ee } : {},
5896
- ...b ? { expanded: te } : {}
5896
+ ...b?.isEnabled ? { rowSelection: z } : {},
5897
+ ...x ? { expanded: te } : {}
5897
5898
  },
5898
- onSortingChange: O,
5899
- onColumnFiltersChange: A,
5899
+ onSortingChange: k,
5900
+ onColumnFiltersChange: j,
5900
5901
  onRowSelectionChange: re,
5901
- ...b ? { onExpandedChange: ne } : {}
5902
+ ...x ? { onExpandedChange: ne } : {}
5902
5903
  });
5903
5904
  u(() => {
5904
5905
  ie.forEach((e) => {
5905
- V.getColumn(e)?.setFilterValue(o);
5906
+ H.getColumn(e)?.setFilterValue(o);
5906
5907
  });
5907
5908
  }, [
5908
5909
  o,
5909
5910
  ie,
5910
- V
5911
+ H
5911
5912
  ]), u(() => {
5912
- s && s?.pageIndex !== j && (y?.onRowSelect([]), V.resetRowSelection(), M(s.pageIndex));
5913
+ s && s?.pageIndex !== M && (b?.onRowSelect([]), H.resetRowSelection(), N(s.pageIndex));
5913
5914
  }, [s?.pageIndex]);
5914
- let H = mo(S?.enabled, S?.threshold, e.length), U = S?.maxHeight ?? 600;
5915
+ let U = mo(C?.enabled, C?.threshold, e.length), W = C?.maxHeight ?? 600, ae = typeof l == "number" ? `${l}px` : l;
5915
5916
  return /* @__PURE__ */ _("div", {
5916
- className: K("wu-text-gray-lead wu-table-container wu-relative", !H && c && "wu-h-full"),
5917
- children: H ? /* @__PURE__ */ v("div", {
5918
- ref: N,
5919
- onScroll: I,
5917
+ className: K("wu-text-gray-lead wu-table-container wu-relative", !U && c && !ae && "wu-h-full"),
5918
+ children: U ? /* @__PURE__ */ v("div", {
5919
+ ref: P,
5920
+ onScroll: L,
5920
5921
  className: K("wu-overflow-x-auto wu-w-full", Ro({ variant: r })),
5921
- children: [g && /* @__PURE__ */ _(No, { children: g }), h ? /* @__PURE__ */ _("div", {
5922
+ children: [y && /* @__PURE__ */ _(No, { children: y }), g ? /* @__PURE__ */ _("div", {
5922
5923
  className: "wu-text-center wu-h-[35vh] wu-flex wu-items-center wu-justify-center",
5923
- children: f ?? /* @__PURE__ */ _(Ke, { className: "wu-w-full" })
5924
- }) : V.getRowModel().rows?.length ? /* @__PURE__ */ _(Lo, {
5925
- table: V,
5924
+ children: m ?? /* @__PURE__ */ _(Ke, { className: "wu-w-full" })
5925
+ }) : H.getRowModel().rows?.length ? /* @__PURE__ */ _(Lo, {
5926
+ table: H,
5926
5927
  size: i,
5927
- isRowDisabled: y?.isRowDisabled,
5928
- containerHeight: U,
5929
- sortableColumns: R,
5930
- HeaderAction: l,
5931
- isRowSelected: z > 0,
5932
- tableLayout: C,
5933
- isScrolledLeft: P,
5934
- isScrolledRight: F,
5935
- isRowExpandable: b,
5936
- hideHeader: x
5928
+ isRowDisabled: b?.isRowDisabled,
5929
+ containerHeight: W,
5930
+ sortableColumns: B,
5931
+ HeaderAction: f,
5932
+ isRowSelected: V > 0,
5933
+ tableLayout: w,
5934
+ isScrolledLeft: F,
5935
+ isScrolledRight: I,
5936
+ isRowExpandable: x,
5937
+ hideHeader: S
5937
5938
  }) : /* @__PURE__ */ _("div", {
5938
5939
  className: "wu-p-4 wu-text-center",
5939
- children: m
5940
+ children: h
5940
5941
  })]
5941
5942
  }) : /* @__PURE__ */ _("div", {
5942
- ref: N,
5943
- onScroll: I,
5944
- className: K("wu-overflow-x-auto wu-w-full", c && "wu-overflow-y-auto wu-h-full"),
5943
+ ref: P,
5944
+ onScroll: L,
5945
+ className: K("wu-overflow-x-auto wu-w-full", c && "wu-overflow-y-auto", c && !ae && "wu-h-full"),
5946
+ style: c && ae ? { maxHeight: ae } : void 0,
5945
5947
  children: /* @__PURE__ */ v(Eo, {
5946
- ...E,
5947
- className: K(`wu-table-${C}`, "wu-w-full", Ro({ variant: r }), T),
5948
+ ...D,
5949
+ className: K(`wu-table-${w}`, "wu-w-full", Ro({ variant: r }), E),
5948
5950
  style: {
5949
- tableLayout: C,
5950
- ...w
5951
+ tableLayout: w,
5952
+ ...T
5951
5953
  },
5952
5954
  children: [
5953
- g && /* @__PURE__ */ _(No, { children: g }),
5954
- !x && /* @__PURE__ */ _(Fo, {
5955
- table: V,
5956
- sortableColumns: R,
5955
+ y && /* @__PURE__ */ _(No, { children: y }),
5956
+ !S && /* @__PURE__ */ _(Fo, {
5957
+ table: H,
5958
+ sortableColumns: B,
5957
5959
  size: i,
5958
- HeaderAction: l,
5959
- isRowSelected: z > 0,
5960
+ HeaderAction: f,
5961
+ isRowSelected: V > 0,
5960
5962
  isStickyHeader: c,
5961
- isRowExpandable: b,
5962
- isScrolledLeft: P,
5963
- isScrolledRight: F
5963
+ isRowExpandable: x,
5964
+ isScrolledLeft: F,
5965
+ isScrolledRight: I
5964
5966
  }),
5965
5967
  /* @__PURE__ */ _(Po, {
5966
- table: V,
5968
+ table: H,
5967
5969
  size: i,
5968
- NoDataContent: m,
5969
- CustomLoader: f,
5970
- isLoading: h,
5971
- isRowDisabled: y?.isRowDisabled,
5972
- isRowExpandable: b,
5973
- isScrolledLeft: P,
5974
- isScrolledRight: F
5970
+ NoDataContent: h,
5971
+ CustomLoader: m,
5972
+ isLoading: g,
5973
+ isRowDisabled: b?.isRowDisabled,
5974
+ isRowExpandable: x,
5975
+ isScrolledLeft: F,
5976
+ isScrolledRight: I
5975
5977
  })
5976
5978
  ]
5977
5979
  })
@@ -6286,7 +6288,7 @@ var ms = () => ({ showToast: ({ message: e, variant: t, duration: n, position: r
6286
6288
  variant: t,
6287
6289
  duration: n,
6288
6290
  position: r
6289
- }) }), hs = G.Provider, gs = B("wu-fixed wu-z-[100] wu-flex wu-max-h-screen wu-w-full wu-flex-col-reverse wu-px-4 wu-py-2 sm:wu-flex-col md:wu-max-w-[720px] wu-w-fit wu-toast-container", {
6291
+ }) }), hs = G.Provider, gs = V("wu-fixed wu-z-[100] wu-flex wu-max-h-screen wu-w-full wu-flex-col-reverse wu-px-4 wu-py-2 sm:wu-flex-col md:wu-max-w-[720px] wu-w-fit wu-toast-container", {
6290
6292
  variants: { position: {
6291
6293
  topRight: "wu-right-0 wu-top-0",
6292
6294
  top: "wu-top-0 wu-left-1/2 wu--translate-x-1/2",
@@ -6302,7 +6304,7 @@ var ms = () => ({ showToast: ({ message: e, variant: t, duration: n, position: r
6302
6304
  ...n
6303
6305
  }));
6304
6306
  _s.displayName = G.Viewport.displayName;
6305
- var vs = B("group wu-pointer-events-auto wu-text-xs wu-font-normal wu-relative wu-flex wu-w-full wu-min-h-12 wu-items-center wu-justify-between wu-overflow-hidden wu-px-4 wu-pr-0 wu-py-2 wu-shadow-sm wu-transition-all data-[swipe=cancel]:wu-translate-y-0 data-[swipe=end]:wu-translate-y-[var(--radix-toast-swipe-end-y)] data-[swipe=move]:wu-translate-y-[var(--radix-toast-swipe-move-y)] data-[swipe=move]:wu-transition-none data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[swipe=end]:wu-animate-out data-[state=closed]:wu-fade-out-80", {
6307
+ var vs = V("group wu-pointer-events-auto wu-text-xs wu-font-normal wu-relative wu-flex wu-w-full wu-min-h-12 wu-items-center wu-justify-between wu-overflow-hidden wu-px-4 wu-pr-0 wu-py-2 wu-shadow-sm wu-transition-all data-[swipe=cancel]:wu-translate-y-0 data-[swipe=end]:wu-translate-y-[var(--radix-toast-swipe-end-y)] data-[swipe=move]:wu-translate-y-[var(--radix-toast-swipe-move-y)] data-[swipe=move]:wu-transition-none data-[state=open]:wu-animate-in data-[state=closed]:wu-animate-out data-[swipe=end]:wu-animate-out data-[state=closed]:wu-fade-out-80", {
6306
6308
  variants: {
6307
6309
  variant: {
6308
6310
  default: "wu-border wu-bg-white wu-text-text",
@@ -6433,7 +6435,7 @@ var Ds = n.forwardRef((e, t) => {
6433
6435
  });
6434
6436
  });
6435
6437
  Ds.displayName = "WuToggle";
6436
- var Os = B("wu-flex wu-items-center wu-gap-3 wu-w-fit", { variants: { labelPosition: {
6438
+ var Os = V("wu-flex wu-items-center wu-gap-3 wu-w-fit", { variants: { labelPosition: {
6437
6439
  right: "wu-flex-row",
6438
6440
  left: "wu-flex-row-reverse",
6439
6441
  top: "wu-flex-col-reverse wu-items-baseline"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@npm-questionpro/wick-ui-lib",
3
3
  "private": false,
4
- "version": "2.0.0-next.26",
4
+ "version": "2.0.0-next.28",
5
5
  "description": "A React component library by QuestionPro for building web applications with ease",
6
6
  "keywords": [
7
7
  "react",
@@ -117,7 +117,6 @@
117
117
  "react-dom": "^19.0.0",
118
118
  "react-virtuoso": "^4.16.1",
119
119
  "sass-embedded": "^1.93.3",
120
- "stylelint": "^16.3.1",
121
120
  "tailwind-merge": "^2.6.0",
122
121
  "tailwindcss": "^3.4.18",
123
122
  "tailwindcss-animate": "^1.0.7",
@@ -128,21 +127,13 @@
128
127
  "vite-plugin-dts": "^4.5.4",
129
128
  "vitest": "^4.1.8",
130
129
  "@npm-questionpro/wick-ui-eslint-config": "1.0.0",
131
- "@npm-questionpro/wick-ui-icon": "2.0.0-next.26",
132
- "@wick-ui/tsconfig": "1.0.0",
133
- "@npm-questionpro/wick-ui-stylelint-config": "1.0.0"
134
- },
135
- "lint-staged": {
136
- "src/**/*.{ts,tsx,js,jsx,json,css,md}": [
137
- "prettier -w",
138
- "eslint --fix"
139
- ]
130
+ "@npm-questionpro/wick-ui-icon": "2.0.0-next.28",
131
+ "@wick-ui/tsconfig": "1.0.0"
140
132
  },
141
133
  "scripts": {
142
134
  "build": "tsc --noEmit && vite build && tsc -p tsconfig.types.json",
143
- "lint": "eslint ./src --fix && stylelint 'src/**/*.css' --fix",
144
- "lint:css": "stylelint 'src/**/*.css' --fix",
145
- "lint:ci": "tsc --noEmit && eslint --max-warnings 0 ./src && stylelint 'src/**/*.css'",
135
+ "lint": "eslint ./src --fix",
136
+ "lint:ci": "tsc --noEmit && eslint --max-warnings 0 ./src",
146
137
  "preview": "vite preview",
147
138
  "test": "TZ=UTC vitest run",
148
139
  "test:watch": "TZ=UTC vitest",