@deepnoid/ui 0.1.30 → 0.1.31

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 (46) hide show
  1. package/.turbo/turbo-build.log +136 -136
  2. package/dist/chunk-62X5AX5B.mjs +297 -0
  3. package/dist/{chunk-VCVQMPC7.mjs → chunk-AIIMJZ7L.mjs} +69 -39
  4. package/dist/{chunk-NKH3OF6I.mjs → chunk-BCMVEGJG.mjs} +1 -1
  5. package/dist/{chunk-QM4ZSQYX.mjs → chunk-CVQM3T2X.mjs} +1 -1
  6. package/dist/{chunk-GLMM253Q.mjs → chunk-EBRCE7XY.mjs} +2 -2
  7. package/dist/{chunk-272FMLIL.mjs → chunk-IEJRE6LT.mjs} +7 -4
  8. package/dist/{chunk-CEZQCD6Z.mjs → chunk-LWRK5TPZ.mjs} +12 -11
  9. package/dist/components/fileUpload/fileUpload.js +62 -39
  10. package/dist/components/fileUpload/fileUpload.mjs +2 -2
  11. package/dist/components/fileUpload/index.js +62 -39
  12. package/dist/components/fileUpload/index.mjs +2 -2
  13. package/dist/components/input/index.js +62 -39
  14. package/dist/components/input/index.mjs +1 -1
  15. package/dist/components/input/input.d.mts +21 -14
  16. package/dist/components/input/input.d.ts +21 -14
  17. package/dist/components/input/input.js +62 -39
  18. package/dist/components/input/input.mjs +1 -1
  19. package/dist/components/pagination/index.js +62 -39
  20. package/dist/components/pagination/index.mjs +2 -2
  21. package/dist/components/pagination/pagination.js +62 -39
  22. package/dist/components/pagination/pagination.mjs +2 -2
  23. package/dist/components/select/index.js +7 -4
  24. package/dist/components/select/index.mjs +1 -1
  25. package/dist/components/select/select.d.mts +9 -0
  26. package/dist/components/select/select.d.ts +9 -0
  27. package/dist/components/select/select.js +7 -4
  28. package/dist/components/select/select.mjs +1 -1
  29. package/dist/components/table/index.js +74 -50
  30. package/dist/components/table/index.mjs +4 -4
  31. package/dist/components/table/table-body.js +12 -11
  32. package/dist/components/table/table-body.mjs +1 -1
  33. package/dist/components/table/table.d.mts +2 -1
  34. package/dist/components/table/table.d.ts +2 -1
  35. package/dist/components/table/table.js +74 -50
  36. package/dist/components/table/table.mjs +4 -4
  37. package/dist/components/textarea/index.js +255 -138
  38. package/dist/components/textarea/index.mjs +2 -1
  39. package/dist/components/textarea/textarea.d.mts +157 -150
  40. package/dist/components/textarea/textarea.d.ts +157 -150
  41. package/dist/components/textarea/textarea.js +255 -138
  42. package/dist/components/textarea/textarea.mjs +2 -1
  43. package/dist/index.js +296 -192
  44. package/dist/index.mjs +7 -7
  45. package/package.json +1 -1
  46. package/dist/chunk-BKE6QF6W.mjs +0 -209
