sevatech-library 1.0.1 → 1.0.3

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 (356) hide show
  1. package/README.md +2 -2
  2. package/dist/cjs/index.js +1644 -36
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/types/components/avatar/avatar-group.component.d.ts +1 -1
  5. package/dist/cjs/types/components/avatar/avatar-group.component.d.ts.map +1 -1
  6. package/dist/cjs/types/components/avatar/avatar-label-group.component.d.ts +1 -1
  7. package/dist/cjs/types/components/avatar/avatar-label-group.component.d.ts.map +1 -1
  8. package/dist/cjs/types/components/avatar/avatar-profile.component.d.ts +1 -1
  9. package/dist/cjs/types/components/avatar/avatar-profile.component.d.ts.map +1 -1
  10. package/dist/cjs/types/components/avatar/avatar-user.component.d.ts +1 -1
  11. package/dist/cjs/types/components/avatar/avatar-user.component.d.ts.map +1 -1
  12. package/dist/cjs/types/components/avatar/index.d.ts +4 -4
  13. package/dist/cjs/types/components/avatar/index.d.ts.map +1 -1
  14. package/dist/cjs/types/components/bread-crumbs/bread-crumbs.component.d.ts +1 -1
  15. package/dist/cjs/types/components/bread-crumbs/bread-crumbs.component.d.ts.map +1 -1
  16. package/dist/cjs/types/components/bread-crumbs/index.d.ts +3 -0
  17. package/dist/cjs/types/components/bread-crumbs/index.d.ts.map +1 -0
  18. package/dist/cjs/types/components/button/index.d.ts +3 -0
  19. package/dist/cjs/types/components/button/index.d.ts.map +1 -0
  20. package/dist/cjs/types/components/button-bar/button-bar.component.d.ts +1 -1
  21. package/dist/cjs/types/components/button-bar/button-bar.component.d.ts.map +1 -1
  22. package/dist/cjs/types/components/button-bar/index.d.ts +2 -0
  23. package/dist/cjs/types/components/button-bar/index.d.ts.map +1 -0
  24. package/dist/cjs/types/components/checkbox/checkbox-content.component.d.ts.map +1 -1
  25. package/dist/cjs/types/components/checkbox/checkbox.component.d.ts +1 -1
  26. package/dist/cjs/types/components/checkbox/checkbox.component.d.ts.map +1 -1
  27. package/dist/cjs/types/components/checkbox/index.d.ts +4 -0
  28. package/dist/cjs/types/components/checkbox/index.d.ts.map +1 -0
  29. package/dist/cjs/types/components/chip/chip.component.d.ts +1 -1
  30. package/dist/cjs/types/components/chip/chip.component.d.ts.map +1 -1
  31. package/dist/cjs/types/components/chip/index.d.ts +3 -0
  32. package/dist/cjs/types/components/chip/index.d.ts.map +1 -0
  33. package/dist/cjs/types/components/date-field/date-field.component.d.ts +1 -1
  34. package/dist/cjs/types/components/date-field/date-field.component.d.ts.map +1 -1
  35. package/dist/cjs/types/components/date-field/index.d.ts +2 -0
  36. package/dist/cjs/types/components/date-field/index.d.ts.map +1 -0
  37. package/dist/cjs/types/components/date-range-picker/date-range-picker.component.d.ts +1 -1
  38. package/dist/cjs/types/components/date-range-picker/date-range-picker.component.d.ts.map +1 -1
  39. package/dist/cjs/types/components/date-range-picker/index.d.ts +2 -0
  40. package/dist/cjs/types/components/date-range-picker/index.d.ts.map +1 -0
  41. package/dist/cjs/types/components/dropdown-field/dropdown-field.component.d.ts +1 -1
  42. package/dist/cjs/types/components/dropdown-field/dropdown-field.component.d.ts.map +1 -1
  43. package/dist/cjs/types/components/dropdown-field/index.d.ts +2 -0
  44. package/dist/cjs/types/components/dropdown-field/index.d.ts.map +1 -0
  45. package/dist/cjs/types/components/grid/grid.component.d.ts +1 -1
  46. package/dist/cjs/types/components/grid/grid.component.d.ts.map +1 -1
  47. package/dist/cjs/types/components/grid/index.d.ts +2 -0
  48. package/dist/cjs/types/components/grid/index.d.ts.map +1 -0
  49. package/dist/cjs/types/components/index.d.ts +22 -23
  50. package/dist/cjs/types/components/index.d.ts.map +1 -1
  51. package/dist/cjs/types/components/input-stepper/index.d.ts +4 -0
  52. package/dist/cjs/types/components/input-stepper/index.d.ts.map +1 -0
  53. package/dist/cjs/types/components/input-stepper/input-stepper-skeleton.d.ts +1 -1
  54. package/dist/cjs/types/components/input-stepper/input-stepper-skeleton.d.ts.map +1 -1
  55. package/dist/cjs/types/components/input-stepper/input-stepper.component.d.ts +1 -1
  56. package/dist/cjs/types/components/input-stepper/input-stepper.component.d.ts.map +1 -1
  57. package/dist/cjs/types/components/link-field/index.d.ts +2 -0
  58. package/dist/cjs/types/components/link-field/index.d.ts.map +1 -0
  59. package/dist/cjs/types/components/link-field/link-field.component.d.ts +1 -1
  60. package/dist/cjs/types/components/link-field/link-field.component.d.ts.map +1 -1
  61. package/dist/cjs/types/components/modal/index.d.ts +2 -2
  62. package/dist/cjs/types/components/modal/index.d.ts.map +1 -1
  63. package/dist/cjs/types/components/modal/modal-card.component.d.ts +1 -1
  64. package/dist/cjs/types/components/modal/modal-card.component.d.ts.map +1 -1
  65. package/dist/cjs/types/components/modal/modal.component.d.ts +1 -1
  66. package/dist/cjs/types/components/modal/modal.component.d.ts.map +1 -1
  67. package/dist/cjs/types/components/money-field/index.d.ts +2 -0
  68. package/dist/cjs/types/components/money-field/index.d.ts.map +1 -0
  69. package/dist/cjs/types/components/money-field/money-field.component.d.ts +1 -1
  70. package/dist/cjs/types/components/money-field/money-field.component.d.ts.map +1 -1
  71. package/dist/cjs/types/components/phone-number-field/index.d.ts +2 -0
  72. package/dist/cjs/types/components/phone-number-field/index.d.ts.map +1 -0
  73. package/dist/cjs/types/components/phone-number-field/phone-number-field.component.d.ts +1 -1
  74. package/dist/cjs/types/components/phone-number-field/phone-number-field.component.d.ts.map +1 -1
  75. package/dist/cjs/types/components/pin/index.d.ts +3 -0
  76. package/dist/cjs/types/components/pin/index.d.ts.map +1 -0
  77. package/dist/cjs/types/components/pin/pin.component.d.ts +1 -1
  78. package/dist/cjs/types/components/pin/pin.component.d.ts.map +1 -1
  79. package/dist/cjs/types/components/search-dropdown/index.d.ts +2 -0
  80. package/dist/cjs/types/components/search-dropdown/index.d.ts.map +1 -0
  81. package/dist/cjs/types/components/search-dropdown/search-dropdown.component.d.ts +1 -1
  82. package/dist/cjs/types/components/search-dropdown/search-dropdown.component.d.ts.map +1 -1
  83. package/dist/cjs/types/components/search-field/index.d.ts +2 -0
  84. package/dist/cjs/types/components/search-field/index.d.ts.map +1 -0
  85. package/dist/cjs/types/components/search-field/search-field.component.d.ts +1 -1
  86. package/dist/cjs/types/components/search-field/search-field.component.d.ts.map +1 -1
  87. package/dist/cjs/types/components/switch/index.d.ts +3 -0
  88. package/dist/cjs/types/components/switch/index.d.ts.map +1 -0
  89. package/dist/cjs/types/components/switch/switch-content.component.d.ts +1 -1
  90. package/dist/cjs/types/components/switch/switch-content.component.d.ts.map +1 -1
  91. package/dist/cjs/types/components/switch/switch.component.d.ts +1 -1
  92. package/dist/cjs/types/components/switch/switch.component.d.ts.map +1 -1
  93. package/dist/cjs/types/components/tab/index.d.ts +3 -0
  94. package/dist/cjs/types/components/tab/index.d.ts.map +1 -0
  95. package/dist/cjs/types/components/tab/tab.component.d.ts +1 -1
  96. package/dist/cjs/types/components/tab/tab.component.d.ts.map +1 -1
  97. package/dist/cjs/types/components/text-area/index.d.ts +2 -0
  98. package/dist/cjs/types/components/text-area/index.d.ts.map +1 -0
  99. package/dist/cjs/types/components/text-area/text-area.component.d.ts +1 -1
  100. package/dist/cjs/types/components/text-area/text-area.component.d.ts.map +1 -1
  101. package/dist/cjs/types/components/text-field/index.d.ts +2 -0
  102. package/dist/cjs/types/components/text-field/index.d.ts.map +1 -0
  103. package/dist/cjs/types/components/text-field/text-field.component.d.ts +1 -1
  104. package/dist/cjs/types/components/text-field/text-field.component.d.ts.map +1 -1
  105. package/dist/cjs/types/components/typography/typography-limit-one-line.component.d.ts +1 -1
  106. package/dist/cjs/types/components/typography/typography-limit-one-line.component.d.ts.map +1 -1
  107. package/dist/cjs/types/components/uploader/index.d.ts +3 -0
  108. package/dist/cjs/types/components/uploader/index.d.ts.map +1 -0
  109. package/dist/cjs/types/components/uploader/uploader-item.component.d.ts +1 -1
  110. package/dist/cjs/types/components/uploader/uploader-item.component.d.ts.map +1 -1
  111. package/dist/cjs/types/components/uploader/uploader.component.d.ts +1 -1
  112. package/dist/cjs/types/components/uploader/uploader.component.d.ts.map +1 -1
  113. package/dist/esm/index.js +1591 -29
  114. package/dist/esm/index.js.map +1 -1
  115. package/dist/esm/types/components/avatar/avatar-group.component.d.ts +1 -1
  116. package/dist/esm/types/components/avatar/avatar-group.component.d.ts.map +1 -1
  117. package/dist/esm/types/components/avatar/avatar-label-group.component.d.ts +1 -1
  118. package/dist/esm/types/components/avatar/avatar-label-group.component.d.ts.map +1 -1
  119. package/dist/esm/types/components/avatar/avatar-profile.component.d.ts +1 -1
  120. package/dist/esm/types/components/avatar/avatar-profile.component.d.ts.map +1 -1
  121. package/dist/esm/types/components/avatar/avatar-user.component.d.ts +1 -1
  122. package/dist/esm/types/components/avatar/avatar-user.component.d.ts.map +1 -1
  123. package/dist/esm/types/components/avatar/index.d.ts +4 -4
  124. package/dist/esm/types/components/avatar/index.d.ts.map +1 -1
  125. package/dist/esm/types/components/bread-crumbs/bread-crumbs.component.d.ts +1 -1
  126. package/dist/esm/types/components/bread-crumbs/bread-crumbs.component.d.ts.map +1 -1
  127. package/dist/esm/types/components/bread-crumbs/index.d.ts +3 -0
  128. package/dist/esm/types/components/bread-crumbs/index.d.ts.map +1 -0
  129. package/dist/esm/types/components/button/index.d.ts +3 -0
  130. package/dist/esm/types/components/button/index.d.ts.map +1 -0
  131. package/dist/esm/types/components/button-bar/button-bar.component.d.ts +1 -1
  132. package/dist/esm/types/components/button-bar/button-bar.component.d.ts.map +1 -1
  133. package/dist/esm/types/components/button-bar/index.d.ts +2 -0
  134. package/dist/esm/types/components/button-bar/index.d.ts.map +1 -0
  135. package/dist/esm/types/components/checkbox/checkbox-content.component.d.ts.map +1 -1
  136. package/dist/esm/types/components/checkbox/checkbox.component.d.ts +1 -1
  137. package/dist/esm/types/components/checkbox/checkbox.component.d.ts.map +1 -1
  138. package/dist/esm/types/components/checkbox/index.d.ts +4 -0
  139. package/dist/esm/types/components/checkbox/index.d.ts.map +1 -0
  140. package/dist/esm/types/components/chip/chip.component.d.ts +1 -1
  141. package/dist/esm/types/components/chip/chip.component.d.ts.map +1 -1
  142. package/dist/esm/types/components/chip/index.d.ts +3 -0
  143. package/dist/esm/types/components/chip/index.d.ts.map +1 -0
  144. package/dist/esm/types/components/date-field/date-field.component.d.ts +1 -1
  145. package/dist/esm/types/components/date-field/date-field.component.d.ts.map +1 -1
  146. package/dist/esm/types/components/date-field/index.d.ts +2 -0
  147. package/dist/esm/types/components/date-field/index.d.ts.map +1 -0
  148. package/dist/esm/types/components/date-range-picker/date-range-picker.component.d.ts +1 -1
  149. package/dist/esm/types/components/date-range-picker/date-range-picker.component.d.ts.map +1 -1
  150. package/dist/esm/types/components/date-range-picker/index.d.ts +2 -0
  151. package/dist/esm/types/components/date-range-picker/index.d.ts.map +1 -0
  152. package/dist/esm/types/components/dropdown-field/dropdown-field.component.d.ts +1 -1
  153. package/dist/esm/types/components/dropdown-field/dropdown-field.component.d.ts.map +1 -1
  154. package/dist/esm/types/components/dropdown-field/index.d.ts +2 -0
  155. package/dist/esm/types/components/dropdown-field/index.d.ts.map +1 -0
  156. package/dist/esm/types/components/grid/grid.component.d.ts +1 -1
  157. package/dist/esm/types/components/grid/grid.component.d.ts.map +1 -1
  158. package/dist/esm/types/components/grid/index.d.ts +2 -0
  159. package/dist/esm/types/components/grid/index.d.ts.map +1 -0
  160. package/dist/esm/types/components/index.d.ts +22 -23
  161. package/dist/esm/types/components/index.d.ts.map +1 -1
  162. package/dist/esm/types/components/input-stepper/index.d.ts +4 -0
  163. package/dist/esm/types/components/input-stepper/index.d.ts.map +1 -0
  164. package/dist/esm/types/components/input-stepper/input-stepper-skeleton.d.ts +1 -1
  165. package/dist/esm/types/components/input-stepper/input-stepper-skeleton.d.ts.map +1 -1
  166. package/dist/esm/types/components/input-stepper/input-stepper.component.d.ts +1 -1
  167. package/dist/esm/types/components/input-stepper/input-stepper.component.d.ts.map +1 -1
  168. package/dist/esm/types/components/link-field/index.d.ts +2 -0
  169. package/dist/esm/types/components/link-field/index.d.ts.map +1 -0
  170. package/dist/esm/types/components/link-field/link-field.component.d.ts +1 -1
  171. package/dist/esm/types/components/link-field/link-field.component.d.ts.map +1 -1
  172. package/dist/esm/types/components/modal/index.d.ts +2 -2
  173. package/dist/esm/types/components/modal/index.d.ts.map +1 -1
  174. package/dist/esm/types/components/modal/modal-card.component.d.ts +1 -1
  175. package/dist/esm/types/components/modal/modal-card.component.d.ts.map +1 -1
  176. package/dist/esm/types/components/modal/modal.component.d.ts +1 -1
  177. package/dist/esm/types/components/modal/modal.component.d.ts.map +1 -1
  178. package/dist/esm/types/components/money-field/index.d.ts +2 -0
  179. package/dist/esm/types/components/money-field/index.d.ts.map +1 -0
  180. package/dist/esm/types/components/money-field/money-field.component.d.ts +1 -1
  181. package/dist/esm/types/components/money-field/money-field.component.d.ts.map +1 -1
  182. package/dist/esm/types/components/phone-number-field/index.d.ts +2 -0
  183. package/dist/esm/types/components/phone-number-field/index.d.ts.map +1 -0
  184. package/dist/esm/types/components/phone-number-field/phone-number-field.component.d.ts +1 -1
  185. package/dist/esm/types/components/phone-number-field/phone-number-field.component.d.ts.map +1 -1
  186. package/dist/esm/types/components/pin/index.d.ts +3 -0
  187. package/dist/esm/types/components/pin/index.d.ts.map +1 -0
  188. package/dist/esm/types/components/pin/pin.component.d.ts +1 -1
  189. package/dist/esm/types/components/pin/pin.component.d.ts.map +1 -1
  190. package/dist/esm/types/components/search-dropdown/index.d.ts +2 -0
  191. package/dist/esm/types/components/search-dropdown/index.d.ts.map +1 -0
  192. package/dist/esm/types/components/search-dropdown/search-dropdown.component.d.ts +1 -1
  193. package/dist/esm/types/components/search-dropdown/search-dropdown.component.d.ts.map +1 -1
  194. package/dist/esm/types/components/search-field/index.d.ts +2 -0
  195. package/dist/esm/types/components/search-field/index.d.ts.map +1 -0
  196. package/dist/esm/types/components/search-field/search-field.component.d.ts +1 -1
  197. package/dist/esm/types/components/search-field/search-field.component.d.ts.map +1 -1
  198. package/dist/esm/types/components/switch/index.d.ts +3 -0
  199. package/dist/esm/types/components/switch/index.d.ts.map +1 -0
  200. package/dist/esm/types/components/switch/switch-content.component.d.ts +1 -1
  201. package/dist/esm/types/components/switch/switch-content.component.d.ts.map +1 -1
  202. package/dist/esm/types/components/switch/switch.component.d.ts +1 -1
  203. package/dist/esm/types/components/switch/switch.component.d.ts.map +1 -1
  204. package/dist/esm/types/components/tab/index.d.ts +3 -0
  205. package/dist/esm/types/components/tab/index.d.ts.map +1 -0
  206. package/dist/esm/types/components/tab/tab.component.d.ts +1 -1
  207. package/dist/esm/types/components/tab/tab.component.d.ts.map +1 -1
  208. package/dist/esm/types/components/text-area/index.d.ts +2 -0
  209. package/dist/esm/types/components/text-area/index.d.ts.map +1 -0
  210. package/dist/esm/types/components/text-area/text-area.component.d.ts +1 -1
  211. package/dist/esm/types/components/text-area/text-area.component.d.ts.map +1 -1
  212. package/dist/esm/types/components/text-field/index.d.ts +2 -0
  213. package/dist/esm/types/components/text-field/index.d.ts.map +1 -0
  214. package/dist/esm/types/components/text-field/text-field.component.d.ts +1 -1
  215. package/dist/esm/types/components/text-field/text-field.component.d.ts.map +1 -1
  216. package/dist/esm/types/components/typography/typography-limit-one-line.component.d.ts +1 -1
  217. package/dist/esm/types/components/typography/typography-limit-one-line.component.d.ts.map +1 -1
  218. package/dist/esm/types/components/uploader/index.d.ts +3 -0
  219. package/dist/esm/types/components/uploader/index.d.ts.map +1 -0
  220. package/dist/esm/types/components/uploader/uploader-item.component.d.ts +1 -1
  221. package/dist/esm/types/components/uploader/uploader-item.component.d.ts.map +1 -1
  222. package/dist/esm/types/components/uploader/uploader.component.d.ts +1 -1
  223. package/dist/esm/types/components/uploader/uploader.component.d.ts.map +1 -1
  224. package/package.json +1 -1
  225. package/dist/cjs/types/components/bread-cumbs/bread-crumbs.component.d.ts +0 -21
  226. package/dist/cjs/types/components/bread-cumbs/bread-crumbs.component.d.ts.map +0 -1
  227. package/dist/esm/types/components/bread-cumbs/bread-crumbs.component.d.ts +0 -21
  228. package/dist/esm/types/components/bread-cumbs/bread-crumbs.component.d.ts.map +0 -1
  229. package/dist/types/components/avatar/avatar-group.component.d.ts +0 -20
  230. package/dist/types/components/avatar/avatar-group.component.d.ts.map +0 -1
  231. package/dist/types/components/avatar/avatar-label-group.component.d.ts +0 -11
  232. package/dist/types/components/avatar/avatar-label-group.component.d.ts.map +0 -1
  233. package/dist/types/components/avatar/avatar-profile.component.d.ts +0 -4
  234. package/dist/types/components/avatar/avatar-profile.component.d.ts.map +0 -1
  235. package/dist/types/components/avatar/avatar-user.component.d.ts +0 -14
  236. package/dist/types/components/avatar/avatar-user.component.d.ts.map +0 -1
  237. package/dist/types/components/avatar/avatar.component.d.ts +0 -20
  238. package/dist/types/components/avatar/avatar.component.d.ts.map +0 -1
  239. package/dist/types/components/avatar/avatar.constant.d.ts +0 -35
  240. package/dist/types/components/avatar/avatar.constant.d.ts.map +0 -1
  241. package/dist/types/components/avatar/avatar.interface.d.ts +0 -28
  242. package/dist/types/components/avatar/avatar.interface.d.ts.map +0 -1
  243. package/dist/types/components/bread-cumbs/bread-crumbs.component.d.ts +0 -21
  244. package/dist/types/components/bread-cumbs/bread-crumbs.component.d.ts.map +0 -1
  245. package/dist/types/components/button/button.component.d.ts +0 -38
  246. package/dist/types/components/button/button.component.d.ts.map +0 -1
  247. package/dist/types/components/button/button.constants.d.ts +0 -33
  248. package/dist/types/components/button/button.constants.d.ts.map +0 -1
  249. package/dist/types/components/button-bar/button-bar.component.d.ts +0 -15
  250. package/dist/types/components/button-bar/button-bar.component.d.ts.map +0 -1
  251. package/dist/types/components/checkbox/checkbox-content.component.d.ts +0 -19
  252. package/dist/types/components/checkbox/checkbox-content.component.d.ts.map +0 -1
  253. package/dist/types/components/checkbox/checkbox.component.d.ts +0 -22
  254. package/dist/types/components/checkbox/checkbox.component.d.ts.map +0 -1
  255. package/dist/types/components/checkbox/checkbox.constant.d.ts +0 -26
  256. package/dist/types/components/checkbox/checkbox.constant.d.ts.map +0 -1
  257. package/dist/types/components/chip/chip.component.d.ts +0 -15
  258. package/dist/types/components/chip/chip.component.d.ts.map +0 -1
  259. package/dist/types/components/chip/chip.constant.d.ts +0 -16
  260. package/dist/types/components/chip/chip.constant.d.ts.map +0 -1
  261. package/dist/types/components/date-field/date-field.component.d.ts +0 -23
  262. package/dist/types/components/date-field/date-field.component.d.ts.map +0 -1
  263. package/dist/types/components/date-range-picker/date-range-picker.component.d.ts +0 -25
  264. package/dist/types/components/date-range-picker/date-range-picker.component.d.ts.map +0 -1
  265. package/dist/types/components/dropdown-field/dropdown-field.component.d.ts +0 -28
  266. package/dist/types/components/dropdown-field/dropdown-field.component.d.ts.map +0 -1
  267. package/dist/types/components/grid/grid.component.d.ts +0 -11
  268. package/dist/types/components/grid/grid.component.d.ts.map +0 -1
  269. package/dist/types/components/icon/icon.element.d.ts +0 -12
  270. package/dist/types/components/icon/icon.element.d.ts.map +0 -1
  271. package/dist/types/components/icon/index.d.ts +0 -2
  272. package/dist/types/components/icon/index.d.ts.map +0 -1
  273. package/dist/types/components/image/image.element.d.ts +0 -13
  274. package/dist/types/components/image/image.element.d.ts.map +0 -1
  275. package/dist/types/components/image/image.enum.d.ts +0 -6
  276. package/dist/types/components/image/image.enum.d.ts.map +0 -1
  277. package/dist/types/components/image/index.d.ts +0 -3
  278. package/dist/types/components/image/index.d.ts.map +0 -1
  279. package/dist/types/components/index.d.ts +0 -28
  280. package/dist/types/components/index.d.ts.map +0 -1
  281. package/dist/types/components/input-stepper/input-stepper-skeleton.d.ts +0 -9
  282. package/dist/types/components/input-stepper/input-stepper-skeleton.d.ts.map +0 -1
  283. package/dist/types/components/input-stepper/input-stepper.component.d.ts +0 -37
  284. package/dist/types/components/input-stepper/input-stepper.component.d.ts.map +0 -1
  285. package/dist/types/components/input-stepper/input-stepper.constant.d.ts +0 -32
  286. package/dist/types/components/input-stepper/input-stepper.constant.d.ts.map +0 -1
  287. package/dist/types/components/link/index.d.ts +0 -3
  288. package/dist/types/components/link/index.d.ts.map +0 -1
  289. package/dist/types/components/link/link-internal.element.d.ts +0 -9
  290. package/dist/types/components/link/link-internal.element.d.ts.map +0 -1
  291. package/dist/types/components/link/link.element.d.ts +0 -8
  292. package/dist/types/components/link/link.element.d.ts.map +0 -1
  293. package/dist/types/components/link-field/link-field.component.d.ts +0 -23
  294. package/dist/types/components/link-field/link-field.component.d.ts.map +0 -1
  295. package/dist/types/components/modal/modal-card.component.d.ts +0 -15
  296. package/dist/types/components/modal/modal-card.component.d.ts.map +0 -1
  297. package/dist/types/components/modal/modal-content.component.d.ts +0 -16
  298. package/dist/types/components/modal/modal-content.component.d.ts.map +0 -1
  299. package/dist/types/components/modal/modal.component.d.ts +0 -11
  300. package/dist/types/components/modal/modal.component.d.ts.map +0 -1
  301. package/dist/types/components/modal/modal.interface.d.ts +0 -20
  302. package/dist/types/components/modal/modal.interface.d.ts.map +0 -1
  303. package/dist/types/components/money-field/money-field.component.d.ts +0 -24
  304. package/dist/types/components/money-field/money-field.component.d.ts.map +0 -1
  305. package/dist/types/components/phone-number-field/phone-number-field.component.d.ts +0 -28
  306. package/dist/types/components/phone-number-field/phone-number-field.component.d.ts.map +0 -1
  307. package/dist/types/components/pin/pin.component.d.ts +0 -23
  308. package/dist/types/components/pin/pin.component.d.ts.map +0 -1
  309. package/dist/types/components/pin/pin.constant.d.ts +0 -25
  310. package/dist/types/components/pin/pin.constant.d.ts.map +0 -1
  311. package/dist/types/components/search-dropdown/search-dropdown.component.d.ts +0 -30
  312. package/dist/types/components/search-dropdown/search-dropdown.component.d.ts.map +0 -1
  313. package/dist/types/components/search-field/search-field.component.d.ts +0 -14
  314. package/dist/types/components/search-field/search-field.component.d.ts.map +0 -1
  315. package/dist/types/components/switch/switch-content.component.d.ts +0 -13
  316. package/dist/types/components/switch/switch-content.component.d.ts.map +0 -1
  317. package/dist/types/components/switch/switch.component.d.ts +0 -12
  318. package/dist/types/components/switch/switch.component.d.ts.map +0 -1
  319. package/dist/types/components/tab/tab.component.d.ts +0 -22
  320. package/dist/types/components/tab/tab.component.d.ts.map +0 -1
  321. package/dist/types/components/tab/tab.constant.d.ts +0 -15
  322. package/dist/types/components/tab/tab.constant.d.ts.map +0 -1
  323. package/dist/types/components/text-area/text-area.component.d.ts +0 -22
  324. package/dist/types/components/text-area/text-area.component.d.ts.map +0 -1
  325. package/dist/types/components/text-field/text-field.component.d.ts +0 -21
  326. package/dist/types/components/text-field/text-field.component.d.ts.map +0 -1
  327. package/dist/types/components/typography/index.d.ts +0 -2
  328. package/dist/types/components/typography/index.d.ts.map +0 -1
  329. package/dist/types/components/typography/typography-limit-one-line.component.d.ts +0 -9
  330. package/dist/types/components/typography/typography-limit-one-line.component.d.ts.map +0 -1
  331. package/dist/types/components/uploader/uploader-item.component.d.ts +0 -17
  332. package/dist/types/components/uploader/uploader-item.component.d.ts.map +0 -1
  333. package/dist/types/components/uploader/uploader-item.styles.d.ts +0 -53
  334. package/dist/types/components/uploader/uploader-item.styles.d.ts.map +0 -1
  335. package/dist/types/components/uploader/uploader.component.d.ts +0 -48
  336. package/dist/types/components/uploader/uploader.component.d.ts.map +0 -1
  337. package/dist/types/constants/apps.data.d.ts +0 -7
  338. package/dist/types/constants/apps.data.d.ts.map +0 -1
  339. package/dist/types/constants/color.constant.d.ts +0 -105
  340. package/dist/types/constants/color.constant.d.ts.map +0 -1
  341. package/dist/types/constants/index.d.ts +0 -5
  342. package/dist/types/constants/index.d.ts.map +0 -1
  343. package/dist/types/constants/style.constant.d.ts +0 -58
  344. package/dist/types/constants/style.constant.d.ts.map +0 -1
  345. package/dist/types/constants/typography.constant.d.ts +0 -710
  346. package/dist/types/constants/typography.constant.d.ts.map +0 -1
  347. package/dist/types/index.d.ts +0 -5
  348. package/dist/types/index.d.ts.map +0 -1
  349. package/dist/types/styles/index.d.ts +0 -2
  350. package/dist/types/styles/index.d.ts.map +0 -1
  351. package/dist/types/styles/stack.style.d.ts +0 -54
  352. package/dist/types/styles/stack.style.d.ts.map +0 -1
  353. package/dist/types/types/index.d.ts +0 -1
  354. package/dist/types/types/index.d.ts.map +0 -1
  355. package/dist/types/utils/index.d.ts +0 -2
  356. package/dist/types/utils/index.d.ts.map +0 -1
