@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
package/dist/index.js CHANGED
@@ -5869,7 +5869,7 @@ var breadcrumbStyle = tv({
5869
5869
  });
5870
5870
 
5871
5871
  // src/components/input/input.tsx
5872
- var import_react9 = __toESM(require("react"));
5872
+ var import_react9 = require("react");
5873
5873
  var import_jsx_runtime11 = require("react/jsx-runtime");
5874
5874
  var Input = (0, import_react9.forwardRef)((originalProps, ref) => {
5875
5875
  const [props, variantProps] = mapPropsVariants(originalProps, inputStyle.variantKeys);
@@ -5878,19 +5878,22 @@ var Input = (0, import_react9.forwardRef)((originalProps, ref) => {
5878
5878
  const slots = (0, import_react9.useMemo)(() => inputStyle({ ...variantProps }), [variantProps]);
5879
5879
  const getContentProps = (0, import_react9.useCallback)(
5880
5880
  () => ({
5881
- className: slots.content({ class: classNames == null ? void 0 : classNames.content }),
5881
+ className: clsx(
5882
+ slots.content({ class: classNames == null ? void 0 : classNames.content }),
5883
+ inputProps.readOnly ? slots.readonly({ class: classNames == null ? void 0 : classNames.readonly }) : ""
5884
+ ),
5882
5885
  size: originalProps.size
5883
5886
  }),
5884
5887
  [slots, classNames, originalProps.size]
5885
5888
  );
5886
5889
  const renderStartContent = () => {
5887
- if (import_react9.default.isValidElement(startContent)) {
5890
+ if ((0, import_react9.isValidElement)(startContent)) {
5888
5891
  const existingProps = startContent.props;
5889
5892
  const mergedProps = {
5890
5893
  ...getContentProps(),
5891
5894
  className: `${getContentProps().className || ""} ${existingProps.className || ""}`.trim()
5892
5895
  };
5893
- return import_react9.default.cloneElement(startContent, mergedProps);
5896
+ return (0, import_react9.cloneElement)(startContent, mergedProps);
5894
5897
  } else {
5895
5898
  const contentProps = getContentProps();
5896
5899
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { ...contentProps, children: startContent });
@@ -5909,13 +5912,13 @@ var Input = (0, import_react9.forwardRef)((originalProps, ref) => {
5909
5912
  }
5910
5913
  );
5911
5914
  const renderContentWithIcon = () => {
5912
- if (import_react9.default.isValidElement(endContent)) {
5915
+ if ((0, import_react9.isValidElement)(endContent)) {
5913
5916
  const existingProps = endContent.props;
5914
5917
  const mergedProps = {
5915
5918
  ...getContentProps(),
5916
5919
  className: `${getContentProps().className || ""} ${existingProps.className || ""}`.trim()
5917
5920
  };
5918
- return import_react9.default.cloneElement(endContent, mergedProps);
5921
+ return (0, import_react9.cloneElement)(endContent, mergedProps);
5919
5922
  } else if (errorMessage) {
5920
5923
  const iconProps = { ...getContentProps(), className: getContentProps().className };
5921
5924
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { ...iconProps, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Icon_default, { name: "exclamation-circle", fill: true, size: originalProps.size }) });
@@ -5950,20 +5953,17 @@ var Input = (0, import_react9.forwardRef)((originalProps, ref) => {
5950
5953
  {
5951
5954
  className: clsx(
5952
5955
  slots.inputWrapper({ class: classNames == null ? void 0 : classNames.inputWrapper }),
5953
- inputProps.readOnly ? slots.readonly({ class: classNames == null ? void 0 : classNames.readonly }) : ""
5956
+ inputProps.readOnly ? slots.readonlyWrapper({ class: classNames == null ? void 0 : classNames.readonlyWrapper }) : ""
5954
5957
  ),
5955
5958
  children: [
5956
5959
  startContent && renderStartContent(),
5957
5960
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
5958
5961
  "input",
5959
5962
  {
5960
- ...inputProps,
5961
5963
  ref: ref || inputRef,
5964
+ ...inputProps,
5962
5965
  readOnly: props.readOnly,
5963
- className: clsx(
5964
- slots.input({ class: classNames == null ? void 0 : classNames.input }),
5965
- inputProps.readOnly ? "!text-body-foreground placeholder:!text-body-foreground" : ""
5966
- ),
5966
+ className: clsx(slots.input({ class: classNames == null ? void 0 : classNames.input })),
5967
5967
  size: 0
5968
5968
  }
5969
5969
  ),
@@ -5971,7 +5971,16 @@ var Input = (0, import_react9.forwardRef)((originalProps, ref) => {
5971
5971
  ]
5972
5972
  }
5973
5973
  ),
5974
- helperMessage && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: slots.helperMessage({ class: classNames == null ? void 0 : classNames.helperMessage }), children: helperMessage }),
5974
+ helperMessage && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
5975
+ "p",
5976
+ {
5977
+ className: clsx(
5978
+ slots.helperMessage({ class: classNames == null ? void 0 : classNames.helperMessage }),
5979
+ inputProps.readOnly ? slots.readonly({ class: classNames == null ? void 0 : classNames.readonly }) : ""
5980
+ ),
5981
+ children: helperMessage
5982
+ }
5983
+ ),
5975
5984
  errorMessage && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: clsx("error", slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })), children: errorMessage })
5976
5985
  ] })
