@deepnoid/ui 0.1.19 → 0.1.21

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 (178) hide show
  1. package/.turbo/turbo-build.log +202 -183
  2. package/dist/assets/images/cogwheel.d.mts +2 -0
  3. package/dist/assets/images/cogwheel.d.ts +2 -0
  4. package/dist/assets/images/cogwheel.js +4 -0
  5. package/dist/assets/images/cogwheel.mjs +8 -0
  6. package/dist/assets/images/folder.d.mts +2 -0
  7. package/dist/assets/images/folder.d.ts +2 -0
  8. package/dist/assets/images/folder.js +4 -0
  9. package/dist/assets/images/folder.mjs +8 -0
  10. package/dist/chunk-2DLKV6TT.mjs +168 -0
  11. package/dist/{chunk-7TXQPX4O.mjs → chunk-2Y7IBUAZ.mjs} +19 -8
  12. package/dist/chunk-3BKCODIL.mjs +49 -0
  13. package/dist/{chunk-A7OXEUCC.mjs → chunk-3IU2RPSM.mjs} +75 -9
  14. package/dist/{chunk-3TJAGKKY.mjs → chunk-7CFOD7G4.mjs} +11 -9
  15. package/dist/chunk-7KUFDVGL.mjs +71 -0
  16. package/dist/chunk-7USF56CT.mjs +8 -0
  17. package/dist/{chunk-5ANQDLRS.mjs → chunk-DUPQBPI2.mjs} +4 -4
  18. package/dist/{chunk-K7Z6PVXE.mjs → chunk-EWZAHXN7.mjs} +7 -7
  19. package/dist/{chunk-BFM3LPBK.mjs → chunk-FBAR75U4.mjs} +4 -4
  20. package/dist/{chunk-RPDPB4JP.mjs → chunk-HQLSHEK6.mjs} +4 -4
  21. package/dist/{chunk-DADMVOYI.mjs → chunk-HWL7TPUN.mjs} +1 -1
  22. package/dist/chunk-IZM66FHP.mjs +8 -0
  23. package/dist/{chunk-QIDZXCYP.mjs → chunk-JHDYQCEE.mjs} +6 -6
  24. package/dist/chunk-MBLZYQCN.mjs +1 -0
  25. package/dist/{chunk-7A5M7DRD.mjs → chunk-MQI5SZWO.mjs} +7 -7
  26. package/dist/{chunk-3DPVPTHL.mjs → chunk-MV7RSV4D.mjs} +3 -3
  27. package/dist/chunk-MW7CSRIE.mjs +348 -0
  28. package/dist/chunk-OV7CZNXU.mjs +135 -0
  29. package/dist/{chunk-AG7AWQKH.mjs → chunk-Q6BZ76DI.mjs} +4 -4
  30. package/dist/{chunk-63WXGSTV.mjs → chunk-QHWFHOW2.mjs} +24 -14
  31. package/dist/{chunk-FONJYZKH.mjs → chunk-SDHQUYFI.mjs} +7 -7
  32. package/dist/{chunk-UHFJ7ZFM.mjs → chunk-UTC2D6GV.mjs} +6 -6
  33. package/dist/chunk-XGYQ6D3S.mjs +82 -0
  34. package/dist/{chunk-UYPVP36M.mjs → chunk-XQGD4ZIX.mjs} +1 -1
  35. package/dist/cogwheel-U2B3CWEL.png +0 -0
  36. package/dist/components/avatar/avatar.js +75 -9
  37. package/dist/components/avatar/avatar.mjs +2 -2
  38. package/dist/components/avatar/index.js +75 -9
  39. package/dist/components/avatar/index.mjs +2 -2
  40. package/dist/components/backdrop/backdrop.mjs +2 -2
  41. package/dist/components/backdrop/index.mjs +2 -2
  42. package/dist/components/breadcrumb/breadcrumb.js +75 -9
  43. package/dist/components/breadcrumb/breadcrumb.mjs +9 -9
  44. package/dist/components/breadcrumb/index.js +75 -9
  45. package/dist/components/breadcrumb/index.mjs +9 -9
  46. package/dist/components/button/button.js +75 -9
  47. package/dist/components/button/button.mjs +5 -5
  48. package/dist/components/button/icon-button.js +75 -9
  49. package/dist/components/button/icon-button.mjs +5 -5
  50. package/dist/components/button/index.js +75 -9
  51. package/dist/components/button/index.mjs +9 -9
  52. package/dist/components/button/text-button.mjs +3 -3
  53. package/dist/components/checkbox/checkbox.mjs +3 -3
  54. package/dist/components/checkbox/index.mjs +3 -3
  55. package/dist/components/chip/chip.js +75 -9
  56. package/dist/components/chip/chip.mjs +4 -4
  57. package/dist/components/chip/index.js +75 -9
  58. package/dist/components/chip/index.mjs +4 -4
  59. package/dist/components/dateTimePicker/calendar.js +75 -9
  60. package/dist/components/dateTimePicker/calendar.mjs +4 -4
  61. package/dist/components/dateTimePicker/dateTimePicker.js +75 -9
  62. package/dist/components/dateTimePicker/dateTimePicker.mjs +9 -9
  63. package/dist/components/dateTimePicker/index.js +75 -9
  64. package/dist/components/dateTimePicker/index.mjs +9 -9
  65. package/dist/components/dateTimePicker/timePicker.js +75 -9
  66. package/dist/components/dateTimePicker/timePicker.mjs +7 -7
  67. package/dist/components/icon/Icon.d.mts +6 -2
  68. package/dist/components/icon/Icon.d.ts +6 -2
  69. package/dist/components/icon/Icon.js +75 -9
  70. package/dist/components/icon/Icon.mjs +2 -2
  71. package/dist/components/icon/index.js +75 -9
  72. package/dist/components/icon/index.mjs +2 -2
  73. package/dist/components/icon/template.d.mts +2 -1
  74. package/dist/components/icon/template.d.ts +2 -1
  75. package/dist/components/icon/template.js +75 -9
  76. package/dist/components/icon/template.mjs +1 -1
  77. package/dist/components/input/index.js +89 -12
  78. package/dist/components/input/index.mjs +5 -5
  79. package/dist/components/input/input.js +89 -12
  80. package/dist/components/input/input.mjs +5 -5
  81. package/dist/components/list/index.js +75 -9
  82. package/dist/components/list/index.mjs +8 -8
  83. package/dist/components/list/list.mjs +2 -2
  84. package/dist/components/list/listItem.js +75 -9
  85. package/dist/components/list/listItem.mjs +5 -5
  86. package/dist/components/modal/index.d.mts +0 -3
  87. package/dist/components/modal/index.d.ts +0 -3
  88. package/dist/components/modal/index.js +205 -158
  89. package/dist/components/modal/index.mjs +11 -9
  90. package/dist/components/modal/modal.d.mts +43 -105
  91. package/dist/components/modal/modal.d.ts +43 -105
  92. package/dist/components/modal/modal.js +206 -164
  93. package/dist/components/modal/modal.mjs +12 -12
  94. package/dist/components/pagination/index.js +89 -12
  95. package/dist/components/pagination/index.mjs +6 -6
  96. package/dist/components/pagination/pagination.js +89 -12
  97. package/dist/components/pagination/pagination.mjs +6 -6
  98. package/dist/components/radio/index.mjs +3 -3
  99. package/dist/components/radio/radio.mjs +3 -3
  100. package/dist/components/ripple/index.mjs +3 -3
  101. package/dist/components/select/index.d.mts +1 -1
  102. package/dist/components/select/index.d.ts +1 -1
  103. package/dist/components/select/index.js +376 -295
  104. package/dist/components/select/index.mjs +5 -6
  105. package/dist/components/select/select.d.mts +190 -177
  106. package/dist/components/select/select.d.ts +190 -177
  107. package/dist/components/select/select.js +376 -295
  108. package/dist/components/select/select.mjs +5 -6
  109. package/dist/components/table/form-table.d.mts +52 -0
  110. package/dist/components/table/form-table.d.ts +52 -0
  111. package/dist/components/table/form-table.js +365 -0
  112. package/dist/components/table/form-table.mjs +9 -0
  113. package/dist/components/table/index.d.mts +2 -0
  114. package/dist/components/table/index.d.ts +2 -0
  115. package/dist/components/table/index.js +162 -30
  116. package/dist/components/table/index.mjs +15 -11
  117. package/dist/components/table/table-body.d.mts +3 -2
  118. package/dist/components/table/table-body.d.ts +3 -2
  119. package/dist/components/table/table-body.js +23 -13
  120. package/dist/components/table/table-body.mjs +4 -4
  121. package/dist/components/table/table-head.d.mts +2 -2
  122. package/dist/components/table/table-head.d.ts +2 -2
  123. package/dist/components/table/table-head.js +2 -2
  124. package/dist/components/table/table-head.mjs +4 -4
  125. package/dist/components/table/table.d.mts +2 -1
  126. package/dist/components/table/table.d.ts +2 -1
  127. package/dist/components/table/table.js +119 -30
  128. package/dist/components/table/table.mjs +10 -10
  129. package/dist/components/tabs/index.mjs +2 -2
  130. package/dist/components/tabs/tabs.mjs +2 -2
  131. package/dist/components/toast/index.js +239 -97
  132. package/dist/components/toast/index.mjs +6 -5
  133. package/dist/components/toast/toast.d.mts +40 -81
  134. package/dist/components/toast/toast.d.ts +40 -81
  135. package/dist/components/toast/toast.js +210 -56
  136. package/dist/components/toast/toast.mjs +5 -4
  137. package/dist/components/toast/use-toast.d.mts +6 -10
  138. package/dist/components/toast/use-toast.d.ts +6 -10
  139. package/dist/components/toast/use-toast.js +239 -97
  140. package/dist/components/toast/use-toast.mjs +6 -5
  141. package/dist/components/tooltip/index.mjs +2 -2
  142. package/dist/components/tooltip/tooltip.mjs +2 -2
  143. package/dist/components/tree/index.d.mts +2 -0
  144. package/dist/components/tree/index.d.ts +2 -0
  145. package/dist/components/tree/index.js +4371 -0
  146. package/dist/components/tree/index.mjs +15 -0
  147. package/dist/components/tree/tree.d.mts +20 -0
  148. package/dist/components/tree/tree.d.ts +20 -0
  149. package/dist/components/{select/option.js → tree/tree.js} +146 -74
  150. package/dist/components/tree/tree.mjs +14 -0
  151. package/dist/folder-RO3QTLGS.svg +9 -0
  152. package/dist/index.d.mts +3 -0
  153. package/dist/index.d.ts +3 -0
  154. package/dist/index.js +681 -545
  155. package/dist/index.mjs +71 -62
  156. package/package.json +1 -1
  157. package/types/images.d.ts +14 -0
  158. package/dist/chunk-5OBP42D6.mjs +0 -117
  159. package/dist/chunk-HDNQOLUJ.mjs +0 -83
  160. package/dist/chunk-MJT6ZW4C.mjs +0 -255
  161. package/dist/chunk-P6NVCCBZ.mjs +0 -76
  162. package/dist/chunk-RXIFDECK.mjs +0 -213
  163. package/dist/chunk-S3QS5B7F.mjs +0 -61
  164. package/dist/components/select/option.d.mts +0 -17
  165. package/dist/components/select/option.d.ts +0 -17
  166. package/dist/components/select/option.mjs +0 -12
  167. package/dist/components/select/useSelect.d.mts +0 -31
  168. package/dist/components/select/useSelect.d.ts +0 -31
  169. package/dist/components/select/useSelect.js +0 -84
  170. package/dist/components/select/useSelect.mjs +0 -8
  171. package/dist/{chunk-D6QI3DJG.mjs → chunk-7H5XPHY6.mjs} +4 -4
  172. package/dist/{chunk-2UUH2MBF.mjs → chunk-DX3KXNP6.mjs} +0 -0
  173. package/dist/{chunk-Z2537DF6.mjs → chunk-IL5ENWCR.mjs} +3 -3
  174. package/dist/{chunk-WFMFC7R6.mjs → chunk-KCOHU7X7.mjs} +4 -4
  175. package/dist/{chunk-LL6F3WDX.mjs → chunk-P5QCU457.mjs} +3 -3
  176. package/dist/{chunk-2YMAKIZ6.mjs → chunk-SSMMWMQC.mjs} +3 -3
  177. package/dist/{chunk-HIVPDIEP.mjs → chunk-UFVQPPPW.mjs} +3 -3
  178. package/dist/{chunk-QIRL6HY6.mjs → chunk-YIIFWADW.mjs} +4 -4
