@deepnoid/ui 0.1.29 → 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 (122) hide show
  1. package/.turbo/turbo-build.log +183 -173
  2. package/dist/chunk-62X5AX5B.mjs +297 -0
  3. package/dist/chunk-6PN3DGOE.mjs +77 -0
  4. package/dist/{chunk-EHRFXDSN.mjs → chunk-AIIMJZ7L.mjs} +72 -42
  5. package/dist/{chunk-3KVZDFMV.mjs → chunk-BCMVEGJG.mjs} +3 -3
  6. package/dist/{chunk-QJJKJYNR.mjs → chunk-BFOK4HVC.mjs} +2 -2
  7. package/dist/{chunk-KXA73VTJ.mjs → chunk-CVQM3T2X.mjs} +4 -4
  8. package/dist/{chunk-RCJOJPRS.mjs → chunk-EBRCE7XY.mjs} +40 -30
  9. package/dist/{chunk-III2QUWF.mjs → chunk-G67WUZO3.mjs} +1 -1
  10. package/dist/{chunk-BB7MFKNQ.mjs → chunk-IBI3OVQI.mjs} +1 -1
  11. package/dist/{chunk-LR3SWRB4.mjs → chunk-IC25OKBJ.mjs} +5 -5
  12. package/dist/{chunk-KLUC2BV6.mjs → chunk-IEJRE6LT.mjs} +10 -7
  13. package/dist/{chunk-ECMBAKSJ.mjs → chunk-K7V4VE7R.mjs} +5 -5
  14. package/dist/chunk-LWRK5TPZ.mjs +80 -0
  15. package/dist/chunk-MZ76AA76.mjs +1 -0
  16. package/dist/{chunk-X4F7JYBA.mjs → chunk-NFQMXW4Z.mjs} +36 -14
  17. package/dist/chunk-P7YYNA6L.mjs +67 -0
  18. package/dist/components/backdrop/backdrop.mjs +2 -2
  19. package/dist/components/backdrop/index.mjs +2 -2
  20. package/dist/components/breadcrumb/breadcrumb.mjs +5 -5
  21. package/dist/components/breadcrumb/index.mjs +5 -5
  22. package/dist/components/button/button.mjs +2 -2
  23. package/dist/components/button/icon-button.mjs +2 -2
  24. package/dist/components/button/index.mjs +4 -4
  25. package/dist/components/button/text-button.mjs +2 -2
  26. package/dist/components/checkbox/checkbox.mjs +2 -2
  27. package/dist/components/checkbox/index.mjs +2 -2
  28. package/dist/components/chip/chip.mjs +2 -2
  29. package/dist/components/chip/index.mjs +2 -2
  30. package/dist/components/dateTimePicker/calendar.mjs +2 -2
  31. package/dist/components/dateTimePicker/dateTimePicker.mjs +6 -6
  32. package/dist/components/dateTimePicker/index.mjs +6 -6
  33. package/dist/components/dateTimePicker/timePicker.mjs +4 -4
  34. package/dist/components/fileUpload/fileUpload.js +62 -39
  35. package/dist/components/fileUpload/fileUpload.mjs +6 -6
  36. package/dist/components/fileUpload/index.js +62 -39
  37. package/dist/components/fileUpload/index.mjs +6 -6
  38. package/dist/components/input/index.js +62 -39
  39. package/dist/components/input/index.mjs +2 -2
  40. package/dist/components/input/input.d.mts +21 -14
  41. package/dist/components/input/input.d.ts +21 -14
  42. package/dist/components/input/input.js +62 -39
  43. package/dist/components/input/input.mjs +2 -2
  44. package/dist/components/list/index.mjs +3 -3
  45. package/dist/components/list/list.mjs +2 -2
  46. package/dist/components/list/listItem.mjs +2 -2
  47. package/dist/components/modal/index.mjs +6 -6
  48. package/dist/components/modal/modal.mjs +6 -6
  49. package/dist/components/pagination/index.js +62 -39
  50. package/dist/components/pagination/index.mjs +3 -3
  51. package/dist/components/pagination/pagination.js +62 -39
  52. package/dist/components/pagination/pagination.mjs +3 -3
  53. package/dist/components/radio/index.mjs +2 -2
  54. package/dist/components/radio/radio.mjs +2 -2
  55. package/dist/components/select/index.js +7 -4
  56. package/dist/components/select/index.mjs +2 -2
  57. package/dist/components/select/select.d.mts +9 -0
  58. package/dist/components/select/select.d.ts +9 -0
  59. package/dist/components/select/select.js +7 -4
  60. package/dist/components/select/select.mjs +2 -2
  61. package/dist/components/skeleton/index.d.mts +2 -0
  62. package/dist/components/skeleton/index.d.ts +2 -0
  63. package/dist/components/skeleton/index.js +141 -0
  64. package/dist/components/skeleton/index.mjs +10 -0
  65. package/dist/components/skeleton/skeleton.d.mts +14 -0
  66. package/dist/components/skeleton/skeleton.d.ts +14 -0
  67. package/dist/components/skeleton/skeleton.js +135 -0
  68. package/dist/components/skeleton/skeleton.mjs +9 -0
  69. package/dist/components/table/index.js +748 -646
  70. package/dist/components/table/index.mjs +11 -9
  71. package/dist/components/table/table-body.d.mts +6 -4
  72. package/dist/components/table/table-body.d.ts +6 -4
  73. package/dist/components/table/table-body.js +115 -63
  74. package/dist/components/table/table-body.mjs +5 -3
  75. package/dist/components/table/table-head.d.mts +3 -1
  76. package/dist/components/table/table-head.d.ts +3 -1
  77. package/dist/components/table/table-head.js +107 -21
  78. package/dist/components/table/table-head.mjs +5 -3
  79. package/dist/components/table/table.d.mts +3 -1
  80. package/dist/components/table/table.d.ts +3 -1
  81. package/dist/components/table/table.js +739 -637
  82. package/dist/components/table/table.mjs +9 -7
  83. package/dist/components/tabs/index.mjs +2 -2
  84. package/dist/components/tabs/tabs.mjs +2 -2
  85. package/dist/components/textarea/index.js +255 -138
  86. package/dist/components/textarea/index.mjs +2 -1
  87. package/dist/components/textarea/textarea.d.mts +157 -150
  88. package/dist/components/textarea/textarea.d.ts +157 -150
  89. package/dist/components/textarea/textarea.js +255 -138
  90. package/dist/components/textarea/textarea.mjs +2 -1
  91. package/dist/components/toast/index.mjs +3 -3
  92. package/dist/components/toast/toast.mjs +2 -2
  93. package/dist/components/toast/use-toast.mjs +3 -3
  94. package/dist/components/tooltip/index.mjs +2 -2
  95. package/dist/components/tooltip/tooltip.mjs +2 -2
  96. package/dist/components/tree/index.js +33 -11
  97. package/dist/components/tree/index.mjs +2 -2
  98. package/dist/components/tree/tree.d.mts +10 -8
  99. package/dist/components/tree/tree.d.ts +10 -8
  100. package/dist/components/tree/tree.js +33 -11
  101. package/dist/components/tree/tree.mjs +2 -2
  102. package/dist/index.d.mts +1 -0
  103. package/dist/index.d.ts +1 -0
  104. package/dist/index.js +799 -593
  105. package/dist/index.mjs +52 -47
  106. package/package.json +1 -1
  107. package/dist/chunk-26MNALVL.mjs +0 -47
  108. package/dist/chunk-A5KQHWS3.mjs +0 -94
  109. package/dist/chunk-BKE6QF6W.mjs +0 -209
  110. package/dist/{chunk-SSMMWMQC.mjs → chunk-2YMAKIZ6.mjs} +3 -3
  111. package/dist/{chunk-6K3E5BVO.mjs → chunk-7TAGGLNY.mjs} +3 -3
  112. package/dist/{chunk-X6D7C7QZ.mjs → chunk-A7RU3FU5.mjs} +3 -3
  113. package/dist/{chunk-YLRYHUTW.mjs → chunk-D6QI3DJG.mjs} +3 -3
  114. package/dist/{chunk-UFVQPPPW.mjs → chunk-HIVPDIEP.mjs} +3 -3
  115. package/dist/{chunk-P5QCU457.mjs → chunk-LL6F3WDX.mjs} +3 -3
  116. package/dist/{chunk-7W2ZI2DD.mjs → chunk-MEY4IL7D.mjs} +3 -3
  117. package/dist/{chunk-33LANVZV.mjs → chunk-QIRL6HY6.mjs} +3 -3
  118. package/dist/{chunk-W45H2ZMW.mjs → chunk-RT3S3VVJ.mjs} +3 -3
  119. package/dist/{chunk-7J3KVOTS.mjs → chunk-UB4YBFOT.mjs} +3 -3
  120. package/dist/{chunk-2PKM7SLZ.mjs → chunk-WFMFC7R6.mjs} +3 -3
  121. package/dist/{chunk-Y6XQTWB5.mjs → chunk-WLNLVX7Q.mjs} +3 -3
  122. package/dist/{chunk-IL5ENWCR.mjs → chunk-Z2537DF6.mjs} +3 -3