package/dist/cjs/index.js CHANGED
@@ -8,21 +8,21 @@ var LinkIcon = require('@mui/icons-material/Link');
8
8
  var CheckIcon = require('@mui/icons-material/Check');
9
9
  var RemoveIcon = require('@mui/icons-material/Remove');
10
10
  var FiberManualRecordIcon = require('@mui/icons-material/FiberManualRecord');
11
- require('@mui/x-date-pickers/DatePicker');
12
- require('@mui/x-date-pickers/LocalizationProvider');
13
- require('@mui/x-date-pickers/AdapterDayjs');
14
- require('dayjs');
15
- require('@mui/icons-material/Add');
11
+ var DatePicker = require('@mui/x-date-pickers/DatePicker');
12
+ var LocalizationProvider = require('@mui/x-date-pickers/LocalizationProvider');
13
+ var AdapterDayjs = require('@mui/x-date-pickers/AdapterDayjs');
14
+ var dayjs = require('dayjs');
15
+ var AddIcon = require('@mui/icons-material/Add');
16
16
  var MuiTextField = require('@mui/material/TextField');
17
17
  var formik = require('formik');
18
18
  var Slider = require('react-slick');
19
19
  require('slick-carousel/slick/slick.css');
20
20
  require('slick-carousel/slick/slick-theme.css');
21
- require('@mui/icons-material/AttachMoney');
22
- require('@mui/icons-material/Search');
23
- require('framer-motion');
24
- require('@mui/icons-material/CheckCircle');
25
- require('@mui/icons-material/Refresh');
21
+ var AttachMoneyIcon = require('@mui/icons-material/AttachMoney');
22
+ var SearchIcon = require('@mui/icons-material/Search');
23
+ var framerMotion = require('framer-motion');
24
+ var CheckCircleIcon = require('@mui/icons-material/CheckCircle');
25
+ var RefreshIcon = require('@mui/icons-material/Refresh');
26
26
 
27
27
  const AVATAR_SIZES = {
28
28
  xs: 24,
@@ -227,13 +227,13 @@ const TEXT_FIELD = {
227
227
  FONT_SIZE_TITLE: 18,
228
228
  FONT_SIZE_CAPTION: 10,
229
229
  };
230
- const FONT_SIZE_ICON = {
230
+ const FONT_SIZE_ICON$1 = {
231
231
  large: '22px',
232
232
  xl: '20px',
233
233
  medium: '19px',
234
234
  small: '12px',
235
235
  };
236
- const FONT_SIZE_LOADING = {
236
+ const FONT_SIZE_LOADING$1 = {
237
237
  large: 40,
238
238
  medium: 22.5,
239
239
  small: 16,
@@ -273,8 +273,8 @@ var style_constant = /*#__PURE__*/Object.freeze({
273
273
  BORDER_RADIUS_ELEMENT_SMALL: BORDER_RADIUS_ELEMENT_SMALL,
274
274
  BORDER_RADIUS_ELEMENT_TAG: BORDER_RADIUS_ELEMENT_TAG,
275
275
  BORDER_RADIUS_ELEMENT_WRAPPER: BORDER_RADIUS_ELEMENT_WRAPPER,
276
- FONT_SIZE_ICON: FONT_SIZE_ICON,
277
- FONT_SIZE_LOADING: FONT_SIZE_LOADING,
276
+ FONT_SIZE_ICON: FONT_SIZE_ICON$1,
277
+ FONT_SIZE_LOADING: FONT_SIZE_LOADING$1,
278
278
  GAP_ICON_CONTENT_BY_SIZE: GAP_ICON_CONTENT_BY_SIZE,
279
279
  HEIGHT_DEFAULT_TEXT_FIELD_BUTTON: HEIGHT_DEFAULT_TEXT_FIELD_BUTTON,
280
280
  HEIGHT_ELEMENT_OTHER: HEIGHT_ELEMENT_OTHER,
@@ -910,7 +910,7 @@ styles.styled(material.Stack)(() => ({
910
910
  alignItems: 'center',
911
911
  justifyContent: 'center',
912
912
  }));
913
- styles.styled(material.Stack)(() => ({
913
+ const StackRowAlignCenterJustEnd = styles.styled(material.Stack)(() => ({
914
914
  flexDirection: 'row',
915
915
  alignItems: 'center',
916
916
  justifyContent: 'flex-end',
@@ -923,7 +923,7 @@ styles.styled(material.Stack)(() => ({
923
923
  flexDirection: 'row',
924
924
  justifyContent: 'space-between',
925
925
  }));
926
- styles.styled(material.Stack)(() => ({
926
+ const StackRowAlignCenterJustBetween = styles.styled(material.Stack)(() => ({
927
927
  flexDirection: 'row',
928
928
  alignItems: 'center',
929
929
  justifyContent: 'space-between',
@@ -1122,7 +1122,7 @@ const IconElement = ({ icon, size = 'medium', color, disabled, onClick, sx, fill
1122
1122
  };
1123
1123
  return (jsxRuntime.jsx(material.Icon, { onClick: onClick, color: color, sx: {
1124
1124
  cursor: 'inherit',
1125
- fontSize: FONT_SIZE_ICON[size],
1125
+ fontSize: FONT_SIZE_ICON$1[size],
1126
1126
  fontVariationSettings: `'FILL' ${fill}, 'wght' 100, 'GRAD' 200, 'opsz' 24`,
1127
1127
  ...sx,
1128
1128
  }, component: 'span', className: "material-symbols-rounded", children: icon }));
@@ -1202,6 +1202,60 @@ const AvatarUserComponent = ({ title, description, descriptionHref, onDescriptio
1202
1202
  }, children: [jsxRuntime.jsx(LinkIcon, { sx: { fontSize: 16, color: descriptionColor } }), description] }))] })] }));
1203
1203
  };
1204
1204
 
1205
+ const SEPARATOR_URLS = {
1206
+ '>': '/images/icon/chevron-right.svg',
1207
+ '/': '/images/icon/slash-separator.svg',
1208
+ };
1209
+ const BreadcrumbsComponent = ({ items, separator = '>', maxItems = 5, idSelect, sx, sxItem, onChange, }) => {
1210
+ // state
1211
+ const [anchorEl, setAnchorEl] = React.useState(null);
1212
+ const showCollapsed = items.length > maxItems;
1213
+ const visibleItems = showCollapsed ? [items[0], ...items.slice(-2)] : items;
1214
+ const collapsedItems = showCollapsed ? items.slice(1, -2) : [];
1215
+ // function
1216
+ const handleMenuOpen = (event) => {
1217
+ setAnchorEl(event.currentTarget);
1218
+ };
1219
+ const handleMenuClose = () => {
1220
+ setAnchorEl(null);
1221
+ };
1222
+ const renderItem = (item) => {
1223
+ const isActive = item.id === idSelect;
1224
+ return (jsxRuntime.jsxs(material.Link, { href: item.href, onClick: (e) => {
1225
+ if (item.onClick) {
1226
+ e.preventDefault();
1227
+ item.onClick();
1228
+ }
1229
+ if (onChange) {
1230
+ onChange(item.id);
1231
+ }
1232
+ }, sx: {
1233
+ display: 'flex',
1234
+ alignItems: 'center',
1235
+ gap: GAP_ICON_CONTENT_BY_SIZE.medium,
1236
+ ...TYPOGRAPHY_STYLES.textSm.semiBold,
1237
+ color: isActive ? '#000000' : '#676E76',
1238
+ cursor: 'pointer',
1239
+ textDecoration: 'none',
1240
+ ...sxItem,
1241
+ }, children: [item.icon && jsxRuntime.jsx(IconElement, { icon: item.icon }), item.label] }, item.id));
1242
+ };
1243
+ const renderSeparator = () => jsxRuntime.jsx(ImageElement, { sx: { width: 14, height: 14 }, url: SEPARATOR_URLS[separator] });
1244
+ return (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx(material.Breadcrumbs, { "aria-label": "breadcrumb", sx: { ...sx }, children: showCollapsed ? (jsxRuntime.jsxs(StackRowAlignCenter, { sx: { gap: GAP_ICON_CONTENT_BY_SIZE.small }, children: [renderItem(items[0]), renderSeparator(), jsxRuntime.jsx(material.IconButton, { size: "small", onClick: handleMenuOpen, sx: { p: 0, mt: 'auto' }, children: jsxRuntime.jsx(IconElement, { icon: "more_horiz" }) }), renderSeparator(), visibleItems.slice(1).map((item, idx) => (jsxRuntime.jsxs(React.Fragment, { children: [idx > 0 && renderSeparator(), renderItem(item)] }, item.id)))] })) : (items.map((item) => renderItem(item))) }), jsxRuntime.jsx(material.Menu, { anchorEl: anchorEl, open: Boolean(anchorEl), onClose: handleMenuClose, disableScrollLock: true, children: collapsedItems.map((item) => {
1245
+ const isActive = item.id === idSelect;
1246
+ return (jsxRuntime.jsxs(material.MenuItem, { onClick: () => {
1247
+ if (item.onClick) {
1248
+ item.onClick();
1249
+ }
1250
+ handleMenuClose();
1251
+ }, sx: {
1252
+ gap: GAP_ICON_CONTENT_BY_SIZE.medium,
1253
+ color: isActive ? '#0F766E' : '#111827',
1254
+ bgcolor: isActive ? '#E0F2FE' : 'transparent',
1255
+ }, children: [item.icon && jsxRuntime.jsx(IconElement, { icon: item.icon }), item.label] }, item.id));
1256
+ }) })] }));
1257
+ };
1258
+
1205
1259
  /** Shade values mapping */
1206
1260
  const SHADE_VALUES = {
1207
1261
  light: 100,
@@ -1342,6 +1396,17 @@ const ButtonComponent = ({ variant = 'solid', color = 'brand', shade = 'dark', s
1342
1396
  return (jsxRuntime.jsx(material.Button, { sx: { ...buttonSx, ...sx }, disabled: disabled || loading, fullWidth: fullWidth, startIcon: !isIconOnly ? prefixContent : undefined, endIcon: !isIconOnly ? suffixContent : undefined, ...props, children: isIconOnly ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [prefixContent, suffixContent] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [activeDot, children] })) }));
1343
1397
  };
1344
1398
 
1399
+ const ButtonBarComponent = ({ layout, children, gap = 12, style }) => {
1400
+ const containerStyle = {
1401
+ display: 'flex',
1402
+ flexDirection: layout === 'horizontal' ? 'row' : 'column',
1403
+ gap: `${gap}px`,
1404
+ alignItems: layout === 'horizontal' ? 'center' : 'stretch',
1405
+ ...style,
1406
+ };
1407
+ return jsxRuntime.jsx("div", { style: containerStyle, children: children });
1408
+ };
1409
+
1345
1410
  const CHECKBOX_COLORS = {
1346
1411
  default: {
1347
1412
  border: '#D0D5DD',
@@ -1505,26 +1570,540 @@ const CheckboxContentComponent = ({ checked = false, disabled = false, title, co
1505
1570
  }, children: content }))] })] }));