package/dist/index.js CHANGED
@@ -110,6 +110,7 @@ __export(index_exports, {
110
110
  CheckBox: () => checkbox_default,
111
111
  Chip: () => chip_default,
112
112
  DateTimePicker: () => dateTimePicker_default,
113
+ FormTable: () => form_table_default,
113
114
  Icon: () => Icon_default,
114
115
  IconButton: () => icon_button_default,
115
116
  Input: () => input_default,
@@ -128,6 +129,7 @@ __export(index_exports, {
128
129
  Toast: () => toast_default,
129
130
  ToastProvider: () => ToastProvider,
130
131
  Tooltip: () => tooltip_default,
132
+ Tree: () => tree_default,
131
133
  deepnoidUi: () => deepnoidUi,
132
134
  iconTemplate: () => iconTemplate,
133
135
  tv: () => tv,
@@ -576,23 +578,89 @@ var template = {
576
578
  }
577
579
  );
578
580
  },
579
- // ----------------------------------- old ---------------------------------
580
- // ** Status **
581
- plus: ({ className, fill }) => {
581
+ exclamation: ({ className, fill }) => {
582
582
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
583
583
  "svg",
584
584
  {
585
- width: "24",
586
- height: "24",
587
- viewBox: "0 0 24 24",
585
+ xmlns: "http://www.w3.org/2000/svg",
586
+ width: "18",
587
+ height: "18",
588
+ viewBox: "0 0 18 18",
588
589
  fill: "none",
590
+ className,
591
+ children: fill ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
592
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
593
+ "path",
594
+ {
595
+ d: "M11.264 2.37077C11.2832 2.37715 11.3024 2.38353 11.3223 2.3901C12.3182 2.72483 13.1824 3.30575 13.9306 4.03468C13.9575 4.06039 13.9843 4.08609 14.0119 4.11257C14.1806 4.27693 14.33 4.45208 14.4754 4.63713C14.4981 4.66509 14.5208 4.69305 14.5442 4.72185C15.0188 5.31801 15.3774 6.01161 15.6224 6.73137C15.6303 6.75453 15.6382 6.77768 15.6464 6.80155C16.1308 8.2413 16.1125 9.82918 15.6224 11.2641C15.6105 11.2995 15.6105 11.2995 15.5983 11.3356C15.3948 11.9315 15.1066 12.5059 14.7335 13.0141C14.7221 13.0297 14.7107 13.0453 14.6989 13.0614C14.313 13.5865 13.8736 14.0779 13.3571 14.4772C13.3155 14.5109 13.3155 14.5109 13.273 14.5454C12.6801 15.0224 11.982 15.3801 11.264 15.6247C11.2408 15.6326 11.2177 15.6406 11.1938 15.6487C9.43757 16.2402 7.50979 16.0678 5.85241 15.2592C4.96204 14.8102 4.13267 14.1489 3.52213 13.3583C3.49962 13.3305 3.47711 13.3028 3.45392 13.2742C2.32855 11.8738 1.85507 9.99621 2.03839 8.22438C2.17342 7.0638 2.58402 5.9339 3.26407 4.98139C3.27714 4.96288 3.29022 4.94436 3.30369 4.92529C3.51689 4.62523 3.75292 4.35545 4.00958 4.09206C4.03773 4.06274 4.06588 4.03342 4.09403 4.00409C4.26597 3.8279 4.44681 3.67012 4.6404 3.5183C4.6683 3.49563 4.69621 3.47296 4.72496 3.4496C6.54339 2.00006 9.08031 1.63201 11.264 2.37077Z",
596
+ fill: "currentColor"
597
+ }
598
+ ),
599
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
600
+ "path",
601
+ {
602
+ d: "M9.36648 5.85289C9.53634 5.9647 9.6533 6.12598 9.71812 6.32867C9.73452 6.40467 9.74201 6.47516 9.74238 6.55312C9.74254 6.57462 9.74269 6.59612 9.74284 6.61826C9.7429 6.64157 9.74296 6.66489 9.74302 6.68891C9.74315 6.71368 9.74329 6.73845 9.74344 6.76397C9.74385 6.84591 9.7441 6.92785 9.74431 7.00979C9.7444 7.03785 9.74448 7.06592 9.74457 7.09484C9.74497 7.22817 9.74528 7.3615 9.74545 7.49483C9.74568 7.66315 9.74639 7.83146 9.74732 7.99978C9.74787 8.11787 9.74805 8.23596 9.74812 8.35405C9.74823 8.41042 9.74847 8.46679 9.74886 8.52316C9.75351 9.23268 9.75351 9.23268 9.54833 9.48966C9.39246 9.65505 9.20768 9.73677 8.98973 9.75C8.78199 9.74035 8.59485 9.64627 8.44906 9.48814C8.28258 9.27909 8.24899 9.03597 8.25049 8.7678C8.25038 8.7429 8.25027 8.718 8.25015 8.69234C8.24987 8.61081 8.25006 8.5293 8.25027 8.44777C8.25023 8.39068 8.25017 8.33358 8.25009 8.27649C8.24999 8.15716 8.25013 8.03783 8.25043 7.9185C8.25079 7.76594 8.25058 7.6134 8.2502 7.46085C8.24997 7.34306 8.25004 7.22527 8.25021 7.10748C8.25025 7.05125 8.2502 6.99501 8.25005 6.93877C8.24989 6.86005 8.25014 6.78135 8.25049 6.70263C8.25036 6.67965 8.25023 6.65668 8.2501 6.63301C8.25225 6.37163 8.32078 6.1648 8.48128 5.96879C8.72644 5.71507 9.07274 5.68973 9.36648 5.85289Z",
603
+ fill: "white"
604
+ }
605
+ ),
606
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
607
+ "path",
608
+ {
609
+ d: "M9.34541 10.8369C9.52938 10.9471 9.67125 11.1068 9.73271 11.3148C9.77656 11.529 9.73613 11.7317 9.62145 11.916C9.49889 12.0867 9.3528 12.1846 9.14957 12.2412C8.92053 12.2704 8.73922 12.2283 8.55045 12.0972C8.38043 11.959 8.27865 11.7781 8.25072 11.5592C8.24266 11.3506 8.30179 11.162 8.43381 10.9998C8.68322 10.7451 9.02878 10.6749 9.34541 10.8369Z",
610
+ fill: "white"
611
+ }
612
+ )
613
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
614
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
615
+ "path",
616
+ {
617
+ d: "M5.03711 3.84082C6.60875 2.5881 8.77805 2.2038 10.7188 2.72754L11.1035 2.84473L11.1064 2.8457C11.125 2.85187 11.144 2.85694 11.1631 2.86328V2.86426C11.9606 3.13233 12.6739 3.57547 13.3125 4.14258L13.582 4.39258L13.585 4.39551L13.666 4.47363C13.7385 4.54442 13.8078 4.61844 13.876 4.69629L14.082 4.94629L14.0869 4.95215L14.1562 5.03711C14.5346 5.51326 14.8361 6.06221 15.0586 6.6416L15.1494 6.89258V6.89355L15.1738 6.96387C15.5931 8.21222 15.6047 9.58552 15.2295 10.8506L15.1494 11.1025L15.1484 11.1045C15.1368 11.1391 15.1363 11.1401 15.125 11.1738C14.9596 11.6581 14.7354 12.1232 14.4541 12.542L14.3301 12.7178L14.3291 12.7197C14.3181 12.7348 14.3072 12.7501 14.2959 12.7656C13.9281 13.2659 13.5205 13.7197 13.0518 14.082L13.3457 14.4629L13.0508 14.0811L13.042 14.0889L12.958 14.1572C12.4859 14.5367 11.9342 14.8378 11.3535 15.0605L11.1025 15.1514H11.1016C11.0793 15.159 11.0571 15.1669 11.0342 15.1748C9.51234 15.6873 7.84224 15.5817 6.36426 14.9443L6.07129 14.8096C5.3482 14.4439 4.67072 13.9288 4.1377 13.3203L3.91797 13.0527L3.91016 13.0439L3.84277 12.959H3.8418C2.81057 11.6744 2.36571 9.93549 2.53516 8.28223C2.64545 7.33424 2.95228 6.41319 3.44727 5.60938L3.6709 5.27148L3.67285 5.26953C3.6858 5.2512 3.69858 5.23275 3.71191 5.21387L3.71094 5.21289C3.85636 5.00834 4.01615 4.81758 4.18945 4.62891L4.36816 4.44141L4.37012 4.43848C4.39734 4.41013 4.42493 4.38187 4.45215 4.35352C4.52879 4.27498 4.60794 4.19996 4.69043 4.12695L4.94922 3.91211L4.95605 3.90625C4.98272 3.88459 5.00872 3.86211 5.03613 3.83984L5.03711 3.84082Z",
618
+ stroke: "currentColor"
619
+ }
620
+ ),
621
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
622
+ "path",
623
+ {
624
+ d: "M9.36648 5.85289C9.53634 5.9647 9.6533 6.12598 9.71812 6.32867C9.73452 6.40467 9.74201 6.47516 9.74238 6.55312C9.74254 6.57462 9.74269 6.59612 9.74284 6.61826C9.7429 6.64157 9.74296 6.66489 9.74302 6.68891C9.74315 6.71368 9.74329 6.73845 9.74344 6.76397C9.74385 6.84591 9.7441 6.92785 9.74431 7.00979C9.7444 7.03785 9.74448 7.06592 9.74457 7.09484C9.74497 7.22817 9.74528 7.3615 9.74545 7.49483C9.74568 7.66315 9.74639 7.83146 9.74732 7.99978C9.74787 8.11787 9.74805 8.23596 9.74812 8.35405C9.74823 8.41042 9.74847 8.46679 9.74886 8.52316C9.75351 9.23268 9.75351 9.23268 9.54833 9.48966C9.39246 9.65505 9.20768 9.73677 8.98973 9.75C8.78199 9.74035 8.59485 9.64627 8.44906 9.48814C8.28258 9.27909 8.24899 9.03597 8.25049 8.7678C8.25038 8.7429 8.25027 8.718 8.25015 8.69234C8.24987 8.61081 8.25006 8.5293 8.25027 8.44777C8.25023 8.39068 8.25017 8.33358 8.25009 8.27649C8.24999 8.15716 8.25013 8.03783 8.25043 7.9185C8.25079 7.76594 8.25058 7.6134 8.2502 7.46085C8.24997 7.34306 8.25004 7.22527 8.25021 7.10748C8.25025 7.05125 8.2502 6.99501 8.25005 6.93877C8.24989 6.86005 8.25014 6.78135 8.25049 6.70263C8.25036 6.67965 8.25023 6.65668 8.2501 6.63301C8.25225 6.37163 8.32078 6.1648 8.48128 5.96879C8.72644 5.71507 9.07274 5.68973 9.36648 5.85289Z",
625
+ fill: "currentColor"
626
+ }
627
+ ),
628
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
629
+ "path",
630
+ {
631
+ d: "M9.34541 10.8369C9.52938 10.9471 9.67125 11.1068 9.73271 11.3148C9.77656 11.529 9.73613 11.7317 9.62145 11.916C9.49889 12.0867 9.3528 12.1846 9.14957 12.2412C8.92053 12.2704 8.73922 12.2283 8.55045 12.0972C8.38043 11.959 8.27865 11.7781 8.25072 11.5592C8.24266 11.3506 8.30179 11.162 8.43381 10.9998C8.68322 10.7451 9.02878 10.6749 9.34541 10.8369Z",
632
+ fill: "currentColor"
633
+ }
634
+ )
635
+ ] })
636
+ }
637
+ );
638
+ },
639
+ close: ({ className }) => {
640
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
641
+ "svg",
642
+ {
589
643
  xmlns: "http://www.w3.org/2000/svg",
644
+ width: "27",
645
+ height: "27",
646
+ viewBox: "0 0 27 27",
647
+ fill: "none",
590
648
  className,
591
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 4.5V19.5M19.5 12H4.5", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" })
649
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
650
+ "path",
651
+ {
652
+ fillRule: "evenodd",
653
+ clipRule: "evenodd",
654
+ d: "M6.24339 6.2645C6.39943 6.10887 6.61095 6.02146 6.83149 6.02146C7.05203 6.02146 7.26355 6.10887 7.41959 6.2645L13.4893 12.3255L19.5589 6.2645C19.6351 6.18285 19.727 6.11736 19.8291 6.07194C19.9312 6.02652 20.0414 6.0021 20.1531 6.00013C20.2648 5.99816 20.3758 6.01869 20.4795 6.06048C20.5831 6.10228 20.6772 6.16449 20.7562 6.2434C20.8353 6.32232 20.8976 6.41632 20.9394 6.51979C20.9813 6.62327 21.0018 6.73411 20.9999 6.84569C20.9979 6.95727 20.9734 7.06732 20.928 7.16926C20.8825 7.27119 20.8169 7.36294 20.7351 7.43902L14.6655 13.5L20.7351 19.561C20.8169 19.6371 20.8825 19.7288 20.928 19.8307C20.9734 19.9327 20.9979 20.0427 20.9999 20.1543C21.0018 20.2659 20.9813 20.3767 20.9394 20.4802C20.8976 20.5837 20.8353 20.6777 20.7562 20.7566C20.6772 20.8355 20.5831 20.8977 20.4795 20.9395C20.3758 20.9813 20.2648 21.0018 20.1531 20.9999C20.0414 20.9979 19.9312 20.9735 19.8291 20.9281C19.727 20.8826 19.6351 20.8172 19.5589 20.7355L13.4893 14.6745L7.41959 20.7355C7.26183 20.8823 7.05317 20.9622 6.83757 20.9584C6.62196 20.9546 6.41626 20.8674 6.26378 20.7151C6.1113 20.5629 6.02396 20.3575 6.02016 20.1422C6.01635 19.9269 6.09638 19.7185 6.24339 19.561L12.313 13.5L6.24339 7.43902C6.08754 7.2832 6 7.07198 6 6.85176C6 6.63154 6.08754 6.42032 6.24339 6.2645Z",
655
+ fill: "currentColor"
656
+ }
657
+ )
592
658
  }
