@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
package/dist/index.mjs CHANGED
@@ -1,96 +1,100 @@
1
1
  "use client";
2
+ import "./chunk-HIE2YRGA.mjs";
3
+ import {
4
+ tooltip_default
5
+ } from "./chunk-Z2537DF6.mjs";
6
+ import "./chunk-ZMOAFSYE.mjs";
7
+ import "./chunk-WSIADHVC.mjs";
2
8
  import "./chunk-MBLZYQCN.mjs";
3
9
  import {
4
10
  tree_default
5
- } from "./chunk-X4F7JYBA.mjs";
11
+ } from "./chunk-NFQMXW4Z.mjs";
12
+ import "./chunk-3MY6LO7N.mjs";
13
+ import {
14
+ tabs_default
15
+ } from "./chunk-2YMAKIZ6.mjs";
16
+ import "./chunk-RRAZM5D3.mjs";
17
+ import {
18
+ textarea_default
19
+ } from "./chunk-62X5AX5B.mjs";
6
20
  import "./chunk-LUWGOKLG.mjs";
7
21
  import {
8
22
  ToastProvider,
9
23
  useToast
10
- } from "./chunk-BB7MFKNQ.mjs";
24
+ } from "./chunk-IBI3OVQI.mjs";
11
25
  import "./chunk-ZOTHPHXA.mjs";
12
26
  import {
13
27
  toast_default
14
- } from "./chunk-7W2ZI2DD.mjs";
15
- import "./chunk-HIE2YRGA.mjs";
28
+ } from "./chunk-MEY4IL7D.mjs";
29
+ import "./chunk-LVFI2NOH.mjs";
16
30
  import {
17
- tooltip_default
18
- } from "./chunk-IL5ENWCR.mjs";
19
- import "./chunk-ZMOAFSYE.mjs";
20
- import "./chunk-WSIADHVC.mjs";
31
+ switch_default
32
+ } from "./chunk-Z74QNVPG.mjs";
21
33
  import "./chunk-DX3KXNP6.mjs";
34
+ import {
35
+ table_default
36
+ } from "./chunk-EBRCE7XY.mjs";
22
37
  import {
23
38
  definition_table_default
24
39
  } from "./chunk-6TIIBU7J.mjs";
25
- import {
26
- table_default
27
- } from "./chunk-RCJOJPRS.mjs";
40
+ import "./chunk-LWRK5TPZ.mjs";
41
+ import "./chunk-P7YYNA6L.mjs";
28
42
  import "./chunk-DQRAFUDA.mjs";
29
43
  import {
30
44
  scrollArea_default
31
45
  } from "./chunk-M37VBNB3.mjs";
32
- import "./chunk-A5KQHWS3.mjs";
33
- import "./chunk-26MNALVL.mjs";
34
- import "./chunk-RRAZM5D3.mjs";
35
- import {
36
- textarea_default
37
- } from "./chunk-BKE6QF6W.mjs";
38
46
  import "./chunk-QCEKPS7U.mjs";
39
47
  import {
40
48
  select_default
41
- } from "./chunk-KLUC2BV6.mjs";
42
- import "./chunk-LVFI2NOH.mjs";
49
+ } from "./chunk-IEJRE6LT.mjs";
50
+ import "./chunk-MZ76AA76.mjs";
43
51
  import {
44
- switch_default
45
- } from "./chunk-Z74QNVPG.mjs";
46
- import "./chunk-3MY6LO7N.mjs";
47
- import {
48
- tabs_default
49
- } from "./chunk-SSMMWMQC.mjs";
52
+ skeleton_default
53
+ } from "./chunk-6PN3DGOE.mjs";
50
54
  import "./chunk-DJOG6Z35.mjs";
51
55
  import {
52
56
  modal_default
53
- } from "./chunk-LR3SWRB4.mjs";
54
- import "./chunk-TPFN22HR.mjs";
55
- import {
56
- radio_default
57
- } from "./chunk-33LANVZV.mjs";
57
+ } from "./chunk-IC25OKBJ.mjs";
58
58
  import "./chunk-7B7LRG5J.mjs";