5977
5986
  ]
@@ -5983,12 +5992,12 @@ var input_default = Input;
5983
5992
  var inputStyle = tv(
5984
5993
  {
5985
5994
  slots: {
5986
- base: ["group/input", "flex select-none"],
5995
+ base: ["group/input", "flex", "select-none"],
5987
5996
  vertical: ["flex-col"],
5988
5997
  horizon: ["flex-row", "gap-0"],
5989
5998
  label: ["flex", "items-center", "font-bold", "text-body-foreground", "min-w-[80px]"],
5990
5999
  innerWrapper: ["flex", "flex-col"],
5991
- inputWrapper: ["flex", "items-center", "duration-200", "group-has-[p.error]/input:bg-danger-soft"],
6000
+ inputWrapper: ["flex", "items-center", "duration-200", "group-has-[p.error]/input:!bg-danger-soft"],
5992
6001
  input: [
5993
6002
  "w-full",
5994
6003
  "h-full",
@@ -5997,8 +6006,8 @@ var inputStyle = tv(
5997
6006
  "placeholder:text-neutral-main",
5998
6007
  "outline-none",
5999
6008
  "focus:ring-0",
6000
- "group-has-[:hover]/input:text-neutral-dark",
6001
- "group-has-[:hover]/input:placeholder:text-neutral-dark",
6009
+ "group-has-[:hover]/input:!text-neutral-dark",
6010
+ "group-has-[:hover]/input:placeholder:!text-neutral-dark",
6002
6011
  "group-has-[:focus]/input:text-neutral-dark",
6003
6012
  "group-has-[:focus]/input:placeholder:text-neutral-dark",
6004
6013
  "group-has-[p.error]/input:text-danger-main",
@@ -6014,13 +6023,22 @@ var inputStyle = tv(
6014
6023
  ],
6015
6024
  helperMessage: ["text-neutral-main", "group-has-[:hover]/input:text-neutral-dark"],
6016
6025
  errorMessage: ["text-danger-main"],
6017
- readonly: ["pointer-events-none", "!text-body-foreground"]
6026
+ readonlyWrapper: [
6027
+ "pointer-events-none",
6028
+ "!text-body-foreground",
6029
+ "placeholder:!text-body-foreground",
6030
+ "group-has-[p.error]/input:!text-danger-main",
6031
+ "group-has-[p.error]/input:placeholder:!text-danger-main",
6032
+ "[&>input]:!text-body-foreground",
6033
+ "[&>input]:placeholder:!text-body-foreground"
6034
+ ],
6035
+ readonly: []
6018
6036
  },
6019
6037
  variants: {
6020
6038
  variant: {
6021
6039
  solid: {
6022
6040
  inputWrapper: ["border-transparent", "bg-trans-soft"],
6023
- readonly: ["!bg-trans-light"]
6041
+ readonlyWrapper: ["!bg-trans-light"]
6024
6042
  },
6025
6043
  outline: {
6026
6044
  inputWrapper: [
@@ -6029,7 +6047,7 @@ var inputStyle = tv(
6029
6047
  "group-has-[:focus]/input:bg-body-background",
6030
6048
  "group-has-[p.error]/input:border-danger-main"
6031
6049
  ],
6032
- readonly: ["!bg-trans-soft"]
6050
+ readonlyWrapper: ["!bg-trans-soft"]
6033
6051
  },
6034
6052
  underline: {
6035
6053
  inputWrapper: [
@@ -6039,30 +6057,31 @@ var inputStyle = tv(
6039
6057
  "group-has-[:focus]/input:bg-body-background",
6040
6058
  "group-has-[p.error]/input:border-danger-main"
6041
6059
  ],
6042
- readonly: ["!bg-trans-soft"]
6060
+ readonlyWrapper: ["!bg-trans-soft"]
6043
6061
  }
6044
6062
  },
6045
6063
  color: {
6046
6064
  primary: {
6047
6065
  content: [
6048
- "group-has-[:focus]/input:text-primary-main",
6049
- "!group-has-[p.error]:not(input:focus):hover/input:text-primary-main"
6066
+ "group-has-[:focus]/input:!text-primary-main",
6067
+ "group-has-[p.error]:not(input:focus):hover/input:!text-primary-main"
6050
6068
  ],
6051
6069
  helperMessage: [
6052
- "group-has-[:focus]/input:text-primary-main",
6053
- "group-has-[:focus:hover]/input:text-primary-main",
6054
- "group-has-[:focus]/input:hover:text-primary-main"
6055
- ]
6070
+ "group-has-[:focus]/input:!text-primary-main",
6071
+ "group-has-[:focus:hover]/input:!text-primary-main",
6072
+ "group-has-[:focus]/input:hover:!text-primary-main"
6073
+ ],
6074
+ readonly: ["!text-primary-main"]
6056
6075
  },
6057
6076
  secondary: {
6058
6077
  content: [
6059
- "group-has-[:focus]/input:text-secondary-main",
6060
- "!group-has-[p.error]:not(input:focus):hover/input:text-secondary-main"
6078
+ "group-has-[:focus]/input:!text-secondary-main",
6079
+ "group-has-[p.error]:not(input:focus):hover/input:!text-secondary-main"
6061
6080
  ],
6062
6081
  helperMessage: [
6063
- "group-has-[:focus]/input:text-secondary-main",
6064
- "group-has-[:focus:hover]/input:text-secondary-main",
6065
- "group-has-[:focus]/input:hover:text-secondary-main"
6082
+ "group-has-[:focus]/input:!text-secondary-main",
6083
+ "group-has-[:focus:hover]/input:!text-secondary-main",
6084
+ "group-has-[:focus]/input:hover:!text-secondary-main"
6066
6085
  ]
6067
6086
  }
6068
6087
  },
@@ -6113,14 +6132,14 @@ var inputStyle = tv(
6113
6132
  },
6114
6133
  disabled: {
6115
6134
  true: {
6116
- inputWrapper: ["!bg-neutral-soft", "pointer-events-none", "!group-has-[p.error]/input:text-danger-light"],
6135
+ inputWrapper: ["!bg-neutral-soft", "pointer-events-none", "group-has-[p.error]/input:!text-danger-light"],
6117
6136
  input: [
6118
- "text-neutral-light",
6119
- "placeholder:text-neutral-light",
6120
- "group-has-[p.error]/input:text-danger-light",
6121
- "group-has-[p.error]/input:placeholder:text-danger-light"
6137
+ "!text-neutral-light",
6138
+ "placeholder:!text-neutral-light",
6139
+ "group-has-[p.error]/input:!text-danger-light",
6140
+ "group-has-[p.error]/input:placeholder:!text-danger-light"
6122
6141
  ],
6123
- content: ["text-neutral-light", "group-has-[p.error]/input:text-danger-light"],
6142
+ content: ["!text-neutral-light", "group-has-[p.error]/input:text-danger-light"],
6124
6143
  helperMessage: ["!text-neutral-light"],
6125
6144
  errorMessage: ["!text-danger-light"]
6126
6145
  }
@@ -6187,7 +6206,11 @@ var inputStyle = tv(
6187
6206
  disabled: true,
6188
6207
  variant: ["outline", "underline"],
6189
6208
  class: {
6190
- inputWrapper: ["!bg-body-background", "group-has-[p.error]/input:border-danger-light"]
6209
+ inputWrapper: ["!bg-body-background", "group-has-[p.error]/input:!border-danger-light"],
6210
+ content: [
6211
+ "group-has-[p.error]/input:!text-danger-light",
6212
+ "group-has-[p.error]/input:placeholder:!text-danger-light"
6213
+ ]
6191
6214
  }
6192
6215
  }
6193
6216
  ],
@@ -6418,200 +6441,277 @@ var import_react11 = require("react");
6418
6441
  var import_tailwind_variants11 = require("tailwind-variants");
6419
6442
  var import_jsx_runtime13 = require("react/jsx-runtime");
6420
6443
  var Textarea = (0, import_react11.forwardRef)((originalProps, ref) => {
6444
+ var _a, _b;
6421
6445
  const [props, variantProps] = mapPropsVariants(originalProps, textareaStyle.variantKeys);
6422
- const { classNames, label, errorMessage, ...textareaProps } = props;
6423
- const slots = (0, import_react11.useMemo)(() => textareaStyle({ ...variantProps }), [variantProps]);
6424
- const getBaseProps = (0, import_react11.useCallback)(
6425
- () => ({
6426
- className: slots.base({ class: classNames == null ? void 0 : classNames.base })
6427
- }),
6428
- [slots, classNames]
6429
- );
6430
- const getLabelProps = (0, import_react11.useCallback)(
6431
- () => ({
6432
- className: slots.label({ class: classNames == null ? void 0 : classNames.label })
6433
- }),
6434
- [slots, classNames]
6435
- );
6436
- const getInnerWrapperProps = (0, import_react11.useCallback)(
6437
- () => ({
6438
- className: slots.innerWrapper({ class: classNames == null ? void 0 : classNames.innerWrapper })
6439
- }),
6440
- [slots, classNames]
6441
- );
6442
- const getTextareaWrapperProps = (0, import_react11.useCallback)(
6443
- () => ({
6444
- className: slots.textareaWrapper({ class: classNames == null ? void 0 : classNames.textareaWrapper })
6445
- }),
6446
- [slots, classNames]
6447
- );
6448
- const getTextareaProps = (0, import_react11.useCallback)(
6449
- () => ({
6450
- ...textareaProps,
6451
- ref,
6452
- className: slots.textarea({ class: classNames == null ? void 0 : classNames.textarea }),
6453
- disabled: originalProps.isDisabled,
6454
- required: originalProps.isRequired,
6455
- size: 0
6456
- }),
6457
- [textareaProps, ref, slots, classNames == null ? void 0 : classNames.textarea, originalProps.isDisabled, originalProps.isRequired]
6446
+ const { classNames, label, helperMessage, errorMessage, ...textareaProps } = props;
6447
+ const [length, setLength] = (0, import_react11.useState)(((_b = (_a = originalProps.value) == null ? void 0 : _a.toString()) != null ? _b : "").length);
6448
+ const innerRef = (0, import_react11.useRef)(null);
6449
+ (0, import_react11.useImperativeHandle)(ref, () => innerRef.current);
6450
+ const autoResize = (0, import_react11.useCallback)(() => {
6451
+ const el = innerRef.current;
6452
+ if (el) {
6453
+ el.style.height = "auto";
6454
+ el.style.height = el.scrollHeight + "px";
6455
+ }
6456
+ }, []);
6457
+ const handleChange = (0, import_react11.useCallback)(
6458
+ (e) => {
6459
+ var _a2;
6460
+ setLength(e.target.value.length);
6461
+ (_a2 = originalProps.onChange) == null ? void 0 : _a2.call(originalProps, e);
6462
+ autoResize();
6463
+ },
6464
+ [originalProps, autoResize]
6458
6465
  );
6459
- const getErrorMessageProps = (0, import_react11.useCallback)(
6460
- () => ({
6461
- className: slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })
6462
- }),
6463
- [slots, classNames]
6466
+ (0, import_react11.useEffect)(() => {
6467
+ autoResize();
6468
+ }, [originalProps.value, autoResize]);
6469
+ const slots = (0, import_react11.useMemo)(() => textareaStyle({ ...variantProps }), [variantProps]);
6470
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
6471
+ "div",
6472
+ {
6473
+ className: clsx(
6474
+ slots.base({ class: classNames == null ? void 0 : classNames.base }),
6475
+ variantProps.direction === "horizon" ? slots.horizon({ class: classNames == null ? void 0 : classNames.horizon }) : slots.vertical({ class: classNames == null ? void 0 : classNames.vertical })
6476
+ ),
6477
+ children: [
6478
+ label && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
6479
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
6480
+ "div",
6481
+ {
6482
+ className: clsx(
6483
+ slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }),
6484
+ textareaProps.readOnly ? slots.readonlyWrapper({ class: classNames == null ? void 0 : classNames.readonlyWrapper }) : ""
6485
+ ),
6486
+ children: [
6487
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
6488
+ "textarea",
6489
+ {
6490
+ ref: innerRef,
6491
+ ...textareaProps,
6492
+ readOnly: props.readOnly,
6493
+ onChange: handleChange,
6494
+ className: slots.textarea({ class: classNames == null ? void 0 : classNames.textarea })
6495
+ }
6496
+ ),
6497
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex justify-between", children: [
6498
+ helperMessage && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
6499
+ "p",
6500
+ {
6501
+ className: clsx(
6502
+ slots.helperMessage({ class: classNames == null ? void 0 : classNames.helperMessage }),
6503
+ textareaProps.readOnly ? slots.readonly({ class: classNames == null ? void 0 : classNames.readonly }) : ""
6504
+ ),
6505
+ children: helperMessage
6506
+ }
6507
+ ),
6508
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: clsx("error", slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })), children: errorMessage }),
6509
+ textareaProps.maxLength !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
6510
+ "p",
6511
+ {
6512
+ className: clsx(
6513
+ slots.helperMessage({ class: classNames == null ? void 0 : classNames.helperMessage }),
6514
+ textareaProps.readOnly ? slots.readonly({ class: classNames == null ? void 0 : classNames.readonly }) : ""
6515
+ ),
6516
+ children: [
6517
+ length,
6518
+ " / ",
6519
+ textareaProps.maxLength
6520
+ ]
6521
+ }
6522
+ )
6523
+ ] })
6524
+ ]
6525
+ }
6526
+ )
6527
+ ]
6528
+ }
6464
6529
  );