593
659
  );
594
660
  },
595
- close: ({ className, fill }) => {
661
+ // ----------------------------------- old ---------------------------------
662
+ // ** Status **
663
+ plus: ({ className, fill }) => {
596
664
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
597
665
  "svg",
598
666
  {
@@ -602,7 +670,7 @@ var template = {
602
670
  fill: "none",
603
671
  xmlns: "http://www.w3.org/2000/svg",
604
672
  className,
605
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M6 18L18 6M6 6L18 18", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" })
673
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 4.5V19.5M19.5 12H4.5", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" })
606
674
  }
607
675
  );
608
676
  },
@@ -5873,7 +5941,18 @@ var Input = (0, import_react9.forwardRef)((originalProps, ref) => {
5873
5941
  ),
5874
5942
  children: [
5875
5943
  startContent && renderStartContent(),
5876
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("input", { ...inputProps, ref: ref || inputRef, className: slots.input({ class: classNames == null ? void 0 : classNames.input }), size: 0 }),
5944
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
5945
+ "input",
5946
+ {
5947
+ ...inputProps,
5948
+ ref: ref || inputRef,
5949
+ className: clsx(
5950
+ slots.input({ class: classNames == null ? void 0 : classNames.input }),
5951
+ inputProps.readOnly ? "!text-body-foreground placeholder:text-body-foreground" : ""
5952
+ ),
5953
+ size: 0
5954
+ }
5955
+ ),
5877
5956
  renderEndContent()
5878
5957
  ]
5879
5958
  }
@@ -5890,7 +5969,7 @@ var input_default = Input;
5890
5969
  var inputStyle = tv(
5891
5970
  {
5892
5971
  slots: {
5893
- base: ["group/input", "flex"],
5972
+ base: ["group/input", "flex select-none"],
5894
5973
  vertical: ["flex-col"],
5895
5974
  horizon: ["flex-row", "gap-0"],
5896
5975
  label: ["flex", "items-center", "font-bold", "text-body-foreground", "min-w-[80px]"],
@@ -5921,7 +6000,7 @@ var inputStyle = tv(
5921
6000
  ],
5922
6001
  helperText: ["text-neutral-main", "group-has-[:hover]/input:text-neutral-dark"],
5923
6002
  errorText: ["text-danger-main"],
5924
- readonly: ["pointer-events-none"]
6003
+ readonly: ["pointer-events-none", "!text-body-foreground"]
5925
6004
  },
5926
6005
  variants: {
5927
6006
  variant: {
@@ -6734,7 +6813,7 @@ var checkboxStyle = tv({
6734
6813
 
6735
6814
  // src/components/table/table-head.tsx
6736
6815
  var import_jsx_runtime15 = require("react/jsx-runtime");
6737
- var TableHead = ({ columns, slots, size, selectableRows, isCheckedAll, classNames, onCheckAll }) => {
6816
+ var TableHead = ({ columns, slots, size, rowCheckbox, isCheckedAll, classNames, onCheckAll }) => {
6738
6817
  const handleClickCheckAll = (e) => {
6739
6818
  e.preventDefault();
6740
6819
  onCheckAll(!isCheckedAll);
@@ -6753,7 +6832,7 @@ var TableHead = ({ columns, slots, size, selectableRows, isCheckedAll, className
6753
6832
  },
6754
6833
  `${column.field}${index}thead`
6755
6834
  ));
6756
- const renderSelectAllCheckbox = () => selectableRows && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("th", { className: slots.th({ class: classNames == null ? void 0 : classNames.th }), onClick: handleClickCheckAll, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(checkbox_default, { size, checked: isCheckedAll }) }) });
6835
+ const renderSelectAllCheckbox = () => rowCheckbox && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("th", { className: slots.th({ class: classNames == null ? void 0 : classNames.th }), onClick: handleClickCheckAll, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(checkbox_default, { size, checked: isCheckedAll }) }) });
6757
6836
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("thead", { className: slots.thead({ class: classNames == null ? void 0 : classNames.thead }), children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), children: [
6758
6837
  renderColumnHeaders(),
6759
6838
  renderSelectAllCheckbox()
@@ -6770,9 +6849,10 @@ var TableBody = ({
6770
6849
  columns,
6771
6850
  rows,
6772
6851
  size,
6773
- selectableRows,
6852
+ rowCheckbox,
6774
6853
  checkedRows,
6775
6854
  onCheckRow,
6855
+ onRowClick,
6776
6856
  emptyContent,
6777
6857
  isLoading,
6778
6858
  classNames,
@@ -6813,21 +6893,30 @@ var TableBody = ({
6813
6893
  [classNames == null ? void 0 : classNames.td, generateColumnStyles, slots]
6814
6894
  );
6815
6895
  const hasRows = rows.length > 0;
6816
- const colSpan = (columns.length || 1) + (selectableRows ? 1 : 0);
6896
+ const colSpan = (columns.length || 1) + (rowCheckbox ? 1 : 0);
6817
6897
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("tbody", { className: clsx(slots.tbody({ class: classNames == null ? void 0 : classNames.tbody }), className), children: [
6818
6898
  !isLoading && hasRows && rows.map((row, rowIndex) => {
6819
6899
  const isRowChecked = checkedRows.has(rowIndex);
6820
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("tr", { className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }), "aria-checked": isRowChecked, children: [
6821
- columns.map((column) => /* @__PURE__ */ (0, import_react14.createElement)("td", { ...getCellProps(column, row), key: column.field })),
6822
- selectableRows && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: slots.td({ class: classNames == null ? void 0 : classNames.td }), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
6823
- checkbox_default,
6824
- {
6825
- size,
6826
- checked: isRowChecked,
6827
- onChange: (e) => onCheckRow(rowIndex, e.target.checked)
6828
- }
6829
- ) }) })
6830
- ] }, rowIndex);
6900
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
6901
+ "tr",
6902
+ {
6903
+ className: slots.tr({ class: classNames == null ? void 0 : classNames.tr }),
6904
+ "aria-checked": isRowChecked,
6905
+ onClick: () => onRowClick ? onRowClick(row) : void 0,
6906
+ children: [
6907
+ columns.map((column) => /* @__PURE__ */ (0, import_react14.createElement)("td", { ...getCellProps(column, row), key: column.field })),
6908
+ rowCheckbox && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { className: slots.td({ class: classNames == null ? void 0 : classNames.td }), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
6909
+ checkbox_default,
6910
+ {
6911
+ size,
6912
+ checked: isRowChecked,
6913
+ onChange: (e) => onCheckRow(rowIndex, e.target.checked)
6914
+ }
6915
+ ) }) })
6916
+ ]
6917
+ },
6918
+ rowIndex
6919
+ );
6831
6920
  }),
6832
6921
  !isLoading && !hasRows && emptyContent && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("tr", { className: clsx(slots.tr({ class: classNames == null ? void 0 : classNames.tr }), "border-none"), children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("td", { colSpan, className: slots.empty({ class: classNames == null ? void 0 : classNames.empty }), children: emptyContent }) })
6833
6922
  ] });