1506
1571
  };
1507
1572
 
1508
- var BorderRadius;
1573
+ const CHIP_ICON_SIZE = {
1574
+ small: '16px',
1575
+ medium: '18px',
1576
+ large: '22px',
1577
+ };
1578
+ const CHIP_LABEL_PADDING = {
1579
+ WITH_ICON_LEFT: '4px 8px 4px 4px',
1580
+ WITH_ICON_RIGHT: '4px 4px 4px 8px',
1581
+ NO_ICON: '4px 8px',
1582
+ };
1583
+ const CHIP_SIZE_CONFIG = {
1584
+ small: {
1585
+ height: 24,
1586
+ fontSize: '12px',
1587
+ borderRadius: '12px',
1588
+ iconSize: '16px',
1589
+ },
1590
+ medium: {
1591
+ height: 32,
1592
+ fontSize: '14px',
1593
+ borderRadius: '16px',
1594
+ iconSize: '18px',
1595
+ },
1596
+ large: {
1597
+ height: 40,
1598
+ fontSize: '16px',
1599
+ borderRadius: '20px',
1600
+ iconSize: '22px',
1601
+ },
1602
+ };
1603
+
1604
+ const getLabelPadding = (hasIcon, position) => {
1605
+ if (!hasIcon)
1606
+ return CHIP_LABEL_PADDING.NO_ICON;
1607
+ return position === 'left' ? CHIP_LABEL_PADDING.WITH_ICON_LEFT : CHIP_LABEL_PADDING.WITH_ICON_RIGHT;
1608
+ };
1609
+ const ChipIcon = ({ icon, size, sxIcon }) => (jsxRuntime.jsx(material.Box, { sx: {
1610
+ display: 'inline-flex',
1611
+ alignItems: 'center',
1612
+ justifyContent: 'center',
1613
+ borderRadius: '50%',
1614
+ padding: '2px',
1615
+ '& svg': {
1616
+ width: size,
1617
+ height: size,
1618
+ display: 'block',
1619
+ },
1620
+ ...sxIcon,
1621
+ }, children: icon }));
1622
+ const ChipComponent = ({ label, onAction, icon, disabled = false, clickable = true, sx, sxIcon, iconPosition = 'right', size = 'medium', }) => {
1623
+ const sizeConfig = CHIP_SIZE_CONFIG[size];
1624
+ const hasIcon = Boolean(icon);
1625
+ return (jsxRuntime.jsx(material.Chip, { disabled: disabled, clickable: clickable, onClick: onAction, label: jsxRuntime.jsxs(StackRowAlignCenter, { sx: { gap: '8px' }, children: [hasIcon && iconPosition === 'left' && jsxRuntime.jsx(ChipIcon, { icon: icon, size: sizeConfig.iconSize, sxIcon: sxIcon }), jsxRuntime.jsx(material.Box, { component: "span", children: label }), hasIcon && iconPosition === 'right' && jsxRuntime.jsx(ChipIcon, { icon: icon, size: sizeConfig.iconSize, sxIcon: sxIcon })] }), sx: {
1626
+ height: sizeConfig.height,
1627
+ fontSize: sizeConfig.fontSize,
1628
+ borderRadius: sizeConfig.borderRadius,
1629
+ cursor: clickable ? 'pointer' : 'default',
1630
+ backgroundColor: 'transparent',
1631
+ border: '1px solid #D1D5DB',
1632
+ '& .MuiChip-label': {
1633
+ padding: getLabelPadding(hasIcon, iconPosition),
1634
+ display: 'flex',
1635
+ alignItems: 'center',
1636
+ },
1637
+ '& .MuiChip-label svg': {
1638
+ flexShrink: 0,
1639
+ color: '#4B5563',
1640
+ },
1641
+ '&.Mui-disabled': {
1642
+ opacity: 0.5,
1643
+ color: '#9E9E9E',
1644
+ },
1645
+ ...sx,
1646
+ } }));
1647
+ };
1648
+
1649
+ const DateFieldComponent = ({ label = 'Label', placeholder = 'DD/MM/YYYY', value, disabled = false, error = false, success = false, errorMessage, successMessage, borderRadius = 6, helperText = '', onChange, locale = 'vi', format = 'DD/MM/YYYY', sx, disablePastDates = false, ...props }) => {
1650
+ // Convert string to Dayjs if needed
1651
+ const dayjsValue = value && typeof value === 'string' ? dayjs(value, format) : value instanceof dayjs ? value : null;
1652
+ const handleDateChange = (date) => {
1653
+ onChange?.(date);
1654
+ };
1655
+ // Disable past dates function
1656
+ const shouldDisableDate = (date) => {
1657
+ if (!disablePastDates)
1658
+ return false;
1659
+ return date.isBefore(dayjs(), 'day');
1660
+ };
1661
+ return (jsxRuntime.jsxs(material.Box, { sx: { ...sx }, children: [label && (jsxRuntime.jsx(material.Typography, { sx: {
1662
+ display: 'block',
1663
+ ...TYPOGRAPHY.textFieldLabel,
1664
+ color: COLOR_GRAY[800],
1665
+ marginBottom: '4px',
1666
+ }, children: label })), jsxRuntime.jsx(LocalizationProvider.LocalizationProvider, { dateAdapter: AdapterDayjs.AdapterDayjs, adapterLocale: locale, children: jsxRuntime.jsx(DatePicker.DatePicker, { value: dayjsValue, onChange: handleDateChange, disabled: disabled, format: format, shouldDisableDate: shouldDisableDate, slotProps: {
1667
+ textField: {
1668
+ placeholder,
1669
+ error: error || false,
1670
+ helperText: error ? errorMessage : helperText,
1671
+ size: 'small',
1672
+ fullWidth: true,
1673
+ disabled: disabled,
1674
+ },
1675
+ openPickerButton: {
1676
+ size: 'small',
1677
+ },
1678
+ }, slots: {
1679
+ openPickerIcon: (props) => jsxRuntime.jsx(IconElement, { icon: "calendar_today", ...props }),
1680
+ }, sx: {
1681
+ width: '100%',
1682
+ '& .MuiPickersInputBase-root': {
1683
+ borderRadius: borderRadius === 'max' ? '100px' : `${borderRadius}px`,
1684
+ '& fieldset': { borderColor: COLOR_NEUTRAL[300] },
1685
+ '&:hover fieldset': { borderColor: COLOR_NEUTRAL[400] },
1686
+ '&.Mui-focused fieldset': { borderColor: COLOR_NEUTRAL[300], borderWidth: '2px' },
1687
+ '&.Mui-focused': {
1688
+ boxShadow: '0 1px 2px 0 rgba(10, 13, 18, 0.05), 0 0 0 4px #FEE4E2',
1689
+ },
1690
+ '&.Mui-disabled': {
1691
+ backgroundColor: COLOR_NEUTRAL[100],
1692
+ '& fieldset': { borderColor: COLOR_NEUTRAL[200] },
1693
+ '& input': { color: COLOR_NEUTRAL[400], WebkitTextFillColor: COLOR_NEUTRAL[400] },
1694
+ },
1695
+ '&.Mui-error fieldset': { borderColor: COLOR_ERROR[500] },
1696
+ '&.Mui-error.Mui-focused fieldset': { borderColor: COLOR_ERROR[500], borderWidth: '2px' },
1697
+ '&.Mui-error.Mui-focused': {
1698
+ boxShadow: `0 1px 2px 0 rgba(10, 13, 18, 0.05), 0 0 0 4px rgba(255, 66, 79, 0.15)`,
1699
+ },
1700
+ ...(success && {
1701
+ '&.Mui-focused': {
1702
+ boxShadow: `0 1px 2px 0 rgba(10, 13, 18, 0.05), 0 0 0 4px ${COLOR_SUCCESS[100]}`,
1703
+ },
1704
+ }),
1705
+ },
1706
+ '& .MuiInputBase-input': {
1707
+ ...TYPOGRAPHY.text14Regular,
1708
+ padding: '12px 8px',
1709
+ color: COLOR_GRAY[900],
1710
+ '&::placeholder': { color: COLOR_NEUTRAL[400], opacity: 0.7 },
1711
+ },
1712
+ }, ...props }) }), success && !error && successMessage && (jsxRuntime.jsx(material.Typography, { sx: {
1713
+ ...TYPOGRAPHY.textFieldHelper,
1714
+ color: COLOR_SUCCESS[500],
1715
+ marginTop: '4px',
1716
+ }, children: successMessage }))] }));
1717
+ };
1718
+
1719
+ const DateRangePickerComponent = ({ label = 'Date Range', fromDate, toDate, disabled = false, error = false, success = false, errorMessage, successMessage, borderRadius = 6, helperText = '', onChange, locale = 'vi', format = 'DD/MM/YYYY', minDate, maxDate, sx, disablePastDates = false, ...props }) => {
1720
+ // Convert string to Dayjs if needed
1721
+ const dayjsFromDate = fromDate && typeof fromDate === 'string' ? dayjs(fromDate, format) : fromDate instanceof dayjs ? fromDate : null;
1722
+ const dayjsToDate = toDate && typeof toDate === 'string' ? dayjs(toDate, format) : toDate instanceof dayjs ? toDate : null;
1723
+ // State for picker
1724
+ const [pickerOpen, setPickerOpen] = React.useState(false);
1725
+ const [selectingPhase, setSelectingPhase] = React.useState('from');
1726
+ const inputRef = React.useRef(null);
1727
+ // Disable past dates function
1728
+ const shouldDisableDate = (date) => {
1729
+ if (!disablePastDates)
1730
+ return false;
1731
+ return date.isBefore(dayjs(), 'day');
1732
+ };
1733
+ const handleInputClick = () => {
1734
+ setPickerOpen(true);
1735
+ // Only reset to 'from' if both dates are empty (fresh start)
1736
+ if (!dayjsFromDate && !dayjsToDate) {
1737
+ setSelectingPhase('from');
1738
+ }
1739
+ };
1740
+ const handleDateChange = (date) => {
1741
+ if (selectingPhase === 'from') {
1742
+ onChange?.([date, dayjsToDate]);
1743
+ if (date) {
1744
+ // Auto switch to toDate selection
1745
+ setSelectingPhase('to');
1746
+ }
1747
+ }
1748
+ else {
1749
+ onChange?.([dayjsFromDate, date]);
1750
+ // Keep picker open for user to potentially change toDate
1751
+ }
1752
+ };
1753
+ return (jsxRuntime.jsx(LocalizationProvider.LocalizationProvider, { dateAdapter: AdapterDayjs.AdapterDayjs, adapterLocale: locale, children: jsxRuntime.jsxs(material.Box, { sx: { ...sx }, children: [label && (jsxRuntime.jsx(material.Typography, { sx: {
1754
+ display: 'block',
1755
+ ...TYPOGRAPHY.textFieldLabel,
1756
+ color: COLOR_GRAY[800],
1757
+ marginBottom: '4px',
1758
+ }, children: label })), jsxRuntime.jsxs(material.Box, { ref: inputRef, onClick: !disabled ? handleInputClick : undefined, sx: {
1759
+ display: 'flex',
1760
+ alignItems: 'center',
1761
+ gap: '12px',
1762
+ padding: '12px 8px',
1763
+ borderRadius: borderRadius === 'max' ? '100px' : `${borderRadius}px`,
1764
+ border: `1px solid ${error ? COLOR_ERROR[500] : COLOR_NEUTRAL[300]}`,
1765
+ backgroundColor: disabled ? COLOR_NEUTRAL[100] : 'white',
1766
+ cursor: disabled ? 'default' : 'pointer',
1767
+ transition: 'all 0.2s ease',
1768
+ ...(disabled
1769
+ ? {}
1770
+ : {
1771
+ '&:hover': {
1772
+ borderColor: error ? COLOR_ERROR[500] : COLOR_NEUTRAL[400],
1773
+ },
1774
+ }),
1775
+ }, children: [jsxRuntime.jsxs(material.Typography, { sx: {
1776
+ flex: 1,
1777
+ ...TYPOGRAPHY.text14Regular,
1778
+ color: dayjsFromDate || dayjsToDate ? COLOR_GRAY[900] : COLOR_NEUTRAL[400],
1779
+ }, children: [dayjsFromDate ? dayjsFromDate.format(format) : format, " \u2192", ' ', dayjsToDate ? dayjsToDate.format(format) : format] }), jsxRuntime.jsx(material.Box, { sx: {
1780
+ display: 'flex',
1781
+ alignItems: 'center',
1782
+ justifyContent: 'center',
1783
+ width: '24px',
1784
+ height: '24px',
1785
+ color: COLOR_NEUTRAL[400],
1786
+ }, children: jsxRuntime.jsx(IconElement, { icon: "calendar_today" }) })] }), jsxRuntime.jsx(DatePicker.DatePicker, { open: pickerOpen, onOpen: () => setPickerOpen(true), onClose: () => setPickerOpen(false), value: selectingPhase === 'from' ? dayjsFromDate : dayjsToDate, onChange: handleDateChange, disabled: disabled, format: format, minDate: selectingPhase === 'from' ? minDate : dayjsFromDate || minDate, maxDate: selectingPhase === 'to' ? maxDate : dayjsToDate || maxDate, shouldDisableDate: shouldDisableDate, slotProps: {
1787
+ textField: {
1788
+ hidden: true,
1789
+ size: 'small',
1790
+ sx: {
1791
+ display: 'none',
1792
+ },
1793
+ },
1794
+ popper: {
1795
+ anchorEl: inputRef.current,
1796
+ placement: 'bottom-start',
1797
+ },
1798
+ } }), helperText && !error && !success && (jsxRuntime.jsx(material.Typography, { sx: {
1799
+ ...TYPOGRAPHY.textFieldHelper,
1800
+ color: COLOR_NEUTRAL[400],
1801
+ marginTop: '4px',
1802
+ }, children: helperText })), error && errorMessage && (jsxRuntime.jsx(material.Typography, { sx: {
1803
+ ...TYPOGRAPHY.textFieldHelper,
1804
+ color: COLOR_ERROR[500],
1805
+ marginTop: '4px',
1806
+ }, children: errorMessage })), success && !error && successMessage && (jsxRuntime.jsx(material.Typography, { sx: {
1807
+ ...TYPOGRAPHY.textFieldHelper,
1808
+ color: COLOR_SUCCESS[500],
1809
+ marginTop: '4px',
1810
+ }, children: successMessage }))] }) }));
1811
+ };
1812
+
1813
+ const DropdownFieldComponent = ({ label = '', placeholder = 'Select option', value = null, disabled = false, error = false, success = false, errorMessage, successMessage, borderRadius = 6, onChange, helperText = '', options = [], checkIconColor = COLOR_ACCENT[900], sx, }) => {
1814
+ const borderRadiusValue = borderRadius === 'max' ? '100px' : `${borderRadius}px`;
1815
+ const selectedOption = React.useMemo(() => options.find((opt) => opt.value === value), [options, value]);
1816
+ const getHelperText = React.useCallback(() => {
1817
+ if (error && errorMessage)
1818
+ return errorMessage;
1819
+ if (success && successMessage)
1820
+ return successMessage;
1821
+ if (helperText)
1822
+ return helperText;
1823
+ return '';
1824
+ }, [error, errorMessage, success, successMessage, helperText]);
1825
+ const getHelperTextColor = React.useCallback(() => {
1826
+ if (error)
1827
+ return COLOR_ERROR[500];
1828
+ if (success)
1829
+ return COLOR_SUCCESS[500];
1830
+ return COLOR_NEUTRAL[400];
1831
+ }, [error, success]);
1832
+ const getBorderColor = React.useCallback(() => {
1833
+ if (error)
1834
+ return COLOR_ERROR[500];
1835
+ if (success)
1836
+ return COLOR_SUCCESS[500];
1837
+ return COLOR_NEUTRAL[300];
1838
+ }, [error, success]);
1839
+ const selectSx = React.useMemo(() => ({
1840
+ '& .MuiOutlinedInput-root': {
1841
+ borderRadius: borderRadiusValue,
1842
+ backgroundColor: disabled ? COLOR_NEUTRAL[100] : 'white',
1843
+ transition: 'all 0.2s ease',
1844
+ '& fieldset': {
1845
+ borderColor: getBorderColor(),
1846
+ },
1847
+ '&:hover fieldset': {
1848
+ borderColor: disabled ? getBorderColor() : error ? COLOR_ERROR[500] : COLOR_NEUTRAL[400],
1849
+ },
1850
+ '&.Mui-focused fieldset': {
1851
+ borderColor: error ? COLOR_ERROR[500] : COLOR_NEUTRAL[400],
1852
+ borderWidth: '1.5px',
1853
+ },
1854
+ },
1855
+ '& .MuiOutlinedInput-input': {
1856
+ padding: '12px 14px',
1857
+ color: COLOR_GRAY[900],
1858
+ '&::placeholder': {
1859
+ color: COLOR_NEUTRAL[400],
1860
+ opacity: 1,
1861
+ },
1862
+ },
1863
+ }), [borderRadiusValue, disabled, error, getBorderColor]);
1864
+ return (jsxRuntime.jsxs(material.Box, { sx: { ...sx }, children: [label && (jsxRuntime.jsx(material.Typography, { sx: {
1865
+ display: 'block',
1866
+ ...TYPOGRAPHY.textFieldLabel,
1867
+ color: COLOR_GRAY[800],
1868
+ marginBottom: '4px',
1869
+ }, children: label })), jsxRuntime.jsx(material.Select, { fullWidth: true, value: value || '', onChange: (e) => {
1870
+ const selectedValue = e.target.value;
1871
+ const matchedOption = options.find((opt) => String(opt.value) === String(selectedValue));
1872
+ if (matchedOption) {
1873
+ onChange?.(matchedOption.value);
1874
+ }
1875
+ }, disabled: disabled, displayEmpty: true, MenuProps: {
1876
+ disableScrollLock: true,
1877
+ }, renderValue: () => {
1878
+ if (!value) {
1879
+ return (jsxRuntime.jsx(material.Box, { sx: { color: COLOR_NEUTRAL[400], display: 'flex', alignItems: 'center', gap: '8px' }, children: placeholder }));
1880
+ }
1881
+ return (jsxRuntime.jsxs(material.Box, { sx: { display: 'flex', alignItems: 'center', gap: '8px' }, children: [selectedOption?.statusIndicator && (jsxRuntime.jsx(material.Box, { sx: {
1882
+ width: '8px',
1883
+ height: '8px',
1884
+ borderRadius: '50%',
1885
+ backgroundColor: '#4CAF50',
1886
+ } })), selectedOption?.avatar && (jsxRuntime.jsx(material.Avatar, { src: selectedOption.avatar, sx: {
1887
+ width: '24px',
1888
+ height: '24px',
1889
+ fontSize: '12px',
1890
+ } })), selectedOption?.icon && jsxRuntime.jsx(IconElement, { icon: selectedOption.icon }), jsxRuntime.jsx(material.Typography, { sx: { color: COLOR_GRAY[900], ...TYPOGRAPHY.text14Regular }, children: selectedOption?.label })] }));
1891
+ }, sx: selectSx, children: options.map((option) => (jsxRuntime.jsx(material.MenuItem, { value: option.value, children: jsxRuntime.jsxs(material.Box, { sx: { display: 'flex', alignItems: 'center', gap: '8px', width: '100%' }, children: [option.statusIndicator && (jsxRuntime.jsx(material.Box, { sx: {
1892
+ width: '8px',
1893
+ height: '8px',
1894
+ borderRadius: '50%',
1895
+ backgroundColor: '#4CAF50',
1896
+ } })), option.avatar && (jsxRuntime.jsx(material.Avatar, { src: option.avatar, sx: {
1897
+ width: '24px',
1898
+ height: '24px',
1899
+ fontSize: '12px',
1900
+ } })), option.icon && jsxRuntime.jsx(IconElement, { icon: option.icon }), jsxRuntime.jsx(material.Typography, { sx: { color: COLOR_GRAY[900], ...TYPOGRAPHY.text14Regular }, children: option.label }), value === option.value && (jsxRuntime.jsx(material.Box, { sx: { marginLeft: 'auto', display: 'flex', alignItems: 'center' }, children: jsxRuntime.jsx(IconElement, { icon: "check", sx: { color: checkIconColor } }) }))] }) }, option.value))) }), getHelperText() && (jsxRuntime.jsx(material.Box, { sx: {
1901
+ color: getHelperTextColor(),
1902
+ marginTop: '4px',
1903
+ ...TYPOGRAPHY.textFieldHelper,
1904
+ }, children: getHelperText() }))] }));
1905
+ };
1906
+
1907
+ const BACKGROUND_COLOR_GRID = '#FFFFFF';
1908
+ const COLOR_CONTENT_GRID = '#27272A';
1909
+ const BORDER_RADIUS_GRID_CONTAINER = 8;
1910
+ const BORDER_RADIUS_GRID = 4;
1911
+ const GridComponent = ({ sx = {}, sxContainer = {}, content = 'Grids', children, }) => {
1912
+ return (jsxRuntime.jsxs(material.Stack, { sx: {
1913
+ bgcolor: BACKGROUND_COLOR_GRID,
1914
+ p: BORDER_RADIUS_GRID_CONTAINER,
1915
+ borderRadius: BORDER_RADIUS_GRID_CONTAINER,
1916
+ gap: BORDER_RADIUS_GRID,
1917
+ ...sx,
1918
+ }, children: [content && (jsxRuntime.jsx(material.Typography, { sx: {
1919
+ color: COLOR_CONTENT_GRID,
1920
+ ...TYPOGRAPHY_STYLES.lg.bold,
1921
+ }, children: content })), jsxRuntime.jsx(material.Container, { maxWidth: false, sx: {
1922
+ bgcolor: BACKGROUND_COLOR_GRID,
1923
+ borderRadius: BORDER_RADIUS_GRID,
1924
+ minHeight: 400,
1925
+ boxShadow: '0 0 8px -4px rgba(16, 24, 40, 0.3)',
1926
+ ...sxContainer,
1927
+ }, children: children })] }));
1928
+ };
1929
+
1930
+ exports.BorderRadius = void 0;
1509
1931
  (function (BorderRadius) {
1510
1932
  BorderRadius["SQUARE"] = "4px";
1511
1933
  BorderRadius["CIRCLE"] = "20px";
1512
- })(BorderRadius || (BorderRadius = {}));
1513
- var ShapeType;
1934
+ })(exports.BorderRadius || (exports.BorderRadius = {}));
1935
+ exports.ShapeType = void 0;
1514
1936
  (function (ShapeType) {
1515
1937
  ShapeType["SQUARE"] = "square";
1516
1938
  ShapeType["CIRCLE"] = "circle";
1517
- })(ShapeType || (ShapeType = {}));
1518
- var Orientation;
1939
+ })(exports.ShapeType || (exports.ShapeType = {}));
1940
+ exports.Orientation = void 0;
1519
1941
  (function (Orientation) {
1520
1942
  Orientation["HORIZONTAL"] = "horizontal";
1521
1943
  Orientation["VERTICAL"] = "vertical";
1522
- })(Orientation || (Orientation = {}));
1523
- var ButtonSize;
1944
+ })(exports.Orientation || (exports.Orientation = {}));
1945
+ exports.ButtonSize = void 0;
1524
1946
  (function (ButtonSize) {
1525
1947
  ButtonSize[ButtonSize["SMALL"] = 32] = "SMALL";
1526
1948
  ButtonSize[ButtonSize["MEDIUM"] = 40] = "MEDIUM";
1527
- })(ButtonSize || (ButtonSize = {}));
1949
+ })(exports.ButtonSize || (exports.ButtonSize = {}));
1950
+ const Colors = {
1951
+ BORDER_COLOR_BUTTON: '#07554B',
1952
+ BORDER_COLOR_DISABLE: '#0000000D',
1953
+ HOVER_BG_COLOR: 'rgba(7, 85, 75, 0.04)',
1954
+ BACKGROUND_COLOR: '#FFFFFF',
1955
+ TEXT_COLOR_READONLY: '#27272A',
1956
+ };
1957
+ const FONT_SIZE_LOADING = {
1958
+ large: 40,
1959
+ };
1960
+ const BORDER_TEXT_FIELD_LOADING = 20;
1961
+ const FONT_SIZE_ICON = {
1962
+ small: 12,
1963
+ xl: 20,
1964
+ };
1965
+
1966
+ const InputStepperSkeleton = ({ orientation, buttonShape }) => {
1967
+ return (jsxRuntime.jsxs(material.Box, { display: "inline-flex", flexDirection: orientation === exports.Orientation.HORIZONTAL ? 'row' : 'column', alignItems: "center", gap: 1, children: [jsxRuntime.jsx(material.Skeleton, { variant: buttonShape === exports.ShapeType.CIRCLE ? 'circular' : 'rectangular', width: FONT_SIZE_LOADING.large, height: FONT_SIZE_LOADING.large, sx: {
1968
+ borderRadius: buttonShape === exports.ShapeType.CIRCLE ? exports.BorderRadius.CIRCLE : exports.BorderRadius.SQUARE,
1969
+ maxHeight: FONT_SIZE_LOADING.large,
1970
+ } }), jsxRuntime.jsx(material.Skeleton, { width: FONT_SIZE_LOADING.large, sx: {
1971
+ borderRadius: `${BORDER_TEXT_FIELD_LOADING}px`,
1972
+ } }), jsxRuntime.jsx(material.Skeleton, { variant: buttonShape === exports.ShapeType.CIRCLE ? 'circular' : 'rectangular', width: FONT_SIZE_LOADING.large, height: FONT_SIZE_LOADING.large, sx: {
1973
+ borderRadius: buttonShape === exports.ShapeType.CIRCLE ? exports.BorderRadius.CIRCLE : exports.BorderRadius.SQUARE,
1974
+ maxHeight: FONT_SIZE_LOADING.large,
1975
+ } })] }));
1976
+ };
1977
+
1978
+ const InputStepperComponent = ({ value: controlledValue, onChange, min, max, step = 1, disabled = false, readOnly = false, orientation = exports.Orientation.HORIZONTAL, loading = false, sx = {}, sxTextField = {}, // style cho input chứa value
1979
+ sxButton = {}, // style cho 2 button
1980
+ buttonShape = exports.ShapeType.SQUARE, buttonColor, textFieldShape = exports.ShapeType.SQUARE, decrementIcon = jsxRuntime.jsx(RemoveIcon, {}), incrementIcon = jsxRuntime.jsx(AddIcon, {}), }) => {
1981
+ const [internalValue, setInternalValue] = React.useState(controlledValue ?? min ?? 0);
1982
+ const value = controlledValue !== undefined ? controlledValue : internalValue;
1983
+ const updateValue = (newValue) => {
1984
+ let finalValue = newValue;
1985
+ if (min !== undefined && newValue < min)
1986
+ finalValue = min;
1987
+ if (max !== undefined && newValue > max)
1988
+ finalValue = max;
1989
+ if (controlledValue === undefined) {
1990
+ setInternalValue(finalValue);
1991
+ }
1992
+ onChange?.(finalValue);
1993
+ };
1994
+ const handleIncrement = () => {
1995
+ updateValue(Number(value) + step);
1996
+ };
1997
+ const handleDecrement = () => {
1998
+ updateValue(Number(value) - step);
1999
+ };
2000
+ const handleInputChange = (event) => {
2001
+ if (!readOnly) {
2002
+ const newValue = event.target.value === '' ? min || 0 : Number(event.target.value);
2003
+ if (!isNaN(newValue)) {
2004
+ updateValue(newValue);
2005
+ }
2006
+ }
2007
+ };
2008
+ const isDecrementDisabled = disabled || (min !== undefined && Number(value) <= min);
2009
+ const isIncrementDisabled = disabled || (max !== undefined && Number(value) >= max);
2010
+ const buttonSize = exports.ButtonSize.MEDIUM;
2011
+ if (loading) {
2012
+ return jsxRuntime.jsx(InputStepperSkeleton, { orientation: orientation, buttonShape: buttonShape });
2013
+ }
2014
+ return (jsxRuntime.jsxs(material.Box, { display: "inline-flex", flexDirection: orientation === 'horizontal' ? 'row' : 'column', alignItems: "center", gap: PADDING_GAP_ITEM, sx: {
2015
+ opacity: disabled ? 0.5 : 1,
2016
+ pointerEvents: disabled ? 'none' : 'auto',
2017
+ ...sx,
2018
+ }, children: [jsxRuntime.jsx(material.IconButton, { onClick: handleDecrement, disabled: isDecrementDisabled, sx: {
2019
+ borderRadius: buttonShape === 'circle' ? exports.BorderRadius.CIRCLE : exports.BorderRadius.SQUARE,
2020
+ width: buttonSize,
2021
+ height: buttonSize,
2022
+ padding: PADDING_GAP_ITEM,
2023
+ border: isDecrementDisabled
2024
+ ? `1px solid ${Colors.BORDER_COLOR_DISABLE}`
2025
+ : `1px solid ${Colors.BORDER_COLOR_BUTTON}`,
2026
+ backgroundColor: Colors.BACKGROUND_COLOR,
2027
+ color: buttonColor || Colors.BORDER_COLOR_BUTTON,
2028
+ '&:hover': {
2029
+ backgroundColor: Colors.HOVER_BG_COLOR,
2030
+ },
2031
+ ...(isDecrementDisabled ? {} : sxButton),
2032
+ }, children: decrementIcon }), jsxRuntime.jsx(material.TextField, { value: value, onChange: handleInputChange, disabled: disabled, inputProps: {
2033
+ min,
2034
+ max,
2035
+ step,
2036
+ readOnly,
2037
+ }, type: "number", sx: {
2038
+ minWidth: buttonSize,
2039
+ width: sxTextField?.width || buttonSize,
2040
+ minHeight: buttonSize,
2041
+ height: sxTextField?.height || buttonSize,
2042
+ overflow: 'hidden',
2043
+ borderRadius: textFieldShape === 'circle' ? exports.BorderRadius.CIRCLE : exports.BorderRadius.SQUARE,
2044
+ color: readOnly ? Colors.TEXT_COLOR_READONLY : '',
2045
+ backgroundColor: readOnly ? 'transparent !important' : sxTextField?.backgroundColor,
2046
+ '& .MuiOutlinedInput-root': {
2047
+ width: '100%',
2048
+ height: '100%',
2049
+ borderRadius: 'inherit',
2050
+ '& fieldset': {
2051
+ borderColor: readOnly || disabled ? 'transparent' : sxTextField?.borderColor || Colors.BORDER_COLOR_BUTTON,
2052
+ borderWidth: readOnly || disabled ? 0 : 1,
2053
+ borderRadius: textFieldShape === 'circle' ? exports.BorderRadius.CIRCLE : exports.BorderRadius.SQUARE,
2054
+ },
2055
+ '&:hover fieldset': readOnly || disabled
2056
+ ? {}
2057
+ : {
2058
+ borderColor: sxTextField?.borderColorHover || Colors.BORDER_COLOR_BUTTON,
2059
+ },
2060
+ '&.Mui-focused fieldset': readOnly
2061
+ ? {
2062
+ borderColor: 'transparent',
2063
+ borderWidth: 0,
2064
+ }
2065
+ : {
2066
+ borderColor: sxTextField?.borderColorFocused || Colors.BORDER_COLOR_BUTTON,
2067
+ borderWidth: 1,
2068
+ },
2069
+ '&.Mui-disabled fieldset': {
2070
+ borderColor: Colors.BORDER_COLOR_DISABLE,
2071
+ backgroundColor: readOnly ? 'transparent' : Colors.BORDER_COLOR_DISABLE,
2072
+ },
2073
+ },
2074
+ '& input[type=number]::-webkit-outer-spin-button, & input[type=number]::-webkit-inner-spin-button': {
2075
+ WebkitAppearance: 'none',
2076
+ margin: 0,
2077
+ },
2078
+ '& input[type=number]': {
2079
+ MozAppearance: 'textfield',
2080
+ },
2081
+ '& .MuiInputBase-input': {
2082
+ textAlign: sxTextField?.textAlign || 'center',
2083
+ padding: sxTextField?.padding || '4px 8px',
2084
+ fontSize: readOnly ? '16px' : sxTextField?.fontSize || '1rem',
2085
+ cursor: readOnly ? 'not-allowed' : 'text',
2086
+ borderRadius: 'inherit',
2087
+ backgroundColor: readOnly ? 'transparent' : sxTextField?.backgroundColor || 'transparent',
2088
+ color: readOnly ? Colors.TEXT_COLOR_READONLY : sxTextField?.color || 'inherit',
2089
+ fontWeight: sxTextField?.fontWeight || (readOnly ? 700 : 'normal'),
2090
+ },
2091
+ } }), jsxRuntime.jsx(material.IconButton, { onClick: handleIncrement, disabled: isIncrementDisabled, sx: {
2092
+ borderRadius: buttonShape === 'circle' ? exports.BorderRadius.CIRCLE : exports.BorderRadius.SQUARE,
2093
+ width: buttonSize,
2094
+ height: buttonSize,
2095
+ padding: PADDING_GAP_ITEM,
2096
+ border: isIncrementDisabled
2097
+ ? `1px solid ${Colors.BORDER_COLOR_DISABLE}`
2098
+ : `1px solid ${Colors.BORDER_COLOR_BUTTON}`,
2099
+ backgroundColor: Colors.BACKGROUND_COLOR,
2100
+ color: buttonColor || Colors.BORDER_COLOR_BUTTON,
2101
+ '&:hover': {
2102
+ backgroundColor: Colors.HOVER_BG_COLOR,
2103
+ },
2104
+ ...(isIncrementDisabled ? {} : sxButton),
2105
+ }, children: incrementIcon })] }));
2106
+ };
1528
2107
 