@@ -1,24 +1,26 @@
1
1
  "use client";
2
2
  import {
3
3
  table_default
4
- } from "../../chunk-RCJOJPRS.mjs";
4
+ } from "../../chunk-EBRCE7XY.mjs";
5
+ import "../../chunk-LWRK5TPZ.mjs";
6
+ import "../../chunk-P7YYNA6L.mjs";
5
7
  import "../../chunk-DQRAFUDA.mjs";
6
8
  import "../../chunk-M37VBNB3.mjs";
7
- import "../../chunk-A5KQHWS3.mjs";
8
- import "../../chunk-26MNALVL.mjs";
9
+ import "../../chunk-MZ76AA76.mjs";
10
+ import "../../chunk-6PN3DGOE.mjs";
9
11
  import "../../chunk-7B7LRG5J.mjs";
10
- import "../../chunk-KXA73VTJ.mjs";
12
+ import "../../chunk-CVQM3T2X.mjs";
11
13
  import "../../chunk-F3HENRVM.mjs";
12
14
  import "../../chunk-2GCSFWHD.mjs";
13
- import "../../chunk-EHRFXDSN.mjs";
15
+ import "../../chunk-AIIMJZ7L.mjs";
14
16
  import "../../chunk-QZ3LVYJW.mjs";