@@ -7165,7 +7254,8 @@ var Table = (0, import_react17.forwardRef)((originalProps, ref) => {
7165
7254
  rows,
7166
7255
  columns,
7167
7256
  size,
7168
- selectableRows,
7257
+ rowCheckbox,
7258
+ onRowClick,
7169
7259
  totalData,
7170
7260
  pagination,
7171
7261
  onPageChange,
@@ -7202,7 +7292,7 @@ var Table = (0, import_react17.forwardRef)((originalProps, ref) => {
7202
7292
  {
7203
7293
  columns,
7204
7294
  size,
7205
- selectableRows,
7295
+ rowCheckbox,
7206
7296
  isCheckedAll: checkedRows.size === rows.length && rows.length > 0,
7207
7297
  onCheckAll: handleCheckAll,
7208
7298
  classNames,
@@ -7216,8 +7306,9 @@ var Table = (0, import_react17.forwardRef)((originalProps, ref) => {
7216
7306
  rows,
7217
7307
  columns,
7218
7308
  size,
7219
- selectableRows,
7309
+ rowCheckbox,
7220
7310
  checkedRows,
7311
+ onRowClick,
7221
7312
  onCheckRow: handleCheck,
7222
7313
  emptyContent,
7223
7314
  isLoading,
@@ -7459,362 +7550,376 @@ var tableStyle = (0, import_tailwind_variants15.tv)({
7459
7550
  }
7460
7551
  });
7461
7552
 
7553
+ // src/components/table/form-table.tsx
7554
+ var import_react18 = require("react");
7555
+ var import_jsx_runtime20 = require("react/jsx-runtime");
7556
+ var DEFAULT_COLUMN_CLASSES = [
7557
+ "w-[120px] h-[50px] px-[10px] font-bold text-md text-body-foreground border-r border-neutral-light",
7558
+ "px-[10px]"
7559
+ ];
7560
+ var FormTableRow = ({ columns, columnClasses = [] }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("tr", { className: "border-neutral-light border-b", children: columns.map((col, index) => {
7561
+ var _a;
7562
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("td", { className: (_a = columnClasses[index]) != null ? _a : DEFAULT_COLUMN_CLASSES[index], children: col }, index);
7563
+ }) });
7564
+ var FormTable = (0, import_react18.forwardRef)(
7565
+ ({ rows, onSubmit, footer, classNames }, ref) => {
7566
+ const slots = (0, import_react18.useMemo)(() => formTableStyle(), []);
7567
+ const content = /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
7568
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("table", { className: slots.table({ class: classNames == null ? void 0 : classNames.table }), children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("tbody", { children: rows.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(FormTableRow, { ...row }, i)) }) }),
7569
+ footer && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { children: footer })
7570
+ ] });
7571
+ if (onSubmit) {
7572
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
7573
+ "form",
7574
+ {
7575
+ ref,
7576
+ onSubmit,
7577
+ className: slots.base({ class: classNames == null ? void 0 : classNames.base }),
7578
+ children: content
7579
+ }
7580
+ );
7581
+ }
7582
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: content });
7583
+ }
7584
+ );
7585
+ FormTable.displayName = "FormTable";
7586
+ var form_table_default = FormTable;
7587
+ var formTableStyle = tv({
7588
+ slots: {
7589
+ base: ["flex", "flex-col", "gap-[30px]"],
7590
+ table: ["w-full", "table-fixed", "border", "border-neutral-light"]
7591
+ }
7592
+ });
7593
+
7462
7594
  // src/components/select/select.tsx
7463
7595
  var import_react19 = require("react");
7464
7596
  var import_react_dom = require("react-dom");
7465
-
7466
- // src/components/select/useSelect.tsx
7467
- var import_react18 = require("react");
7468
- var useSelect = ({ options, defaultOption, onChange }) => {
7469
- const [selectedOption, setSelectedOption] = (0, import_react18.useState)(defaultOption);
7470
- const [targetRect, setTargetRect] = (0, import_react18.useState)(null);
7471
- const [optionWrapperHeight, setOptionWrapperHeight] = (0, import_react18.useState)(0);
7472
- const selectWrapperRef = (0, import_react18.useRef)(null);
7473
- const optionWrapperRef = (0, import_react18.useRef)(null);
7474
- const calculatePositionWithScroll = (targetRect2, optionWrapperHeight2) => {
7475
- const scrollTop = window.scrollY || document.documentElement.scrollTop || document.body.scrollTop;
7476
- const scrollLeft = window.scrollX || document.documentElement.scrollLeft || document.body.scrollLeft;
7477
- const spaceBelow = window.innerHeight - (targetRect2.y + targetRect2.height + 4);
7478
- const spaceAbove = targetRect2.y - 4;
7479
- const top = spaceBelow < optionWrapperHeight2 && spaceAbove > optionWrapperHeight2 ? targetRect2.y - optionWrapperHeight2 - 4 : targetRect2.y + targetRect2.height + 4;
7597
+ var import_jsx_runtime21 = require("react/jsx-runtime");
7598
+ var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
7599
+ var _a;
7600
+ const [props, variantProps] = mapPropsVariants(originalProps, select.variantKeys);
7601
+ const {
7602
+ label,
7603
+ options,
7604
+ helperText,
7605
+ errorText,
7606
+ classNames,
7607
+ defaultSelectedOptions = [],
7608
+ onChange,
7609
+ multiple,
7610
+ ...inputProps
7611
+ } = props;
7612
+ const slots = (0, import_react19.useMemo)(() => select({ ...variantProps }), [variantProps]);
7613
+ const [selectedOptions, setSelectedOptions] = (0, import_react19.useState)(defaultSelectedOptions);
7614
+ const [targetRect, setTargetRect] = (0, import_react19.useState)(null);
7615
+ const [optionWrapperHeight, setOptionWrapperHeight] = (0, import_react19.useState)(0);
7616
+ const [isVisible, setIsVisible] = (0, import_react19.useState)(false);
7617
+ const [isOpen, setIsOpen] = (0, import_react19.useState)(false);
7618
+ const selectWrapperRef = (0, import_react19.useRef)(null);
7619
+ const optionWrapperRef = (0, import_react19.useRef)(null);
7620
+ const handleToggleSelect = () => {
7621
+ if (isOpen) {
7622
+ setIsOpen(false);
7623
+ setTimeout(() => setIsVisible(false), 150);
7624
+ } else {
7625
+ if (selectWrapperRef.current) {
7626
+ const rect = selectWrapperRef.current.getBoundingClientRect();
7627
+ setTargetRect(rect);
7628
+ setIsVisible(true);
7629
+ requestAnimationFrame(() => setIsOpen(true));
7630
+ }
7631
+ }
7632
+ };
7633
+ const calculatePositionWithScroll = (rect, height) => {
7634
+ const scrollTop = window.scrollY;
7635
+ const scrollLeft = window.scrollX;
7636
+ const spaceBelow = window.innerHeight - (rect.y + rect.height + 4);
7637
+ const spaceAbove = rect.y - 4;
7638
+ const top = spaceBelow < height && spaceAbove > height ? rect.y - height - 4 : rect.y + rect.height + 4;
7480
7639
  return {
7481
7640
  top: top + scrollTop,
7482
- left: targetRect2.x + scrollLeft
7641
+ left: rect.x + scrollLeft
7483
7642
  };
7484
7643
  };
7485
- const handleToggleSelect = () => {
7486
- if (selectWrapperRef.current) {
7487
- const rect = selectWrapperRef.current.getBoundingClientRect();
7488
- setTargetRect((prevRect) => prevRect ? null : { x: rect.x, y: rect.y, width: rect.width, height: rect.height });
7489
- }
7490
- };
7491
7644
  const handleChangeOption = (option) => {
7492
- onChange == null ? void 0 : onChange(option);
7493
- setSelectedOption(option);
7494
- handleToggleSelect();
7645
+ let nextOptions;
7646
+ if (multiple) {
7647
+ const exists = selectedOptions.some((o) => o.key === option.key);
7648
+ nextOptions = exists ? selectedOptions.filter((o) => o.key !== option.key) : [...selectedOptions, option];
7649
+ } else {
7650
+ nextOptions = [option];
7651
+ setIsOpen(false);
7652
+ setTimeout(() => setIsVisible(false), 150);
7653
+ }
7654
+ setSelectedOptions(nextOptions);
7655
+ onChange == null ? void 0 : onChange(nextOptions);
7495
7656
  };
7496
- (0, import_react18.useEffect)(() => {
7497
- const onClickOutside = (e) => {
7498
- if (optionWrapperRef.current && !optionWrapperRef.current.contains(e.target)) {
7499
- setTargetRect(null);
7657
+ (0, import_react19.useEffect)(() => {
7658
+ const handleClickOutside = (e) => {
7659
+ var _a2;
7660
+ if (optionWrapperRef.current && !optionWrapperRef.current.contains(e.target) && !((_a2 = selectWrapperRef.current) == null ? void 0 : _a2.contains(e.target))) {
7661
+ setIsOpen(false);
7662
+ setTimeout(() => setIsVisible(false), 150);
7500
7663
  }
7501
7664
  };
7502
- window.addEventListener("mousedown", onClickOutside);
7503
- return () => window.removeEventListener("mousedown", onClickOutside);
7665
+ window.addEventListener("mousedown", handleClickOutside);
7666
+ return () => window.removeEventListener("mousedown", handleClickOutside);
7504
7667
  }, []);
7505
- (0, import_react18.useEffect)(() => {
7668
+ (0, import_react19.useEffect)(() => {
7506
7669
  if (optionWrapperRef.current) {
7507
7670
  setOptionWrapperHeight(optionWrapperRef.current.getBoundingClientRect().height);
7508
7671
  }
7509
7672
  }, [targetRect]);
7510
- return {
7511
- selectedOption,
7512
- targetRect,
7513
- optionWrapperHeight,
7514
- selectWrapperRef,
7515
- optionWrapperRef,
7516
- handleToggleSelect,
7517
- handleChangeOption,
7518
- calculatePositionWithScroll
7519
- };
7520
- };
7521
-
7522
- // src/components/select/option.tsx
7523
- var import_jsx_runtime20 = require("react/jsx-runtime");
7524
- var Option = (props) => {
7525
- const { base, option, icon } = optionStyle(props);
7526
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
7527
- "div",
7528
- {
7529
- title: props.option.value,
7530
- className: base(),
7531
- onClick: () => props.onClick(props.option),
7532
- ref: (node) => {
7533
- props.isSelected && (node == null ? void 0 : node.scrollIntoView());
7534
- },
7535
- children: [
7536
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: option(), children: props.children }),
7537
- props.isSelected && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: icon(), children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon_default, { name: "check", size: props.size }) })
7538
- ]
7539
- }
7540
- );
7541
- };
7542
- var option_default = Option;
7543
- var optionStyle = tv({
7544
- slots: {
7545
- base: ["w-full", "flex", "items-center", "justify-between", , "overflow-hidden"],
7546
- option: ["text-ellipsis overflow-hidden "],
7547
- icon: ""
7548
- },
7549
- variants: {
7550
- variant: {
7551
- solid: {},
7552
- normal: {},
7553
- line: {}
7554
- },
7555
- color: {
7556
- primary: {
7557
- base: ["border-primary-main", "hover:bg-primary-soft", "hover:text-primary-main"],
7558
- icon: "text-primary-main"
7559
- },
7560
- secondary: {
7561
- base: ["border-secondary-main", "hover:bg-secondary-soft", "hover:text-secondary-main"],
7562
- icon: "text-secondary-main"
7563
- }
7564
- },
7565
- size: {
7566
- sm: {
7567
- base: "text-sm px-[6px] py-[4.5px]"
7568
- },
7569
- md: {
7570
- base: "text-md px-[8px] py-[6.5px]"
7571
- },
7572
- lg: {
7573
- base: "text-lg px-[10px] py-[8px]"
7574
- },
7575
- xl: {
7576
- base: "text-xl px-[10px] py-[8px]"
7577
- }
7578
- }
7579
- },
7580
- defaultVariants: {
7581
- variant: "normal",
7582
- color: "primary",
7583
- size: "md"
7584
- }
7585
- });
7586
-
7587
- // src/components/select/select.tsx
7588
- var import_jsx_runtime21 = require("react/jsx-runtime");
7589
- var Select = (0, import_react19.forwardRef)((originalProps, ref) => {
7590
- const [props, variantProps] = mapPropsVariants(originalProps, select.variantKeys);
7591
- const { classNames, options, defaultOption, onChange, ...inputProps } = props;
7592
- const slots = (0, import_react19.useMemo)(() => select({ ...variantProps }), [variantProps]);
7593
- const {
7594
- targetRect,
7595
- selectedOption,
7596
- optionWrapperHeight,
7597
- selectWrapperRef,
7598
- optionWrapperRef,
7599
- handleToggleSelect,
7600
- handleChangeOption,
7601
- calculatePositionWithScroll
7602
- } = useSelect({
7603
- options,
7604
- defaultOption,
7605
- onChange
7606
- });
7607
7673
  const position = targetRect ? calculatePositionWithScroll(targetRect, optionWrapperHeight) : null;
7608
- const getBaseProps = (0, import_react19.useCallback)(
7609
- () => ({
7610
- className: slots.base({ class: classNames == null ? void 0 : classNames.base })
7611
- }),
7612
- [slots, classNames]
7613
- );
7614
- const getLabelProps = (0, import_react19.useCallback)(
7615
- () => ({
7616
- className: slots.label({ class: classNames == null ? void 0 : classNames.label })
7617
- }),
7618
- [slots, classNames]
7619
- );
7620
- const getSelectWrapperProps = (0, import_react19.useCallback)(
7621
- () => ({
7622
- className: slots.selectWrapper({ class: classNames == null ? void 0 : classNames.selectWrapper }),
7623
- ref: selectWrapperRef,
7624
- onClick: handleToggleSelect
7625
- }),
7626
- [slots, classNames]
7627
- );
7628
- const getSelectProps = (0, import_react19.useCallback)(
7629
- () => ({
7630
- ...inputProps,
7631
- ref,
7632
- className: slots.select({ class: classNames == null ? void 0 : classNames.select }),
7633
- value: (selectedOption == null ? void 0 : selectedOption.value) || "",
7634
- readOnly: true,
7635
- size: 0
7636
- }),
7637
- [slots, classNames, inputProps, selectedOption, ref]
7638
- );
7639
- const getOptionsWrapperProps = (0, import_react19.useCallback)(
7640
- () => ({
7641
- className: slots.optionsWrapper({ class: classNames == null ? void 0 : classNames.optionsWrapper }),
7642
- ref: optionWrapperRef
7643
- }),
7644
- [slots, classNames]
7645
- );
7646
- const getErrorMessageProps = (0, import_react19.useCallback)(
7647
- () => ({
7648
- className: slots.errorMessage({ class: classNames == null ? void 0 : classNames.errorMessage })
7649
- }),
7650
- [slots, classNames]
7651
- );
7674
+ const displayValue = multiple ? selectedOptions.map((opt) => opt.value).join(", ") : ((_a = selectedOptions[0]) == null ? void 0 : _a.value) || "";
7675
+ const Option = ({
7676
+ option,
7677
+ isSelected,
7678
+ onClick
7679
+ }) => {
7680
+ const slot = select({ ...variantProps, isSelected });
7681
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { title: option.value, onClick, className: clsx(slot.option({ class: classNames == null ? void 0 : classNames.option })), children: [
7682
+ option.value,
7683
+ isSelected && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon_default, { name: "check", size: originalProps.size })
7684
+ ] });
7685
+ };
7652
7686
  return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
7653
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { ...getBaseProps(), children: [
7654
- props.label && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("label", { ...getLabelProps(), children: props.label }),
7655
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { "data-expanded": !!targetRect, ...getSelectWrapperProps(), children: [
7656
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("input", { ...getSelectProps() }),
7657
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Icon_default, { name: !!targetRect ? "arrow-triangle-up" : "arrow-triangle-down", size: originalProps.size, fill: true })
7658
- ] }),
7659
- props.errorMessage && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { ...getErrorMessageProps(), children: props.errorMessage })
7660
- ] }),
7661
- targetRect && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_jsx_runtime21.Fragment, { children: (0, import_react_dom.createPortal)(
7687
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
7688
+ "div",
7689
+ {
7690
+ className: clsx(
7691
+ slots.base({ class: classNames == null ? void 0 : classNames.base }),
7692
+ variantProps.direction === "horizon" ? slots.horizon({ class: classNames == null ? void 0 : classNames.horizon }) : slots.vertical({ class: classNames == null ? void 0 : classNames.vertical })
7693
+ ),
7694
+ children: [
7695
+ label && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("label", { className: slots.label({ class: classNames == null ? void 0 : classNames.label }), children: label }),
7696
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
7697
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
7698
+ "div",
7699
+ {
7700
+ "data-expanded": isOpen,
7701
+ className: clsx(
7702
+ slots.selectWrapper({ class: classNames == null ? void 0 : classNames.selectWrapper }),
7703
+ inputProps.readOnly ? slots.readonly({ class: classNames == null ? void 0 : classNames.readonly }) : ""
7704
+ ),
7705
+ ref: selectWrapperRef,
7706
+ onClick: handleToggleSelect,
7707
+ children: [
7708
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
7709
+ "input",
7710
+ {
7711
+ ...inputProps,
7712
+ ref,
7713
+ className: clsx(
7714
+ slots.select({ class: classNames == null ? void 0 : classNames.select }),
7715
+ inputProps.readOnly ? "!text-body-foreground placeholder:text-body-foreground" : ""
7716
+ ),
7717
+ value: displayValue,
7718
+ readOnly: true,
7719
+ size: 0
7720
+ }
7721
+ ),
7722
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
7723
+ Icon_default,
7724
+ {
7725
+ name: "brace-up",
7726
+ size: originalProps.size,
7727
+ className: `transition-transform duration-200 ${isOpen ? "rotate-0" : "rotate-180"}`
7728
+ }
7729
+ )
7730
+ ]
7731
+ }
7732
+ ),
7733
+ helperText && !errorText && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: slots.helperText({ class: classNames == null ? void 0 : classNames.helperText }), children: helperText }),
7734
+ errorText && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("p", { className: clsx("error", slots.errorText({ class: classNames == null ? void 0 : classNames.errorText })), children: errorText })
7735
+ ] })
7736
+ ]
7737
+ }
7738
+ ),
7739
+ isVisible && (0, import_react_dom.createPortal)(
7662
7740
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
7663
7741
  "div",
7664
7742
  {
7665
- ...getOptionsWrapperProps(),
7743
+ ref: optionWrapperRef,
7744
+ className: slots.optionsWrapper({ class: classNames == null ? void 0 : classNames.optionsWrapper }),
7666
7745
  style: {
7667
7746
  position: "absolute",
7668
7747
  top: position == null ? void 0 : position.top,
7669
7748
  left: position == null ? void 0 : position.left,
7670
- width: targetRect.width
7749
+ width: targetRect == null ? void 0 : targetRect.width,
7750
+ zIndex: 1e3,
7751
+ opacity: isOpen ? 1 : 0,
7752
+ transform: isOpen ? "translateY(0)" : "translateY(-0.25rem)",
7753
+ transition: "opacity 150ms ease-out, transform 150ms ease-out"
7671
7754
  },
7672
- children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
7673
- option_default,
7674
- {
7675
- variant: originalProps.variant,
7676
- size: originalProps.size,
7677
- color: originalProps.color,
7678
- option,
7679
- isSelected: (selectedOption == null ? void 0 : selectedOption.key) === option.key,
7680
- onClick: () => handleChangeOption(option),
7681
- children: option.value
7682
- },
7683
- option.key
7684
- ))
7755
+ children: options.map((option) => {
7756
+ const isSelected = selectedOptions.some((o) => o.key === option.key);
7757
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
7758
+ Option,
7759
+ {
7760
+ option,
7761
+ isSelected,
7762
+ onClick: () => handleChangeOption(option)
7763
+ },
7764
+ option.key
7765
+ );
7766
+ })
7685
7767
  }