6465
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { ...getBaseProps(), children: [
6466
- props.label && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("label", { ...getLabelProps(), children: props.label }),
6467
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { ...getInnerWrapperProps(), children: [
6468
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { ...getTextareaWrapperProps(), children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("textarea", { ...getTextareaProps() }) }),
6469
- props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { ...getErrorMessageProps(), children: props.errorMessage })
6470
- ] })
6471
- ] });
6472
6530
  });
6473
6531
  Textarea.displayName = "Textarea";
6474
6532
  var textarea_default = Textarea;
6475
6533
  var textareaStyle = (0, import_tailwind_variants11.tv)({
6476
6534
  slots: {
6477
- base: ["group/textarea", "flex", "flex-col", "gap-[10px]", "select-none"],
6478
- label: ["flex", "items-center"],
6479
- innerWrapper: ["flex", "flex-col", "gap-[6px]"],
6480
- textareaWrapper: [
6481
- "flex",
6482
- "bg-transparent",
6483
- "border-neutral-main",
6484
- "group-has-[p]/textarea:border-danger-main",
6485
- "group-has-[p]/textarea:bg-danger-soft",
6486
- "transition duration-200"
6487
- ],
6535
+ base: ["group/textarea", "flex", "select-none"],
6536
+ vertical: ["flex-col"],
6537
+ horizon: ["flex-row", "gap-0"],
6538
+ label: ["flex", "items-center", "font-bold", "text-body-foreground", "min-w-[80px]"],
6539
+ wrapper: ["flex", "flex-col"],
6488
6540
  textarea: [
6489
6541
  "w-full",
6542
+ "h-full",
6490
6543
  "bg-transparent",
6491
- "placeholder:text-neutral-main",
6492
- "focus-visible:outline-none",
6493
- "resize-none"
6544
+ "text-neutral-main",
6545
+ "placeholder:!text-neutral-main",
6546
+ "outline-none",
6547
+ "resize-none",
6548
+ "focus:ring-0",
6549
+ "group-has-[:hover]/textarea:!text-neutral-dark",
6550
+ "group-has-[:hover]/textarea:placeholder:!text-neutral-dark",
6551
+ "group-has-[:focus]/textarea:!text-neutral-dark",
6552
+ "group-has-[:focus]/textarea:placeholder:!text-neutral-dark",
6553
+ "group-has-[p.error]/textarea:bg-danger-soft",
6554
+ "group-has-[p.error]/textarea:text-danger-main",
6555
+ "group-has-[p.error]/textarea:placeholder:!text-danger-main"
6494
6556
  ],
6495
- errorMessage: ["text-danger-main"]
6557
+ helperMessage: [
6558
+ "text-neutral-main",
6559
+ "group-has-[:hover]/textarea:text-neutral-dark",
6560
+ "group-has-[p.error]/textarea:text-danger-main"
6561
+ ],
6562
+ errorMessage: ["text-danger-main"],
6563
+ readonlyWrapper: [
6564
+ "pointer-events-none",
6565
+ "[&>textarea]:!text-body-foreground",
6566
+ "[&>textarea]:placeholder:!text-body-foreground"
6567
+ ],
6568
+ readonly: []
6496
6569
  },
6497
6570
  variants: {
6498
6571
  variant: {
6499
6572
  solid: {
6500
- textareaWrapper: ["bg-trans-soft", "hover:bg-trans-light", "has-[:focus]:bg-trans-light"]
6573
+ textarea: ["border-transparent", "bg-trans-soft"],
6574
+ readonlyWrapper: ["[&>textarea]:!bg-trans-light"]
6501
6575
  },
6502
- line: {
6503
- textareaWrapper: ["border", "hover:bg-trans-soft", "has-[:focus]:bg-trans-soft"]
6576
+ outline: {
6577
+ textarea: [
6578
+ "border-neutral-light",
6579
+ "group-has-[:hover]/textarea:bg-trans-soft",
6580
+ "group-has-[:focus]/textarea:bg-body-background",
6581
+ "group-has-[p.error]/textarea:border-danger-main"
6582
+ ],
6583
+ readonlyWrapper: ["[&>textarea]:!bg-trans-soft"]
6504
6584
  }
6505
6585
  },
6506
6586
  color: {
6507
- primary: {},
6508
- secondary: {}
6587
+ primary: {
6588
+ helperMessage: [
6589
+ "group-has-[:focus]/textarea:!text-primary-main",
6590
+ "group-has-[:focus]/textarea:!text-primary-main",
6591
+ "group-has-[:focus]/textarea:hover:!text-primary-main",
6592
+ "group-has-[:focus:hover]/textarea:!text-primary-main",
6593
+ "group-has-[p.error]:not(textarea:focus):hover/textarea:!text-primary-main"
6594
+ ],
6595
+ readonly: ["!text-primary-main"]
6596
+ },
6597
+ secondary: {
6598
+ helperMessage: [
6599
+ "group-has-[:focus]/textarea:text-secondary-main",
6600
+ "group-has-[:focus]/textarea:text-secondary-main",
6601
+ "group-has-[:focus]/textarea:hover:text-secondary-main",
6602
+ "group-has-[:focus:hover]/textarea:text-secondary-main",
6603
+ "group-has-[p.error]:not(textarea:focus):hover/textarea:!text-secondary-main"
6604
+ ],
6605
+ readonly: ["!text-secondary-main"]
6606
+ }
6509
6607
  },
6510
6608
  size: {
6511
6609
  sm: {
6512
- base: "gap-[6px]",
6513
- textareaWrapper: "w-[240px] rounded-sm p-[6px]",
6514
- textarea: "text-sm rounded-sm",
6515
- label: "text-sm",
6516
- errorMessage: "text-sm"
6610
+ base: ["text-sm", "gap-[4px]"],
6611
+ label: ["text-sm"],
6612
+ wrapper: ["gap-[4px]"],
6613
+ textarea: ["w-[240px]", "h-[24px]", "rounded-sm", "p-[8px]", "gap-[4px]"],
6614
+ helperMessage: ["text-sm"],
6615
+ errorMessage: ["text-sm"]
6517
6616
  },
6518
6617
  md: {
6519
- base: "gap-[8px]",
6520
- textareaWrapper: "w-[240px] rounded-md p-[8px]",
6521
- textarea: "text-md rounded-md",
6522
- label: "text-md",
6523
- errorMessage: "text-md"
6618
+ base: ["text-md", "gap-[6px]"],
6619
+ label: ["text-md"],
6620
+ wrapper: ["gap-[6px]"],
6621
+ textarea: ["w-[240px]", "h-[32px]", "rounded-md", "p-[8px]", "gap-[6px]"],
6622
+ helperMessage: ["text-sm"],
6623
+ errorMessage: ["text-sm"]
6524
6624
  },
6525
6625
  lg: {
6526
- base: "gap-[10px]",
6527
- textareaWrapper: "w-[240px] rounded-lg p-[10px]",
6528
- textarea: "text-lg rounded-lg",
6529
- label: "text-lg",
6530
- errorMessage: "text-lg"
6626
+ base: ["text-lg", "gap-[8px]"],
6627
+ label: ["text-lg"],
6628
+ wrapper: ["gap-[8px]"],
6629
+ textarea: ["w-[240px]", "h-[40px]", "rounded-lg", "p-[10px]", "gap-[8px]"],
6630
+ helperMessage: ["text-md"],
6631
+ errorMessage: ["text-md"]
6531
6632
  },
6532
6633
  xl: {
6533
- base: "gap-[10px]",
6534
- textareaWrapper: "w-[240px] rounded-xl p-[10px]",
6535
- textarea: "text-xl rounded-xl",
6536
- label: "text-xl",
6537
- errorMessage: "text-xl"
6538
- }
6539
- },
6540
- radius: {
6541
- default: {},
6542
- none: {
6543
- textareaWrapper: "rounded-none",
6544
- textarea: "rounded-none"
6545
- },
6546
- full: {
6547
- textareaWrapper: "rounded-full",
6548
- textarea: "rounded-full"
6634
+ base: ["text-xl", "gap-[10px]"],
6635
+ label: ["text-xl"],
6636
+ wrapper: ["gap-[10px]"],
6637
+ textarea: ["w-[240px]", "h-[50px]", "rounded-lg", "p-[10px]", "gap-[10px]"],
6638
+ helperMessage: ["text-md"],
6639
+ errorMessage: ["text-md"]
6549
6640
  }
6550
6641
  },
6551
- fullWidth: {
6552
- true: {
6553
- base: "w-full",
6554
- textareaWrapper: "w-full",
6555
- textarea: "w-full"
6556
- }
6642
+ direction: {
6643
+ vertical: "",
6644
+ horizon: ""
6557
6645
  },
6558
- isDisabled: {
6646
+ full: {
6559
6647
  true: {
6560
- base: ["opacity-disabled", "pointer-events-none"],
6561
- textareaWrapper: ["bg-neutral-soft", "border-neutral-light", "pointer-events-none"],
6562
- textarea: ["text-neutral-light placeholder:text-neutral-light", "border-neutral-light"],
6563
- label: ["text-neutral-light", "pointer-events-none"],
6564
- errorMessage: "text-danger-light"
6648
+ base: ["w-full"],
6649
+ wrapper: ["flex-1"],
6650
+ textarea: ["w-full"]
6565
6651
  }
6566
6652
  },
6567
- isRequired: {
6653
+ disabled: {
6568
6654
  true: {
6569
- label: ["after:content-['*']", "after:text-danger-main", "after:ml-0.5"]
6655
+ textarea: [
6656
+ "bg-neutral-soft",
6657
+ "pointer-events-none",
6658
+ "text-neutral-light",
6659
+ "placeholder:!text-neutral-light",
6660
+ "group-has-[p.error]/textarea:text-danger-light",
6661
+ "group-has-[p.error]/textarea:border-danger-light",
6662
+ "group-has-[p.error]/textarea:placeholder:!text-danger-light"
6663
+ ],
6664
+ helperMessage: ["!text-neutral-light", "group-has-[p.error]/textarea:!text-danger-light"],
6665
+ errorMessage: ["!text-danger-light"]
6570
6666
  }
6571
6667
  }
6572
6668
  },
6573
- defaultVariants: {
6574
- variant: "solid",
6575
- color: "primary",
6576
- size: "md",
6577
- fullWidth: false,
6578
- isDisabled: false,
6579
- isRequired: false
6580
- },
6581
6669
  compoundVariants: [
6582
- // variants & color
6583
6670
  {
6584
- variant: "line",
6585
- color: "primary",
6671
+ variant: "outline",
6672
+ size: "sm",
6586
6673
  class: {
6587
- textareaWrapper: "has-[:focus]:border-primary-main"
6674
+ textarea: ["border-sm"]
6588
6675
  }
6589
6676
  },
6590
6677
  {
6591
- variant: "line",
6592
- color: "secondary",
6678
+ variant: "outline",
6679
+ size: "md",
6593
6680
  class: {
6594
- textareaWrapper: "has-[:focus]:border-secondary-main",
6595
- textarea: "focus:bg-secondary-main"
6681
+ textarea: ["border-md"]
6596
6682
  }
6597
6683
  },
6598
- // Variants & isDisabled
6599
6684
  {
6600
- variant: "line",
6601
- isDisabled: true,
6685
+ variant: "outline",
6686
+ size: "lg",
6602
6687
  class: {
6603
- textareaWrapper: "bg-neutral-soft"
6688
+ textarea: ["border-lg"]
6604
6689
  }
6605
6690
  },
6606
- // isRequired & isDisabled
6607
6691
  {
6608
- isRequired: true,
6609
- isDisabled: true,
6692
+ variant: "outline",
6693
+ size: "xl",
6694
+ class: {
6695
+ textarea: ["border-xl"]
6696
+ }
6697
+ },
6698
+ {
6699
+ disabled: true,
6700
+ variant: ["outline"],
6610
6701
  class: {
6611
- label: "after:text-danger-light"
6702
+ textarea: ["!bg-body-background", "group-has-[p.error]/input:border-danger-light"]
6612
6703
  }
6613
6704
  }
6614
- ]
6705
+ ],
6706
+ defaultVariants: {
6707
+ variant: "solid",
6708
+ color: "primary",
6709
+ size: "md",
6710
+ direction: "vertical",
6711
+ fullWidth: false,
6712
+ disabled: false,
6713
+ readonly: false
6714
+ }
6615
6715
  });
6616
6716
 
6617
6717
  // src/components/table/table.tsx
@@ -6965,11 +7065,12 @@ var TableBody = ({
6965
7065
  classNames,
6966
7066
  className
6967
7067
  }) => {
6968
- const getCellStyle = (col) => ({
6969
- width: col.width ? `${col.width}px` : void 0,
6970
- minWidth: col.minWidth ? `${col.minWidth}px` : void 0,
6971
- maxWidth: col.maxWidth ? `${col.maxWidth}px` : void 0,
6972
- height: col.height ? `${col.height}px` : void 0
7068
+ const getCellStyle = (column) => ({
7069
+ width: column.width ? `${column.width}px` : void 0,
7070
+ minWidth: column.minWidth ? `${column.minWidth}px` : void 0,
7071
+ maxWidth: column.maxWidth ? `${column.maxWidth}px` : void 0,
7072
+ height: column.height ? `${column.height}px` : void 0,
7073
+ textAlign: column.align || "center"
6973
7074
  });
6974
7075
  const renderTdSkeleton = (key) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: slots.td({ class: classNames == null ? void 0 : classNames.td }), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(skeleton_default, { color, className: "h-full w-full", rounded: "lg", speed: "fast" }) }, key);
6975
7076
  const renderCheckboxCell = (rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), "text-center"), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
@@ -6986,16 +7087,16 @@ var TableBody = ({
6986
7087
  ] }, `skeleton-${rowIndex}`);
6987
7088
  const renderEmptyRow = () => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("td", { colSpan: columns.length + (rowCheckbox ? 1 : 0), className: slots.empty({ class: classNames == null ? void 0 : classNames.empty }), children: emptyContent }) });