15
- import "../../chunk-YLRYHUTW.mjs";
17
+ import "../../chunk-D6QI3DJG.mjs";
16
18
  import "../../chunk-ZYIIXWVY.mjs";
17
19
  import "../../chunk-2TKEWFGH.mjs";
18
20
  import "../../chunk-2SDYFOZL.mjs";
21
+ import "../../chunk-4ZJFD3L3.mjs";
19
22
  import "../../chunk-27Y6K5NK.mjs";
20
23
  import "../../chunk-E3G5QXSH.mjs";
21
- import "../../chunk-4ZJFD3L3.mjs";
22
24
  import "../../chunk-AC6TWLRT.mjs";
23
25
  export {
24
26
  table_default as default
@@ -2,9 +2,9 @@
2
2
  import "../../chunk-3MY6LO7N.mjs";
3
3
  import {
4
4
  tabs_default
5
- } from "../../chunk-SSMMWMQC.mjs";
6
- import "../../chunk-E3G5QXSH.mjs";
5
+ } from "../../chunk-2YMAKIZ6.mjs";
7
6
  import "../../chunk-4ZJFD3L3.mjs";
7
+ import "../../chunk-E3G5QXSH.mjs";
8
8
  import "../../chunk-AC6TWLRT.mjs";
9
9
  export {
10
10
  tabs_default as Tabs
@@ -2,9 +2,9 @@
2
2
  import {
3
3
  tabs,
4
4
  tabs_default
5
- } from "../../chunk-SSMMWMQC.mjs";
6
- import "../../chunk-E3G5QXSH.mjs";
5
+ } from "../../chunk-2YMAKIZ6.mjs";
7
6
  import "../../chunk-4ZJFD3L3.mjs";