7686
7768
  ),
7687
7769
  document.body
7688
- ) })
7770
+ )
7689
7771
  ] });
7690
7772
  });
7691
7773
  Select.displayName = "Select";
7692
7774
  var select_default = Select;
7693
7775
  var select = tv({
7694
7776
  slots: {
7695
- base: ["group/select", "flex flex-col"],
7696
- label: ["flex", "items-center"],
7777
+ base: ["group/select", "flex"],
7778
+ vertical: ["flex-col"],
7779
+ horizon: ["flex-row", "gap-0"],
7780
+ label: ["flex", "items-center", "font-bold", "text-body-foreground", "min-w-[80px]"],
7781
+ wrapper: ["flex", "flex-col"],
7697
7782
  selectWrapper: [
7698
7783
  "flex",
7699
7784
  "items-center",
7700
- "bg-transparent",
7701
- "border-neutral-main",
7702
- "transition duration-200",
7703
- "group-has-[p]/select:border-danger-main",
7704
- "group-has-[p]/select:text-danger-main",
7705
- "group-has-[p]/select:bg-danger-soft"
7785
+ "justify-between",
7786
+ "border",
7787
+ "cursor-pointer",
7788
+ "text-neutral-main",
7789
+ "hover:bg-trans-soft",
7790
+ "group-has-[p.error]/select:border-danger-main",
7791
+ "group-has-[p.error]/select:bg-danger-soft",
7792
+ "group-has-[p.error]/select:text-danger-main",
7793
+ "group-has-[p.error]/select:hover:bg-danger-soft"
7706
7794
  ],
7707
7795
  select: [
7708
- "w-full",
7709
7796
  "bg-transparent",
7710
- "text-foreground",
7711
- "cursor-inherit",
7712
- "cursor-pointer",
7797
+ "w-full",
7798
+ "outline-none",
7713
7799
  "placeholder:text-neutral-main",
7714
- "group-has-[p]/select:text-danger-main",
7715
- "focus-visible:outline-none"
7800
+ "text-neutral-dark",
7801
+ "group-has-[p.error]/select:text-danger-main",
7802
+ "group-has-[p.error]/select:placeholder:text-danger-main"
7716
7803
  ],
7717
- optionsWrapper: ["w-[240px]", "border", "bg-background", "cursor-pointer", "overflow-y-auto"],
7718
- errorMessage: ["text-danger-main"]
7804
+ optionsWrapper: ["border", "rounded", "bg-white", "shadow", "overflow-auto"],
7805
+ option: ["flex", "justify-between", "items-center", "cursor-pointer"],
7806
+ helperText: ["text-neutral-main"],
7807
+ errorText: ["text-danger-main"],
7808
+ readonly: ["pointer-events-none", "!bg-trans-soft"]
7719
7809
  },
7720
7810
  variants: {
7721
- variant: {
7722
- solid: {
7723
- selectWrapper: "bg-trans-soft hover:bg-trans-light data-[expanded=true]:bg-trans-light group-has-[p]/select:bg-danger-soft"
7724
- },
7725
- normal: {
7726
- selectWrapper: "border hover:bg-trans-soft data-[expanded=true]:bg-trans-soft"
7727
- },
7728
- line: {
7729
- selectWrapper: "border-b !rounded-none hover:bg-trans-soft data-[expanded=true]:bg-trans-soft",
7730
- optionsWrapper: "!rounded-none"
7731
- }
7732
- },
7733
7811
  color: {
7734
7812
  primary: {
7735
- selectWrapper: "data-[expanded=true]:border-primary-main text-primary-main",
7736
- optionsWrapper: "border-primary-main",
7737
- select: "data-[expanded=true]:text-primary-main"
7813
+ selectWrapper: ["hover:text-primary-main"],
7814
+ option: ["hover:bg-primary-soft", "hover:text-primary-main"]
7738
7815
  },
7739
7816
  secondary: {
7740
- selectWrapper: "data-[expanded=true]:border-secondary-main text-secondary-main",
7741
- optionsWrapper: "border-secondary-main",
7742
- select: "data-[expanded=true]:text-secondary-main"
7817
+ selectWrapper: ["hover:text-secondary-main"],
7818
+ select: ["text-secondary-main"],
7819
+ option: ["hover:bg-secondary-soft", "hover:text-secondary-main"]
7743
7820
  }
7744
7821
  },
7745
7822
  size: {
7746
7823
  sm: {
7747
- base: "text-sm gap-[6px]",
7748
- selectWrapper: "w-[240px] h-[24px] px-[6px] py-[4.5px] gap-[6px] rounded-sm",
7749
- optionsWrapper: "max-h-[96px] rounded-sm",
7750
- errorMessage: "text-sm"
7824
+ base: ["text-sm", "gap-[4px]"],
7825
+ label: ["text-sm"],
7826
+ wrapper: ["gap-[4px]"],
7827
+ selectWrapper: ["w-[240px]", "h-[24px]", "rounded-sm", "px-[4px]"],
7828
+ select: ["text-sm"],
7829
+ option: ["px-[4px]", "py-[3px]", "text-sm"],
7830
+ helperText: ["text-sm"],
7831
+ errorText: ["text-sm"]
7751
7832
  },
7752
7833
  md: {
7753
- base: "text-md gap-[8px]",
7754
- selectWrapper: "w-[240px] h-[30px] px-[8px] py-[6.5px] gap-[8px] rounded-md",
7755
- optionsWrapper: "max-h-[120px] rounded-md",
7756
- errorMessage: "text-md"
7834
+ base: ["text-md", "gap-[6px]", "rounded-md"],
7835
+ label: ["text-md"],
7836
+ wrapper: ["gap-[6px]"],
7837
+ selectWrapper: ["w-[240px]", "h-[32px]", "rounded-md", "px-[6px]"],
7838
+ select: ["text-md"],
7839
+ option: ["px-[6px]", "py-[5.5px]", "text-md"],
7840
+ helperText: ["text-sm"],
7841
+ errorText: ["text-sm"]
7757
7842
  },
7758
7843
  lg: {
7759
- base: "text-lg gap-[10px]",
7760
- selectWrapper: "w-[240px] h-[36px] px-[10px] py-[8px] gap-[10px] rounded-lg",
7761
- optionsWrapper: "max-h-[144px] rounded-lg",
7762
- errorMessage: "text-lg"
7844
+ base: ["text-lg", "gap-[8px]"],
7845
+ label: ["text-lg"],
7846
+ wrapper: ["gap-[8px]"],
7847
+ selectWrapper: ["w-[240px]", "h-[40px]", "rounded-lg", "px-[8px]"],
7848
+ select: ["text-lg"],
7849
+ option: ["px-[8px]", "py-[8px]", "text-lg"],
7850
+ helperText: ["text-md"],
7851
+ errorText: ["text-md"]
7763
7852
  },
7764
7853
  xl: {
7765
- base: "text-lg gap-[10px]",
7766
- selectWrapper: "w-[240px] h-[36px] px-[10px] py-[8px] gap-[10px] rounded-xl",
7767
- optionsWrapper: "max-h-[144px] rounded-xl",
7768
- errorMessage: "text-xl"
7854
+ base: ["text-xl", "gap-[10px]"],
7855
+ label: ["text-xl"],
7856
+ wrapper: ["gap-[10px]"],
7857
+ selectWrapper: ["w-[240px]", "h-[50px]", "rounded-lg", "px-[10px]"],
7858
+ select: ["text-xl"],
7859
+ option: ["px-[10px]", "py-[11.5px]"],
7860
+ helperText: ["text-md"],
7861
+ errorText: ["text-md"]
7769
7862
  }
7770
7863
  },
7771
- radius: {
7772
- default: "",
7773
- none: {
7774
- selectWrapper: "rounded-none",
7775
- optionsWrapper: "rounded-none"
7776
- },
7777
- full: {
7778
- selectWrapper: "rounded-full"
7779
- }
7864
+ direction: {
7865
+ vertical: "",
7866
+ horizon: ""
7780
7867
  },
7781
- fullWidth: {
7868
+ full: {
7782
7869
  true: {
7783
- selectWrapper: "w-full",
7784
- optionsWrapper: "w-full"
7870
+ base: ["w-full"],
7871
+ wrapper: ["w-full"],
7872
+ selectWrapper: ["w-full"]
7785
7873
  }
7786
7874
  },
7787
- isDisabled: {
7875
+ disabled: {
7788
7876
  true: {
7789
- base: "cursor-default",
7790
- selectWrapper: "bg-neutral-soft border-neutral-light text-neutral-light pointer-events-none",
7791
- select: "text-neutral-light focus:text-neutral-light",
7792
- label: "text-neutral-light"
7877
+ base: ["pointer-events-none"],
7878
+ selectWrapper: [
7879
+ "bg-neutral-soft",
7880
+ "border-neutral-light",
7881
+ "group-has-[p.error]/select:text-danger-light",
7882
+ "group-has-[p.error]/select:bg-danger-soft",
7883
+ "group-has-[p.error]/select:border-danger-light"
7884
+ ],
7885
+ select: [
7886
+ "text-neutral-light",
7887
+ "placeholder:text-neutral-light",
7888
+ "group-has-[p.error]/select:text-danger-light",
7889
+ "group-has-[p.error]/select:placeholder:text-danger-light"
7890
+ ],
7891
+ helperText: ["!text-neutral-light"],
7892
+ errorText: ["!text-danger-light"]
7793
7893
  }
7794
7894
  },
7795
- isRequired: {
7796
- true: {
7797
- label: "after:content-['*'] after:text-danger-main after:ml-0.5"
7798
- }
7895
+ isSelected: {
7896
+ true: "",
7897
+ false: ""
7799
7898
  }
7800
7899
  },
7801
- defaultVariants: {
7802
- variant: "solid",
7803
- color: "primary",
7804
- size: "md",
7805
- fullWidth: false,
7806
- isDisabled: false,
7807
- isRequired: false
7808
- },
7809
7900
  compoundVariants: [
7810
7901
  {
7811
- isDisabled: true,
7812
- isRequired: true,
7902
+ color: "primary",
7903
+ isSelected: true,
7813
7904
  class: {
7814
- label: "after:text-danger-light"
7905
+ option: "bg-primary-soft text-primary-main"
7906
+ }
7907
+ },
7908
+ {
7909
+ color: "secondary",
7910
+ isSelected: true,
7911
+ class: {
7912
+ option: "bg-secondary-soft text-secondary-main"
7815
7913
  }
7816
7914
  }
7817
- ]
7915
+ ],
7916
+ defaultVariants: {
7917
+ color: "primary",
7918
+ size: "md",
7919
+ direction: "vertical",
7920
+ disabled: false,
7921
+ readonly: false
7922
+ }
7818
7923
  });
7819
7924
 
7820
7925
  // src/components/chip/chip.tsx
@@ -8563,107 +8668,26 @@ var tooltipStyle = tv({
8563
8668
  var import_react25 = require("react");
8564
8669
  var import_react_dom3 = require("react-dom");
8565
8670
  var import_jsx_runtime26 = require("react/jsx-runtime");
8566
- var Modal = (0, import_react25.forwardRef)((originalProps, ref) => {
8567
- const [props, variantProps] = mapPropsVariants(originalProps, modal.variantKeys);
8671
+ var Modal = (0, import_react25.forwardRef)((props, ref) => {
8672
+ const [localProps, variantProps] = mapPropsVariants(props, modal.variantKeys);
8568
8673
  const {
8569
8674
  classNames,
8570
8675
  isOpen,
8571
- icon,
8572
8676
  title,
8573
- subTitle,
8574
8677
  content,
8575
8678
  confirmButtonText,
8576
8679
  cancelButtonText,
8577
- showCloseButton,
8578
- isDismissable = true,
8680
+ showCloseButton = true,
8579
8681
  isKeyboardDismissDisabled = false,
8580
8682
  onConfirm,
8581
8683
  onCancel
8582
- } = props;
8583
- const slots = (0, import_react25.useMemo)(() => modal({ ...variantProps }), [...Object.values(variantProps)]);
8584
- const getBackdropProps = (0, import_react25.useCallback)(
8585
- () => ({
8586
- className: slots.backdrop({ class: classNames == null ? void 0 : classNames.backdrop }),
8587
- onClick: (e) => {
8588
- if (isDismissable && e.target === e.currentTarget && onCancel) {
8589
- onCancel();
8590
- }
8591
- }
8592
- }),
8593
- [slots, classNames == null ? void 0 : classNames.backdrop, isDismissable, onCancel]
8594
- );
8595
- const getModalWrapperProps = (0, import_react25.useCallback)(
8596
- () => ({
8597
- className: slots.modalWrapper({ class: classNames == null ? void 0 : classNames.modalWrapper }),
8598
- "data-icon-visibility": typeof icon !== "undefined"
8599
- }),
8600
- [slots, classNames == null ? void 0 : classNames.modalWrapper, icon]
8601
- );
8602
- const getIconProps = (0, import_react25.useCallback)(
8603
- () => ({
8604
- className: slots.icon({ class: [classNames == null ? void 0 : classNames.icon] })
8605
- }),
8606
- [slots, classNames == null ? void 0 : classNames.icon]
8607
- );
8608
- const getCloseIconProps = (0, import_react25.useCallback)(
8609
- () => ({
8610
- className: slots.closeIcon({ class: [classNames == null ? void 0 : classNames.closeIcon, showCloseButton ? "" : "hidden"] })
8611
- }),
8612
- [slots, classNames == null ? void 0 : classNames.closeIcon, showCloseButton]
8613
- );
8614
- const getBodyWrapperProps = (0, import_react25.useCallback)(
8615
- () => ({
8616
- className: slots.bodyWrapper({ class: classNames == null ? void 0 : classNames.bodyWrapper })
8617
- }),
8618
- [slots, classNames == null ? void 0 : classNames.bodyWrapper]
8619
- );
8620
- const getTitleWrapperProps = (0, import_react25.useCallback)(
8621
- () => ({
8622
- className: slots.titleWrapper({ class: classNames == null ? void 0 : classNames.titleWrapper })
8623
- }),
8624
- [slots, classNames == null ? void 0 : classNames.titleWrapper]
8625
- );
8626
- const getTitleProps = (0, import_react25.useCallback)(
8627
- () => ({
8628
- className: slots.title({ class: classNames == null ? void 0 : classNames.title })
8629
- }),
8630
- [slots, classNames == null ? void 0 : classNames.title]
8631
- );
8632
- const getSubTitleProps = (0, import_react25.useCallback)(
8633
- () => ({
8634
- className: slots.subTitle({ class: classNames == null ? void 0 : classNames.subTitle })
8635
- }),
8636
- [slots, classNames == null ? void 0 : classNames.subTitle]
8637
- );
8638
- const getBodyProps = (0, import_react25.useCallback)(
8639
- () => ({
8640
- className: slots.body({ class: classNames == null ? void 0 : classNames.body })
8641
- }),
8642
- [slots, classNames == null ? void 0 : classNames.body]
8643
- );
8644
- const getContentProps = (0, import_react25.useCallback)(
8645
- () => ({
8646
- className: slots.content({ class: classNames == null ? void 0 : classNames.content })
8647
- }),
8648
- [slots, classNames == null ? void 0 : classNames.content]
8649
- );
8650
- const getFooterWrapperProps = (0, import_react25.useCallback)(
8651
- () => ({
8652
- className: slots.footerWrapper({ class: classNames == null ? void 0 : classNames.footerWrapper })
8653
- }),
8654
- [slots, classNames == null ? void 0 : classNames.footerWrapper]
8655
- );
8684
+ } = localProps;
8685
+ const slots = (0, import_react25.useMemo)(() => modal(variantProps), [variantProps]);
8656
8686
  (0, import_react25.useEffect)(() => {
8657
- if (isOpen) {
8658
- document.body.classList.add("overflow-hidden");
8659
- } else {
8660
- document.body.classList.remove("overflow-hidden");
8661
- }
8687
+ document.body.classList.toggle("overflow-hidden", !!isOpen);
8662
8688
  if (!isOpen || isKeyboardDismissDisabled) return;
8663
8689
  const handleKeyDown = (e) => {
8664
- if (e.key === "Escape" && onCancel) {
8665
- onCancel();
8666
- }
8690
+ if (e.key === "Escape") onCancel == null ? void 0 : onCancel();
8667
8691
  };
8668
8692
  document.addEventListener("keydown", handleKeyDown);
8669
8693
  return () => {
@@ -8671,82 +8695,83 @@ var Modal = (0, import_react25.forwardRef)((originalProps, ref) => {
8671
8695
  document.body.classList.remove("overflow-hidden");
8672
8696
  };
8673
8697
  }, [isOpen, isKeyboardDismissDisabled, onCancel]);
8674
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children: isOpen && (0, import_react_dom3.createPortal)(
8675
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ...getBackdropProps(), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { ref, ...getModalWrapperProps(), children: [
8676
- typeof icon === "string" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ...getIconProps(), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon_default, { name: icon, className: "h-[80px] w-[80px]" }) }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ...getIconProps(), children: icon }),
8677
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { ...getBodyWrapperProps(), children: [
8678
- showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Icon_default, { name: "close", ...getCloseIconProps(), onClick: onCancel }),
8679
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { ...getBodyProps(), children: [
8680
- (title || subTitle) && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { ...getTitleWrapperProps(), children: [
8681
- title && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ...getTitleProps(), children: title }),
8682
- subTitle && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ...getSubTitleProps(), children: subTitle })
8683
- ] }),
8684
- content && typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ...getContentProps(), children: content }) : content,
8685
- (cancelButtonText || confirmButtonText) && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { ...getFooterWrapperProps(), children: [
8686
- cancelButtonText && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(button_default, { variant: "outline", color: originalProps.color, fullWidth: true, onClick: onCancel, children: cancelButtonText }),
8687
- confirmButtonText && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(button_default, { size: "md", color: originalProps.color, fullWidth: true, onClick: onConfirm, children: confirmButtonText })
8698
+ if (!isOpen) return null;
8699
+ return (0, import_react_dom3.createPortal)(
8700
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
8701
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(backdrop_default, { open: true }),
8702
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ref, className: slots.base({ class: classNames == null ? void 0 : classNames.base }), children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: slots.modalWrapper({ class: classNames == null ? void 0 : classNames.modalWrapper }), children: [
8703
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
8704
+ Icon_default,
8705
+ {
8706
+ size: "xl",
8707
+ name: "close",
8708
+ className: slots.closeIcon({ class: classNames == null ? void 0 : classNames.closeIcon }),
8709
+ onClick: onCancel
8710
+ }
8711
+ ),
8712
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
8713
+ title && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: slots.title({ class: classNames == null ? void 0 : classNames.title }), children: title }),
8714
+ typeof content === "string" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: slots.content({ class: classNames == null ? void 0 : classNames.content }), children: content }) : content,
8715
+ (cancelButtonText || confirmButtonText) && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: slots.footer({ class: classNames == null ? void 0 : classNames.footer }), children: [
8716
+ cancelButtonText && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(button_default, { variant: "soft", color: "neutral", fullWidth: true, onClick: onCancel, children: cancelButtonText }),
8717
+ confirmButtonText && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(button_default, { color: props.color, fullWidth: true, onClick: onConfirm, children: confirmButtonText })
8688
8718
  ] })
8689
8719
  ] })