1529
2108
  const LinkInternalElement = ({ content, onClick, sx = {} }) => {
1530
2109
  return (jsxRuntime.jsx(material.Typography, { onClick: onClick, sx: {
@@ -1547,7 +2126,7 @@ const LinkElement = ({ onClick, sx = {}, target = '_self', ...rest }) => {
1547
2126
  }, ...rest }));
1548
2127
  };
1549
2128
 
1550
- styles.styled(MuiTextField)(({ theme }) => {
2129
+ const StyledTextField$3 = styles.styled(MuiTextField)(({ theme }) => {
1551
2130
  return {
1552
2131
  '& .MuiOutlinedInput-root': {
1553
2132
  '& fieldset': { borderColor: COLOR_NEUTRAL[300] },
@@ -1589,6 +2168,57 @@ styles.styled(MuiTextField)(({ theme }) => {
1589
2168
  },
1590
2169
  };
1591
2170
  });
2171
+ const LinkFieldComponent = ({ label = 'Website', placeholder = 'www.untitledui.com', value, disabled = false, error = false, success = false, errorMessage, successMessage, borderRadius = 6, helperText = 'This is a hint text to help user.', onChange, protocol = 'http://', iconAfter, sx, ...props }) => {
2172
+ const [validationError, setValidationError] = React.useState(false);
2173
+ const isValidLink = (url) => {
2174
+ if (!url)
2175
+ return true; // Empty is valid (optional field)
2176
+ try {
2177
+ const urlToTest = url.includes('://') ? url : `${protocol}${url}`;
2178
+ new URL(urlToTest);
2179
+ // Kiểm tra domain phải có dấu chấm (ít nhất là có TLD)
2180
+ const hostname = new URL(urlToTest).hostname;
2181
+ if (!hostname || !hostname.includes('.')) {
2182
+ return false;
2183
+ }
2184
+ return true;
2185
+ }
2186
+ catch {
2187
+ return false;
2188
+ }
2189
+ };
2190
+ const handleBlur = (event) => {
2191
+ const inputValue = event.target.value;
2192
+ if (inputValue && !isValidLink(inputValue)) {
2193
+ setValidationError(true);
2194
+ }
2195
+ else {
2196
+ setValidationError(false);
2197
+ }
2198
+ };
2199
+ return (jsxRuntime.jsxs(material.Box, { sx: { ...sx }, children: [label && (jsxRuntime.jsx(material.Typography, { sx: {
2200
+ display: 'block',
2201
+ ...TYPOGRAPHY.textFieldLabel,
2202
+ color: COLOR_GRAY[800],
2203
+ marginBottom: '4px',
2204
+ }, children: label })), jsxRuntime.jsx(StyledTextField$3, { placeholder: placeholder, value: value, disabled: disabled, error: error || validationError, helperText: error || validationError ? (error ? errorMessage : 'đây không phải link') : '', size: "small", fullWidth: true, onChange: onChange, onBlur: handleBlur, InputProps: {
2205
+ startAdornment: (jsxRuntime.jsx(material.InputAdornment, { position: "start", children: jsxRuntime.jsx(material.Typography, { sx: { color: COLOR_NEUTRAL[300], ...TYPOGRAPHY.text14Regular }, children: protocol }) })),
2206
+ endAdornment: (success || error || validationError) && (jsxRuntime.jsx(material.InputAdornment, { position: "end", children: iconAfter ? (iconAfter) : (jsxRuntime.jsx(IconElement, { icon: error || validationError ? 'info' : 'check_circle', sx: { color: error || validationError ? COLOR_ERROR[500] : COLOR_SUCCESS[500] } })) })),
2207
+ }, sx: {
2208
+ '& .MuiOutlinedInput-root': {
2209
+ borderRadius: borderRadius === 'max' ? '100px' : `${borderRadius}px`,
2210
+ ...(success && {
2211
+ '&.Mui-focused': {
2212
+ boxShadow: `0 1px 2px 0 rgba(10, 13, 18, 0.05), 0 0 0 4px ${COLOR_SUCCESS[100]}`,
2213
+ },
2214
+ }),
2215
+ },
2216
+ } }), success && !error && successMessage && (jsxRuntime.jsx(material.Typography, { sx: {
2217
+ ...TYPOGRAPHY.textFieldHelper,
2218
+ color: COLOR_SUCCESS[500],
2219
+ marginTop: '4px',
2220
+ }, children: successMessage }))] }));
2221
+ };
1592
2222
 
1593
2223
  const MODAL_ICON_COLORS = {
1594
2224
  check_circle: '#10B981',
@@ -1698,7 +2328,15 @@ const ModalCardComponent = ({ open, isForm = false, onClose, items, nodeContent,
1698
2328
  }, children: jsxRuntime.jsxs(StackRowAlignCenter, { sx: { width: '100%' }, children: [nodeBottomLeft && jsxRuntime.jsx(material.Box, { sx: { width: '100%' }, children: nodeBottomLeft }), (buttonLeft || buttonCenter || buttonRight) && (jsxRuntime.jsxs(StackRow, { sx: { width: '100%', gap: PADDING_GAP_LAYOUT }, children: [buttonLeft && (jsxRuntime.jsx(material.Box, { sx: { flex: 1 }, children: jsxRuntime.jsx(ButtonComponent, { ...buttonLeft, fullWidth: true }) })), buttonCenter && (jsxRuntime.jsx(material.Box, { sx: { flex: 1 }, children: jsxRuntime.jsx(ButtonComponent, { ...buttonCenter, fullWidth: true }) })), buttonRight && (jsxRuntime.jsx(material.Box, { sx: { flex: 1 }, children: jsxRuntime.jsx(ButtonComponent, { ...buttonRight, fullWidth: true }) }))] }))] }) }))] }) }));