6988
7089
  const renderDataRow = (row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), onClick: () => onRowClick == null ? void 0 : onRowClick(row), children: [
6989
- columns.map((col, colIdx) => {
7090
+ columns.map((column, colIdx) => {
6990
7091
  var _a;
6991
- const value = row[col.field];
6992
- const formattedValue = ((_a = col.valueFormatter) == null ? void 0 : _a.call(col, { value, field: col.field })) || value;
6993
- const content = col.renderCell ? col.renderCell({ id: row.id, field: col.field, value, formattedValue, row }) : formattedValue;
7092
+ const value = row[column.field];
7093
+ const formattedValue = ((_a = column.valueFormatter) == null ? void 0 : _a.call(column, { value, field: column.field })) || value;
7094
+ const content = column.renderCell ? column.renderCell({ id: row.id, field: column.field, value, formattedValue, row }) : formattedValue;
6994
7095
  return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
6995
7096
  "td",
6996
7097
  {
6997
- className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), col.className),
6998
- style: getCellStyle(col),
7098
+ className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), column.className),
7099
+ style: getCellStyle(column),
6999
7100
  children: content
7000
7101
  },
7001
7102
  `${rowIndex}-${colIdx}`
@@ -7895,13 +7996,16 @@ var select = tv({
7895
7996
  variants: {
7896
7997
  color: {
7897
7998
  primary: {
7898
- selectWrapper: ["hover:text-primary-main"],
7899
- option: ["hover:bg-primary-soft", "hover:text-primary-main"]
7999
+ selectWrapper: ["text-primary-main"],
8000
+ select: ["text-primary-main"],
8001
+ option: ["hover:bg-primary-soft", "hover:text-primary-main"],
8002
+ helperMessage: ["text-primary-main"]
7900
8003
  },
7901
8004
  secondary: {
7902
- selectWrapper: ["hover:text-secondary-main"],
8005
+ selectWrapper: ["text-secondary-main"],
7903
8006
  select: ["text-secondary-main"],
7904
- option: ["hover:bg-secondary-soft", "hover:text-secondary-main"]
8007
+ option: ["hover:bg-secondary-soft", "hover:text-secondary-main"],
8008
+ helperMessage: ["text-secondary-main"]
7905
8009
  }
7906
8010
  },
7907
8011
  size: {