8690
- ] })
8691
- ] }) }),
8720
+ ] }) })
8721
+ ] }),
8692
8722
  document.body
8693
- ) });
8723
+ );
8694
8724
  });
8695
8725
  Modal.displayName = "Modal";
8696
8726
  var modal_default = Modal;
8697
8727
  var modal = tv({
8698
8728
  slots: {
8699
- backdrop: ["relative w-screen h-screen fixed inset-0 bg-black/60", "z-[900]"],
8700
- modalWrapper: ["group/modal", "absolute", "top-1/2", "-translate-y-1/2", "left-1/2", "-translate-x-1/2"],
8701
- icon: ["absolute", "top-[-40px]", "left-1/2", "-translate-x-1/2", "z-10"],
8702
- closeIcon: [
8729
+ base: [
8730
+ "group/modal",
8703
8731
  "absolute",
8704
- "top-[20px]",
8705
- "right-[20px]",
8706
- "cursor-pointer",
8707
- "z-10",
8708
- "group-data-[icon-visibility=true]/modal:top-[80px]"
8732
+ "top-1/2",
8733
+ "-translate-y-1/2",
8734
+ "left-1/2",
8735
+ "-translate-x-1/2",
8736
+ "z-[50]",
8737
+ "bg-body-background"
8709
8738
  ],
8710
- titleWrapper: ["relative", "flex", "flex-col", "gap-[10px]"],
8711
- title: "text-h5 text-center text-foreground",
8712
- subTitle: "text-lg text-center text-neutral-dark",
8713
- bodyWrapper: [
8714
- "min-w-[400px]",
8715
- "flex flex-col justify-center",
8716
- "p-[20px]",
8739
+ modalWrapper: [
8740
+ "min-w-[450px]",
8741
+ "flex",
8742
+ "flex-col",
8743
+ "justify-center",
8744
+ "p-[30px]",
8717
8745
  "bg-background",
8718
- "shadow-drop shadow-foreground/20 rounded-xxlg",
8746
+ "shadow-drop",
8747
+ "shadow-foreground/20",
8748
+ "rounded-xlg",
8719
8749
  "overflow-hidden",
8720
8750
  "group-data-[icon-visibility=true]/modal:mt-[0]",
8721
8751
  "group-data-[icon-visibility=true]/modal:pt-[60px]"
8722
8752
  ],
8723
- body: ["flex", "flex-col", "gap-[20px]"],
8724
- content: ["text-md text-center", "break-words", "bg-neutral-soft", "rounded-[5px]", "p-[10px]"],
8725
- footerWrapper: ["flex gap-[20px]"]
8753
+ wrapper: ["flex", "flex-col", "gap-[30px]"],
8754
+ title: ["text-xl", "font-extrabold", "text-foreground"],
8755
+ content: ["text-md", "font-bold", "text-center", "break-words", "bg-neutral-soft", "rounded-[5px]", "p-[10px]"],
8756
+ footer: ["flex", "gap-[10px]"],
8757
+ closeIcon: [
8758
+ "absolute",
8759
+ "top-[30px]",
8760
+ "right-[30px]",
8761
+ "cursor-pointer",
8762
+ "z-60",
8763
+ "group-data-[icon-visibility=true]/modal:top-[80px]"
8764
+ ]
8726
8765
  },
8727
8766
  variants: {
8728
8767
  color: {
8729
- primary: {
8730
- icon: "text-primary-main"
8731
- },
8732
- secondary: {
8733
- icon: "text-secondary-main"
8734
- },
8735
- neutral: {
8736
- icon: "text-neutral-main"
8737
- },
8738
- success: {
8739
- icon: "text-success-main"
8740
- },
8741
- info: {
8742
- icon: "text-info-main"
8743
- },
8744
- warning: {
8745
- icon: "text-warning-main"
8746
- },
8747
- danger: {
8748
- icon: "text-danger-main"
8749
- }
8768
+ primary: {},
8769
+ secondary: {},
8770
+ neutral: {},
8771
+ success: {},
8772
+ info: {},
8773
+ warning: {},
8774
+ danger: {}
8750
8775
  }
8751
8776
  },
8752
8777
  defaultVariants: {
@@ -8998,37 +9023,52 @@ var import_react28 = require("react");
8998
9023
  var import_jsx_runtime29 = require("react/jsx-runtime");
8999
9024
  var Toast = (0, import_react28.forwardRef)((originalProps, ref) => {
9000
9025
  const [props, variantProps] = mapPropsVariants(originalProps, toast.variantKeys);
9001
- const { width = 300, placement, classNames, showIcon = true, showCloseButton = true, onClose, ...toastProps } = props;
9026
+ const {
9027
+ title,
9028
+ content,
9029
+ width = 300,
9030
+ placement,
9031
+ classNames,
9032
+ showIcon = true,
9033
+ showCloseButton = true,
9034
+ hasShadow = true,
9035
+ disableAnimation,
9036
+ onClose
9037
+ } = { ...props, ...variantProps };
9002
9038
  const slots = (0, import_react28.useMemo)(() => toast({ ...variantProps }), [variantProps]);
9003
9039
  const toastRef = (0, import_react28.useRef)(null);
9004
9040
  (0, import_react28.useImperativeHandle)(
9005
9041
  ref,
9006
9042
  () => ({
9007
9043
  getWidth: () => {
9008
- if (toastRef.current) {
9009
- return toastRef.current.offsetWidth;
9010
- }
9044
+ var _a;
9045
+ return (_a = toastRef.current) == null ? void 0 : _a.offsetWidth;
9011
9046
  }
9012
9047
  }),
9013
9048
  []
9014
9049
  );
9015
- const getBaseProps = (0, import_react28.useCallback)(
9016
- () => ({
9017
- className: slots.base({
9018
- class: [
9019
- classNames == null ? void 0 : classNames.base,
9020
- width ? `w-[${width}px]` : "",
9021
- (placement == null ? void 0 : placement.includes("top")) ? "animate-slideInFromTop" : "animate-slideInFromBottom"
9022
- ]
9023
- })
9024
- }),
9025
- [slots, classNames == null ? void 0 : classNames.base]
9050
+ const animationClass = (placement == null ? void 0 : placement.includes("top")) ? "animate-slideInFromTop" : "animate-slideInFromBottom";
9051
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
9052
+ "div",
9053
+ {
9054
+ ref: toastRef,
9055
+ className: clsx(
9056
+ slots.base({ class: classNames == null ? void 0 : classNames.base }),
9057
+ width && `w-[${width}px]`,
9058
+ animationClass,
9059
+ disableAnimation && "!animate-none"
9060
+ ),
9061
+ style: hasShadow ? { boxShadow: "0px 6px 18px rgba(0, 0, 0, 0.10)" } : {},
9062
+ children: [
9063
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: slots.wrapper({ class: classNames == null ? void 0 : classNames.wrapper }), children: [
9064
+ showIcon && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon_default, { name: originalProps.icon || "info-circle", fill: true, className: "mt-[2px]" }),
9065
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: slots.title({ class: classNames == null ? void 0 : classNames.title }), children: title }),
9066
+ showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon_default, { name: "close", className: "cursor-pointer", onClick: onClose })
9067
+ ] }),
9068
+ content && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { children: content })
9069
+ ]
9070
+ }
9026
9071
  );