59
59
  import {
60
60
  pagination_default
61
- } from "./chunk-KXA73VTJ.mjs";
61
+ } from "./chunk-CVQM3T2X.mjs";
62
62
  import "./chunk-F3HENRVM.mjs";
63
+ import "./chunk-TPFN22HR.mjs";
64
+ import {
65
+ radio_default
66
+ } from "./chunk-QIRL6HY6.mjs";
63
67
  import "./chunk-RLXOHILK.mjs";
64
68
  import "./chunk-MGEWSREV.mjs";
65
69
  import "./chunk-75HLCORR.mjs";
66
70
  import {
67
71
  dateTimePicker_default
68
- } from "./chunk-ECMBAKSJ.mjs";
69
- import "./chunk-X6D7C7QZ.mjs";
70
- import "./chunk-QJJKJYNR.mjs";
72
+ } from "./chunk-K7V4VE7R.mjs";
73
+ import "./chunk-A7RU3FU5.mjs";
74
+ import "./chunk-BFOK4HVC.mjs";
71
75
  import "./chunk-7MVEAQ7Z.mjs";
72
76
  import {
73
77
  listItem_default
74
- } from "./chunk-W45H2ZMW.mjs";
78
+ } from "./chunk-RT3S3VVJ.mjs";
75
79
  import {
76
80
  list_default
77
- } from "./chunk-UFVQPPPW.mjs";
81
+ } from "./chunk-HIVPDIEP.mjs";
78
82
  import "./chunk-FWJ2ZKH6.mjs";
79
83
  import "./chunk-P732YGHO.mjs";
80
84
  import {
81
85
  fileUpload_default
82
- } from "./chunk-3KVZDFMV.mjs";
86
+ } from "./chunk-BCMVEGJG.mjs";
83
87
  import "./chunk-2GCSFWHD.mjs";
84
88
  import {
85
89
  input_default
86
- } from "./chunk-EHRFXDSN.mjs";
90
+ } from "./chunk-AIIMJZ7L.mjs";
87
91
  import "./chunk-QZ3LVYJW.mjs";
88
92
  import {
89
93
  checkbox_default
90
- } from "./chunk-YLRYHUTW.mjs";
94
+ } from "./chunk-D6QI3DJG.mjs";
91
95
  import {
92
96
  chip_default
93
- } from "./chunk-Y6XQTWB5.mjs";
97
+ } from "./chunk-WLNLVX7Q.mjs";
94
98
  import "./chunk-7DLOYKVC.mjs";
95
99
  import {
96
100
  avatar_default
@@ -98,39 +102,39 @@ import {
98
102
  import "./chunk-SE5TU755.mjs";
99
103
  import {
100
104
  backdrop_default
101
- } from "./chunk-P5QCU457.mjs";
105
+ } from "./chunk-LL6F3WDX.mjs";
102
106
  import "./chunk-KYIODWXL.mjs";
103
107
  import {
104
108
  breadcrumb_default
105
- } from "./chunk-III2QUWF.mjs";
109
+ } from "./chunk-G67WUZO3.mjs";
106
110
  import "./chunk-MY5U63QO.mjs";
107
111
  import {
108
112
  button_group_default
109
113
  } from "./chunk-LPZOH3RP.mjs";
110
114
  import {
111
115
  button_default
112
- } from "./chunk-7J3KVOTS.mjs";
116
+ } from "./chunk-UB4YBFOT.mjs";
113
117
  import {
114
118
  icon_button_default
115
- } from "./chunk-6K3E5BVO.mjs";
119
+ } from "./chunk-7TAGGLNY.mjs";
116
120
  import "./chunk-6WSACUIB.mjs";
117
121
  import "./chunk-LXHUO6VM.mjs";
118
122
  import "./chunk-6PNKRBUT.mjs";
