lizaui 9.0.51 → 9.0.53

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.
@@ -1 +1 @@
1
- {"version":3,"file":"table-body.d.ts","sourceRoot":"","sources":["../../../../src/components/table/body/table-body.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAIhF,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,8BAA8B,CAAC;AAiFzF,eAAO,MAAM,SAAS,EAEhB,CAAC,KAAK,SAAS,MAAM,EAAE,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC"}
1
+ {"version":3,"file":"table-body.d.ts","sourceRoot":"","sources":["../../../../src/components/table/body/table-body.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAIhF,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,8BAA8B,CAAC;AAqFzF,eAAO,MAAM,SAAS,EAEhB,CAAC,KAAK,SAAS,MAAM,EAAE,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"table-header-row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/header/table-header-row.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAqD,MAAM,OAAO,CAAC;AAI1F,OAAO,EAAE,KAAK,mBAAmB,EAAwB,MAAM,8BAA8B,CAAC;AAK9F,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAwDlD,CAAC"}
1
+ {"version":3,"file":"table-header-row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/header/table-header-row.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAqD,MAAM,OAAO,CAAC;AAI1F,OAAO,EAAE,KAAK,mBAAmB,EAAwB,MAAM,8BAA8B,CAAC;AAK9F,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAuDlD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/components/table/table.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAqD,MAAM,OAAO,CAAC;AAI1E,eAAO,MAAM,QAAQ,GAAI,uDAAuD,UAAU,4CAmCzF,CAAC;AAEF,eAAO,MAAM,KAAK,2DArC8D,UAAU;;;;;;;;;CAkDxF,CAAC"}
1
+ {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../src/components/table/table.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,KAAqD,MAAM,OAAO,CAAC;AAI1E,eAAO,MAAM,QAAQ,GAAI,uDAAuD,UAAU,4CAoCzF,CAAC;AAEF,eAAO,MAAM,KAAK,2DAtC8D,UAAU;;;;;;;;;CAmDxF,CAAC"}
@@ -228,7 +228,7 @@ const TableEmptyState = React.memo((t0) => {
228
228
  });
229
229
  TableEmptyState.displayName = "TableEmptyState";
230
230
  function TableBodyComponent(t0) {
231
- const $ = compilerRuntime.c(43);
231
+ const $ = compilerRuntime.c(45);
232
232
  let children;
233
233
  let className;
234
234
  let props;
@@ -285,27 +285,39 @@ function TableBodyComponent(t0) {
285
285
  isChecks
286
286
  } = useTableContext();
287
287
  const total = Number(totalColumn) + Number(isActions) + Number(isChecks);
288
- let t6;
289
- if ($[11] !== className) {
290
- t6 = tailwindMerge.twMerge(className);
291
- $[11] = className;
292
- $[12] = t6;
288
+ const t6 = props;
289
+ let domProps;
290
+ if ($[11] !== t6) {
291
+ domProps = {
292
+ ...t6
293
+ };
294
+ delete domProps.dataHeader;
295
+ $[11] = t6;
296
+ $[12] = domProps;
293
297
  } else {
294
- t6 = $[12];
298
+ domProps = $[12];
295
299
  }
296
- const mergedClass = t6;
297
300
  let t7;
301
+ if ($[13] !== className) {
302
+ t7 = tailwindMerge.twMerge(className);
303
+ $[13] = className;
304
+ $[14] = t7;
305
+ } else {
306
+ t7 = $[14];
307
+ }
308
+ const mergedClass = t7;
309
+ let t8;
298
310
  bb0: {
299
311
  if (!data || data.length === 0) {
300
- t7 = null;
312
+ t8 = null;
301
313
  break bb0;
302
314
  }
303
315
  if (typeof children === "function") {
304
- let t82;
305
- if ($[13] !== children || $[14] !== data || $[15] !== rowKey) {
306
- let t9;
307
- if ($[17] !== children || $[18] !== rowKey) {
308
- t9 = (el, index) => {
316
+ let t92;
317
+ if ($[15] !== children || $[16] !== data || $[17] !== rowKey) {
318
+ let t10;
319
+ if ($[19] !== children || $[20] !== rowKey) {
320
+ t10 = (el, index) => {
309
321
  const child = children({
310
322
  item: el,
311
323
  index
@@ -315,114 +327,114 @@ function TableBodyComponent(t0) {
315
327
  key: keyValue
316
328
  }) : null;
317
329
  };
318
- $[17] = children;
319
- $[18] = rowKey;
320
- $[19] = t9;
330
+ $[19] = children;
331
+ $[20] = rowKey;
332
+ $[21] = t10;
321
333
  } else {
322
- t9 = $[19];
334
+ t10 = $[21];
323
335
  }
324
- t82 = data.map(t9);
325
- $[13] = children;
326
- $[14] = data;
327
- $[15] = rowKey;
328
- $[16] = t82;
336
+ t92 = data.map(t10);
337
+ $[15] = children;
338
+ $[16] = data;
339
+ $[17] = rowKey;
340
+ $[18] = t92;
329
341
  } else {
330
- t82 = $[16];
342
+ t92 = $[18];
331
343
  }
332
- t7 = t82;
344
+ t8 = t92;
333
345
  } else {
334
- let t82;
335
- if ($[20] !== children || $[21] !== data || $[22] !== rowKey) {
336
- let t9;
337
- if ($[24] !== data || $[25] !== rowKey) {
338
- t9 = (child_0, index_0) => React.isValidElement(child_0) ? React.cloneElement(child_0, {
346
+ let t92;
347
+ if ($[22] !== children || $[23] !== data || $[24] !== rowKey) {
348
+ let t10;
349
+ if ($[26] !== data || $[27] !== rowKey) {
350
+ t10 = (child_0, index_0) => React.isValidElement(child_0) ? React.cloneElement(child_0, {
339
351
  key: rowKey ? rowKey(data[index_0], index_0) : index_0
340
352
  }) : child_0;
341
- $[24] = data;
342
- $[25] = rowKey;
343
- $[26] = t9;
353
+ $[26] = data;
354
+ $[27] = rowKey;
355
+ $[28] = t10;
344
356
  } else {
345
- t9 = $[26];
357
+ t10 = $[28];
346
358
  }
347
- t82 = React.Children.map(children, t9);
348
- $[20] = children;
349
- $[21] = data;
350
- $[22] = rowKey;
351
- $[23] = t82;
359
+ t92 = React.Children.map(children, t10);
360
+ $[22] = children;
361
+ $[23] = data;
362
+ $[24] = rowKey;
363
+ $[25] = t92;
352
364
  } else {
353
- t82 = $[23];
365
+ t92 = $[25];
354
366
  }
355
- t7 = t82;
367
+ t8 = t92;
356
368
  }
357
369
  }
358
- const renderedRows = t7;
370
+ const renderedRows = t8;
359
371
  let fallbackContent = null;
360
372
  if (isLoading) {
361
- let t82;
362
- if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
363
- t82 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3.5", children: /* @__PURE__ */ jsxRuntime.jsx(loaderCircle.LoaderCircle, { size: 45 }) });
364
- $[27] = t82;
373
+ let t92;
374
+ if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
375
+ t92 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3.5", children: /* @__PURE__ */ jsxRuntime.jsx(loaderCircle.LoaderCircle, { size: 45 }) });
376
+ $[29] = t92;
365
377
  } else {
366
- t82 = $[27];
378
+ t92 = $[29];
367
379
  }
368
- let t9;
369
- if ($[28] !== loadingLabel) {
370
- t9 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center relative", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col justify-center items-center gap-2", children: [
371
- t82,
380
+ let t10;
381
+ if ($[30] !== loadingLabel) {
382
+ t10 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center relative", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col justify-center items-center gap-2", children: [
383
+ t92,
372
384
  /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "line-clamp-1 text-sm text-default-800", children: loadingLabel }) })
373
385
  ] }) });
374
- $[28] = loadingLabel;
375
- $[29] = t9;
386
+ $[30] = loadingLabel;
387
+ $[31] = t10;
376
388
  } else {
377
- t9 = $[29];
389
+ t10 = $[31];
378
390
  }
379
- let t10;
380
- if ($[30] !== t9 || $[31] !== total) {
381
- t10 = /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "border-b border-divider", children: /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-2 py-2.5 w-full", colSpan: total, children: t9 }) });
382
- $[30] = t9;
383
- $[31] = total;
391
+ let t11;
392
+ if ($[32] !== t10 || $[33] !== total) {
393
+ t11 = /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "border-b border-divider", children: /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-2 py-2.5 w-full", colSpan: total, children: t10 }) });
384
394
  $[32] = t10;
395
+ $[33] = total;
396
+ $[34] = t11;
385
397
  } else {
386
- t10 = $[32];
398
+ t11 = $[34];
387
399
  }
388
- fallbackContent = t10;
400
+ fallbackContent = t11;
389
401
  } else {
390
402
  if (data.length === 0) {
391
- let t82;
392
- if ($[33] !== emptyText) {
393
- t82 = /* @__PURE__ */ jsxRuntime.jsx(TableEmptyState, { text: emptyText });
394
- $[33] = emptyText;
395
- $[34] = t82;
403
+ let t92;
404
+ if ($[35] !== emptyText) {
405
+ t92 = /* @__PURE__ */ jsxRuntime.jsx(TableEmptyState, { text: emptyText });
406
+ $[35] = emptyText;
407
+ $[36] = t92;
396
408
  } else {
397
- t82 = $[34];
409
+ t92 = $[36];
398
410
  }
399
- let t9;
400
- if ($[35] !== t82 || $[36] !== total) {
401
- t9 = /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "border-b border-divider", children: /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-2 py-10 w-full", colSpan: total, children: t82 }) });
402
- $[35] = t82;
403
- $[36] = total;
404
- $[37] = t9;
411
+ let t10;
412
+ if ($[37] !== t92 || $[38] !== total) {
413
+ t10 = /* @__PURE__ */ jsxRuntime.jsx("tr", { className: "border-b border-divider", children: /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-2 py-10 w-full", colSpan: total, children: t92 }) });
414
+ $[37] = t92;
415
+ $[38] = total;
416
+ $[39] = t10;
405
417
  } else {
406
- t9 = $[37];
418
+ t10 = $[39];
407
419
  }
408
- fallbackContent = t9;
420
+ fallbackContent = t10;
409
421
  }
410
422
  }
411
- let t8;
412
- if ($[38] !== fallbackContent || $[39] !== mergedClass || $[40] !== props || $[41] !== renderedRows) {
413
- t8 = /* @__PURE__ */ jsxRuntime.jsxs("tbody", { className: mergedClass, ...props, children: [
423
+ let t9;
424
+ if ($[40] !== domProps || $[41] !== fallbackContent || $[42] !== mergedClass || $[43] !== renderedRows) {
425
+ t9 = /* @__PURE__ */ jsxRuntime.jsxs("tbody", { className: mergedClass, ...domProps, children: [
414
426
  renderedRows,
415
427
  fallbackContent
416
428
  ] });
417
- $[38] = fallbackContent;
418
- $[39] = mergedClass;
419
- $[40] = props;
420
- $[41] = renderedRows;
421
- $[42] = t8;
429
+ $[40] = domProps;
430
+ $[41] = fallbackContent;
431
+ $[42] = mergedClass;
432
+ $[43] = renderedRows;
433
+ $[44] = t9;
422
434
  } else {
423
- t8 = $[42];
435
+ t9 = $[44];
424
436
  }
425
- return t8;
437
+ return t9;
426
438
  }
427
439
  const TableBody = React.memo((props) => {
428
440
  const $ = compilerRuntime.c(2);
@@ -592,7 +604,7 @@ const TableBodyColumn = React.memo(React.forwardRef((t0, ref) => {
592
604
  }));
593
605
  TableBodyColumn.displayName = "TableBodyColumn";
594
606
  const TableHeaderRow = React.memo((t0) => {
595
- const $ = compilerRuntime.c(44);
607
+ const $ = compilerRuntime.c(42);
596
608
  let children;
597
609
  let className;
598
610
  let disabledCheck;
@@ -662,107 +674,104 @@ const TableHeaderRow = React.memo((t0) => {
662
674
  let t5;
663
675
  if (typeof children === "function") {
664
676
  let t62;
665
- if ($[13] !== children || $[14] !== dataHeader || $[15] !== props) {
677
+ if ($[13] !== children || $[14] !== dataHeader) {
666
678
  let t72;
667
- if ($[17] !== children || $[18] !== props) {
679
+ if ($[16] !== children) {
668
680
  t72 = (el, index) => {
669
681
  const child = children({
670
682
  item: el
671
683
  });
672
684
  const keyValue = el.id ?? el.header ?? index;
673
685
  return React.isValidElement(child) ? React.cloneElement(child, {
674
- key: keyValue,
675
- ...props
686
+ key: keyValue
676
687
  }) : null;
677
688
  };
678
- $[17] = children;
679
- $[18] = props;
680
- $[19] = t72;
689
+ $[16] = children;
690
+ $[17] = t72;
681
691
  } else {
682
- t72 = $[19];
692
+ t72 = $[17];
683
693
  }
684
694
  t62 = dataHeader.map(t72);
685
695
  $[13] = children;
686
696
  $[14] = dataHeader;
687
- $[15] = props;
688
- $[16] = t62;
697
+ $[15] = t62;
689
698
  } else {
690
- t62 = $[16];
699
+ t62 = $[15];
691
700
  }
692
701
  t5 = t62;
693
702
  } else {
694
703
  let t62;
695
- if ($[20] !== children || $[21] !== dataHeader || $[22] !== props) {
704
+ if ($[18] !== children || $[19] !== dataHeader || $[20] !== props) {
696
705
  let t72;
697
- if ($[24] !== dataHeader || $[25] !== props) {
706
+ if ($[22] !== dataHeader || $[23] !== props) {
698
707
  t72 = (child_0, index_0) => React.isValidElement(child_0) ? React.cloneElement(child_0, {
699
708
  key: dataHeader[index_0]?.id ?? dataHeader[index_0]?.header ?? index_0,
700
709
  ...props
701
710
  }) : child_0;
702
- $[24] = dataHeader;
703
- $[25] = props;
704
- $[26] = t72;
711
+ $[22] = dataHeader;
712
+ $[23] = props;
713
+ $[24] = t72;
705
714
  } else {
706
- t72 = $[26];
715
+ t72 = $[24];
707
716
  }
708
717
  t62 = React.Children.map(children, t72);
709
- $[20] = children;
710
- $[21] = dataHeader;
711
- $[22] = props;
712
- $[23] = t62;
718
+ $[18] = children;
719
+ $[19] = dataHeader;
720
+ $[20] = props;
721
+ $[21] = t62;
713
722
  } else {
714
- t62 = $[23];
723
+ t62 = $[21];
715
724
  }
716
725
  t5 = t62;
717
726
  }
718
727
  const headerChildren = t5;
719
728
  let t6;
720
- if ($[27] !== className) {
729
+ if ($[25] !== className) {
721
730
  t6 = tailwindMerge.twMerge("bg-default-100 h-[45px]", className);
722
- $[27] = className;
723
- $[28] = t6;
731
+ $[25] = className;
732
+ $[26] = t6;
724
733
  } else {
725
- t6 = $[28];
734
+ t6 = $[26];
726
735
  }
727
736
  let t7;
728
- if ($[29] !== color || $[30] !== handleChange || $[31] !== isChecks || $[32] !== uui || $[33] !== valueCheck) {
737
+ if ($[27] !== color || $[28] !== handleChange || $[29] !== isChecks || $[30] !== uui || $[31] !== valueCheck) {
729
738
  t7 = isChecks && /* @__PURE__ */ jsxRuntime.jsx(TableHeaderColumn, { className: "min-w-10 w-10", children: /* @__PURE__ */ jsxRuntime.jsx(checkbox.Checkbox, { id: uui, onChange: (e) => handleChange(e.target.checked), checked: valueCheck, className: "flex justify-center", color }) });
730
- $[29] = color;
731
- $[30] = handleChange;
732
- $[31] = isChecks;
733
- $[32] = uui;
734
- $[33] = valueCheck;
735
- $[34] = t7;
739
+ $[27] = color;
740
+ $[28] = handleChange;
741
+ $[29] = isChecks;
742
+ $[30] = uui;
743
+ $[31] = valueCheck;
744
+ $[32] = t7;
736
745
  } else {
737
- t7 = $[34];
746
+ t7 = $[32];
738
747
  }
739
748
  let t8;
740
- if ($[35] !== color || $[36] !== isActions || $[37] !== widthAction) {
749
+ if ($[33] !== color || $[34] !== isActions || $[35] !== widthAction) {
741
750
  t8 = isActions && /* @__PURE__ */ jsxRuntime.jsx(TableHeaderColumn, { color, style: {
742
751
  minWidth: `${widthAction}px`,
743
752
  width: `${widthAction}px`
744
753
  } });
745
- $[35] = color;
746
- $[36] = isActions;
747
- $[37] = widthAction;
748
- $[38] = t8;
754
+ $[33] = color;
755
+ $[34] = isActions;
756
+ $[35] = widthAction;
757
+ $[36] = t8;
749
758
  } else {
750
- t8 = $[38];
759
+ t8 = $[36];
751
760
  }
752
761
  let t9;
753
- if ($[39] !== headerChildren || $[40] !== t6 || $[41] !== t7 || $[42] !== t8) {
762
+ if ($[37] !== headerChildren || $[38] !== t6 || $[39] !== t7 || $[40] !== t8) {
754
763
  t9 = /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: t6, children: [
755
764
  t7,
756
765
  headerChildren,
757
766
  t8
758
767
  ] });
759
- $[39] = headerChildren;
760
- $[40] = t6;
761
- $[41] = t7;
762
- $[42] = t8;
763
- $[43] = t9;
768
+ $[37] = headerChildren;
769
+ $[38] = t6;
770
+ $[39] = t7;
771
+ $[40] = t8;
772
+ $[41] = t9;
764
773
  } else {
765
- t9 = $[43];
774
+ t9 = $[41];
766
775
  }
767
776
  return t9;
768
777
  });
@@ -959,7 +968,8 @@ const TableHOC = ({
959
968
  selectKeys = [],
960
969
  isActions = true,
961
970
  widthAction = 100,
962
- dataHeader
971
+ dataHeader,
972
+ ...otherProps
963
973
  } = props;
964
974
  const tableClass = React.useMemo(() => tailwindMerge.twMerge("table-main-container w-full border-collapse table-auto", className), [className]);
965
975
  const containerClass = React.useMemo(() => tailwindMerge.twMerge("max-w-full overflow-x-auto overflow-y-auto bg-content1", classNameContainer), [classNameContainer]);
@@ -972,7 +982,8 @@ const TableHOC = ({
972
982
  widthAction,
973
983
  totalColumn: dataHeader?.length || 0
974
984
  }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: containerClass, children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: /* @__PURE__ */ jsxRuntime.jsx(framerMotion.LazyMotion, { features: () => import("framer-motion").then((res) => res.domAnimation), children: /* @__PURE__ */ jsxRuntime.jsx("table", { className: tableClass, children: React.Children.map(children, (child) => React.isValidElement(child) ? React.cloneElement(child, {
975
- ...props
985
+ dataHeader,
986
+ ...otherProps
976
987
  }) : child) }) }) }) }) });
977
988
  };
978
989
  const Table = Object.assign(TableHOC, {