7
+ import "../../chunk-E3G5QXSH.mjs";
8
8
  import "../../chunk-AC6TWLRT.mjs";
9
9
  export {
10
10
  tabs_default as default,
@@ -49,203 +49,320 @@ var mapPropsVariants = (props, variantKeys, removeVariantProps = true) => {
49
49
  }
50
50
  };
51
51
 
52
+ // src/utils/clsx.ts
53
+ function clsx(...args) {
54
+ var i = 0, tmp, x, str = "";
55
+ while (i < args.length) {
56
+ if (tmp = args[i++]) {
57
+ if (x = toVal(tmp)) {
58
+ str && (str += " ");
59
+ str += x;
60
+ }
61
+ }
62
+ }
63
+ return str;
64
+ }
65
+ function toVal(mix) {
66
+ var k, y, str = "";
67
+ if (typeof mix === "string" || typeof mix === "number") {
68
+ str += mix;
69
+ } else if (typeof mix === "object") {
70
+ if (Array.isArray(mix)) {
71
+ var len = mix.length;
72
+ for (k = 0; k < len; k++) {
73
+ if (mix[k]) {
74
+ if (y = toVal(mix[k])) {
75
+ str && (str += " ");
76
+ str += y;
77
+ }
78
+ }
79
+ }
80
+ } else {
81
+ for (y in mix) {
82
+ if (mix[y]) {
83
+ str && (str += " ");
84
+ str += y;
85
+ }
86
+ }
87
+ }
88
+ }
89
+ return str;
90
+ }
91
+
52
92
  // src/components/textarea/textarea.tsx
53
93
  var import_jsx_runtime = require("react/jsx-runtime");