119
123
  import {
120
124
  text_button_default
121
- } from "./chunk-2PKM7SLZ.mjs";
125
+ } from "./chunk-WFMFC7R6.mjs";
122
126
  import "./chunk-ZYIIXWVY.mjs";
123
127
  import {
124
128
  Icon_default,
125
129
  iconTemplate
126
130
  } from "./chunk-2TKEWFGH.mjs";
127
131
  import "./chunk-2SDYFOZL.mjs";
128
- import "./chunk-27Y6K5NK.mjs";
129
- import "./chunk-E3G5QXSH.mjs";
130
132
  import {
131
133
  deepnoidUi,
132
134
  tv
133
135
  } from "./chunk-4ZJFD3L3.mjs";
136
+ import "./chunk-27Y6K5NK.mjs";
137
+ import "./chunk-E3G5QXSH.mjs";
134
138
  import "./chunk-AC6TWLRT.mjs";
135
139
  export {
136
140
  avatar_default as Avatar,
@@ -153,6 +157,7 @@ export {
153
157
  radio_default as Radio,
154
158
  scrollArea_default as ScrollArea,
155
159
  select_default as Select,
160
+ skeleton_default as Skeleton,
156
161
  switch_default as Switch,
157
162
  table_default as Table,
158
163
  tabs_default as Tabs,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepnoid/ui",
3
- "version": "0.1.29",
3
+ "version": "0.1.31",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "exports": {
@@ -1,47 +0,0 @@
1
- "use client";
2
- import {
3
- checkbox_default
4
- } from "./chunk-YLRYHUTW.mjs";
5
- import {
6
- clsx
7
- } from "./chunk-27Y6K5NK.mjs";
8
-
9
- // src/components/table/table-head.tsx
10
- import { jsx, jsxs } from "react/jsx-runtime";
11
- var TableHead = ({ columns, slots, size, rowCheckbox, isCheckedAll, classNames, onCheckAll }) => {
12
- const handleClickCheckAll = (e) => {
13
- e.preventDefault();
14
- onCheckAll(!isCheckedAll);
15
- };
16
- const renderColumnHeaders = () => columns.map((column, index) => /* @__PURE__ */ jsx(
17
- "th",
18
- {
19
- className: clsx(slots.th({ class: classNames == null ? void 0 : classNames.th }), column),
20
- style: {
21
- width: column.width ? `${column.width}px` : void 0,
22
- minWidth: column.minWidth ? `${column.minWidth}px` : void 0,
23
- maxWidth: column.maxWidth ? `${column.maxWidth}px` : void 0,
24
- height: column.height ? `${column.height}px` : void 0
25
- },
26
- children: column.headerName
27
- },
28
- `${column.field}${index}thead`
29
- ));
30
- const renderSelectAllCheckbox = () => rowCheckbox && /* @__PURE__ */ jsx("th", { className: slots.th({ class: classNames == null ? void 0 : classNames.th }), onClick: handleClickCheckAll, children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(
31
- checkbox_default,
32
- {
33
- size,
34
- checked: isCheckedAll,
35
- onChange: (e) => onCheckAll(e.target.checked)
36
- }
37
- ) }) });
38
- return /* @__PURE__ */ jsx("thead", { className: slots.thead({ class: classNames == null ? void 0 : classNames.thead }), children: /* @__PURE__ */ jsxs("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
39
- renderColumnHeaders(),
40
- renderSelectAllCheckbox()
41
- ] }) });
42
- };
43
- var table_head_default = TableHead;
44
-
45
- export {
46
- table_head_default
47
- };
@@ -1,94 +0,0 @@
1
- "use client";
2
- import {
3
- checkbox_default
4
- } from "./chunk-YLRYHUTW.mjs";
5
- import {
6
- clsx
7
- } from "./chunk-27Y6K5NK.mjs";
8
-
9
- // src/components/table/table-body.tsx
10
- import { useCallback } from "react";
11
- import { jsx, jsxs } from "react/jsx-runtime";
12
- import { createElement } from "react";
13
- var TableBody = ({
14
- slots,
15
- columns,
16
- rows,
17
- size,
18
- rowCheckbox,
19
- checkedRows,
20
- onCheckRow,
21
- onRowClick,
22
- emptyContent,
23
- isLoading,
24
- classNames,
25
- className
26
- }) => {
27
- const generateColumnStyles = useCallback((column) => {
28
- const alignClass = column.align ? `text-${column.align}` : "text-left";
29
- return clsx(alignClass, column.className);
30
- }, []);
31
- const getCellProps = useCallback(
32
- (column, row) => {
33
- if (!column || !row) {
34
- return {
35
- className: slots.td({ class: classNames == null ? void 0 : classNames.td })
36
- };
37
- }
38
- const value = row[column.field];
39
- const formattedValue = column.valueFormatter ? column.valueFormatter({ id: column.field, field: column.field, value }) : value;
40
- const children = column.renderCell ? column.renderCell({
41
- id: column.field,
42
- field: column.field,
43
- value,
44
- formattedValue,
45
- row
46
- }) : formattedValue;
47
- const columnStyles = generateColumnStyles(column);
48
- return {
49
- children,
50
- className: clsx(slots.td({ class: classNames == null ? void 0 : classNames.td }), columnStyles),
51
- style: {
52
- width: column.width ? `${column.width}px` : void 0,
53
- minWidth: column.minWidth ? `${column.minWidth}px` : void 0,
54
- maxWidth: column.maxWidth ? `${column.maxWidth}px` : void 0,
55
- height: column.height ? `${column.height}px` : void 0
56
- }
57
- };
58
- },
59
- [classNames == null ? void 0 : classNames.td, generateColumnStyles, slots]
60
- );
61
- const hasRows = rows.length > 0;
62
- const colSpan = (columns.length || 1) + (rowCheckbox ? 1 : 0);
63
- return /* @__PURE__ */ jsxs("tbody", { className: clsx(slots.tbody({ class: classNames == null ? void 0 : classNames.tbody }), className), children: [
64
- !isLoading && hasRows && rows.map((row, rowIndex) => {
65
- const isRowChecked = checkedRows.has(rowIndex);
66
- return /* @__PURE__ */ jsxs(
67
- "tr",
68
- {
69
- className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }),
70
- "aria-checked": isRowChecked,
71
- onClick: () => onRowClick ? onRowClick(row) : void 0,
72
- children: [
73
- columns.map((column) => /* @__PURE__ */ createElement("td", { ...getCellProps(column, row), key: column.field })),
74
- rowCheckbox && /* @__PURE__ */ jsx("td", { className: slots.td({ class: classNames == null ? void 0 : classNames.td }), children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(
75
- checkbox_default,
76
- {
77
- size,
78
- checked: isRowChecked,
79
- onChange: (e) => onCheckRow(rowIndex, e.target.checked)
80
- }
81
- ) }) })
82
- ]
83
- },
84
- rowIndex
85
- );
86
- }),
87
- !isLoading && !hasRows && emptyContent && /* @__PURE__ */ jsx("tr", { className: clsx(slots.tr({ class: classNames == null ? void 0 : classNames.tr }), "border-none"), children: /* @__PURE__ */ jsx("td", { colSpan, className: slots.empty({ class: classNames == null ? void 0 : classNames.empty }), children: emptyContent }) })
88
- ] });
89
- };
90
- var table_body_default = TableBody;
91
-
92
- export {
93
- table_body_default
94
- };
@@ -1,209 +0,0 @@
1
- "use client";
2
- import {
3
- mapPropsVariants
4
- } from "./chunk-E3G5QXSH.mjs";
5
-
6
- // src/components/textarea/textarea.tsx
7
- import { forwardRef, useCallback, useMemo } from "react";
8
- import { tv } from "tailwind-variants";
9
- import { jsx, jsxs } from "react/jsx-runtime";
10
- var Textarea = forwardRef((originalProps, ref) => {
11
- const [props, variantProps] = mapPropsVariants(originalProps, textareaStyle.variantKeys);
12
- const { classNames, label, errorMessage, ...textareaProps } = props;
13
- const slots = useMemo(() => textareaStyle({ ...variantProps }), [variantProps]);
14
- const getBaseProps = useCallback(
15
- () => ({
16
- className: slots.base({ class: classNames == null ? void 0 : classNames.base })
17
- }),
18
- [slots, classNames]
19
- );
20
- const getLabelProps = useCallback(
21
- () => ({
22
- className: slots.label({ class: classNames == null ? void 0 : classNames.label })
23
- }),
24
- [slots, classNames]
25
- );
26
- const getInnerWrapperProps = useCallback(
27
- () => ({
28
- className: slots.innerWrapper({ class: classNames == null ? void 0 : classNames.innerWrapper })
29
- }),
30
- [slots, classNames]
31
- );
32
- const getTextareaWrapperProps = useCallback(
33
- () => ({
34
- className: slots.textareaWrapper({ class: classNames == null ? void 0 : classNames.textareaWrapper })
35
- }),
36
- [slots, classNames]
37
- );
38
- const getTextareaProps = useCallback(
39
- () => ({
40
- ...textareaProps,
41
- ref,
42
- className: slots.textarea({ class: classNames == null ? void 0 : classNames.textarea }),
43
- disabled: originalProps.isDisabled,
44
- required: originalProps.isRequired,
45
- size: 0
46
- }),
47
- [textareaProps, ref, slots, classNames == null ? void 0 : classNames.textarea, originalProps.isDisabled, originalProps.isRequired]
48
- );
49
- const getErrorMessageProps = useCallback(
50
- () => ({
51
- className: slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })
52
- }),
53
- [slots, classNames]
54
- );
55
- return /* @__PURE__ */ jsxs("div", { ...getBaseProps(), children: [
56
- props.label && /* @__PURE__ */ jsx("label", { ...getLabelProps(), children: props.label }),
57
- /* @__PURE__ */ jsxs("div", { ...getInnerWrapperProps(), children: [
58
- /* @__PURE__ */ jsx("div", { ...getTextareaWrapperProps(), children: /* @__PURE__ */ jsx("textarea", { ...getTextareaProps() }) }),
59
- props.errorMessage && /* @__PURE__ */ jsx("p", { ...getErrorMessageProps(), children: props.errorMessage })
60
- ] })
61
- ] });
62
- });
63
- Textarea.displayName = "Textarea";
64
- var textarea_default = Textarea;
65
- var textareaStyle = tv({
66
- slots: {
67
- base: ["group/textarea", "flex", "flex-col", "gap-[10px]", "select-none"],
68
- label: ["flex", "items-center"],
69
- innerWrapper: ["flex", "flex-col", "gap-[6px]"],
70
- textareaWrapper: [
71
- "flex",
72
- "bg-transparent",
73
- "border-neutral-main",
74
- "group-has-[p]/textarea:border-danger-main",
75
- "group-has-[p]/textarea:bg-danger-soft",
76
- "transition duration-200"
77
- ],
78
- textarea: [
79
- "w-full",
80
- "bg-transparent",
81
- "placeholder:text-neutral-main",
82
- "focus-visible:outline-none",
83
- "resize-none"
84
- ],
85
- errorMessage: ["text-danger-main"]
86
- },
87
- variants: {
88
- variant: {
89
- solid: {
90
- textareaWrapper: ["bg-trans-soft", "hover:bg-trans-light", "has-[:focus]:bg-trans-light"]
91
- },
92
- line: {
93
- textareaWrapper: ["border", "hover:bg-trans-soft", "has-[:focus]:bg-trans-soft"]
94
- }
95
- },
96
- color: {
97
- primary: {},
98
- secondary: {}
99
- },
100
- size: {
101
- sm: {
102
- base: "gap-[6px]",
103
- textareaWrapper: "w-[240px] rounded-sm p-[6px]",
104
- textarea: "text-sm rounded-sm",
105
- label: "text-sm",
106
- errorMessage: "text-sm"
107
- },
108
- md: {
109
- base: "gap-[8px]",
110
- textareaWrapper: "w-[240px] rounded-md p-[8px]",
111
- textarea: "text-md rounded-md",
112
- label: "text-md",
113
- errorMessage: "text-md"
114
- },
115
- lg: {
116
- base: "gap-[10px]",
117
- textareaWrapper: "w-[240px] rounded-lg p-[10px]",
118
- textarea: "text-lg rounded-lg",
119
- label: "text-lg",
120
- errorMessage: "text-lg"
121
- },
122
- xl: {
123
- base: "gap-[10px]",
124
- textareaWrapper: "w-[240px] rounded-xl p-[10px]",
125
- textarea: "text-xl rounded-xl",
126
- label: "text-xl",
127
- errorMessage: "text-xl"
128
- }
129
- },
130
- radius: {
131
- default: {},
132
- none: {
133
- textareaWrapper: "rounded-none",
134
- textarea: "rounded-none"
135
- },
136
- full: {
137
- textareaWrapper: "rounded-full",
138
- textarea: "rounded-full"
139
- }
140
- },
141
- fullWidth: {
142
- true: {
143
- base: "w-full",
144
- textareaWrapper: "w-full",
145
- textarea: "w-full"
146
- }
147
- },
148
- isDisabled: {
149
- true: {
150
- base: ["opacity-disabled", "pointer-events-none"],
151
- textareaWrapper: ["bg-neutral-soft", "border-neutral-light", "pointer-events-none"],
152
- textarea: ["text-neutral-light placeholder:text-neutral-light", "border-neutral-light"],
153
- label: ["text-neutral-light", "pointer-events-none"],
154
- errorMessage: "text-danger-light"
155
- }
156
- },
157
- isRequired: {
158
- true: {
159
- label: ["after:content-['*']", "after:text-danger-main", "after:ml-0.5"]
160
- }
161
- }
162
- },
163
- defaultVariants: {
164
- variant: "solid",
165
- color: "primary",
166
- size: "md",
167
- fullWidth: false,
168
- isDisabled: false,
169
- isRequired: false
170
- },
171
- compoundVariants: [
172
- // variants & color
173
- {
174
- variant: "line",
175
- color: "primary",
176
- class: {
177
- textareaWrapper: "has-[:focus]:border-primary-main"
178
- }
179
- },
180
- {
181
- variant: "line",
182
- color: "secondary",
183
- class: {
184
- textareaWrapper: "has-[:focus]:border-secondary-main",
185
- textarea: "focus:bg-secondary-main"
186
- }
187
- },
188
- // Variants & isDisabled
189
- {
190
- variant: "line",
191
- isDisabled: true,
192
- class: {
193
- textareaWrapper: "bg-neutral-soft"
194
- }
195
- },
196
- // isRequired & isDisabled
197
- {
198
- isRequired: true,
199
- isDisabled: true,
200
- class: {
201
- label: "after:text-danger-light"
202
- }
203
- }
204
- ]
205
- });
206
-
207
- export {
208
- textarea_default
209
- };
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import {
3
- mapPropsVariants
4
- } from "./chunk-E3G5QXSH.mjs";
5
2
  import {
6
3
  tv
7
4
  } from "./chunk-4ZJFD3L3.mjs";