1699
2329
  };
1700
2330
 
1701
- styles.styled(MuiTextField)(({ theme }) => {
2331
+ const CURRENCIES = ['USD', 'EUR', 'GBP', 'JPY', 'AUD', 'CAD', 'CHF', 'CNY', 'VND', 'INR'];
2332
+ // Format number with thousand separators
2333
+ const formatMoneyDisplay = (value) => {
2334
+ if (!value)
2335
+ return '';
2336
+ const numericOnly = value.replace(/\D/g, '');
2337
+ return numericOnly.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
2338
+ };
2339
+ const StyledTextField$2 = styles.styled(MuiTextField)(({ theme }) => {
1702
2340
  return {
1703
2341
  '& .MuiOutlinedInput-root': {
1704
2342
  '& fieldset': { borderColor: COLOR_NEUTRAL[300] },
@@ -1740,8 +2378,64 @@ styles.styled(MuiTextField)(({ theme }) => {
1740
2378
  },
1741
2379
  };
1742
2380
  });
2381
+ const MoneyFieldComponent = ({ label = 'Sale amount', placeholder = '1,000.00', value, disabled = false, error = false, success = false, errorMessage, successMessage, borderRadius = 6, helperText = 'This is a hint text to help user.', onChange, currency = 'USD', onCurrencyChange, iconBefore, optionCurrencies = CURRENCIES, sx, ...props }) => {
2382
+ const [selectedCurrency, setSelectedCurrency] = React.useState(currency);
2383
+ const handleCurrencyChange = (e) => {
2384
+ const newCurrency = e.target.value;
2385
+ setSelectedCurrency(newCurrency);
2386
+ onCurrencyChange?.(newCurrency);
2387
+ };
2388
+ const handleMoneyChange = (e) => {
2389
+ const rawValue = e.target.value.replace(/,/g, '');
2390
+ onChange?.({ ...e, target: { ...e.target, value: rawValue } });
2391
+ };
2392
+ return (jsxRuntime.jsxs(material.Box, { sx: { ...sx }, children: [label && (jsxRuntime.jsx(material.Typography, { sx: {
2393
+ display: 'block',
2394
+ ...TYPOGRAPHY.textFieldLabel,
2395
+ color: COLOR_GRAY[800],
2396
+ marginBottom: '4px',
2397
+ }, children: label })), jsxRuntime.jsx(StyledTextField$2, { placeholder: placeholder, value: formatMoneyDisplay(value), disabled: disabled, error: error, helperText: error ? errorMessage : helperText, size: "small", fullWidth: true, onChange: handleMoneyChange, InputProps: {
2398
+ startAdornment: (jsxRuntime.jsx(material.InputAdornment, { position: "start", children: iconBefore ? iconBefore : jsxRuntime.jsx(AttachMoneyIcon, { sx: { fontSize: '18px', color: COLOR_GRAY[400], mr: 0.5 } }) })),
2399
+ endAdornment: (jsxRuntime.jsx(material.InputAdornment, { position: "end", children: jsxRuntime.jsxs(material.Box, { sx: { display: 'flex', alignItems: 'center', gap: 1 }, children: [(success || error) && (jsxRuntime.jsx(IconElement, { icon: error ? 'info' : 'check_circle', sx: { color: error ? COLOR_ERROR[500] : COLOR_SUCCESS[500] } })), jsxRuntime.jsx(material.Select, { value: selectedCurrency, onChange: handleCurrencyChange, disabled: disabled, variant: "standard", sx: {
2400
+ border: 'none',
2401
+ outline: 'none',
2402
+ '& .MuiSelect-standard': { border: 'none' },
2403
+ '&.MuiInput-underline:before': { borderBottom: 'none' },
2404
+ '&.MuiInput-underline:hover:before': { borderBottom: 'none' },
2405
+ '&.MuiInput-underline:after': { borderBottom: 'none' },
2406
+ minWidth: '70px',
2407
+ fontSize: '14px',
2408
+ color: COLOR_GRAY[500],
2409
+ }, children: optionCurrencies.map((curr) => (jsxRuntime.jsx(material.MenuItem, { value: curr, children: curr }, curr))) })] }) })),
2410
+ }, sx: {
2411
+ '& .MuiOutlinedInput-root': {
2412
+ borderRadius: borderRadius === 'max' ? '100px' : `${borderRadius}px`,
2413
+ ...(success && {
2414
+ '&.Mui-focused': {
2415
+ boxShadow: `0 1px 2px 0 rgba(10, 13, 18, 0.05), 0 0 0 4px ${COLOR_SUCCESS[100]}`,
2416
+ },
2417
+ }),
2418
+ },
2419
+ } }), success && !error && successMessage && (jsxRuntime.jsx(material.Typography, { sx: {
2420
+ ...TYPOGRAPHY.textFieldHelper,
2421
+ color: COLOR_SUCCESS[600],
2422
+ marginTop: '4px',
2423
+ }, children: successMessage }))] }));
2424
+ };
1743
2425
 
1744
- styles.styled(MuiTextField)(({ theme }) => {
2426
+ const COUNTRY_CODES = [
2427
+ { code: 'US', name: 'United States', flag: '🇺🇸', value: '+1' },
2428
+ { code: 'GB', name: 'United Kingdom', flag: '🇬🇧', value: '+44' },
2429
+ { code: 'CA', name: 'Canada', flag: '🇨🇦', value: '+1' },
2430
+ { code: 'AU', name: 'Australia', flag: '🇦🇺', value: '+61' },
2431
+ { code: 'VN', name: 'Vietnam', flag: '🇻🇳', value: '+84' },
2432
+ { code: 'JP', name: 'Japan', flag: '🇯🇵', value: '+81' },
2433
+ { code: 'CN', name: 'China', flag: '🇨🇳', value: '+86' },
2434
+ { code: 'IN', name: 'India', flag: '🇮🇳', value: '+91' },
2435
+ { code: 'DE', name: 'Germany', flag: '🇩🇪', value: '+49' },
2436
+ { code: 'FR', name: 'France', flag: '🇫🇷', value: '+33' },
2437
+ ];
2438
+ const StyledTextField$1 = styles.styled(MuiTextField)(({ theme }) => {
1745
2439
  return {
1746
2440
  '& .MuiOutlinedInput-root': {
1747
2441
  '& fieldset': { borderColor: COLOR_NEUTRAL[300] },
@@ -1783,8 +2477,250 @@ styles.styled(MuiTextField)(({ theme }) => {
1783
2477
  },
1784
2478
  };
1785
2479
  });
2480
+ const PhoneNumberFieldComponent = ({ label = 'Số điện thoại', placeholder = '0123 456 789', value, disabled = false, error = false, success = false, errorMessage, successMessage, borderRadius = 6, helperText, onChange, countryCode = 'US', onCountryCodeChange, countries = COUNTRY_CODES, sx, ...props }) => {
2481
+ const handleCountryChange = (e) => {
2482
+ const newCode = e.target.value;
2483
+ onCountryCodeChange?.(newCode);
2484
+ };
2485
+ return (jsxRuntime.jsxs(material.Box, { sx: { ...sx }, children: [label && (jsxRuntime.jsx(material.Typography, { sx: {
2486
+ display: 'block',
2487
+ ...TYPOGRAPHY.textFieldLabel,
2488
+ color: COLOR_GRAY[800],
2489
+ marginBottom: '4px',
2490
+ }, children: label })), jsxRuntime.jsx(StyledTextField$1, { placeholder: placeholder, value: value, disabled: disabled, error: error, helperText: error ? errorMessage : helperText, size: "small", fullWidth: true, onChange: onChange, InputProps: {
2491
+ startAdornment: (jsxRuntime.jsx(material.InputAdornment, { position: "start", sx: { mr: 0 }, children: jsxRuntime.jsx(material.Select, { value: countryCode, onChange: handleCountryChange, disabled: disabled, variant: "standard", sx: {
2492
+ border: 'none',
2493
+ outline: 'none',
2494
+ '& .MuiSelect-standard': { border: 'none' },
2495
+ '&.MuiInput-underline:before': { borderBottom: 'none' },
2496
+ '&.MuiInput-underline:hover:before': { borderBottom: 'none' },
2497
+ '&.MuiInput-underline:after': { borderBottom: 'none' },
2498
+ minWidth: '50px',
2499
+ fontSize: '14px',
2500
+ color: COLOR_GRAY[500],
2501
+ display: 'flex',
2502
+ alignItems: 'center',
2503
+ gap: 0.5,
2504
+ }, children: countries.map((c) => (jsxRuntime.jsx(material.MenuItem, { value: c.code, children: c.code }, c.code))) }) })),
2505
+ endAdornment: (success || error) && (jsxRuntime.jsx(material.InputAdornment, { position: "end", children: jsxRuntime.jsx(IconElement, { icon: error ? 'info' : 'check_circle', sx: { color: error ? COLOR_ERROR[500] : COLOR_SUCCESS[500] } }) })),
2506
+ }, sx: {
2507
+ '& .MuiOutlinedInput-root': {
2508
+ borderRadius: borderRadius === 'max' ? '100px' : `${borderRadius}px`,
2509
+ ...(success && {
2510
+ '&.Mui-focused': {
2511
+ boxShadow: `0 1px 2px 0 rgba(10, 13, 18, 0.05), 0 0 0 4px ${COLOR_SUCCESS[100]}`,
2512
+ },
2513
+ }),
2514
+ },
2515
+ } }), success && !error && successMessage && (jsxRuntime.jsx(material.Typography, { sx: {
2516
+ ...TYPOGRAPHY.textFieldHelper,
2517
+ color: COLOR_SUCCESS[600],
2518
+ marginTop: '4px',
2519
+ }, children: successMessage }))] }));
2520
+ };
2521
+
2522
+ const PIN_SIZES = {
2523
+ sm: { width: 40, height: 40, fontSize: 18 },
2524
+ md: { width: 48, height: 48, fontSize: 20 },
2525
+ lg: { width: 56, height: 56, fontSize: 24 },
2526
+ };
2527
+ const PIN_SPACING = {
2528
+ sm: 8,
2529
+ md: 12,
2530
+ lg: 16,
2531
+ };
1786
2532
 
1787
- material.styled(material.Autocomplete)(({ theme }) => ({
2533
+ const PINComponent = ({ length = 6, value, onChange, label, error = false, errorMessage, type = 'text', disabled = false, autoFocus = false, onComplete, align = 'left', spacing = 'md', size = 'md', masked = false, borderFocusColor, sx, }) => {
2534
+ const { palette } = material.useTheme();
2535
+ const inputRefs = React.useRef([]);
2536
+ React.useEffect(() => {
2537
+ if (autoFocus && inputRefs.current[0]) {
2538
+ inputRefs.current[0].focus();
2539
+ }
2540
+ }, [autoFocus]);
2541
+ const handleChange = (index, val) => {
2542
+ if (!/^\d*$/.test(val))
2543
+ return;
2544
+ const newValue = value.split('');
2545
+ newValue[index] = val;
2546
+ const updatedValue = newValue.join('').slice(0, length);
2547
+ onChange(updatedValue);
2548
+ if (val && index < length - 1) {
2549
+ inputRefs.current[index + 1]?.focus();
2550
+ }
2551
+ if (updatedValue.length === length) {
2552
+ onComplete?.(updatedValue);
2553
+ }
2554
+ };
2555
+ const handleKeyDown = (index, e) => {
2556
+ if (e.key === 'Backspace' && !value[index] && index > 0) {
2557
+ inputRefs.current[index - 1]?.focus();
2558
+ }
2559
+ };
2560
+ const renderPINDisplay = (index) => {
2561
+ const inputValue = value[index] || '';
2562
+ const isFilled = !!inputValue;
2563
+ const sizeStyle = PIN_SIZES[size];
2564
+ const borderColor = error ? palette.error.main : COLOR_GRAY[200];
2565
+ const borderFocusColorValue = borderFocusColor || (error ? palette.error.main : COLOR_GRAY[900]);
2566
+ if (type === 'bullet') {
2567
+ return (jsxRuntime.jsxs(material.Box, { sx: { position: 'relative', width: sizeStyle.width, height: sizeStyle.height }, children: [jsxRuntime.jsx(material.TextField, { ref: (el) => {
2568
+ const input = el?.querySelector('input');
2569
+ if (input) {
2570
+ inputRefs.current[index] = input;
2571
+ }
2572
+ }, type: "text", inputMode: "numeric", value: inputValue, onChange: (e) => handleChange(index, e.target.value), onKeyDown: (e) => handleKeyDown(index, e), disabled: disabled, error: error, sx: {
2573
+ width: '100%',
2574
+ height: '100%',
2575
+ '& .MuiOutlinedInput-root': {
2576
+ height: '100%',
2577
+ padding: 0,
2578
+ '& input': {
2579
+ textAlign: 'center',
2580
+ fontSize: sizeStyle.fontSize,
2581
+ fontWeight: 600,
2582
+ padding: 0,
2583
+ color: masked && isFilled ? 'transparent' : 'inherit',
2584
+ WebkitTextFillColor: masked && isFilled ? 'transparent' : 'unset',
2585
+ caretColor: palette.primary.main,
2586
+ '&::placeholder': {
2587
+ color: palette.action.disabled,
2588
+ opacity: 1,
2589
+ },
2590
+ },
2591
+ '& fieldset': {
2592
+ borderColor: borderColor,
2593
+ borderRadius: '8px',
2594
+ },
2595
+ '&:hover fieldset': {
2596
+ borderColor: error ? palette.error.main : borderFocusColorValue,
2597
+ },
2598
+ '&.Mui-focused fieldset': {
2599
+ borderColor: borderFocusColorValue,
2600
+ borderWidth: 1,
2601
+ },
2602
+ },
2603
+ '& input': {
2604
+ maxLength: 1,
2605
+ },
2606
+ }, placeholder: "-" }), masked && isFilled && (jsxRuntime.jsx(material.Box, { sx: {
2607
+ position: 'absolute',
2608
+ top: '50%',
2609
+ left: '50%',
2610
+ transform: 'translate(-50%, -50%)',
2611
+ fontSize: sizeStyle.fontSize,
2612
+ fontWeight: 600,
2613
+ color: error ? palette.error.main : palette.text.primary,
2614
+ pointerEvents: 'none',
2615
+ }, children: "\u25CF" }))] }));
2616
+ }
2617
+ if (type === 'circle') {
2618
+ return (jsxRuntime.jsxs(material.Box, { sx: { position: 'relative', width: sizeStyle.width, height: sizeStyle.height }, children: [jsxRuntime.jsx(material.TextField, { ref: (el) => {
2619
+ const input = el?.querySelector('input');
2620
+ if (input) {
2621
+ inputRefs.current[index] = input;
2622
+ }
2623
+ }, type: "text", inputMode: "numeric", value: inputValue, onChange: (e) => handleChange(index, e.target.value), onKeyDown: (e) => handleKeyDown(index, e), disabled: disabled, error: error, sx: {
2624
+ width: '100%',
2625
+ height: '100%',
2626
+ '& .MuiOutlinedInput-root': {
2627
+ height: '100%',
2628
+ padding: 0,
2629
+ borderRadius: '50%',
2630
+ '& input': {
2631
+ textAlign: 'center',
2632
+ fontSize: sizeStyle.fontSize,
2633
+ fontWeight: 600,
2634
+ padding: 0,
2635
+ color: masked && isFilled ? 'transparent' : 'inherit',
2636
+ WebkitTextFillColor: masked && isFilled ? 'transparent' : 'unset',
2637
+ caretColor: palette.primary.main,
2638
+ '&::placeholder': {
2639
+ color: palette.action.disabled,
2640
+ opacity: 1,
2641
+ },
2642
+ },
2643
+ '& fieldset': {
2644
+ borderColor: borderColor,
2645
+ borderRadius: '50%',
2646
+ },
2647
+ '&:hover fieldset': {
2648
+ borderColor: error ? palette.error.main : borderFocusColorValue,
2649
+ },
2650
+ '&.Mui-focused fieldset': {
2651
+ borderColor: borderFocusColorValue,
2652
+ borderWidth: 1,
2653
+ },
2654
+ },
2655
+ '& input': {
2656
+ maxLength: 1,
2657
+ },
2658
+ }, placeholder: "-" }), masked && isFilled && (jsxRuntime.jsx(material.Box, { sx: {
2659
+ position: 'absolute',
2660
+ top: '50%',
2661
+ left: '50%',
2662
+ transform: 'translate(-50%, -50%)',
2663
+ fontSize: sizeStyle.fontSize,
2664
+ fontWeight: 600,
2665
+ color: error ? palette.error.main : palette.text.primary,
2666
+ pointerEvents: 'none',
2667
+ }, children: "\u25CF" }))] }));
2668
+ }
2669
+ // Default text type
2670
+ return (jsxRuntime.jsx(material.TextField, { ref: (el) => {
2671
+ const input = el?.querySelector('input');
2672
+ if (input) {
2673
+ inputRefs.current[index] = input;
2674
+ }
2675
+ }, type: "text", inputMode: "numeric", value: inputValue, onChange: (e) => handleChange(index, e.target.value), onKeyDown: (e) => handleKeyDown(index, e), disabled: disabled, error: error, sx: {
2676
+ width: sizeStyle.width,
2677
+ '& .MuiOutlinedInput-root': {
2678
+ height: sizeStyle.height,
2679
+ padding: 0,
2680
+ '& input': {
2681
+ textAlign: 'center',
2682
+ fontSize: sizeStyle.fontSize,
2683
+ fontWeight: 600,
2684
+ padding: 0,
2685
+ '&::placeholder': {
2686
+ color: palette.action.disabled,
2687
+ opacity: 1,
2688
+ },
2689
+ },
2690
+ '& fieldset': {
2691
+ borderColor: borderColor,
2692
+ },
2693
+ '&:hover fieldset': {
2694
+ borderColor: error ? palette.error.main : borderFocusColorValue,
2695
+ },
2696
+ '&.Mui-focused fieldset': {
2697
+ borderColor: borderFocusColorValue,
2698
+ borderWidth: 1,
2699
+ },
2700
+ },
2701
+ '& input': {
2702
+ maxLength: 1,
2703
+ },
2704
+ }, placeholder: "-" }));
2705
+ };
2706
+ return (jsxRuntime.jsxs(material.Box, { sx: { ...sx }, children: [label && (jsxRuntime.jsx(material.Box, { sx: {
2707
+ mb: 1,
2708
+ fontSize: 14,
2709
+ fontWeight: 500,
2710
+ color: palette.text.primary,
2711
+ }, children: label })), jsxRuntime.jsx(material.Box, { sx: {
2712
+ display: 'flex',
2713
+ gap: `${PIN_SPACING[spacing]}px`,
2714
+ justifyContent: align === 'center' ? 'center' : align === 'right' ? 'flex-end' : 'flex-start',
2715
+ }, children: Array.from({ length }).map((_, index) => (jsxRuntime.jsx(material.Box, { children: renderPINDisplay(index) }, index))) }), error && errorMessage && (jsxRuntime.jsx(material.Box, { sx: {
2716
+ mt: 1,
2717
+ fontSize: 12,
2718
+ color: palette.error.main,
2719
+ textAlign: align,
2720
+ }, children: errorMessage }))] }));
2721
+ };
2722
+
2723
+ const StyledAutocomplete$1 = material.styled(material.Autocomplete)(({ theme }) => ({
1788
2724
  '& .MuiOutlinedInput-root': {
1789
2725
  padding: '8px !important',
1790
2726
  display: 'flex',
@@ -1845,8 +2781,138 @@ material.styled(material.Autocomplete)(({ theme }) => ({
1845
2781
  },
1846
2782
  },
1847
2783
  }));
2784
+ const SearchDropdownComponent = ({ value, onChange, onClear, onInputChange, onSearch, borderRadius = 6, disabled = false, multiple = false, label = '', placeholder = 'Search...', error = false, errorMessage, success = false, successMessage, helperText = '', options = [], loading = false, sx, }) => {
2785
+ const DEBOUNCE_DELAY = 500;
2786
+ const [inputValue, setInputValue] = React.useState('');
2787
+ const [filteredOptions, setFilteredOptions] = React.useState(options);
2788
+ const [isLoading, setIsLoading] = React.useState(false);
2789
+ const debounceTimerRef = React.useRef(null);
2790
+ const onSearchRef = React.useRef(onSearch);
2791
+ const onInputChangeRef = React.useRef(onInputChange);
2792
+ const optionsRef = React.useRef(options);
2793
+ // Update refs when props change
2794
+ React.useEffect(() => {
2795
+ onSearchRef.current = onSearch;
2796
+ onInputChangeRef.current = onInputChange;
2797
+ optionsRef.current = options;
2798
+ }, [onSearch, onInputChange, options]);
2799
+ // Normalize value to array for internal state
2800
+ const selectedValues = React.useMemo(() => {
2801
+ if (!value)
2802
+ return [];
2803
+ const values = Array.isArray(value) ? value : [value];
2804
+ return values.map((v) => (typeof v === 'object' ? v : { label: String(v), value: v }));
2805
+ }, [value]);
2806
+ // Search logic with debounce
2807
+ React.useEffect(() => {
2808
+ if (debounceTimerRef.current) {
2809
+ clearTimeout(debounceTimerRef.current);
2810
+ }
2811
+ // Reset to original options when input is empty
2812
+ if (!inputValue.trim()) {
2813
+ setFilteredOptions(optionsRef.current);
2814
+ return;
2815
+ }
2816
+ debounceTimerRef.current = setTimeout(async () => {
2817
+ const searchFn = onSearchRef.current;
2818
+ if (searchFn) {
2819
+ // Async search
2820
+ setIsLoading(true);
2821
+ try {
2822
+ const results = await searchFn(inputValue);
2823
+ setFilteredOptions(results);
2824
+ }
2825
+ catch (error) {
2826
+ console.error('Search error:', error);
2827
+ setFilteredOptions([]);
2828
+ }
2829
+ finally {
2830
+ setIsLoading(false);
2831
+ }
2832
+ }
2833
+ else {
2834
+ // Local filtering
2835
+ const filtered = optionsRef.current.filter((opt) => opt.label.toLowerCase().includes(inputValue.toLowerCase()));
2836
+ setFilteredOptions(filtered);
2837
+ }
2838
+ onInputChangeRef.current?.(inputValue);
2839
+ }, DEBOUNCE_DELAY);
2840
+ return () => {
2841
+ if (debounceTimerRef.current) {
2842
+ clearTimeout(debounceTimerRef.current);
2843
+ }
2844
+ };
2845
+ }, [inputValue]);
2846
+ const handleInputChange = (event, newInputValue) => {
2847
+ setInputValue(newInputValue);
2848
+ };
2849
+ const handleChange = (event, newValue) => {
2850
+ if (multiple) {
2851
+ const result = Array.isArray(newValue) ? newValue : newValue ? [newValue] : [];
2852
+ onChange?.(result.length > 0 ? result : null);
2853
+ }
2854
+ else {
2855
+ onChange?.(newValue || null);
2856
+ }
2857
+ };
2858
+ const handleClear = () => {
2859
+ setInputValue('');
2860
+ setFilteredOptions(optionsRef.current);
2861
+ onClear?.();
2862
+ };
2863
+ return (jsxRuntime.jsxs(material.Box, { sx: { width: '100%', ...sx }, children: [label && (jsxRuntime.jsx(material.Typography, { variant: "subtitle2", sx: {
2864
+ fontWeight: 500,
2865
+ color: COLOR_GRAY[900],
2866
+ marginBottom: '6px',
2867
+ display: 'block',
2868
+ }, children: label })), jsxRuntime.jsx(StyledAutocomplete$1, { multiple: multiple, freeSolo: true, options: filteredOptions, getOptionLabel: (option) => {
2869
+ if (!option)
2870
+ return '';
2871
+ if (typeof option === 'object' && 'label' in option)
2872
+ return option.label;
2873
+ return String(option);
2874
+ }, isOptionEqualToValue: (option, val) => {
2875
+ if (!option || !val)
2876
+ return false;
2877
+ if (typeof option === 'object' && typeof val === 'object' && 'value' in option && 'value' in val) {
2878
+ return option.value === val.value;
2879
+ }
2880
+ return false;
2881
+ }, value: multiple ? selectedValues : selectedValues[0] || null, inputValue: inputValue, onInputChange: handleInputChange, onChange: handleChange, disabled: disabled || loading, loading: isLoading || loading, noOptionsText: inputValue ? 'No results found' : 'Type to search', sx: {
2882
+ '& .MuiOutlinedInput-root': {
2883
+ borderRadius: borderRadius === 'max' ? '100px' : `${borderRadius}px`,
2884
+ borderColor: error ? COLOR_ERROR[500] : success ? COLOR_SUCCESS[500] : undefined,
2885
+ },
2886
+ }, renderInput: (params) => (jsxRuntime.jsx(material.TextField, { ...params, placeholder: placeholder, variant: "outlined", size: "small", error: error, InputProps: {
2887
+ ...params.InputProps,
2888
+ startAdornment: (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(material.InputAdornment, { position: "start", sx: { marginLeft: '4px', marginRight: '0px' }, children: jsxRuntime.jsx(SearchIcon, { sx: { color: '#999', fontSize: '18px' } }) }), params.InputProps?.startAdornment] })),
2889
+ } })), renderTags: (value, getTagProps) => value.map((option, index) => {
2890
+ const label = typeof option === 'object' && option && 'label' in option ? option.label : String(option);
2891
+ return jsxRuntime.jsx(material.Chip, { ...getTagProps({ index }), label: label, size: "small" });
2892
+ }), renderOption: (props, option) => {
2893
+ const { key, ...otherProps } = props;
2894
+ const label = option?.label || '';
2895
+ return (jsxRuntime.jsx(material.Box, { ...otherProps, component: "li", children: label }, key));
2896
+ }, componentsProps: {
2897
+ clearIndicator: {
2898
+ onClick: handleClear,
2899
+ },
2900
+ } }), error && errorMessage && (jsxRuntime.jsx(material.Box, { sx: {
2901
+ fontSize: '12px',
2902
+ color: COLOR_ERROR[500],
2903
+ marginTop: '4px',
2904
+ }, children: errorMessage })), success && successMessage && (jsxRuntime.jsx(material.Box, { sx: {
2905
+ fontSize: '12px',
2906
+ color: COLOR_SUCCESS[500],
2907
+ marginTop: '4px',
2908
+ }, children: successMessage })), helperText && !error && !success && (jsxRuntime.jsx(material.Box, { sx: {
2909
+ fontSize: '12px',
2910
+ color: COLOR_NEUTRAL[500],
2911
+ marginTop: '4px',
2912
+ }, children: helperText }))] }));
2913
+ };
1848
2914
 
1849
- material.styled(material.Autocomplete)(({ theme }) => ({
2915
+ const StyledAutocomplete = material.styled(material.Autocomplete)(({ theme }) => ({
1850
2916
  '& .MuiOutlinedInput-root': {
1851
2917
  padding: '0 !important',
1852
2918
  display: 'flex',
@@ -1885,6 +2951,45 @@ material.styled(material.Autocomplete)(({ theme }) => ({
1885
2951
  paddingRight: '8px',
1886
2952
  },
1887
2953
  }));
2954
+ const SearchFieldComponent = ({ value, onChange, onClear, onInputChange, borderRadius = 6, disabled = false, placeholder = 'Placeholder', sx, }) => {
2955
+ const DEBOUNCE_DELAY = 1000;
2956
+ const [inputValue, setInputValue] = React.useState('');
2957
+ const debounceTimer = React.useRef(null);
2958
+ React.useEffect(() => {
2959
+ if (debounceTimer.current) {
2960
+ clearTimeout(debounceTimer.current);
2961
+ }
2962
+ debounceTimer.current = setTimeout(() => {
2963
+ onInputChange?.(new Event('debounce'), inputValue, 'debounce');
2964
+ }, DEBOUNCE_DELAY);
2965
+ return () => {
2966
+ if (debounceTimer.current) {
2967
+ clearTimeout(debounceTimer.current);
2968
+ }
2969
+ };
2970
+ }, [inputValue, onInputChange]);
2971
+ const handleInputChange = React.useCallback((event, value) => {
2972
+ setInputValue(value);
2973
+ }, []);
2974
+ const handleClear = React.useCallback(() => {
2975
+ setInputValue('');
2976
+ onClear?.();
2977
+ onInputChange?.(new Event('clear'), '', 'clear');
2978
+ }, [onClear, onInputChange]);
2979
+ return (jsxRuntime.jsx(StyledAutocomplete, { freeSolo: true, options: [], inputValue: inputValue, onInputChange: handleInputChange, disabled: disabled, onChange: onChange, noOptionsText: null, sx: {
2980
+ '& .MuiOutlinedInput-root': {
2981
+ borderRadius: borderRadius === 'max' ? '100px' : `${borderRadius}px`,
2982
+ },
2983
+ ...sx,
2984
+ }, renderInput: (params) => (jsxRuntime.jsx(material.TextField, { ...params, placeholder: placeholder, variant: "outlined", size: "small", InputProps: {
2985
+ ...params.InputProps,
2986
+ startAdornment: (jsxRuntime.jsx(material.InputAdornment, { position: "start", sx: { marginLeft: '8px' }, children: jsxRuntime.jsx(SearchIcon, { sx: { color: '#999', fontSize: '20px' } }) })),
2987
+ } })), componentsProps: {
2988
+ clearIndicator: {
2989
+ onClick: handleClear,
2990
+ },
2991
+ } }));
2992
+ };
1888
2993
 
1889
2994
  const SWITCH_SIZE = {
1890
2995
  small: { width: '36px', height: '20px', thumbSize: '16px' },
@@ -1904,7 +3009,7 @@ const SWITCH_COLORS = {
1904
3009
  thumbFocusColor: '#F4EBFF',
1905
3010
  },
1906
3011
  };
1907
- material.styled(material.Switch, {
3012
+ const StyledSwitch = material.styled(material.Switch, {
1908
3013
  shouldForwardProp: (prop) => prop !== 'size',
1909
3014
  })(({ theme, size = 'medium' }) => {
1910
3015
  const mode = theme.palette.mode;
@@ -1957,16 +3062,262 @@ material.styled(material.Switch, {
1957
3062
  },
1958
3063
  };
1959
3064
  });
3065
+ const SwitchComponent = ({ title, sx, ...switchProps }) => {
3066
+ if (!title) {
3067
+ return jsxRuntime.jsx(StyledSwitch, { disableRipple: true, ...switchProps });
3068
+ }
3069
+ return (jsxRuntime.jsxs(StackRowAlignCenterJustEnd, { sx: {
3070
+ display: 'inline-flex',
3071
+ alignItems: 'center',
3072
+ gap: '12px',
3073
+ ...sx,
3074
+ }, children: [jsxRuntime.jsx(StyledSwitch, { disableRipple: true, ...switchProps }), title] }));
3075
+ };
3076
+
3077
+ const SwitchContentComponent = ({ title, content, checked, disabled, size = 'medium', onChange, sx, }) => {
3078
+ return (jsxRuntime.jsxs(StackRow, { sx: {
3079
+ width: 'fit-content',
3080
+ gap: '12px',
3081
+ maxWidth: '345px',
3082
+ ...sx,
3083
+ }, children: [jsxRuntime.jsx(SwitchComponent, { checked: checked, disabled: disabled, size: size, onChange: onChange }), jsxRuntime.jsxs(material.Box, { children: [jsxRuntime.jsx(material.Typography, { sx: {
3084
+ fontSize: 16,
3085
+ lineHeight: '24px',
3086
+ fontWeight: 500,
3087
+ color: '#344054',
3088
+ }, children: title }), content && (jsxRuntime.jsx(material.Typography, { sx: {
3089
+ mt: 0.5,
3090
+ fontSize: 16,
3091
+ lineHeight: '24px',
3092
+ fontWeight: 400,
3093
+ color: '#667085',
3094
+ }, children: content }))] })] }));
3095
+ };
1960
3096
 
1961
- var TabColors;
3097
+ const TAB_STYLES = {
3098
+ position: 'relative',
3099
+ padding: '18px 16px',
3100
+ cursor: 'pointer',
3101
+ minHeight: 44,
3102
+ '&:hover': {
3103
+ bgcolor: '#F3F4F6',
3104
+ },
3105
+ };
3106
+ const TAB_BACKGROUND_STYLES = {
3107
+ position: 'absolute',
3108
+ top: 0,
3109
+ left: 0,
3110
+ right: 0,
3111
+ bottom: 0,
3112
+ borderRadius: 1,
3113
+ };
3114
+ const TAB_UNDERLINE_STYLES = {
3115
+ width: '1px',
3116
+ alignSelf: 'stretch',
3117
+ bgcolor: '#E5E7EB',
3118
+ };
3119
+ const TABS_CONTAINER_HORIZONTAL = {
3120
+ display: 'flex',
3121
+ alignItems: 'center',
3122
+ borderBottom: '2px solid #E5E7EB',
3123
+ };
3124
+ const TAB_ACTIVE_BACKGROUND_HORIZONTAL = {
3125
+ position: 'absolute',
3126
+ bottom: -2,
3127
+ left: 0,
3128
+ right: 0,
3129
+ height: '2px',
3130
+ bgcolor: '#0F766E',
3131
+ };
3132
+ const TABS_CONTAINER_VERTICAL = {
3133
+ position: 'relative',
3134
+ padding: '10px',
3135
+ cursor: 'pointer',
3136
+ minHeight: 40,
3137
+ '&:hover': {
3138
+ bgcolor: '#F3F4F6',
3139
+ },
3140
+ width: '100%',
3141
+ };
3142
+ const TAB_ACTIVE_BACKGROUND_VERTICAL = {
3143
+ position: 'absolute',
3144
+ inset: 0,
3145
+ bgcolor: '#E6EEED',
3146
+ borderRadius: 1,
3147
+ };
3148
+ exports.TabColors = void 0;
1962
3149
  (function (TabColors) {
1963
3150
  TabColors["ACTIVE_TEXT"] = "#0F766E";
1964
3151
  TabColors["INACTIVE_TEXT"] = "#6B7280";
1965
3152
  TabColors["HOVER_BACKGROUND"] = "#F3F4F6";
1966
3153
  TabColors["MENU_ACTIVE_BACKGROUND"] = "#E0F2FE";
1967
- })(TabColors || (TabColors = {}));
3154
+ })(exports.TabColors || (exports.TabColors = {}));
3155
+
3156
+ const TabsComponent = ({ idSelect, tabs, size, direction = 'row', maxDisplay, onChange, sx, sxTabs, sxWrapper, }) => {
3157
+ // state
3158
+ const [selected, setSelected] = React.useState(idSelect);
3159
+ const [anchorEl, setAnchorEl] = React.useState(null);
3160
+ const layoutGroupId = React.useId();
3161
+ React.useEffect(() => {
3162
+ setSelected(idSelect);
3163
+ }, [idSelect]);
3164
+ const isVertical = direction === 'column';
3165
+ const showOverflow = !isVertical && maxDisplay && tabs.length > maxDisplay;
3166
+ const visibleTabs = showOverflow ? tabs.slice(0, maxDisplay) : tabs;
3167
+ const overflowTabs = showOverflow ? tabs.slice(maxDisplay) : [];
3168
+ // function
3169
+ const handleOpenDropdown = (event) => {
3170
+ setAnchorEl(event.currentTarget);
3171
+ };
3172
+ const handleTabClick = (tab) => {
3173
+ setSelected(tab.id);
3174
+ onChange?.(tab.id);
3175
+ if (tab.onClick) {
3176
+ tab.onClick();
3177
+ }
3178
+ };
3179
+ const handleOverflowItemClick = (tab) => {
3180
+ handleTabClick(tab);
3181
+ setAnchorEl(null);
3182
+ };
3183
+ return (jsxRuntime.jsx(React.Fragment, { children: isVertical ? (jsxRuntime.jsx(framerMotion.LayoutGroup, { id: layoutGroupId, children: jsxRuntime.jsx(material.Stack, { direction: "column", sx: { width: 'fit-content', gap: PADDING_GAP_ITEM_SMALL, ...sxWrapper }, children: tabs.map((tab) => {
3184
+ const isActive = tab.id === selected;
3185
+ return (jsxRuntime.jsx(LinkElement, { href: tab.href, onClick: tab.onClick, id: tab.id, children: jsxRuntime.jsxs(material.Box, { sx: { position: 'relative' }, children: [jsxRuntime.jsx(material.Stack, { component: framerMotion.motion.div, sx: {
3186
+ ...TABS_CONTAINER_VERTICAL,
3187
+ color: isActive ? exports.TabColors.ACTIVE_TEXT : exports.TabColors.INACTIVE_TEXT,
3188
+ }, onTap: () => handleTabClick(tab), children: jsxRuntime.jsxs(material.Box, { sx: {
3189
+ ...TYPOGRAPHY_STYLES.textMd.medium,
3190
+ display: 'flex',
3191
+ alignItems: 'center',
3192
+ gap: tab.icon ? 0.5 : 0,
3193
+ position: 'relative',
3194
+ zIndex: 1,
3195
+ ...sx,
3196
+ }, children: [tab.icon && jsxRuntime.jsx(IconElement, { size: size, icon: tab.icon }), tab.name] }) }), isActive && (jsxRuntime.jsx(material.Box, { component: framerMotion.motion.div, sx: { ...TAB_ACTIVE_BACKGROUND_VERTICAL }, layoutId: `${layoutGroupId}-background` }))] }) }, tab.id));
3197
+ }) }) })) : (jsxRuntime.jsx(framerMotion.LayoutGroup, { id: layoutGroupId, children: jsxRuntime.jsxs(material.Box, { sx: { position: 'relative', display: 'flex', alignItems: 'center' }, children: [jsxRuntime.jsxs(material.Box, { sx: { ...TABS_CONTAINER_HORIZONTAL }, children: [visibleTabs.map((tab) => {
3198
+ const isActive = tab.id === selected;
3199
+ return (jsxRuntime.jsx(LinkElement, { href: tab.href, onClick: tab.onClick, id: tab.id, children: jsxRuntime.jsxs(material.Stack, { component: framerMotion.motion.div, sx: {
3200
+ color: isActive ? exports.TabColors.ACTIVE_TEXT : exports.TabColors.INACTIVE_TEXT,
3201
+ position: 'relative',
3202
+ padding: '18px 16px',
3203
+ cursor: 'pointer',
3204
+ minHeight: 40,
3205
+ '&:hover': {
3206
+ bgcolor: exports.TabColors.HOVER_BACKGROUND,
3207
+ },
3208
+ ...sxTabs,
3209
+ }, onTap: () => handleTabClick(tab), children: [jsxRuntime.jsxs(material.Box, { sx: {
3210
+ ...TYPOGRAPHY_STYLES.textMd.medium,
3211
+ display: 'flex',
3212
+ alignItems: 'center',
3213
+ gap: tab.icon ? 0.5 : 0,
3214
+ ...sx,
3215
+ }, children: [tab.icon && jsxRuntime.jsx(IconElement, { size: size, icon: tab.icon }), tab.name] }), isActive && (jsxRuntime.jsx(material.Box, { component: framerMotion.motion.div, sx: { ...TAB_ACTIVE_BACKGROUND_HORIZONTAL }, layoutId: `${layoutGroupId}-underline` }))] }) }, tab.id));
3216
+ }), showOverflow && (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx(material.Box, { sx: { ...TAB_UNDERLINE_STYLES } }), jsxRuntime.jsx(material.Stack, { sx: {
3217
+ ...TAB_STYLES,
3218
+ }, onClick: handleOpenDropdown, children: jsxRuntime.jsx(IconElement, { icon: "more_horiz", size: size }) })] }))] }), jsxRuntime.jsx(material.Menu, { disableScrollLock: true, anchorEl: anchorEl, open: Boolean(anchorEl), onClose: () => setAnchorEl(null), anchorOrigin: {
3219
+ vertical: 'bottom',
3220
+ horizontal: 'left',
3221
+ }, transformOrigin: {
3222
+ vertical: 'top',
3223
+ horizontal: 'left',
3224
+ }, children: overflowTabs.map((tab) => {
3225
+ const isActive = tab.id === selected;
3226
+ return (jsxRuntime.jsx(material.MenuItem, { onClick: () => handleOverflowItemClick(tab), sx: {
3227
+ color: isActive ? exports.TabColors.ACTIVE_TEXT : exports.TabColors.INACTIVE_TEXT,
3228
+ bgcolor: isActive ? exports.TabColors.MENU_ACTIVE_BACKGROUND : 'transparent',
3229
+ '&:hover': {
3230
+ bgcolor: isActive ? exports.TabColors.MENU_ACTIVE_BACKGROUND : exports.TabColors.HOVER_BACKGROUND,
3231
+ },
3232
+ }, children: jsxRuntime.jsxs(material.Box, { sx: {
3233
+ display: 'flex',
3234
+ alignItems: 'center',
3235
+ gap: tab.icon ? 0.5 : 0,
3236
+ }, children: [tab.icon && jsxRuntime.jsx(IconElement, { size: size, icon: tab.icon }), tab.name] }) }, tab.id));
3237
+ }) })] }) })) }));
3238
+ };
3239
+
3240
+ const TextAreaComponent = ({ label = '', placeholder = '', value = '', disabled = false, error = false, success = false, errorMessage, successMessage, borderRadius = 6, onChange, onBlur, helperText = '', rows = 4, maxLength, sx, }) => {
3241
+ const borderRadiusValue = borderRadius === 'max' ? '100px' : `${borderRadius}px`;
3242
+ const getHelperText = () => {
3243
+ if (error && errorMessage)
3244
+ return errorMessage;
3245
+ if (success && successMessage)
3246
+ return successMessage;
3247
+ if (helperText)
3248
+ return helperText;
3249
+ return '';
3250
+ };
3251
+ const getHelperTextColor = () => {
3252
+ if (error)
3253
+ return COLOR_ERROR[500];
3254
+ if (success)
3255
+ return COLOR_SUCCESS[500];
3256
+ return COLOR_NEUTRAL[400];
3257
+ };
3258
+ const getBorderColor = () => {
3259
+ if (error)
3260
+ return COLOR_ERROR[500];
3261
+ if (success)
3262
+ return COLOR_SUCCESS[500];
3263
+ return COLOR_NEUTRAL[300];
3264
+ };
3265
+ return (jsxRuntime.jsxs(material.Box, { sx: { ...sx }, children: [label && (jsxRuntime.jsx(material.Typography, { sx: {
3266
+ display: 'block',
3267
+ ...TYPOGRAPHY.textFieldLabel,
3268
+ color: COLOR_GRAY[800],
3269
+ marginBottom: '4px',
3270
+ }, children: label })), jsxRuntime.jsxs(material.Box, { sx: { position: 'relative' }, children: [jsxRuntime.jsx(material.TextField, { fullWidth: true, multiline: true, rows: rows, placeholder: placeholder, value: value, disabled: disabled, onChange: (e) => onChange?.(e.target.value), onBlur: (e) => onBlur?.(e.target.value), inputProps: {
3271
+ maxLength: maxLength,
3272
+ style: {
3273
+ ...TYPOGRAPHY.text14Regular,
3274
+ paddingBottom: maxLength ? '24px' : '0px',
3275
+ },
3276
+ }, sx: {
3277
+ '& .MuiOutlinedInput-root': {
3278
+ borderRadius: borderRadiusValue,
3279
+ backgroundColor: disabled ? COLOR_NEUTRAL[100] : 'white',
3280
+ transition: 'all 0.2s ease',
3281
+ '& fieldset': {
3282
+ borderColor: getBorderColor(),
3283
+ },
3284
+ '&:hover fieldset': {
3285
+ borderColor: disabled ? getBorderColor() : error ? COLOR_ERROR[500] : COLOR_NEUTRAL[400],
3286
+ },
3287
+ '&.Mui-focused fieldset': {
3288
+ borderColor: error ? COLOR_ERROR[500] : COLOR_NEUTRAL[400],
3289
+ borderWidth: '1.5px',
3290
+ },
3291
+ },
3292
+ '& .MuiOutlinedInput-input': {
3293
+ color: value ? COLOR_GRAY[900] : COLOR_NEUTRAL[400],
3294
+ '&::placeholder': {
3295
+ color: COLOR_NEUTRAL[400],
3296
+ opacity: 1,
3297
+ },
3298
+ '&:disabled': {
3299
+ color: COLOR_NEUTRAL[400],
3300
+ WebkitTextFillColor: COLOR_NEUTRAL[400],
3301
+ },
3302
+ },
3303
+ '& .MuiOutlinedInput-notchedOutline': {
3304
+ borderColor: getBorderColor(),
3305
+ },
3306
+ } }), maxLength && (jsxRuntime.jsxs(material.Box, { sx: {
3307
+ position: 'absolute',
3308
+ bottom: '8px',
3309
+ right: '12px',
3310
+ fontSize: '12px',
3311
+ color: COLOR_NEUTRAL[400],
3312
+ pointerEvents: 'none',
3313
+ }, children: ["(", value?.length, "/", maxLength, ")"] }))] }), getHelperText() && (jsxRuntime.jsx(material.Box, { sx: {
3314
+ color: getHelperTextColor(),
3315
+ marginTop: '4px',
3316
+ ...TYPOGRAPHY.textFieldHelper,
3317
+ }, children: getHelperText() }))] }));
3318
+ };
1968
3319
 
1969
- styles.styled(MuiTextField)(({ theme }) => {
3320
+ const StyledTextField = styles.styled(MuiTextField)(({ theme }) => {
1970
3321
  return {
1971
3322
  '& .MuiOutlinedInput-root': {
1972
3323
  '& fieldset': { borderColor: COLOR_NEUTRAL[300] },
@@ -2008,11 +3359,223 @@ styles.styled(MuiTextField)(({ theme }) => {
2008
3359
  },
2009
3360
  };
2010
3361
  });
3362
+ const TextFieldComponent = ({ label, placeholder = 'Placeholder', value, disabled = false, error = false, success = false, errorMessage, successMessage, borderRadius = 6, helperText, onChange, iconBefore, iconAfter, sx, ...props }) => {
3363
+ return (jsxRuntime.jsxs(material.Box, { sx: { ...sx }, children: [label && (jsxRuntime.jsx(material.Typography, { sx: {
3364
+ display: 'block',
3365
+ ...TYPOGRAPHY.textFieldLabel,
3366
+ color: COLOR_GRAY[800],
3367
+ marginBottom: '4px',
3368
+ }, children: label })), jsxRuntime.jsx(StyledTextField, { placeholder: placeholder, value: value, disabled: disabled, error: error, helperText: error ? errorMessage : helperText, size: "small", fullWidth: true, onChange: onChange, InputProps: {
3369
+ startAdornment: iconBefore ? jsxRuntime.jsx(material.InputAdornment, { position: "start", children: iconBefore }) : undefined,
3370
+ endAdornment: iconAfter ? jsxRuntime.jsx(material.InputAdornment, { position: "end", children: iconAfter }) : undefined,
3371
+ }, sx: {
3372
+ '& .MuiOutlinedInput-root': {
3373
+ borderRadius: borderRadius === 'max' ? '100px' : `${borderRadius}px`,
3374
+ ...(success && {
3375
+ '&.Mui-focused': {
3376
+ boxShadow: `0 1px 2px 0 rgba(10, 13, 18, 0.05), 0 0 0 4px ${COLOR_SUCCESS[100]}`,
3377
+ },
3378
+ }),
3379
+ },
3380
+ }, ...props }), success && !error && successMessage && (jsxRuntime.jsx(material.Typography, { sx: {
3381
+ ...TYPOGRAPHY.textFieldHelper,
3382
+ color: COLOR_SUCCESS[500],
3383
+ marginTop: '4px',
3384
+ }, children: successMessage }))] }));
3385
+ };
2011
3386
 
2012
- ({
3387
+ const SX_STYLES = {
2013
3388
  progressBar: {
2014
- backgroundColor: COLOR_GRAY[200]}});
3389
+ position: 'absolute',
3390
+ top: 0,
3391
+ left: 0,
3392
+ height: '100%',
3393
+ backgroundColor: COLOR_GRAY[200],
3394
+ opacity: 0.8,
3395
+ transition: 'width 0.3s ease, opacity 0.3s ease',
3396
+ animation: 'wave 1.5s linear infinite',
3397
+ '@keyframes wave': {
3398
+ '0%': { backgroundPosition: '0% 0%' },
3399
+ '50%': { backgroundPosition: '100% 0%' },
3400
+ '100%': { backgroundPosition: '0% 0%' },
3401
+ },
3402
+ },
3403
+ imageIcon: {
3404
+ width: '40px',
3405
+ height: '40px',
3406
+ flexShrink: 0,
3407
+ position: 'relative',
3408
+ zIndex: 1,
3409
+ },
3410
+ contentBox: {
3411
+ flexGrow: 1,
3412
+ minWidth: 0,
3413
+ position: 'relative',
3414
+ zIndex: 1,
3415
+ },
3416
+ textBox: {
3417
+ minWidth: 0,
3418
+ flexGrow: 1,
3419
+ mr: 2,
3420
+ },
3421
+ actionBox: {
3422
+ flexShrink: 0,
3423
+ display: 'flex',
3424
+ alignItems: 'center',
3425
+ position: 'relative',
3426
+ zIndex: 1,
3427
+ },
3428
+ linearProgress: {
3429
+ mt: 1,
3430
+ width: '100%',
3431
+ },
3432
+ };
3433
+
3434
+ const VIDEO_EXTENSIONS = ['mp4', 'mov', 'avi', 'wmv', 'flv', 'mkv', 'webm'];
3435
+ const ICON_PATH = {
3436
+ VIDEO: '/images/icon/film.svg',
3437
+ FILE: '/images/icon/file.svg',
3438
+ };
3439
+ // ============================================================================
3440
+ // Helper Functions
3441
+ // ============================================================================
3442
+ const formatFileSize = (bytes) => {
3443
+ if (bytes === 0)
3444
+ return '0 Bytes';
3445
+ const k = 1024;
3446
+ const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
3447
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
3448
+ return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
3449
+ };
3450
+ const getFileIcon = (fileName) => {
3451
+ const ext = fileName.split('.').pop()?.toLowerCase();
3452
+ return ext && VIDEO_EXTENSIONS.includes(ext) ? ICON_PATH.VIDEO : ICON_PATH.FILE;
3453
+ };
3454
+ // ============================================================================
3455
+ // Component
3456
+ // ============================================================================
3457
+ const UploaderItemComponent = ({ file, progress = 0, status = 'pending', onDelete, onRetry, isProcess = true, borderSuccess, borderError = COLOR_ERROR[600], sx, }) => {
3458
+ // Memoize
3459
+ const iconSrc = React.useMemo(() => getFileIcon(file.name), [file.name]);
3460
+ // Status flags
3461
+ const isCompleted = status === 'success';
3462
+ const isFailed = status === 'failed';
3463
+ const isUploading = status === 'uploading';
3464
+ // Determine colors based on status
3465
+ const borderColor = isFailed
3466
+ ? String(borderError)
3467
+ : isCompleted && borderSuccess
3468
+ ? String(borderSuccess)
3469
+ : '#e0e0e0';
3470
+ const textColor = isFailed ? String(borderError) : '#737373';
3471
+ const subtitleColor = isFailed ? String(borderError) : '#a3a3a3';
3472
+ // Render progress info
3473
+ const renderProgressInfo = () => {
3474
+ if (isUploading && !isCompleted)
3475
+ return ` • ${Math.round(progress)}% uploaded`;
3476
+ if (isFailed)
3477
+ return ' • Upload failed';
3478
+ return '';
3479
+ };
3480
+ return (jsxRuntime.jsxs(material.Box, { sx: {
3481
+ display: 'flex',
3482
+ alignItems: 'flex-start',
3483
+ padding: '16px',
3484
+ border: '1px solid',
3485
+ borderColor: borderColor,
3486
+ borderRadius: '8px',
3487
+ gap: '16px',
3488
+ position: 'relative',
3489
+ overflow: 'hidden',
3490
+ transition: 'background-color 0.3s ease',
3491
+ backgroundColor: 'background.paper',
3492
+ ...sx,
3493
+ }, children: [!isProcess && isUploading && !isCompleted && !isFailed && (jsxRuntime.jsx(material.Box, { sx: { ...SX_STYLES.progressBar, width: `${progress}%` } })), jsxRuntime.jsx(material.Box, { component: "img", src: iconSrc, alt: "file icon", sx: SX_STYLES.imageIcon }), jsxRuntime.jsxs(material.Box, { sx: SX_STYLES.contentBox, children: [jsxRuntime.jsxs(StackRowAlignCenterJustBetween, { children: [jsxRuntime.jsxs(material.Box, { sx: SX_STYLES.textBox, children: [jsxRuntime.jsx(material.Typography, { noWrap: true, title: file.name, sx: { ...TYPOGRAPHY.text14Medium, color: textColor }, children: file.name }), jsxRuntime.jsxs(material.Typography, { sx: { ...TYPOGRAPHY.text14Regular, color: subtitleColor }, children: [formatFileSize(file.size), renderProgressInfo()] })] }), jsxRuntime.jsxs(material.Box, { sx: SX_STYLES.actionBox, children: [!isProcess && isUploading && !isCompleted && (jsxRuntime.jsx(material.Box, { sx: { position: 'relative', display: 'inline-flex', mr: 1 }, children: jsxRuntime.jsx(material.CircularProgress, { variant: "determinate", value: progress, color: "success", size: 24 }) })), isCompleted && jsxRuntime.jsx(CheckCircleIcon, { color: "success", sx: { mr: 1 } }), isFailed && onRetry && (jsxRuntime.jsx(material.IconButton, { size: "small", onClick: onRetry, title: "Retry upload", children: jsxRuntime.jsx(RefreshIcon, { fontSize: "small", sx: { color: borderError } }) })), !isFailed && onDelete && (jsxRuntime.jsx(material.IconButton, { size: "small", onClick: onDelete, children: jsxRuntime.jsx(IconElement, { icon: "delete" }) }))] })] }), isProcess && isUploading && (jsxRuntime.jsx(material.Box, { sx: SX_STYLES.linearProgress, children: jsxRuntime.jsx(material.LinearProgress, { variant: "determinate", value: progress, color: "success", sx: { height: 8, borderRadius: 4 } }) }))] })] }));
3494
+ };
3495
+
3496
+ const UploaderComponent = ({ onFilesSelected, accept = '*', multiple = true, children, sx, labelSx, uploadLabel = 'Click to upload', appearance, files: externalFiles, onDeleteFile, onRetryFile, borderError, }) => {
3497
+ const fileInputRef = React.useRef(null);
3498
+ const [isDragging, setIsDragging] = React.useState(false);
3499
+ // Sử dụng external files nếu có, nếu không hiển thị rỗng
3500
+ const displayFiles = externalFiles || [];
3501
+ const handleClick = () => {
3502
+ fileInputRef.current?.click();
3503
+ };
3504
+ const handleFileChange = (event) => {
3505
+ const selectedFiles = event.target.files;
3506
+ if (selectedFiles) {
3507
+ const fileArray = Array.from(selectedFiles);
3508
+ onFilesSelected(fileArray);
3509
+ }
3510
+ event.target.value = '';
3511
+ };
3512
+ const handleDeleteFile = (file) => {
3513
+ if (onDeleteFile) {
3514
+ onDeleteFile(file);
3515
+ }
3516
+ };
3517
+ const handleDragOver = (e) => {
3518
+ e.preventDefault();
3519
+ e.stopPropagation();
3520
+ setIsDragging(true);
3521
+ };
3522
+ const handleDragLeave = (e) => {
3523
+ e.preventDefault();
3524
+ e.stopPropagation();
3525
+ setIsDragging(false);
3526
+ };
3527
+ const handleDrop = (e) => {
3528
+ e.preventDefault();
3529
+ e.stopPropagation();
3530
+ setIsDragging(false);
3531
+ const files = e.dataTransfer.files;
3532
+ if (files) {
3533
+ onFilesSelected(Array.from(files));
3534
+ }
3535
+ };
3536
+ return (jsxRuntime.jsxs(material.Box, { sx: {
3537
+ border: '2px solid',
3538
+ borderColor: appearance?.borderColor || 'action.selected',
3539
+ borderRadius: '8px',
3540
+ padding: '32px 24px',
3541
+ textAlign: 'center',
3542
+ cursor: 'pointer',
3543
+ transition: 'all 0.3s ease',
3544
+ backgroundColor: isDragging ? 'action.selected' : appearance?.background || 'background.paper',
3545
+ '&:hover': {
3546
+ borderColor: appearance?.borderColorHover || appearance?.borderColor || 'primary.main',
3547
+ filter: 'brightness(0.92)',
3548
+ },
3549
+ ...sx,
3550
+ }, onClick: handleClick, onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, children: [jsxRuntime.jsx("input", { ref: fileInputRef, type: "file", accept: accept, multiple: multiple, onChange: handleFileChange, style: { display: 'none' } }), displayFiles.length === 0 && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: children ? (jsxRuntime.jsxs(material.Box, { children: [children, jsxRuntime.jsxs(material.Box, { component: "p", sx: {
3551
+ color: 'primary.main',
3552
+ textDecoration: 'underline',
3553
+ fontWeight: 500,
3554
+ fontSize: '14px',
3555
+ marginTop: '12px',
3556
+ margin: '12px 0 0 0',
3557
+ ...labelSx,
3558
+ }, children: [uploadLabel, " or drag and drop"] })] })) : (jsxRuntime.jsxs(material.Box, { children: [jsxRuntime.jsx(material.Box, { component: "img", src: "/images/icon/uploader.svg", alt: "Upload icon", sx: {
3559
+ width: '46px',
3560
+ height: '46px',
3561
+ marginBottom: '12px',
3562
+ } }), jsxRuntime.jsxs(material.Box, { component: "p", sx: {
3563
+ color: 'primary.main',
3564
+ textDecoration: 'underline',
3565
+ fontWeight: 500,
3566
+ fontSize: '14px',
3567
+ margin: 0,
3568
+ ...labelSx,
3569
+ }, children: [uploadLabel, " or drag and drop"] })] })) })), displayFiles && displayFiles.length > 0 && (jsxRuntime.jsx(material.Box, { sx: {
3570
+ marginTop: '24px',
3571
+ display: 'flex',
3572
+ flexDirection: 'column',
3573
+ gap: '12px',
3574
+ textAlign: 'left',
3575
+ }, onClick: (e) => e.stopPropagation(), children: displayFiles.map((item, index) => (jsxRuntime.jsx(UploaderItemComponent, { file: item.file, progress: item.progress, status: item.status, isProcess: item.isProcess ?? true, onDelete: () => handleDeleteFile(item.file), onRetry: () => onRetryFile?.(item.id), borderSuccess: appearance?.borderSuccess, borderError: borderError }, item.id || index))) }))] }));
3576
+ };
2015
3577
 
3578
+ exports.ACCESSIBILITY = ACCESSIBILITY;
2016
3579
  exports.AVATAR_SIZES = AVATAR_SIZES;
2017
3580
  exports.AvatarComponent = AvatarComponent;
2018
3581
  exports.AvatarGroupComponent = AvatarGroupComponent;
@@ -2021,11 +3584,21 @@ exports.AvatarProfileComponent = AvatarProfileComponent;
2021
3584
  exports.AvatarUserComponent = AvatarUserComponent;
2022
3585
  exports.BADGE_FONT_SIZES = BADGE_FONT_SIZES;
2023
3586
  exports.BADGE_SIZES = BADGE_SIZES;
3587
+ exports.BORDER_TEXT_FIELD_LOADING = BORDER_TEXT_FIELD_LOADING;
3588
+ exports.BUTTON_CONSTANTS = BUTTON_CONSTANTS;
2024
3589
  exports.BadgeImage = BadgeImage;
2025
3590
  exports.BadgeLive = BadgeLive;
2026
3591
  exports.BadgeNumber = BadgeNumber;
2027
3592
  exports.BadgeOnline = BadgeOnline;
3593
+ exports.BreadcrumbsComponent = BreadcrumbsComponent;
3594
+ exports.ButtonBarComponent = ButtonBarComponent;
2028
3595
  exports.ButtonComponent = ButtonComponent;
3596
+ exports.CHECKBOX_COLORS = CHECKBOX_COLORS;
3597
+ exports.CHECKBOX_SIZE = CHECKBOX_SIZE;
3598
+ exports.CHIP_ICON_SIZE = CHIP_ICON_SIZE;
3599
+ exports.CHIP_LABEL_PADDING = CHIP_LABEL_PADDING;
3600
+ exports.CHIP_SIZE_CONFIG = CHIP_SIZE_CONFIG;
3601
+ exports.COLORS = COLORS;
2029
3602
  exports.COLOR_ACCENT = COLOR_ACCENT;
2030
3603
  exports.COLOR_BRAND = COLOR_BRAND;
2031
3604
  exports.COLOR_ERROR = COLOR_ERROR;
@@ -2034,16 +3607,28 @@ exports.COLOR_INFO = COLOR_INFO;
2034
3607
  exports.COLOR_NEUTRAL = COLOR_NEUTRAL;
2035
3608
  exports.COLOR_SUCCESS = COLOR_SUCCESS;
2036
3609
  exports.COLOR_WARNING = COLOR_WARNING;
3610
+ exports.CheckboxComponent = CheckboxComponent;
2037
3611
  exports.CheckboxContentComponent = CheckboxContentComponent;
3612
+ exports.ChipComponent = ChipComponent;
3613
+ exports.Colors = Colors;
3614
+ exports.DateFieldComponent = DateFieldComponent;
3615
+ exports.DateRangePickerComponent = DateRangePickerComponent;
2038
3616
  exports.DialogWrapper = DialogWrapper;
3617
+ exports.DropdownFieldComponent = DropdownFieldComponent;
2039
3618
  exports.FONT_FAMILY = FONT_FAMILY;
2040
3619
  exports.FONT_SIZE = FONT_SIZE;
3620
+ exports.FONT_SIZE_ICON = FONT_SIZE_ICON;
3621
+ exports.FONT_SIZE_LOADING = FONT_SIZE_LOADING;
2041
3622
  exports.FONT_STYLE = FONT_STYLE;
2042
3623
  exports.FONT_WEIGHT = FONT_WEIGHT;
3624
+ exports.GridComponent = GridComponent;
2043
3625
  exports.IconElement = IconElement;
2044
3626
  exports.ImageElement = ImageElement;
3627
+ exports.InputStepperComponent = InputStepperComponent;
3628
+ exports.InputStepperSkeleton = InputStepperSkeleton;
2045
3629
  exports.LINE_HEIGHT = LINE_HEIGHT;
2046
3630
  exports.LinkElement = LinkElement;
3631
+ exports.LinkFieldComponent = LinkFieldComponent;
2047
3632
  exports.LinkInternalElement = LinkInternalElement;
2048
3633
  exports.MAP_SIZE = MAP_SIZE;
2049
3634
  exports.Modal = ModalComponent;
@@ -2051,11 +3636,34 @@ exports.ModalCard = ModalCardComponent;
2051
3636
  exports.ModalDescription = ModalDescription;
2052
3637
  exports.ModalIcon = ModalIcon;
2053
3638
  exports.ModalTitle = ModalTitle;
3639
+ exports.MoneyFieldComponent = MoneyFieldComponent;
3640
+ exports.PINComponent = PINComponent;
3641
+ exports.PIN_SIZES = PIN_SIZES;
3642
+ exports.PIN_SPACING = PIN_SPACING;
3643
+ exports.PhoneNumberFieldComponent = PhoneNumberFieldComponent;
3644
+ exports.SHADE_VALUES = SHADE_VALUES;
3645
+ exports.SIZES = SIZES;
2054
3646
  exports.SIZE_EXTRA_LARGE = SIZE_EXTRA_LARGE;
2055
3647
  exports.STYLE = style_constant;
3648
+ exports.SearchDropdownComponent = SearchDropdownComponent;
3649
+ exports.SearchFieldComponent = SearchFieldComponent;
3650
+ exports.SwitchComponent = SwitchComponent;
3651
+ exports.SwitchContentComponent = SwitchContentComponent;
3652
+ exports.TABS_CONTAINER_HORIZONTAL = TABS_CONTAINER_HORIZONTAL;
3653
+ exports.TABS_CONTAINER_VERTICAL = TABS_CONTAINER_VERTICAL;
3654
+ exports.TAB_ACTIVE_BACKGROUND_HORIZONTAL = TAB_ACTIVE_BACKGROUND_HORIZONTAL;
3655
+ exports.TAB_ACTIVE_BACKGROUND_VERTICAL = TAB_ACTIVE_BACKGROUND_VERTICAL;
3656
+ exports.TAB_BACKGROUND_STYLES = TAB_BACKGROUND_STYLES;
3657
+ exports.TAB_STYLES = TAB_STYLES;
3658
+ exports.TAB_UNDERLINE_STYLES = TAB_UNDERLINE_STYLES;
2056
3659
  exports.TYPOGRAPHY = TYPOGRAPHY;
2057
3660
  exports.TYPOGRAPHY_STYLES = TYPOGRAPHY_STYLES;
3661
+ exports.TabsComponent = TabsComponent;
3662
+ exports.TextAreaComponent = TextAreaComponent;
3663
+ exports.TextFieldComponent = TextFieldComponent;
2058
3664
  exports.TypographyOneLine = TypographyOneLine;
3665
+ exports.UploaderComponent = UploaderComponent;
3666
+ exports.UploaderItemComponent = UploaderItemComponent;
2059
3667
  exports.createTypography = createTypography;
2060
3668
  exports.getBadgePosition = getBadgePosition;
2061
3669
  //# sourceMappingURL=index.js.map