9027
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { ref: toastRef, ...getBaseProps(), children: [
9028
- showIcon && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon_default, { name: originalProps.icon || "info-circle", fill: true, className: "mt-[2px]" }),
9029
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "flex-1 select-none", children: props.content }),
9030
- showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Icon_default, { name: "close", className: "cursor-pointer mt-[2px]", onClick: onClose })
9031
- ] });
9032
9072
  });
9033
9073
  Toast.displayName = "Toast";
9034
9074
  var toast_default = Toast;
@@ -9039,15 +9079,18 @@ var toast = tv({
9039
9079
  "inline-flex",
9040
9080
  "items-start",
9041
9081
  "border",
9042
- "rounded-md",
9082
+ "rounded-[5px]",
9043
9083
  "text-md",
9044
9084
  "p-[10px]",
9045
9085
  "gap-[5px]",
9046
9086
  "z-0",
9047
9087
  "transition-all",
9048
9088
  "duration-300",
9049
- "overflow-auto"
9089
+ "overflow-auto",
9090
+ "select-none"
9050
9091
  ],
9092
+ wrapper: ["flex", "items-center", "gap-[5px]"],
9093
+ title: ["font-bold", "truncate"],
9051
9094
  content: [
9052
9095
  "absolute",
9053
9096
  "top-0",
@@ -9061,37 +9104,67 @@ var toast = tv({
9061
9104
  ]
9062
9105
  },
9063
9106
  variants: {
9107
+ variant: {
9108
+ solid: {},
9109
+ outline: {}
9110
+ },
9064
9111
  color: {
9065
- primary: {
9066
- base: "bg-primary-soft border-primary-light text-primary-main"
9067
- },
9068
- secondary: {
9069
- base: "bg-secondary-soft border-secondary-light text-secondary-main"
9070
- },
9071
- default: {
9072
- base: "bg-default-soft border-default-light text-default-main"
9073
- },
9074
- success: {
9075
- base: "bg-success-soft border-success-light text-success-main"
9076
- },
9077
- info: {
9078
- base: "bg-info-soft border-info-light text-info-main"
9079
- },
9080
- warning: {
9081
- base: "bg-warning-soft border-warning-light text-warning-main"
9082
- },
9083
- danger: {
9084
- base: "bg-danger-soft border-danger-light text-danger-main"
9112
+ primary: {},
9113
+ secondary: {},
9114
+ success: {},
9115
+ info: {},
9116
+ warning: {},
9117
+ danger: {}
9118
+ }
9119
+ },
9120
+ compoundVariants: [
9121
+ {
9122
+ variant: "solid",
9123
+ color: "primary",
9124
+ class: {
9125
+ base: ["bg-primary-soft", "border-primary-main", "text-primary-main"]
9085
9126
  }
9086
9127
  },
9087
- disableAnimation: {
9088
- true: {
9089
- base: "animate-none"
9128
+ {
9129
+ variant: "solid",
9130
+ color: "secondary",
9131
+ class: {
9132
+ base: ["bg-secondary-soft", "border-secondary-main", "text-secondary-main"]
9133
+ }
9134
+ },
9135
+ {
9136
+ variant: "solid",
9137
+ color: "success",
9138
+ class: {
9139
+ base: ["bg-success-soft", "border-success-main", "text-success-main"]
9140
+ }
9141
+ },
9142
+ {
9143
+ variant: "solid",
9144
+ color: "info",
9145
+ class: {
9146
+ base: ["bg-info-soft", "border-info-main", "text-info-main"]
9147
+ }
9148
+ },
9149
+ {
9150
+ variant: "solid",
9151
+ color: "warning",
9152
+ class: {
9153
+ base: ["bg-warning-soft", "border-warning-main", "text-warning-main"]
9154
+ }
9155
+ },
9156
+ {
9157
+ variant: "solid",
9158
+ color: "danger",
9159
+ class: {
9160
+ base: ["bg-danger-soft", "border-danger-main", "text-danger-main"]
9090
9161
  }
9091
9162
  }
9092
- },
9163
+ ],
9093
9164
  defaultVariants: {
9094
- color: "default",
9165
+ variant: "solid",
9166
+ color: "primary",
9167
+ hasShadow: true,
9095
9168
  disableAnimation: false
9096
9169
  }
9097
9170
  });
@@ -9152,54 +9225,42 @@ var ToastProvider = ({
9152
9225
  const [toasts, setToasts] = (0, import_react29.useState)([]);
9153
9226
  const [containerStyle, setContainerStyle] = (0, import_react29.useState)({});
9154
9227
  const toastRef = (0, import_react29.useRef)(null);
9155
- const addToast = (0, import_react29.useCallback)((content, options) => {
9156
- const id = Date.now() + Math.floor(Math.random() * 1e5);
9157
- const newToast = {
9158
- id,
9159
- content,
9160
- ...options
9161
- };
9162
- setToasts((prevToasts) => [...prevToasts, newToast]);
9163
- setTimeout(() => {
9164
- setToasts((prevToasts) => prevToasts.filter((toast2) => toast2.id !== id));
9165
- }, options.duration || 3e3);
9166
- }, []);
9228
+ const addToast = (0, import_react29.useCallback)(
9229
+ (title, options = {}) => {
9230
+ const id = Date.now() + Math.floor(Math.random() * 1e5);
9231
+ const newToast = {
9232
+ id,
9233
+ title,
9234
+ duration: 3e3,
9235
+ ...globalOptions,
9236
+ ...options
9237
+ };
9238
+ setToasts((prev) => [...prev, newToast]);
9239
+ setTimeout(() => {
9240
+ setToasts((prevToasts) => prevToasts.filter((toast2) => toast2.id !== id));
9241
+ }, newToast.duration || 3e3);
9242
+ },
9243
+ [globalOptions]
9244
+ );
9167
9245
  const removeToast = (0, import_react29.useCallback)((id) => {
9168
9246
  setToasts((prevToasts) => prevToasts.filter((toast2) => toast2.id !== id));
9169
9247
  }, []);
9170
- const value = {
9171
- default: (content, options) => addToast(content, { type: "default", icon: "info-circle", color: "default", ...globalOptions, ...options }),
9172
- info: (content, options) => addToast(content, { type: "info", icon: "info-circle", color: "info", ...globalOptions, ...options }),
9173
- success: (content, options) => addToast(content, { type: "success", icon: "check-circle", color: "success", ...globalOptions, ...options }),
9174
- warning: (content, options) => addToast(content, {
9175
- type: "warning",
9176
- icon: "exclamation-triangle",
9177
- color: "warning",
9178
- ...globalOptions,
9179
- ...options
9180
- }),
9181
- error: (content, options) => addToast(content, { type: "error", icon: "exclamation-circle", color: "danger", ...globalOptions, ...options })
9182
- };
9248
+ const contextValue = addToast;
9183
9249
  (0, import_react29.useEffect)(() => {
9184
9250
  var _a;
9185
- const width = (globalOptions == null ? void 0 : globalOptions.width) ? globalOptions == null ? void 0 : globalOptions.width : typeof ((_a = toastRef.current) == null ? void 0 : _a.getWidth) === "function" ? toastRef.current.getWidth() : 300;
9251
+ const width = (globalOptions == null ? void 0 : globalOptions.width) ? globalOptions.width : typeof ((_a = toastRef.current) == null ? void 0 : _a.getWidth) === "function" ? toastRef.current.getWidth() : 300;
9186
9252
  const offset = 20;
9187
- const calculatePosition = () => {
9188
- const placement = (globalOptions == null ? void 0 : globalOptions.placement) || "bottom-right";
9189
- const { top, left, bottom, right } = getToastPosition(placement, width, offset);
9190
- setContainerStyle({
9191
- position: "fixed",
9192
- top: top !== void 0 ? `${top}px` : void 0,
9193
- left: left !== void 0 ? `${left}px` : void 0,
9194
- bottom: bottom !== void 0 ? `${bottom}px` : void 0,
9195
- right: right !== void 0 ? `${right}px` : void 0
9196
- });
9197
- };
9198
- calculatePosition();
9199
- window.addEventListener("resize", calculatePosition);
9200
- return () => window.removeEventListener("resize", calculatePosition);
9253
+ const placement = (globalOptions == null ? void 0 : globalOptions.placement) || "bottom-right";
9254
+ const { top, left, bottom, right } = getToastPosition(placement, width, offset);
9255
+ setContainerStyle({
9256
+ position: "fixed",
9257
+ top: top !== void 0 ? `${top}px` : void 0,
9258
+ left: left !== void 0 ? `${left}px` : void 0,
9259
+ bottom: bottom !== void 0 ? `${bottom}px` : void 0,
9260
+ right: right !== void 0 ? `${right}px` : void 0
9261
+ });
9201
9262
  }, [globalOptions == null ? void 0 : globalOptions.placement, globalOptions == null ? void 0 : globalOptions.width]);
9202
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(ToastContext.Provider, { value, children: [
9263
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(ToastContext.Provider, { value: contextValue, children: [
9203
9264
  children,
9204
9265
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { id: "deepnoid-toast-container", className: "flex flex-col gap-[10px]", style: containerStyle, children: toasts.map((toast2) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(toast_default, { ref: toastRef, onClose: () => removeToast(toast2.id), ...toast2 }, toast2.id)) })
9205
9266
  ] });
@@ -9936,6 +9997,79 @@ var dateTimePickerStyle = tv({
9936
9997
  }
9937
9998
  ]
9938
9999
  });
10000
+
10001
+ // src/components/tree/tree.tsx
10002
+ var import_react34 = require("react");
10003
+
10004
+ // src/assets/images/cogwheel.png
10005
+ var cogwheel_default = "./cogwheel-U2B3CWEL.png";
10006
+
10007
+ // src/assets/images/folder.svg
10008
+ var folder_default = "./folder-RO3QTLGS.svg";
10009
+
10010
+ // src/components/tree/tree.tsx
10011
+ var import_jsx_runtime34 = require("react/jsx-runtime");
10012
+ var TreeNodeItem = (0, import_react34.forwardRef)(({ node, depth }, _ref) => {
10013
+ var _a;
10014
+ const [isOpen, setIsOpen] = (0, import_react34.useState)(false);
10015
+ const slots = (0, import_react34.useMemo)(() => treeStyle(), []);
10016
+ const toggleOpen = (0, import_react34.useCallback)(() => {
10017
+ setIsOpen((prev) => !prev);
10018
+ }, []);
10019
+ const handleClick = () => {
10020
+ var _a2;
10021
+ toggleOpen();
10022
+ (_a2 = node.onClick) == null ? void 0 : _a2.call(node);
10023
+ };
10024
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: depth > 1 ? "ml-[30px]" : "", children: [
10025
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: slots.label(), onClick: handleClick, children: [
10026
+ node.children && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
10027
+ Icon_default,
10028
+ {
10029
+ name: "right-chevron",
10030
+ className: `text-neutral-main transition-transform duration-150 ${isOpen ? "rotate-90" : "rotate-0"}`
10031
+ }
10032
+ ),
10033
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("img", { src: folder_default, alt: "folder", width: 25, height: 25 }),
10034
+ node.label
10035
+ ] }),
10036
+ isOpen && ((_a = node.children) == null ? void 0 : _a.map((child) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TreeNodeItem, { node: child, depth: depth + 1 }, child.id)))
10037
+ ] });
10038
+ });
10039
+ var Tree = (0, import_react34.forwardRef)(({ headerContent, group }, ref) => {
10040
+ const { label, data, onClick } = group;
10041
+ const slots = (0, import_react34.useMemo)(() => treeStyle(), []);
10042
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: slots.base(), ref, children: [
10043
+ headerContent && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { children: headerContent }),
10044
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { children: [
10045
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: slots.label(), onClick, children: [
10046
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("img", { src: cogwheel_default, alt: "cogwheel", width: 25, height: 25 }),
10047
+ label
10048
+ ] }),
10049
+ data.map((node) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TreeNodeItem, { node, depth: 1 }, node.id))
10050
+ ] })
10051
+ ] });
10052
+ });
10053
+ TreeNodeItem.displayName = "TreeNodeItem";
10054
+ Tree.displayName = "Tree";
10055
+ var tree_default = Tree;
10056
+ var treeStyle = tv({
10057
+ slots: {
10058
+ base: ["border", "border-neutral-light", "rounded-xl", "p-[20px]", "flex", "flex-col", "gap-[20px]"],
10059
+ label: [
10060
+ "flex",
10061
+ "items-center",
10062
+ "gap-[5px]",
10063
+ "text-md",
10064
+ "font-bold",
10065
+ "text-body-foreground",
10066
+ "hover:bg-neutral-soft",
10067
+ "p-[5px]",
10068
+ "rounded-[5px]",
10069
+ "cursor-pointer"
10070
+ ]
10071
+ }
10072
+ });
9939
10073
  // Annotate the CommonJS export names for ESM import in node:
9940
10074
  0 && (module.exports = {
9941
10075
  Avatar,
@@ -9946,6 +10080,7 @@ var dateTimePickerStyle = tv({
9946
10080
  CheckBox,
9947
10081
  Chip,
9948
10082
  DateTimePicker,
10083
+ FormTable,
9949
10084
  Icon,
9950
10085
  IconButton,
9951
10086
  Input,
@@ -9964,6 +10099,7 @@ var dateTimePickerStyle = tv({
9964
10099
  Toast,
9965
10100
  ToastProvider,
9966
10101
  Tooltip,
10102
+ Tree,
9967
10103
  deepnoidUi,
9968
10104
  iconTemplate,
9969
10105
  tv,