54
94
  var Textarea = (0, import_react.forwardRef)((originalProps, ref) => {
95
+ var _a, _b;
55
96
  const [props, variantProps] = mapPropsVariants(originalProps, textareaStyle.variantKeys);
56
- const { classNames, label, errorMessage, ...textareaProps } = props;
57
- const slots = (0, import_react.useMemo)(() => textareaStyle({ ...variantProps }), [variantProps]);
58
- const getBaseProps = (0, import_react.useCallback)(
59
- () => ({
60
- className: slots.base({ class: classNames == null ? void 0 : classNames.base })
61
- }),
62
- [slots, classNames]
63
- );
64
- const getLabelProps = (0, import_react.useCallback)(
65
- () => ({
66
- className: slots.label({ class: classNames == null ? void 0 : classNames.label })
67
- }),
68
- [slots, classNames]
69
- );
70
- const getInnerWrapperProps = (0, import_react.useCallback)(
71
- () => ({
72
- className: slots.innerWrapper({ class: classNames == null ? void 0 : classNames.innerWrapper })
73
- }),
74
- [slots, classNames]
75
- );
76
- const getTextareaWrapperProps = (0, import_react.useCallback)(
77
- () => ({
78
- className: slots.textareaWrapper({ class: classNames == null ? void 0 : classNames.textareaWrapper })
79
- }),
80
- [slots, classNames]
81
- );
82
- const getTextareaProps = (0, import_react.useCallback)(
83
- () => ({
84
- ...textareaProps,
85
- ref,
86
- className: slots.textarea({ class: classNames == null ? void 0 : classNames.textarea }),
87
- disabled: originalProps.isDisabled,
88
- required: originalProps.isRequired,
89
- size: 0
90
- }),
91
- [textareaProps, ref, slots, classNames == null ? void 0 : classNames.textarea, originalProps.isDisabled, originalProps.isRequired]
97
+ const { classNames, label, helperMessage, errorMessage, ...textareaProps } = props;
98
+ const [length, setLength] = (0, import_react.useState)(((_b = (_a = originalProps.value) == null ? void 0 : _a.toString()) != null ? _b : "").length);
99
+ const innerRef = (0, import_react.useRef)(null);
100
+ (0, import_react.useImperativeHandle)(ref, () => innerRef.current);
101
+ const autoResize = (0, import_react.useCallback)(() => {
102
+ const el = innerRef.current;
103
+ if (el) {
104
+ el.style.height = "auto";
105
+ el.style.height = el.scrollHeight + "px";
106
+ }
107
+ }, []);
108
+ const handleChange = (0, import_react.useCallback)(
109
+ (e) => {
110
+ var _a2;
111
+ setLength(e.target.value.length);
112
+ (_a2 = originalProps.onChange) == null ? void 0 : _a2.call(originalProps, e);
113
+ autoResize();
114
+ },
115
+ [originalProps, autoResize]
92
116
  );
93
- const getErrorMessageProps = (0, import_react.useCallback)(
94
- () => ({
95
- className: slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })
96
- }),
97
- [slots, classNames]
117
+ (0, import_react.useEffect)(() => {
118
+ autoResize();
119
+ }, [originalProps.value, autoResize]);
120
+ const slots = (0, import_react.useMemo)(() => textareaStyle({ ...variantProps }), [variantProps]);
121
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
122
+ "div",
123
+ {
124
+ className: clsx(
125
+ slots.base({ class: classNames == null ? void 0 : classNames.base }),
126
+ variantProps.direction === "horizon" ? slots.horizon({ class: classNames == null ? void 0 : classNames.horizon }) : slots.vertical({ class: classNames == null ? void 0 : classNames.vertical })
127
+ ),
128
+ children: [
129
+ label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
130
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
131
+ "div",
132
+ {
133
+ className: clsx(
134
+ slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }),
135
+ textareaProps.readOnly ? slots.readonlyWrapper({ class: classNames == null ? void 0 : classNames.readonlyWrapper }) : ""
136
+ ),
137
+ children: [
138
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
139
+ "textarea",
140
+ {
141
+ ref: innerRef,
142
+ ...textareaProps,
143
+ readOnly: props.readOnly,
144
+ onChange: handleChange,
145
+ className: slots.textarea({ class: classNames == null ? void 0 : classNames.textarea })
146
+ }
147
+ ),
148
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex justify-between", children: [
149
+ helperMessage && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
150
+ "p",
151
+ {
152
+ className: clsx(
153
+ slots.helperMessage({ class: classNames == null ? void 0 : classNames.helperMessage }),
154
+ textareaProps.readOnly ? slots.readonly({ class: classNames == null ? void 0 : classNames.readonly }) : ""
155
+ ),
156
+ children: helperMessage
157
+ }
158
+ ),
159
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: clsx("error", slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })), children: errorMessage }),
160
+ textareaProps.maxLength !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
161
+ "p",
162
+ {
163
+ className: clsx(
164
+ slots.helperMessage({ class: classNames == null ? void 0 : classNames.helperMessage }),
165
+ textareaProps.readOnly ? slots.readonly({ class: classNames == null ? void 0 : classNames.readonly }) : ""
166
+ ),
167
+ children: [
168
+ length,
169
+ " / ",
170
+ textareaProps.maxLength
171
+ ]
172
+ }
173
+ )
174
+ ] })
175
+ ]
176
+ }
177
+ )
178
+ ]
179
+ }
98
180
  );
99
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ...getBaseProps(), children: [
100
- props.label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { ...getLabelProps(), children: props.label }),
101
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { ...getInnerWrapperProps(), children: [
102
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { ...getTextareaWrapperProps(), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("textarea", { ...getTextareaProps() }) }),
103
- props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { ...getErrorMessageProps(), children: props.errorMessage })
104
- ] })
105
- ] });
106
181
  });
107
182
  Textarea.displayName = "Textarea";