5
+ import {
6
+ mapPropsVariants
7
+ } from "./chunk-E3G5QXSH.mjs";
8
8
 
9
9
  // src/components/tabs/tabs.tsx
10
10
  import { forwardRef, useCallback, useMemo, useState } from "react";
@@ -8,12 +8,12 @@ import {
8
8
  import {
9
9
  Icon_default
10
10
  } from "./chunk-2TKEWFGH.mjs";
11
- import {
12
- mapPropsVariants
13
- } from "./chunk-E3G5QXSH.mjs";
14
11
  import {
15
12
  tv
16
13
  } from "./chunk-4ZJFD3L3.mjs";
14
+ import {
15
+ mapPropsVariants
16
+ } from "./chunk-E3G5QXSH.mjs";
17
17
 
18
18
  // src/components/button/icon-button.tsx
19
19
  import { forwardRef, useMemo, useCallback } from "react";
@@ -6,12 +6,12 @@ import {
6
6
  import {
7
7
  Icon_default
8
8
  } from "./chunk-2TKEWFGH.mjs";
9
- import {
10
- mapPropsVariants
11
- } from "./chunk-E3G5QXSH.mjs";
12
9
  import {
13
10
  tv
14
11
  } from "./chunk-4ZJFD3L3.mjs";
12
+ import {
13
+ mapPropsVariants
14
+ } from "./chunk-E3G5QXSH.mjs";
15
15
 
16
16
  // src/components/dateTimePicker/calendar.tsx
17
17
  import React, {
@@ -1,13 +1,13 @@
1
1
  "use client";
2
+ import {
3
+ tv
4
+ } from "./chunk-4ZJFD3L3.mjs";
2
5
  import {
3
6
  clsx
4
7
  } from "./chunk-27Y6K5NK.mjs";
5
8
  import {
6
9
  mapPropsVariants
7
10
  } from "./chunk-E3G5QXSH.mjs";
8
- import {
9
- tv
10
- } from "./chunk-4ZJFD3L3.mjs";
11
11
 
12
12
  // src/components/checkbox/checkbox.tsx
13
13
  import { forwardRef, useMemo } from "react";
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import {
3
- mapPropsVariants
4
- } from "./chunk-E3G5QXSH.mjs";
5
2
  import {
6
3
  tv
7
4
  } from "./chunk-4ZJFD3L3.mjs";
5
+ import {
6
+ mapPropsVariants
7
+ } from "./chunk-E3G5QXSH.mjs";
8
8
 
9
9
  // src/components/list/list.tsx
10
10
  import { Children, cloneElement, forwardRef, isValidElement, useMemo } from "react";
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import {
3
- clsx
4
- } from "./chunk-27Y6K5NK.mjs";
5
2
  import {
6
3
  tv
7
4
  } from "./chunk-4ZJFD3L3.mjs";
5
+ import {
6
+ clsx
7
+ } from "./chunk-27Y6K5NK.mjs";
8
8
 
9
9
  // src/components/backdrop/backdrop.tsx
10
10
  import { useEffect, useState } from "react";
@@ -2,15 +2,15 @@
2
2
  import {
3
3
  Icon_default
4
4
  } from "./chunk-2TKEWFGH.mjs";
5
+ import {
6
+ tv
7
+ } from "./chunk-4ZJFD3L3.mjs";
5
8
  import {
6
9
  clsx
7
10
  } from "./chunk-27Y6K5NK.mjs";
8
11
  import {
9
12
  mapPropsVariants
10
13
  } from "./chunk-E3G5QXSH.mjs";
11
- import {
12
- tv
13
- } from "./chunk-4ZJFD3L3.mjs";
14
14
 
15
15
  // src/components/toast/toast.tsx
16
16
  import { forwardRef, useImperativeHandle, useMemo, useRef } from "react";
@@ -1,13 +1,13 @@
1
1
  "use client";
2
+ import {
3
+ tv
4
+ } from "./chunk-4ZJFD3L3.mjs";
2
5
  import {
3
6
  clsx
4
7
  } from "./chunk-27Y6K5NK.mjs";
5
8
  import {
6
9
  mapPropsVariants
7
10
  } from "./chunk-E3G5QXSH.mjs";
8
- import {
9
- tv
10
- } from "./chunk-4ZJFD3L3.mjs";
11
11
 
12
12
  // src/components/radio/radio.tsx
13
13
  import { forwardRef, useMemo } from "react";