@@ -737,11 +737,12 @@ var TableBody = ({
737
737
  classNames,
738
738
  className
739
739
  }) => {
740
- const getCellStyle = (col) => ({
741
- width: col.width ? `${col.width}px` : void 0,
742
- minWidth: col.minWidth ? `${col.minWidth}px` : void 0,
743
- maxWidth: col.maxWidth ? `${col.maxWidth}px` : void 0,
744
- height: col.height ? `${col.height}px` : void 0
740
+ const getCellStyle = (column) => ({
741
+ width: column.width ? `${column.width}px` : void 0,
742
+ minWidth: column.minWidth ? `${column.minWidth}px` : void 0,
743
+ maxWidth: column.maxWidth ? `${column.maxWidth}px` : void 0,
744
+ height: column.height ? `${column.height}px` : void 0,
745
+ textAlign: column.align || "center"
745
746
  });
746
747
  const renderTdSkeleton = (key) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("td", { className: slots.td({ class: classNames == null ? void 0 : classNames.td }), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(skeleton_default, { color, className: "h-full w-full", rounded: "lg", speed: "fast" }) }, key);
747
748
  const renderCheckboxCell = (rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("td", { className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), "text-center"), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
@@ -758,16 +759,16 @@ var TableBody = ({
758
759
  ] }, `skeleton-${rowIndex}`);
759
760
  const renderEmptyRow = () => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("td", { colSpan: columns.length + (rowCheckbox ? 1 : 0), className: slots.empty({ class: classNames == null ? void 0 : classNames.empty }), children: emptyContent }) });
760
761
  const renderDataRow = (row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), onClick: () => onRowClick == null ? void 0 : onRowClick(row), children: [
761
- columns.map((col, colIdx) => {
762
+ columns.map((column, colIdx) => {
762
763
  var _a;
763
- const value = row[col.field];
764
- const formattedValue = ((_a = col.valueFormatter) == null ? void 0 : _a.call(col, { value, field: col.field })) || value;
765
- const content = col.renderCell ? col.renderCell({ id: row.id, field: col.field, value, formattedValue, row }) : formattedValue;
764
+ const value = row[column.field];
765
+ const formattedValue = ((_a = column.valueFormatter) == null ? void 0 : _a.call(column, { value, field: column.field })) || value;
766
+ const content = column.renderCell ? column.renderCell({ id: row.id, field: column.field, value, formattedValue, row }) : formattedValue;
766
767
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
767
768
  "td",
768
769
  {
769
- className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), col.className),
770
- style: getCellStyle(col),
770
+ className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), column.className),
771
+ style: getCellStyle(column),
771
772
  children: content
772
773
  },
773
774
  `${rowIndex}-${colIdx}`
@@ -813,7 +814,7 @@ var usePagination = ({ currentPage, totalPage, groupSize, handleChangePage }) =>
813
814
  var usePagination_default = usePagination;
814
815
 
815
816
  // src/components/input/input.tsx
816
- var import_react3 = __toESM(require("react"));
817
+ var import_react3 = require("react");
817
818
 
818
819
  // src/components/icon/template.tsx
819
820
  var import_jsx_runtime5 = require("react/jsx-runtime");
@@ -4805,19 +4806,22 @@ var Input = (0, import_react3.forwardRef)((originalProps, ref) => {
4805
4806
  const slots = (0, import_react3.useMemo)(() => inputStyle({ ...variantProps }), [variantProps]);
4806
4807
  const getContentProps = (0, import_react3.useCallback)(
4807
4808
  () => ({
4808
- className: slots.content({ class: classNames == null ? void 0 : classNames.content }),
4809
+ className: clsx(
4810
+ slots.content({ class: classNames == null ? void 0 : classNames.content }),
4811
+ inputProps.readOnly ? slots.readonly({ class: classNames == null ? void 0 : classNames.readonly }) : ""
4812
+ ),
4809
4813
  size: originalProps.size
4810
4814
  }),
4811
4815
  [slots, classNames, originalProps.size]
4812
4816
  );
4813
4817
  const renderStartContent = () => {
4814
- if (import_react3.default.isValidElement(startContent)) {
4818
+ if ((0, import_react3.isValidElement)(startContent)) {
4815
4819
  const existingProps = startContent.props;
4816
4820
  const mergedProps = {
4817
4821
  ...getContentProps(),
4818
4822
  className: `${getContentProps().className || ""} ${existingProps.className || ""}`.trim()
4819
4823
  };
4820
- return import_react3.default.cloneElement(startContent, mergedProps);
4824
+ return (0, import_react3.cloneElement)(startContent, mergedProps);
4821
4825
  } else {
4822
4826
  const contentProps = getContentProps();
4823
4827
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { ...contentProps, children: startContent });
@@ -4836,13 +4840,13 @@ var Input = (0, import_react3.forwardRef)((originalProps, ref) => {
4836
4840
  }
4837
4841
  );
4838
4842
  const renderContentWithIcon = () => {
4839
- if (import_react3.default.isValidElement(endContent)) {
4843
+ if ((0, import_react3.isValidElement)(endContent)) {
4840
4844
  const existingProps = endContent.props;
4841
4845
  const mergedProps = {
4842
4846
  ...getContentProps(),
4843
4847
  className: `${getContentProps().className || ""} ${existingProps.className || ""}`.trim()
4844
4848
  };
4845
- return import_react3.default.cloneElement(endContent, mergedProps);
4849
+ return (0, import_react3.cloneElement)(endContent, mergedProps);
4846
4850
  } else if (errorMessage) {
4847
4851
  const iconProps = { ...getContentProps(), className: getContentProps().className };
4848
4852
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { ...iconProps, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon_default, { name: "exclamation-circle", fill: true, size: originalProps.size }) });
@@ -4877,20 +4881,17 @@ var Input = (0, import_react3.forwardRef)((originalProps, ref) => {
4877
4881
  {
4878
4882
  className: clsx(
4879
4883
  slots.inputWrapper({ class: classNames == null ? void 0 : classNames.inputWrapper }),
4880
- inputProps.readOnly ? slots.readonly({ class: classNames == null ? void 0 : classNames.readonly }) : ""
4884
+ inputProps.readOnly ? slots.readonlyWrapper({ class: classNames == null ? void 0 : classNames.readonlyWrapper }) : ""
4881
4885
  ),
4882
4886
  children: [
4883
4887
  startContent && renderStartContent(),
4884
4888
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
4885
4889
  "input",
4886
4890
  {
4887
- ...inputProps,
4888
4891
  ref: ref || inputRef,
4892
+ ...inputProps,
4889
4893
  readOnly: props.readOnly,
4890
- className: clsx(
4891
- slots.input({ class: classNames == null ? void 0 : classNames.input }),
4892
- inputProps.readOnly ? "!text-body-foreground placeholder:!text-body-foreground" : ""
4893
- ),
4894
+ className: clsx(slots.input({ class: classNames == null ? void 0 : classNames.input })),
4894
4895
  size: 0
4895
4896
  }
4896
4897
  ),
@@ -4898,7 +4899,16 @@ var Input = (0, import_react3.forwardRef)((originalProps, ref) => {
4898
4899
  ]
4899
4900
  }
4900
4901
  ),
4901
- helperMessage && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: slots.helperMessage({ class: classNames == null ? void 0 : classNames.helperMessage }), children: helperMessage }),
4902
+ helperMessage && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
4903
+ "p",
4904
+ {
4905
+ className: clsx(
4906
+ slots.helperMessage({ class: classNames == null ? void 0 : classNames.helperMessage }),
4907
+ inputProps.readOnly ? slots.readonly({ class: classNames == null ? void 0 : classNames.readonly }) : ""
4908
+ ),
4909
+ children: helperMessage
4910
+ }
4911
+ ),
4902
4912
  errorMessage && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: clsx("error", slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })), children: errorMessage })
4903
4913
  ] })