108
183
  var textarea_default = Textarea;
109
184
  var textareaStyle = (0, import_tailwind_variants.tv)({
110
185
  slots: {
111
- base: ["group/textarea", "flex", "flex-col", "gap-[10px]", "select-none"],
112
- label: ["flex", "items-center"],
113
- innerWrapper: ["flex", "flex-col", "gap-[6px]"],
114
- textareaWrapper: [
115
- "flex",
116
- "bg-transparent",
117
- "border-neutral-main",
118
- "group-has-[p]/textarea:border-danger-main",
119
- "group-has-[p]/textarea:bg-danger-soft",
120
- "transition duration-200"
121
- ],
186
+ base: ["group/textarea", "flex", "select-none"],
187
+ vertical: ["flex-col"],
188
+ horizon: ["flex-row", "gap-0"],
189
+ label: ["flex", "items-center", "font-bold", "text-body-foreground", "min-w-[80px]"],
190
+ wrapper: ["flex", "flex-col"],
122
191
  textarea: [
123
192
  "w-full",
193
+ "h-full",
124
194
  "bg-transparent",
125
- "placeholder:text-neutral-main",
126
- "focus-visible:outline-none",
127
- "resize-none"
195
+ "text-neutral-main",
196
+ "placeholder:!text-neutral-main",
197
+ "outline-none",
198
+ "resize-none",
199
+ "focus:ring-0",
200
+ "group-has-[:hover]/textarea:!text-neutral-dark",
201
+ "group-has-[:hover]/textarea:placeholder:!text-neutral-dark",
202
+ "group-has-[:focus]/textarea:!text-neutral-dark",
203
+ "group-has-[:focus]/textarea:placeholder:!text-neutral-dark",
204
+ "group-has-[p.error]/textarea:bg-danger-soft",
205
+ "group-has-[p.error]/textarea:text-danger-main",
206
+ "group-has-[p.error]/textarea:placeholder:!text-danger-main"
207
+ ],
208
+ helperMessage: [
209
+ "text-neutral-main",
210
+ "group-has-[:hover]/textarea:text-neutral-dark",
211
+ "group-has-[p.error]/textarea:text-danger-main"
212
+ ],
213
+ errorMessage: ["text-danger-main"],
214
+ readonlyWrapper: [
215
+ "pointer-events-none",
216
+ "[&>textarea]:!text-body-foreground",
217
+ "[&>textarea]:placeholder:!text-body-foreground"
128
218
  ],
129
- errorMessage: ["text-danger-main"]
219
+ readonly: []
130
220
  },
131
221
  variants: {
132
222
  variant: {
133
223
  solid: {
134
- textareaWrapper: ["bg-trans-soft", "hover:bg-trans-light", "has-[:focus]:bg-trans-light"]
224
+ textarea: ["border-transparent", "bg-trans-soft"],
225
+ readonlyWrapper: ["[&>textarea]:!bg-trans-light"]
135
226
  },
136
- line: {
137
- textareaWrapper: ["border", "hover:bg-trans-soft", "has-[:focus]:bg-trans-soft"]
227
+ outline: {
228
+ textarea: [
229
+ "border-neutral-light",
230
+ "group-has-[:hover]/textarea:bg-trans-soft",
231
+ "group-has-[:focus]/textarea:bg-body-background",
232
+ "group-has-[p.error]/textarea:border-danger-main"
233
+ ],
234
+ readonlyWrapper: ["[&>textarea]:!bg-trans-soft"]
138
235
  }
139
236
  },
140
237
  color: {
141
- primary: {},
142
- secondary: {}
238
+ primary: {
239
+ helperMessage: [
240
+ "group-has-[:focus]/textarea:!text-primary-main",
241
+ "group-has-[:focus]/textarea:!text-primary-main",
242
+ "group-has-[:focus]/textarea:hover:!text-primary-main",
243
+ "group-has-[:focus:hover]/textarea:!text-primary-main",
244
+ "group-has-[p.error]:not(textarea:focus):hover/textarea:!text-primary-main"
245
+ ],
246
+ readonly: ["!text-primary-main"]
247
+ },
248
+ secondary: {
249
+ helperMessage: [
250
+ "group-has-[:focus]/textarea:text-secondary-main",
251
+ "group-has-[:focus]/textarea:text-secondary-main",
252
+ "group-has-[:focus]/textarea:hover:text-secondary-main",
253
+ "group-has-[:focus:hover]/textarea:text-secondary-main",
254
+ "group-has-[p.error]:not(textarea:focus):hover/textarea:!text-secondary-main"
255
+ ],
256
+ readonly: ["!text-secondary-main"]
257
+ }
143
258
  },
144
259
  size: {
145
260
  sm: {
146
- base: "gap-[6px]",
147
- textareaWrapper: "w-[240px] rounded-sm p-[6px]",
148
- textarea: "text-sm rounded-sm",
149
- label: "text-sm",
150
- errorMessage: "text-sm"
261
+ base: ["text-sm", "gap-[4px]"],
262
+ label: ["text-sm"],
263
+ wrapper: ["gap-[4px]"],
264
+ textarea: ["w-[240px]", "h-[24px]", "rounded-sm", "p-[8px]", "gap-[4px]"],
265
+ helperMessage: ["text-sm"],
266
+ errorMessage: ["text-sm"]
151
267
  },
152
268
  md: {
153
- base: "gap-[8px]",
154
- textareaWrapper: "w-[240px] rounded-md p-[8px]",
155
- textarea: "text-md rounded-md",
156
- label: "text-md",
157
- errorMessage: "text-md"
269
+ base: ["text-md", "gap-[6px]"],
270
+ label: ["text-md"],
271
+ wrapper: ["gap-[6px]"],
272
+ textarea: ["w-[240px]", "h-[32px]", "rounded-md", "p-[8px]", "gap-[6px]"],
273
+ helperMessage: ["text-sm"],
274
+ errorMessage: ["text-sm"]
158
275
  },
159
276
  lg: {
160
- base: "gap-[10px]",
161
- textareaWrapper: "w-[240px] rounded-lg p-[10px]",
162
- textarea: "text-lg rounded-lg",
163
- label: "text-lg",
164
- errorMessage: "text-lg"
277
+ base: ["text-lg", "gap-[8px]"],
278
+ label: ["text-lg"],
279
+ wrapper: ["gap-[8px]"],
280
+ textarea: ["w-[240px]", "h-[40px]", "rounded-lg", "p-[10px]", "gap-[8px]"],
281
+ helperMessage: ["text-md"],
282
+ errorMessage: ["text-md"]
165
283
  },
166
284
  xl: {
167
- base: "gap-[10px]",
168
- textareaWrapper: "w-[240px] rounded-xl p-[10px]",
169
- textarea: "text-xl rounded-xl",
170
- label: "text-xl",
171
- errorMessage: "text-xl"
172
- }
173
- },
174
- radius: {
175
- default: {},
176
- none: {
177
- textareaWrapper: "rounded-none",
178
- textarea: "rounded-none"
179
- },
180
- full: {
181
- textareaWrapper: "rounded-full",
182
- textarea: "rounded-full"
285
+ base: ["text-xl", "gap-[10px]"],
286
+ label: ["text-xl"],
287
+ wrapper: ["gap-[10px]"],
288
+ textarea: ["w-[240px]", "h-[50px]", "rounded-lg", "p-[10px]", "gap-[10px]"],
289
+ helperMessage: ["text-md"],
290
+ errorMessage: ["text-md"]
183
291
  }
184
292
  },
185
- fullWidth: {
186
- true: {
187
- base: "w-full",
188
- textareaWrapper: "w-full",
189
- textarea: "w-full"
190
- }
293
+ direction: {
294
+ vertical: "",
295
+ horizon: ""
191
296
  },
192
- isDisabled: {
297
+ full: {
193
298
  true: {
194
- base: ["opacity-disabled", "pointer-events-none"],
195
- textareaWrapper: ["bg-neutral-soft", "border-neutral-light", "pointer-events-none"],
196
- textarea: ["text-neutral-light placeholder:text-neutral-light", "border-neutral-light"],
197
- label: ["text-neutral-light", "pointer-events-none"],
198
- errorMessage: "text-danger-light"
299
+ base: ["w-full"],
300
+ wrapper: ["flex-1"],
301
+ textarea: ["w-full"]
199
302
  }
200
303
  },
201
- isRequired: {
304
+ disabled: {
202
305
  true: {
203
- label: ["after:content-['*']", "after:text-danger-main", "after:ml-0.5"]
306
+ textarea: [
307
+ "bg-neutral-soft",
308
+ "pointer-events-none",
309
+ "text-neutral-light",
310
+ "placeholder:!text-neutral-light",
311
+ "group-has-[p.error]/textarea:text-danger-light",
312
+ "group-has-[p.error]/textarea:border-danger-light",
313
+ "group-has-[p.error]/textarea:placeholder:!text-danger-light"
314
+ ],
315
+ helperMessage: ["!text-neutral-light", "group-has-[p.error]/textarea:!text-danger-light"],
316
+ errorMessage: ["!text-danger-light"]
204
317
  }
205
318
  }
206
319
  },
207
- defaultVariants: {
208
- variant: "solid",
209
- color: "primary",
210
- size: "md",
211
- fullWidth: false,
212
- isDisabled: false,
213
- isRequired: false
214
- },
215
320
  compoundVariants: [
216
- // variants & color
217
321
  {
218
- variant: "line",
219
- color: "primary",
322
+ variant: "outline",
323
+ size: "sm",
324
+ class: {
325
+ textarea: ["border-sm"]
326
+ }
327
+ },
328
+ {
329
+ variant: "outline",
330
+ size: "md",
220
331
  class: {
221
- textareaWrapper: "has-[:focus]:border-primary-main"
332
+ textarea: ["border-md"]
222
333
  }
223
334
  },
224
335
  {
225
- variant: "line",
226
- color: "secondary",
336
+ variant: "outline",
337
+ size: "lg",
227
338
  class: {
228
- textareaWrapper: "has-[:focus]:border-secondary-main",
229
- textarea: "focus:bg-secondary-main"
339
+ textarea: ["border-lg"]
230
340
  }
231
341
  },
232
- // Variants & isDisabled
233
342
  {
234
- variant: "line",
235
- isDisabled: true,
343
+ variant: "outline",
344
+ size: "xl",
236
345
  class: {
237
- textareaWrapper: "bg-neutral-soft"
346
+ textarea: ["border-xl"]
238
347
  }
239
348
  },
240
- // isRequired & isDisabled
241
349
  {
242
- isRequired: true,
243
- isDisabled: true,
350
+ disabled: true,
351
+ variant: ["outline"],
244
352
  class: {
245
- label: "after:text-danger-light"
353
+ textarea: ["!bg-body-background", "group-has-[p.error]/input:border-danger-light"]
246
354
  }
247
355
  }
248
- ]
356
+ ],
357
+ defaultVariants: {
358
+ variant: "solid",
359
+ color: "primary",
360
+ size: "md",
361
+ direction: "vertical",
362
+ fullWidth: false,
363
+ disabled: false,
364
+ readonly: false
365
+ }
249
366
  });
250
367
  // Annotate the CommonJS export names for ESM import in node:
251
368
  0 && (module.exports = {
@@ -2,7 +2,8 @@
2
2
  import "../../chunk-RRAZM5D3.mjs";
3
3
  import {
4
4
  textarea_default
5
- } from "../../chunk-BKE6QF6W.mjs";
5
+ } from "../../chunk-62X5AX5B.mjs";
6
+ import "../../chunk-27Y6K5NK.mjs";
6
7
  import "../../chunk-E3G5QXSH.mjs";
7
8
  import "../../chunk-AC6TWLRT.mjs";
8
9
  export {