4904
4914
  ]
@@ -4910,12 +4920,12 @@ var input_default = Input;
4910
4920
  var inputStyle = tv(
4911
4921
  {
4912
4922
  slots: {
4913
- base: ["group/input", "flex select-none"],
4923
+ base: ["group/input", "flex", "select-none"],
4914
4924
  vertical: ["flex-col"],
4915
4925
  horizon: ["flex-row", "gap-0"],
4916
4926
  label: ["flex", "items-center", "font-bold", "text-body-foreground", "min-w-[80px]"],
4917
4927
  innerWrapper: ["flex", "flex-col"],
4918
- inputWrapper: ["flex", "items-center", "duration-200", "group-has-[p.error]/input:bg-danger-soft"],
4928
+ inputWrapper: ["flex", "items-center", "duration-200", "group-has-[p.error]/input:!bg-danger-soft"],
4919
4929
  input: [
4920
4930
  "w-full",
4921
4931
  "h-full",
@@ -4924,8 +4934,8 @@ var inputStyle = tv(
4924
4934
  "placeholder:text-neutral-main",
4925
4935
  "outline-none",
4926
4936
  "focus:ring-0",
4927
- "group-has-[:hover]/input:text-neutral-dark",
4928
- "group-has-[:hover]/input:placeholder:text-neutral-dark",
4937
+ "group-has-[:hover]/input:!text-neutral-dark",
4938
+ "group-has-[:hover]/input:placeholder:!text-neutral-dark",
4929
4939
  "group-has-[:focus]/input:text-neutral-dark",
4930
4940
  "group-has-[:focus]/input:placeholder:text-neutral-dark",
4931
4941
  "group-has-[p.error]/input:text-danger-main",
@@ -4941,13 +4951,22 @@ var inputStyle = tv(
4941
4951
  ],
4942
4952
  helperMessage: ["text-neutral-main", "group-has-[:hover]/input:text-neutral-dark"],
4943
4953
  errorMessage: ["text-danger-main"],
4944
- readonly: ["pointer-events-none", "!text-body-foreground"]
4954
+ readonlyWrapper: [
4955
+ "pointer-events-none",
4956
+ "!text-body-foreground",
4957
+ "placeholder:!text-body-foreground",
4958
+ "group-has-[p.error]/input:!text-danger-main",
4959
+ "group-has-[p.error]/input:placeholder:!text-danger-main",
4960
+ "[&>input]:!text-body-foreground",
4961
+ "[&>input]:placeholder:!text-body-foreground"
4962
+ ],
4963
+ readonly: []
4945
4964
  },
4946
4965
  variants: {
4947
4966
  variant: {
4948
4967
  solid: {
4949
4968
  inputWrapper: ["border-transparent", "bg-trans-soft"],
4950
- readonly: ["!bg-trans-light"]
4969
+ readonlyWrapper: ["!bg-trans-light"]
4951
4970
  },
4952
4971
  outline: {
4953
4972
  inputWrapper: [
@@ -4956,7 +4975,7 @@ var inputStyle = tv(
4956
4975
  "group-has-[:focus]/input:bg-body-background",
4957
4976
  "group-has-[p.error]/input:border-danger-main"
4958
4977
  ],
4959
- readonly: ["!bg-trans-soft"]
4978
+ readonlyWrapper: ["!bg-trans-soft"]
4960
4979
  },
4961
4980
  underline: {
4962
4981
  inputWrapper: [
@@ -4966,30 +4985,31 @@ var inputStyle = tv(
4966
4985
  "group-has-[:focus]/input:bg-body-background",
4967
4986
  "group-has-[p.error]/input:border-danger-main"
4968
4987
  ],
4969
- readonly: ["!bg-trans-soft"]
4988
+ readonlyWrapper: ["!bg-trans-soft"]
4970
4989
  }
4971
4990
  },
4972
4991
  color: {
4973
4992
  primary: {
4974
4993
  content: [
4975
- "group-has-[:focus]/input:text-primary-main",
4976
- "!group-has-[p.error]:not(input:focus):hover/input:text-primary-main"
4994
+ "group-has-[:focus]/input:!text-primary-main",
4995
+ "group-has-[p.error]:not(input:focus):hover/input:!text-primary-main"
4977
4996
  ],
4978
4997
  helperMessage: [
4979
- "group-has-[:focus]/input:text-primary-main",
4980
- "group-has-[:focus:hover]/input:text-primary-main",
4981
- "group-has-[:focus]/input:hover:text-primary-main"
4982
- ]
4998
+ "group-has-[:focus]/input:!text-primary-main",
4999
+ "group-has-[:focus:hover]/input:!text-primary-main",
5000
+ "group-has-[:focus]/input:hover:!text-primary-main"
5001
+ ],
5002
+ readonly: ["!text-primary-main"]
4983
5003
  },
4984
5004
  secondary: {
4985
5005
  content: [
4986
- "group-has-[:focus]/input:text-secondary-main",
4987
- "!group-has-[p.error]:not(input:focus):hover/input:text-secondary-main"
5006
+ "group-has-[:focus]/input:!text-secondary-main",
5007
+ "group-has-[p.error]:not(input:focus):hover/input:!text-secondary-main"
4988
5008
  ],
4989
5009
  helperMessage: [
4990
- "group-has-[:focus]/input:text-secondary-main",
4991
- "group-has-[:focus:hover]/input:text-secondary-main",
4992
- "group-has-[:focus]/input:hover:text-secondary-main"
5010
+ "group-has-[:focus]/input:!text-secondary-main",
5011
+ "group-has-[:focus:hover]/input:!text-secondary-main",
5012
+ "group-has-[:focus]/input:hover:!text-secondary-main"
4993
5013
  ]
4994
5014
  }
4995
5015
  },
@@ -5040,14 +5060,14 @@ var inputStyle = tv(
5040
5060
  },
5041
5061
  disabled: {
5042
5062
  true: {
5043
- inputWrapper: ["!bg-neutral-soft", "pointer-events-none", "!group-has-[p.error]/input:text-danger-light"],
5063
+ inputWrapper: ["!bg-neutral-soft", "pointer-events-none", "group-has-[p.error]/input:!text-danger-light"],
5044
5064
  input: [
5045
- "text-neutral-light",
5046
- "placeholder:text-neutral-light",
5047
- "group-has-[p.error]/input:text-danger-light",
5048
- "group-has-[p.error]/input:placeholder:text-danger-light"
5065
+ "!text-neutral-light",
5066
+ "placeholder:!text-neutral-light",
5067
+ "group-has-[p.error]/input:!text-danger-light",
5068
+ "group-has-[p.error]/input:placeholder:!text-danger-light"
5049
5069
  ],
5050
- content: ["text-neutral-light", "group-has-[p.error]/input:text-danger-light"],
5070
+ content: ["!text-neutral-light", "group-has-[p.error]/input:text-danger-light"],
5051
5071
  helperMessage: ["!text-neutral-light"],
5052
5072
  errorMessage: ["!text-danger-light"]
5053
5073
  }
@@ -5114,7 +5134,11 @@ var inputStyle = tv(
5114
5134
  disabled: true,
5115
5135
  variant: ["outline", "underline"],
5116
5136
  class: {
5117
- inputWrapper: ["!bg-body-background", "group-has-[p.error]/input:border-danger-light"]
5137
+ inputWrapper: ["!bg-body-background", "group-has-[p.error]/input:!border-danger-light"],
5138
+ content: [
5139
+ "group-has-[p.error]/input:!text-danger-light",
5140
+ "group-has-[p.error]/input:placeholder:!text-danger-light"
5141
+ ]
5118
5142
  }
5119
5143
  }
5120
5144
  ],
@@ -2,21 +2,21 @@
2
2
  import "../../chunk-DX3KXNP6.mjs";
3
3
  import {
4
4
  table_default
5
- } from "../../chunk-GLMM253Q.mjs";
5
+ } from "../../chunk-EBRCE7XY.mjs";
6
6
  import {
7
7
  definition_table_default
8
8
  } from "../../chunk-6TIIBU7J.mjs";
9
- import "../../chunk-CEZQCD6Z.mjs";
9
+ import "../../chunk-LWRK5TPZ.mjs";
10
10
  import "../../chunk-P7YYNA6L.mjs";
11
11
  import "../../chunk-DQRAFUDA.mjs";
12
12
  import "../../chunk-M37VBNB3.mjs";
13
13
  import "../../chunk-MZ76AA76.mjs";
14
14
  import "../../chunk-6PN3DGOE.mjs";
15
15
  import "../../chunk-7B7LRG5J.mjs";
16
- import "../../chunk-QM4ZSQYX.mjs";
16
+ import "../../chunk-CVQM3T2X.mjs";
17
17
  import "../../chunk-F3HENRVM.mjs";
18
18
  import "../../chunk-2GCSFWHD.mjs";
19
- import "../../chunk-VCVQMPC7.mjs";
19
+ import "../../chunk-AIIMJZ7L.mjs";
20
20
  import "../../chunk-QZ3LVYJW.mjs";
21
21
  import "../../chunk-D6QI3DJG.mjs";
22
22
  import "../../chunk-ZYIIXWVY.mjs";
@@ -679,11 +679,12 @@ var TableBody = ({
679
679
  classNames,
680
680
  className
681
681
  }) => {
682
- const getCellStyle = (col) => ({
683
- width: col.width ? `${col.width}px` : void 0,
684
- minWidth: col.minWidth ? `${col.minWidth}px` : void 0,
685
- maxWidth: col.maxWidth ? `${col.maxWidth}px` : void 0,
686
- height: col.height ? `${col.height}px` : void 0
682
+ const getCellStyle = (column) => ({
683
+ width: column.width ? `${column.width}px` : void 0,
684
+ minWidth: column.minWidth ? `${column.minWidth}px` : void 0,
685
+ maxWidth: column.maxWidth ? `${column.maxWidth}px` : void 0,
686
+ height: column.height ? `${column.height}px` : void 0,
687
+ textAlign: column.align || "center"
687
688
  });
688
689
  const renderTdSkeleton = (key) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: slots.td({ class: classNames == null ? void 0 : classNames.td }), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(skeleton_default, { color, className: "h-full w-full", rounded: "lg", speed: "fast" }) }, key);
689
690
  const renderCheckboxCell = (rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), "text-center"), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
@@ -700,16 +701,16 @@ var TableBody = ({
700
701
  ] }, `skeleton-${rowIndex}`);
701
702
  const renderEmptyRow = () => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("td", { colSpan: columns.length + (rowCheckbox ? 1 : 0), className: slots.empty({ class: classNames == null ? void 0 : classNames.empty }), children: emptyContent }) });
702
703
  const renderDataRow = (row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), onClick: () => onRowClick == null ? void 0 : onRowClick(row), children: [
703
- columns.map((col, colIdx) => {
704
+ columns.map((column, colIdx) => {
704
705
  var _a;
705
- const value = row[col.field];
706
- const formattedValue = ((_a = col.valueFormatter) == null ? void 0 : _a.call(col, { value, field: col.field })) || value;
707
- const content = col.renderCell ? col.renderCell({ id: row.id, field: col.field, value, formattedValue, row }) : formattedValue;
706
+ const value = row[column.field];
707
+ const formattedValue = ((_a = column.valueFormatter) == null ? void 0 : _a.call(column, { value, field: column.field })) || value;
708
+ const content = column.renderCell ? column.renderCell({ id: row.id, field: column.field, value, formattedValue, row }) : formattedValue;
708
709
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
709
710
  "td",
710
711
  {
711
- className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), col.className),
712
- style: getCellStyle(col),
712
+ className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), column.className),
713
+ style: getCellStyle(column),
713
714
  children: content
714
715
  },
715
716
  `${rowIndex}-${colIdx}`
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  table_body_default
4
- } from "../../chunk-CEZQCD6Z.mjs";
4
+ } from "../../chunk-LWRK5TPZ.mjs";
5
5
  import "../../chunk-MZ76AA76.mjs";
6
6
  import "../../chunk-6PN3DGOE.mjs";
7
7
  import "../../chunk-QZ3LVYJW.mjs";
@@ -206,10 +206,11 @@ type ValueFormatterParams<V = any> = {
206
206
  value: V;
207
207
  };
208
208
  type TableRow<R extends RowValue = RowValue> = R;
209
+ type Align = "center" | "left" | "right";
209
210
  type TableColumn<R extends RowValue = RowValue, V = any, F = V> = {
210
211
  field: string;
211
212
  headerName?: string | ReactElement;
212
- align?: "left" | "center" | "right";
213
+ align?: Align;
213
214
  width?: number;
214
215
  minWidth?: number;
215
216
  maxWidth?: number;
@@ -206,10 +206,11 @@ type ValueFormatterParams<V = any> = {
206
206
  value: V;
207
207
  };
208
208
  type TableRow<R extends RowValue = RowValue> = R;
209
+ type Align = "center" | "left" | "right";
209
210
  type TableColumn<R extends RowValue = RowValue, V = any, F = V> = {
210
211
  field: string;
211
212
  headerName?: string | ReactElement;
212
- align?: "left" | "center" | "right";
213
+ align?: Align;
213
214
  width?: number;
214
215
  minWidth?: number;
215
216
  maxWidth?: number;
@@ -734,11 +734,12 @@ var TableBody = ({
734
734
  classNames,
735
735
  className
736
736
  }) => {
737
- const getCellStyle = (col) => ({
738
- width: col.width ? `${col.width}px` : void 0,
739
- minWidth: col.minWidth ? `${col.minWidth}px` : void 0,
740
- maxWidth: col.maxWidth ? `${col.maxWidth}px` : void 0,
741
- height: col.height ? `${col.height}px` : void 0
737
+ const getCellStyle = (column) => ({
738
+ width: column.width ? `${column.width}px` : void 0,
739
+ minWidth: column.minWidth ? `${column.minWidth}px` : void 0,
740
+ maxWidth: column.maxWidth ? `${column.maxWidth}px` : void 0,
741
+ height: column.height ? `${column.height}px` : void 0,
742
+ textAlign: column.align || "center"
742
743
  });
743
744
  const renderTdSkeleton = (key) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("td", { className: slots.td({ class: classNames == null ? void 0 : classNames.td }), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(skeleton_default, { color, className: "h-full w-full", rounded: "lg", speed: "fast" }) }, key);
744
745
  const renderCheckboxCell = (rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("td", { className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), "text-center"), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
@@ -755,16 +756,16 @@ var TableBody = ({
755
756
  ] }, `skeleton-${rowIndex}`);
756
757
  const renderEmptyRow = () => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("td", { colSpan: columns.length + (rowCheckbox ? 1 : 0), className: slots.empty({ class: classNames == null ? void 0 : classNames.empty }), children: emptyContent }) });
757
758
  const renderDataRow = (row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), onClick: () => onRowClick == null ? void 0 : onRowClick(row), children: [
758
- columns.map((col, colIdx) => {
759
+ columns.map((column, colIdx) => {
759
760
  var _a;
760
- const value = row[col.field];
761
- const formattedValue = ((_a = col.valueFormatter) == null ? void 0 : _a.call(col, { value, field: col.field })) || value;
762
- const content = col.renderCell ? col.renderCell({ id: row.id, field: col.field, value, formattedValue, row }) : formattedValue;
761
+ const value = row[column.field];
762
+ const formattedValue = ((_a = column.valueFormatter) == null ? void 0 : _a.call(column, { value, field: column.field })) || value;
763
+ const content = column.renderCell ? column.renderCell({ id: row.id, field: column.field, value, formattedValue, row }) : formattedValue;
763
764
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
764
765
  "td",
765
766
  {
766
- className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), col.className),
767
- style: getCellStyle(col),
767
+ className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), column.className),
768
+ style: getCellStyle(column),
768
769
  children: content
769
770
  },
770
771
  `${rowIndex}-${colIdx}`
@@ -810,7 +811,7 @@ var usePagination = ({ currentPage, totalPage, groupSize, handleChangePage }) =>
810
811
  var usePagination_default = usePagination;
811
812
 
812
813
  // src/components/input/input.tsx
813
- var import_react3 = __toESM(require("react"));
814
+ var import_react3 = require("react");
814
815
 
815
816
  // src/components/icon/template.tsx
816
817
  var import_jsx_runtime5 = require("react/jsx-runtime");
@@ -4802,19 +4803,22 @@ var Input = (0, import_react3.forwardRef)((originalProps, ref) => {
4802
4803
  const slots = (0, import_react3.useMemo)(() => inputStyle({ ...variantProps }), [variantProps]);
4803
4804
  const getContentProps = (0, import_react3.useCallback)(
4804
4805
  () => ({
4805
- className: slots.content({ class: classNames == null ? void 0 : classNames.content }),
4806
+ className: clsx(
4807
+ slots.content({ class: classNames == null ? void 0 : classNames.content }),
4808
+ inputProps.readOnly ? slots.readonly({ class: classNames == null ? void 0 : classNames.readonly }) : ""
4809
+ ),
4806
4810
  size: originalProps.size
4807
4811
  }),
4808
4812
  [slots, classNames, originalProps.size]
4809
4813
  );
4810
4814
  const renderStartContent = () => {
4811
- if (import_react3.default.isValidElement(startContent)) {
4815
+ if ((0, import_react3.isValidElement)(startContent)) {
4812
4816
  const existingProps = startContent.props;
4813
4817
  const mergedProps = {
4814
4818
  ...getContentProps(),
4815
4819
  className: `${getContentProps().className || ""} ${existingProps.className || ""}`.trim()
4816
4820
  };
4817
- return import_react3.default.cloneElement(startContent, mergedProps);
4821
+ return (0, import_react3.cloneElement)(startContent, mergedProps);
4818
4822
  } else {
4819
4823
  const contentProps = getContentProps();
4820
4824
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { ...contentProps, children: startContent });
@@ -4833,13 +4837,13 @@ var Input = (0, import_react3.forwardRef)((originalProps, ref) => {
4833
4837
  }
4834
4838
  );
4835
4839
  const renderContentWithIcon = () => {
4836
- if (import_react3.default.isValidElement(endContent)) {
4840
+ if ((0, import_react3.isValidElement)(endContent)) {
4837
4841
  const existingProps = endContent.props;
4838
4842
  const mergedProps = {
4839
4843
  ...getContentProps(),
4840
4844
  className: `${getContentProps().className || ""} ${existingProps.className || ""}`.trim()
4841
4845
  };
4842
- return import_react3.default.cloneElement(endContent, mergedProps);
4846
+ return (0, import_react3.cloneElement)(endContent, mergedProps);
4843
4847
  } else if (errorMessage) {
4844
4848
  const iconProps = { ...getContentProps(), className: getContentProps().className };
4845
4849
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { ...iconProps, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon_default, { name: "exclamation-circle", fill: true, size: originalProps.size }) });
@@ -4874,20 +4878,17 @@ var Input = (0, import_react3.forwardRef)((originalProps, ref) => {
4874
4878
  {
4875
4879
  className: clsx(
4876
4880
  slots.inputWrapper({ class: classNames == null ? void 0 : classNames.inputWrapper }),
4877
- inputProps.readOnly ? slots.readonly({ class: classNames == null ? void 0 : classNames.readonly }) : ""
4881
+ inputProps.readOnly ? slots.readonlyWrapper({ class: classNames == null ? void 0 : classNames.readonlyWrapper }) : ""
4878
4882
  ),
4879
4883
  children: [
4880
4884
  startContent && renderStartContent(),
4881
4885
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
4882
4886
  "input",
4883
4887
  {
4884
- ...inputProps,
4885
4888
  ref: ref || inputRef,
4889
+ ...inputProps,
4886
4890
  readOnly: props.readOnly,
4887
- className: clsx(
4888
- slots.input({ class: classNames == null ? void 0 : classNames.input }),
4889
- inputProps.readOnly ? "!text-body-foreground placeholder:!text-body-foreground" : ""
4890
- ),
4891
+ className: clsx(slots.input({ class: classNames == null ? void 0 : classNames.input })),
4891
4892
  size: 0
4892
4893
  }
4893
4894
  ),
@@ -4895,7 +4896,16 @@ var Input = (0, import_react3.forwardRef)((originalProps, ref) => {
4895
4896
  ]
4896
4897
  }
4897
4898
  ),
4898
- helperMessage && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: slots.helperMessage({ class: classNames == null ? void 0 : classNames.helperMessage }), children: helperMessage }),
4899
+ helperMessage && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
4900
+ "p",
4901
+ {
4902
+ className: clsx(
4903
+ slots.helperMessage({ class: classNames == null ? void 0 : classNames.helperMessage }),
4904
+ inputProps.readOnly ? slots.readonly({ class: classNames == null ? void 0 : classNames.readonly }) : ""
4905
+ ),
4906
+ children: helperMessage
4907
+ }
4908
+ ),
4899
4909
  errorMessage && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: clsx("error", slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })), children: errorMessage })
4900
4910
  ] })
4901
4911
  ]
@@ -4907,12 +4917,12 @@ var input_default = Input;
4907
4917
  var inputStyle = tv(
4908
4918
  {
4909
4919
  slots: {
4910
- base: ["group/input", "flex select-none"],
4920
+ base: ["group/input", "flex", "select-none"],
4911
4921
  vertical: ["flex-col"],
4912
4922
  horizon: ["flex-row", "gap-0"],
4913
4923
  label: ["flex", "items-center", "font-bold", "text-body-foreground", "min-w-[80px]"],
4914
4924
  innerWrapper: ["flex", "flex-col"],
4915
- inputWrapper: ["flex", "items-center", "duration-200", "group-has-[p.error]/input:bg-danger-soft"],
4925
+ inputWrapper: ["flex", "items-center", "duration-200", "group-has-[p.error]/input:!bg-danger-soft"],
4916
4926
  input: [
4917
4927
  "w-full",
4918
4928
  "h-full",
@@ -4921,8 +4931,8 @@ var inputStyle = tv(
4921
4931
  "placeholder:text-neutral-main",
4922
4932
  "outline-none",
4923
4933
  "focus:ring-0",
4924
- "group-has-[:hover]/input:text-neutral-dark",
4925
- "group-has-[:hover]/input:placeholder:text-neutral-dark",
4934
+ "group-has-[:hover]/input:!text-neutral-dark",
4935
+ "group-has-[:hover]/input:placeholder:!text-neutral-dark",
4926
4936
  "group-has-[:focus]/input:text-neutral-dark",
4927
4937
  "group-has-[:focus]/input:placeholder:text-neutral-dark",
4928
4938
  "group-has-[p.error]/input:text-danger-main",
@@ -4938,13 +4948,22 @@ var inputStyle = tv(
4938
4948
  ],
4939
4949
  helperMessage: ["text-neutral-main", "group-has-[:hover]/input:text-neutral-dark"],
4940
4950
  errorMessage: ["text-danger-main"],
4941
- readonly: ["pointer-events-none", "!text-body-foreground"]
4951
+ readonlyWrapper: [
4952
+ "pointer-events-none",
4953
+ "!text-body-foreground",
4954
+ "placeholder:!text-body-foreground",
4955
+ "group-has-[p.error]/input:!text-danger-main",
4956
+ "group-has-[p.error]/input:placeholder:!text-danger-main",
4957
+ "[&>input]:!text-body-foreground",
4958
+ "[&>input]:placeholder:!text-body-foreground"
4959
+ ],
4960
+ readonly: []
4942
4961
  },
4943
4962
  variants: {
4944
4963
  variant: {
4945
4964
  solid: {
4946
4965
  inputWrapper: ["border-transparent", "bg-trans-soft"],
4947
- readonly: ["!bg-trans-light"]
4966
+ readonlyWrapper: ["!bg-trans-light"]
4948
4967
  },
4949
4968
  outline: {
4950
4969
  inputWrapper: [
@@ -4953,7 +4972,7 @@ var inputStyle = tv(
4953
4972
  "group-has-[:focus]/input:bg-body-background",
4954
4973
  "group-has-[p.error]/input:border-danger-main"
4955
4974
  ],
4956
- readonly: ["!bg-trans-soft"]
4975
+ readonlyWrapper: ["!bg-trans-soft"]
4957
4976
  },
4958
4977
  underline: {
4959
4978
  inputWrapper: [
@@ -4963,30 +4982,31 @@ var inputStyle = tv(
4963
4982
  "group-has-[:focus]/input:bg-body-background",
4964
4983
  "group-has-[p.error]/input:border-danger-main"
4965
4984
  ],
4966
- readonly: ["!bg-trans-soft"]
4985
+ readonlyWrapper: ["!bg-trans-soft"]
4967
4986
  }
4968
4987
  },
4969
4988
  color: {
4970
4989
  primary: {
4971
4990
  content: [
4972
- "group-has-[:focus]/input:text-primary-main",
4973
- "!group-has-[p.error]:not(input:focus):hover/input:text-primary-main"
4991
+ "group-has-[:focus]/input:!text-primary-main",
4992
+ "group-has-[p.error]:not(input:focus):hover/input:!text-primary-main"
4974
4993
  ],
4975
4994
  helperMessage: [
4976
- "group-has-[:focus]/input:text-primary-main",
4977
- "group-has-[:focus:hover]/input:text-primary-main",
4978
- "group-has-[:focus]/input:hover:text-primary-main"
4979
- ]
4995
+ "group-has-[:focus]/input:!text-primary-main",
4996
+ "group-has-[:focus:hover]/input:!text-primary-main",
4997
+ "group-has-[:focus]/input:hover:!text-primary-main"
4998
+ ],
4999
+ readonly: ["!text-primary-main"]
4980
5000
  },
4981
5001
  secondary: {
4982
5002
  content: [
4983
- "group-has-[:focus]/input:text-secondary-main",
4984
- "!group-has-[p.error]:not(input:focus):hover/input:text-secondary-main"
5003
+ "group-has-[:focus]/input:!text-secondary-main",
5004
+ "group-has-[p.error]:not(input:focus):hover/input:!text-secondary-main"
4985
5005
  ],
4986
5006
  helperMessage: [
4987
- "group-has-[:focus]/input:text-secondary-main",
4988
- "group-has-[:focus:hover]/input:text-secondary-main",
4989
- "group-has-[:focus]/input:hover:text-secondary-main"
5007
+ "group-has-[:focus]/input:!text-secondary-main",
5008
+ "group-has-[:focus:hover]/input:!text-secondary-main",
5009
+ "group-has-[:focus]/input:hover:!text-secondary-main"
4990
5010
  ]
4991
5011
  }
4992
5012
  },
@@ -5037,14 +5057,14 @@ var inputStyle = tv(
5037
5057
  },
5038
5058
  disabled: {
5039
5059
  true: {
5040
- inputWrapper: ["!bg-neutral-soft", "pointer-events-none", "!group-has-[p.error]/input:text-danger-light"],
5060
+ inputWrapper: ["!bg-neutral-soft", "pointer-events-none", "group-has-[p.error]/input:!text-danger-light"],
5041
5061
  input: [
5042
- "text-neutral-light",
5043
- "placeholder:text-neutral-light",
5044
- "group-has-[p.error]/input:text-danger-light",
5045
- "group-has-[p.error]/input:placeholder:text-danger-light"
5062
+ "!text-neutral-light",
5063
+ "placeholder:!text-neutral-light",
5064
+ "group-has-[p.error]/input:!text-danger-light",
5065
+ "group-has-[p.error]/input:placeholder:!text-danger-light"
5046
5066
  ],
5047
- content: ["text-neutral-light", "group-has-[p.error]/input:text-danger-light"],
5067
+ content: ["!text-neutral-light", "group-has-[p.error]/input:text-danger-light"],
5048
5068
  helperMessage: ["!text-neutral-light"],
5049
5069
  errorMessage: ["!text-danger-light"]
5050
5070
  }
@@ -5111,7 +5131,11 @@ var inputStyle = tv(
5111
5131
  disabled: true,
5112
5132
  variant: ["outline", "underline"],
5113
5133
  class: {
5114
- inputWrapper: ["!bg-body-background", "group-has-[p.error]/input:border-danger-light"]
5134
+ inputWrapper: ["!bg-body-background", "group-has-[p.error]/input:!border-danger-light"],
5135
+ content: [
5136
+ "group-has-[p.error]/input:!text-danger-light",
5137
+ "group-has-[p.error]/input:placeholder:!text-danger-light"
5138
+ ]
5115
5139
  }
5116
5140
  }
5117
5141
  ],