sevatech-library 1.0.0

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 (398) hide show
  1. package/README.md +655 -0
  2. package/dist/cjs/index.js +3565 -0
  3. package/dist/cjs/index.js.map +1 -0
  4. package/dist/cjs/types/components/avatar/avatar-group.component.d.ts +20 -0
  5. package/dist/cjs/types/components/avatar/avatar-group.component.d.ts.map +1 -0
  6. package/dist/cjs/types/components/avatar/avatar-label-group.component.d.ts +11 -0
  7. package/dist/cjs/types/components/avatar/avatar-label-group.component.d.ts.map +1 -0
  8. package/dist/cjs/types/components/avatar/avatar-profile.component.d.ts +5 -0
  9. package/dist/cjs/types/components/avatar/avatar-profile.component.d.ts.map +1 -0
  10. package/dist/cjs/types/components/avatar/avatar-user.component.d.ts +14 -0
  11. package/dist/cjs/types/components/avatar/avatar-user.component.d.ts.map +1 -0
  12. package/dist/cjs/types/components/avatar/avatar.component.d.ts +20 -0
  13. package/dist/cjs/types/components/avatar/avatar.component.d.ts.map +1 -0
  14. package/dist/cjs/types/components/avatar/avatar.constant.d.ts +35 -0
  15. package/dist/cjs/types/components/avatar/avatar.constant.d.ts.map +1 -0
  16. package/dist/cjs/types/components/avatar/avatar.interface.d.ts +28 -0
  17. package/dist/cjs/types/components/avatar/avatar.interface.d.ts.map +1 -0
  18. package/dist/cjs/types/components/avatar/index.d.ts +8 -0
  19. package/dist/cjs/types/components/avatar/index.d.ts.map +1 -0
  20. package/dist/cjs/types/components/bread-cumbs/bread-crumbs.component.d.ts +21 -0
  21. package/dist/cjs/types/components/bread-cumbs/bread-crumbs.component.d.ts.map +1 -0
  22. package/dist/cjs/types/components/button/button.component.d.ts +37 -0
  23. package/dist/cjs/types/components/button/button.component.d.ts.map +1 -0
  24. package/dist/cjs/types/components/button/button.constants.d.ts +33 -0
  25. package/dist/cjs/types/components/button/button.constants.d.ts.map +1 -0
  26. package/dist/cjs/types/components/button-bar/button-bar.component.d.ts +15 -0
  27. package/dist/cjs/types/components/button-bar/button-bar.component.d.ts.map +1 -0
  28. package/dist/cjs/types/components/checkbox/checkbox-content.component.d.ts +19 -0
  29. package/dist/cjs/types/components/checkbox/checkbox-content.component.d.ts.map +1 -0
  30. package/dist/cjs/types/components/checkbox/checkbox.component.d.ts +23 -0
  31. package/dist/cjs/types/components/checkbox/checkbox.component.d.ts.map +1 -0
  32. package/dist/cjs/types/components/checkbox/checkbox.constant.d.ts +26 -0
  33. package/dist/cjs/types/components/checkbox/checkbox.constant.d.ts.map +1 -0
  34. package/dist/cjs/types/components/chip/chip.component.d.ts +16 -0
  35. package/dist/cjs/types/components/chip/chip.component.d.ts.map +1 -0
  36. package/dist/cjs/types/components/chip/chip.constant.d.ts +16 -0
  37. package/dist/cjs/types/components/chip/chip.constant.d.ts.map +1 -0
  38. package/dist/cjs/types/components/date-field/date-field.component.d.ts +23 -0
  39. package/dist/cjs/types/components/date-field/date-field.component.d.ts.map +1 -0
  40. package/dist/cjs/types/components/date-range-picker/date-range-picker.component.d.ts +25 -0
  41. package/dist/cjs/types/components/date-range-picker/date-range-picker.component.d.ts.map +1 -0
  42. package/dist/cjs/types/components/dropdown-field/dropdown-field.component.d.ts +28 -0
  43. package/dist/cjs/types/components/dropdown-field/dropdown-field.component.d.ts.map +1 -0
  44. package/dist/cjs/types/components/grid/grid.component.d.ts +11 -0
  45. package/dist/cjs/types/components/grid/grid.component.d.ts.map +1 -0
  46. package/dist/cjs/types/components/icon/icon.element.d.ts +12 -0
  47. package/dist/cjs/types/components/icon/icon.element.d.ts.map +1 -0
  48. package/dist/cjs/types/components/icon/index.d.ts +2 -0
  49. package/dist/cjs/types/components/icon/index.d.ts.map +1 -0
  50. package/dist/cjs/types/components/image/image.element.d.ts +13 -0
  51. package/dist/cjs/types/components/image/image.element.d.ts.map +1 -0
  52. package/dist/cjs/types/components/image/image.enum.d.ts +6 -0
  53. package/dist/cjs/types/components/image/image.enum.d.ts.map +1 -0
  54. package/dist/cjs/types/components/image/index.d.ts +3 -0
  55. package/dist/cjs/types/components/image/index.d.ts.map +1 -0
  56. package/dist/cjs/types/components/index.d.ts +48 -0
  57. package/dist/cjs/types/components/index.d.ts.map +1 -0
  58. package/dist/cjs/types/components/input-stepper/input-stepper-skeleton.d.ts +9 -0
  59. package/dist/cjs/types/components/input-stepper/input-stepper-skeleton.d.ts.map +1 -0
  60. package/dist/cjs/types/components/input-stepper/input-stepper.component.d.ts +38 -0
  61. package/dist/cjs/types/components/input-stepper/input-stepper.component.d.ts.map +1 -0
  62. package/dist/cjs/types/components/input-stepper/input-stepper.constant.d.ts +32 -0
  63. package/dist/cjs/types/components/input-stepper/input-stepper.constant.d.ts.map +1 -0
  64. package/dist/cjs/types/components/link/index.d.ts +3 -0
  65. package/dist/cjs/types/components/link/index.d.ts.map +1 -0
  66. package/dist/cjs/types/components/link/link-internal.element.d.ts +9 -0
  67. package/dist/cjs/types/components/link/link-internal.element.d.ts.map +1 -0
  68. package/dist/cjs/types/components/link/link.element.d.ts +8 -0
  69. package/dist/cjs/types/components/link/link.element.d.ts.map +1 -0
  70. package/dist/cjs/types/components/link-field/link-field.component.d.ts +23 -0
  71. package/dist/cjs/types/components/link-field/link-field.component.d.ts.map +1 -0
  72. package/dist/cjs/types/components/modal/index.d.ts +5 -0
  73. package/dist/cjs/types/components/modal/index.d.ts.map +1 -0
  74. package/dist/cjs/types/components/modal/modal-card.component.d.ts +15 -0
  75. package/dist/cjs/types/components/modal/modal-card.component.d.ts.map +1 -0
  76. package/dist/cjs/types/components/modal/modal-content.component.d.ts +16 -0
  77. package/dist/cjs/types/components/modal/modal-content.component.d.ts.map +1 -0
  78. package/dist/cjs/types/components/modal/modal.component.d.ts +11 -0
  79. package/dist/cjs/types/components/modal/modal.component.d.ts.map +1 -0
  80. package/dist/cjs/types/components/modal/modal.interface.d.ts +20 -0
  81. package/dist/cjs/types/components/modal/modal.interface.d.ts.map +1 -0
  82. package/dist/cjs/types/components/money-field/money-field.component.d.ts +24 -0
  83. package/dist/cjs/types/components/money-field/money-field.component.d.ts.map +1 -0
  84. package/dist/cjs/types/components/phone-number-field/phone-number-field.component.d.ts +28 -0
  85. package/dist/cjs/types/components/phone-number-field/phone-number-field.component.d.ts.map +1 -0
  86. package/dist/cjs/types/components/pin/pin.component.d.ts +23 -0
  87. package/dist/cjs/types/components/pin/pin.component.d.ts.map +1 -0
  88. package/dist/cjs/types/components/pin/pin.constant.d.ts +25 -0
  89. package/dist/cjs/types/components/pin/pin.constant.d.ts.map +1 -0
  90. package/dist/cjs/types/components/search-dropdown/search-dropdown.component.d.ts +30 -0
  91. package/dist/cjs/types/components/search-dropdown/search-dropdown.component.d.ts.map +1 -0
  92. package/dist/cjs/types/components/search-field/search-field.component.d.ts +14 -0
  93. package/dist/cjs/types/components/search-field/search-field.component.d.ts.map +1 -0
  94. package/dist/cjs/types/components/switch/switch-content.component.d.ts +14 -0
  95. package/dist/cjs/types/components/switch/switch-content.component.d.ts.map +1 -0
  96. package/dist/cjs/types/components/switch/switch.component.d.ts +12 -0
  97. package/dist/cjs/types/components/switch/switch.component.d.ts.map +1 -0
  98. package/dist/cjs/types/components/tab/tab.component.d.ts +23 -0
  99. package/dist/cjs/types/components/tab/tab.component.d.ts.map +1 -0
  100. package/dist/cjs/types/components/tab/tab.constant.d.ts +15 -0
  101. package/dist/cjs/types/components/tab/tab.constant.d.ts.map +1 -0
  102. package/dist/cjs/types/components/text-area/text-area.component.d.ts +22 -0
  103. package/dist/cjs/types/components/text-area/text-area.component.d.ts.map +1 -0
  104. package/dist/cjs/types/components/text-field/text-field.component.d.ts +21 -0
  105. package/dist/cjs/types/components/text-field/text-field.component.d.ts.map +1 -0
  106. package/dist/cjs/types/components/typography/index.d.ts +2 -0
  107. package/dist/cjs/types/components/typography/index.d.ts.map +1 -0
  108. package/dist/cjs/types/components/typography/typography-limit-one-line.component.d.ts +9 -0
  109. package/dist/cjs/types/components/typography/typography-limit-one-line.component.d.ts.map +1 -0
  110. package/dist/cjs/types/components/uploader/uploader-item.component.d.ts +18 -0
  111. package/dist/cjs/types/components/uploader/uploader-item.component.d.ts.map +1 -0
  112. package/dist/cjs/types/components/uploader/uploader-item.styles.d.ts +53 -0
  113. package/dist/cjs/types/components/uploader/uploader-item.styles.d.ts.map +1 -0
  114. package/dist/cjs/types/components/uploader/uploader.component.d.ts +48 -0
  115. package/dist/cjs/types/components/uploader/uploader.component.d.ts.map +1 -0
  116. package/dist/cjs/types/constants/apps.data.d.ts +7 -0
  117. package/dist/cjs/types/constants/apps.data.d.ts.map +1 -0
  118. package/dist/cjs/types/constants/color.constant.d.ts +105 -0
  119. package/dist/cjs/types/constants/color.constant.d.ts.map +1 -0
  120. package/dist/cjs/types/constants/index.d.ts +5 -0
  121. package/dist/cjs/types/constants/index.d.ts.map +1 -0
  122. package/dist/cjs/types/constants/style.constant.d.ts +58 -0
  123. package/dist/cjs/types/constants/style.constant.d.ts.map +1 -0
  124. package/dist/cjs/types/constants/typography.constant.d.ts +710 -0
  125. package/dist/cjs/types/constants/typography.constant.d.ts.map +1 -0
  126. package/dist/cjs/types/index.d.ts +5 -0
  127. package/dist/cjs/types/index.d.ts.map +1 -0
  128. package/dist/cjs/types/styles/index.d.ts +2 -0
  129. package/dist/cjs/types/styles/index.d.ts.map +1 -0
  130. package/dist/cjs/types/styles/stack.style.d.ts +54 -0
  131. package/dist/cjs/types/styles/stack.style.d.ts.map +1 -0
  132. package/dist/cjs/types/types/index.d.ts +1 -0
  133. package/dist/cjs/types/types/index.d.ts.map +1 -0
  134. package/dist/cjs/types/utils/index.d.ts +2 -0
  135. package/dist/cjs/types/utils/index.d.ts.map +1 -0
  136. package/dist/esm/index.js +3500 -0
  137. package/dist/esm/index.js.map +1 -0
  138. package/dist/esm/types/components/avatar/avatar-group.component.d.ts +20 -0
  139. package/dist/esm/types/components/avatar/avatar-group.component.d.ts.map +1 -0
  140. package/dist/esm/types/components/avatar/avatar-label-group.component.d.ts +11 -0
  141. package/dist/esm/types/components/avatar/avatar-label-group.component.d.ts.map +1 -0
  142. package/dist/esm/types/components/avatar/avatar-profile.component.d.ts +5 -0
  143. package/dist/esm/types/components/avatar/avatar-profile.component.d.ts.map +1 -0
  144. package/dist/esm/types/components/avatar/avatar-user.component.d.ts +14 -0
  145. package/dist/esm/types/components/avatar/avatar-user.component.d.ts.map +1 -0
  146. package/dist/esm/types/components/avatar/avatar.component.d.ts +20 -0
  147. package/dist/esm/types/components/avatar/avatar.component.d.ts.map +1 -0
  148. package/dist/esm/types/components/avatar/avatar.constant.d.ts +35 -0
  149. package/dist/esm/types/components/avatar/avatar.constant.d.ts.map +1 -0
  150. package/dist/esm/types/components/avatar/avatar.interface.d.ts +28 -0
  151. package/dist/esm/types/components/avatar/avatar.interface.d.ts.map +1 -0
  152. package/dist/esm/types/components/avatar/index.d.ts +8 -0
  153. package/dist/esm/types/components/avatar/index.d.ts.map +1 -0
  154. package/dist/esm/types/components/bread-cumbs/bread-crumbs.component.d.ts +21 -0
  155. package/dist/esm/types/components/bread-cumbs/bread-crumbs.component.d.ts.map +1 -0
  156. package/dist/esm/types/components/button/button.component.d.ts +37 -0
  157. package/dist/esm/types/components/button/button.component.d.ts.map +1 -0
  158. package/dist/esm/types/components/button/button.constants.d.ts +33 -0
  159. package/dist/esm/types/components/button/button.constants.d.ts.map +1 -0
  160. package/dist/esm/types/components/button-bar/button-bar.component.d.ts +15 -0
  161. package/dist/esm/types/components/button-bar/button-bar.component.d.ts.map +1 -0
  162. package/dist/esm/types/components/checkbox/checkbox-content.component.d.ts +19 -0
  163. package/dist/esm/types/components/checkbox/checkbox-content.component.d.ts.map +1 -0
  164. package/dist/esm/types/components/checkbox/checkbox.component.d.ts +23 -0
  165. package/dist/esm/types/components/checkbox/checkbox.component.d.ts.map +1 -0
  166. package/dist/esm/types/components/checkbox/checkbox.constant.d.ts +26 -0
  167. package/dist/esm/types/components/checkbox/checkbox.constant.d.ts.map +1 -0
  168. package/dist/esm/types/components/chip/chip.component.d.ts +16 -0
  169. package/dist/esm/types/components/chip/chip.component.d.ts.map +1 -0
  170. package/dist/esm/types/components/chip/chip.constant.d.ts +16 -0
  171. package/dist/esm/types/components/chip/chip.constant.d.ts.map +1 -0
  172. package/dist/esm/types/components/date-field/date-field.component.d.ts +23 -0
  173. package/dist/esm/types/components/date-field/date-field.component.d.ts.map +1 -0
  174. package/dist/esm/types/components/date-range-picker/date-range-picker.component.d.ts +25 -0
  175. package/dist/esm/types/components/date-range-picker/date-range-picker.component.d.ts.map +1 -0
  176. package/dist/esm/types/components/dropdown-field/dropdown-field.component.d.ts +28 -0
  177. package/dist/esm/types/components/dropdown-field/dropdown-field.component.d.ts.map +1 -0
  178. package/dist/esm/types/components/grid/grid.component.d.ts +11 -0
  179. package/dist/esm/types/components/grid/grid.component.d.ts.map +1 -0
  180. package/dist/esm/types/components/icon/icon.element.d.ts +12 -0
  181. package/dist/esm/types/components/icon/icon.element.d.ts.map +1 -0
  182. package/dist/esm/types/components/icon/index.d.ts +2 -0
  183. package/dist/esm/types/components/icon/index.d.ts.map +1 -0
  184. package/dist/esm/types/components/image/image.element.d.ts +13 -0
  185. package/dist/esm/types/components/image/image.element.d.ts.map +1 -0
  186. package/dist/esm/types/components/image/image.enum.d.ts +6 -0
  187. package/dist/esm/types/components/image/image.enum.d.ts.map +1 -0
  188. package/dist/esm/types/components/image/index.d.ts +3 -0
  189. package/dist/esm/types/components/image/index.d.ts.map +1 -0
  190. package/dist/esm/types/components/index.d.ts +48 -0
  191. package/dist/esm/types/components/index.d.ts.map +1 -0
  192. package/dist/esm/types/components/input-stepper/input-stepper-skeleton.d.ts +9 -0
  193. package/dist/esm/types/components/input-stepper/input-stepper-skeleton.d.ts.map +1 -0
  194. package/dist/esm/types/components/input-stepper/input-stepper.component.d.ts +38 -0
  195. package/dist/esm/types/components/input-stepper/input-stepper.component.d.ts.map +1 -0
  196. package/dist/esm/types/components/input-stepper/input-stepper.constant.d.ts +32 -0
  197. package/dist/esm/types/components/input-stepper/input-stepper.constant.d.ts.map +1 -0
  198. package/dist/esm/types/components/link/index.d.ts +3 -0
  199. package/dist/esm/types/components/link/index.d.ts.map +1 -0
  200. package/dist/esm/types/components/link/link-internal.element.d.ts +9 -0
  201. package/dist/esm/types/components/link/link-internal.element.d.ts.map +1 -0
  202. package/dist/esm/types/components/link/link.element.d.ts +8 -0
  203. package/dist/esm/types/components/link/link.element.d.ts.map +1 -0
  204. package/dist/esm/types/components/link-field/link-field.component.d.ts +23 -0
  205. package/dist/esm/types/components/link-field/link-field.component.d.ts.map +1 -0
  206. package/dist/esm/types/components/modal/index.d.ts +5 -0
  207. package/dist/esm/types/components/modal/index.d.ts.map +1 -0
  208. package/dist/esm/types/components/modal/modal-card.component.d.ts +15 -0
  209. package/dist/esm/types/components/modal/modal-card.component.d.ts.map +1 -0
  210. package/dist/esm/types/components/modal/modal-content.component.d.ts +16 -0
  211. package/dist/esm/types/components/modal/modal-content.component.d.ts.map +1 -0
  212. package/dist/esm/types/components/modal/modal.component.d.ts +11 -0
  213. package/dist/esm/types/components/modal/modal.component.d.ts.map +1 -0
  214. package/dist/esm/types/components/modal/modal.interface.d.ts +20 -0
  215. package/dist/esm/types/components/modal/modal.interface.d.ts.map +1 -0
  216. package/dist/esm/types/components/money-field/money-field.component.d.ts +24 -0
  217. package/dist/esm/types/components/money-field/money-field.component.d.ts.map +1 -0
  218. package/dist/esm/types/components/phone-number-field/phone-number-field.component.d.ts +28 -0
  219. package/dist/esm/types/components/phone-number-field/phone-number-field.component.d.ts.map +1 -0
  220. package/dist/esm/types/components/pin/pin.component.d.ts +23 -0
  221. package/dist/esm/types/components/pin/pin.component.d.ts.map +1 -0
  222. package/dist/esm/types/components/pin/pin.constant.d.ts +25 -0
  223. package/dist/esm/types/components/pin/pin.constant.d.ts.map +1 -0
  224. package/dist/esm/types/components/search-dropdown/search-dropdown.component.d.ts +30 -0
  225. package/dist/esm/types/components/search-dropdown/search-dropdown.component.d.ts.map +1 -0
  226. package/dist/esm/types/components/search-field/search-field.component.d.ts +14 -0
  227. package/dist/esm/types/components/search-field/search-field.component.d.ts.map +1 -0
  228. package/dist/esm/types/components/switch/switch-content.component.d.ts +14 -0
  229. package/dist/esm/types/components/switch/switch-content.component.d.ts.map +1 -0
  230. package/dist/esm/types/components/switch/switch.component.d.ts +12 -0
  231. package/dist/esm/types/components/switch/switch.component.d.ts.map +1 -0
  232. package/dist/esm/types/components/tab/tab.component.d.ts +23 -0
  233. package/dist/esm/types/components/tab/tab.component.d.ts.map +1 -0
  234. package/dist/esm/types/components/tab/tab.constant.d.ts +15 -0
  235. package/dist/esm/types/components/tab/tab.constant.d.ts.map +1 -0
  236. package/dist/esm/types/components/text-area/text-area.component.d.ts +22 -0
  237. package/dist/esm/types/components/text-area/text-area.component.d.ts.map +1 -0
  238. package/dist/esm/types/components/text-field/text-field.component.d.ts +21 -0
  239. package/dist/esm/types/components/text-field/text-field.component.d.ts.map +1 -0
  240. package/dist/esm/types/components/typography/index.d.ts +2 -0
  241. package/dist/esm/types/components/typography/index.d.ts.map +1 -0
  242. package/dist/esm/types/components/typography/typography-limit-one-line.component.d.ts +9 -0
  243. package/dist/esm/types/components/typography/typography-limit-one-line.component.d.ts.map +1 -0
  244. package/dist/esm/types/components/uploader/uploader-item.component.d.ts +18 -0
  245. package/dist/esm/types/components/uploader/uploader-item.component.d.ts.map +1 -0
  246. package/dist/esm/types/components/uploader/uploader-item.styles.d.ts +53 -0
  247. package/dist/esm/types/components/uploader/uploader-item.styles.d.ts.map +1 -0
  248. package/dist/esm/types/components/uploader/uploader.component.d.ts +48 -0
  249. package/dist/esm/types/components/uploader/uploader.component.d.ts.map +1 -0
  250. package/dist/esm/types/constants/apps.data.d.ts +7 -0
  251. package/dist/esm/types/constants/apps.data.d.ts.map +1 -0
  252. package/dist/esm/types/constants/color.constant.d.ts +105 -0
  253. package/dist/esm/types/constants/color.constant.d.ts.map +1 -0
  254. package/dist/esm/types/constants/index.d.ts +5 -0
  255. package/dist/esm/types/constants/index.d.ts.map +1 -0
  256. package/dist/esm/types/constants/style.constant.d.ts +58 -0
  257. package/dist/esm/types/constants/style.constant.d.ts.map +1 -0
  258. package/dist/esm/types/constants/typography.constant.d.ts +710 -0
  259. package/dist/esm/types/constants/typography.constant.d.ts.map +1 -0
  260. package/dist/esm/types/index.d.ts +5 -0
  261. package/dist/esm/types/index.d.ts.map +1 -0
  262. package/dist/esm/types/styles/index.d.ts +2 -0
  263. package/dist/esm/types/styles/index.d.ts.map +1 -0
  264. package/dist/esm/types/styles/stack.style.d.ts +54 -0
  265. package/dist/esm/types/styles/stack.style.d.ts.map +1 -0
  266. package/dist/esm/types/types/index.d.ts +1 -0
  267. package/dist/esm/types/types/index.d.ts.map +1 -0
  268. package/dist/esm/types/utils/index.d.ts +2 -0
  269. package/dist/esm/types/utils/index.d.ts.map +1 -0
  270. package/dist/types/components/avatar/avatar-group.component.d.ts +20 -0
  271. package/dist/types/components/avatar/avatar-group.component.d.ts.map +1 -0
  272. package/dist/types/components/avatar/avatar-label-group.component.d.ts +11 -0
  273. package/dist/types/components/avatar/avatar-label-group.component.d.ts.map +1 -0
  274. package/dist/types/components/avatar/avatar-profile.component.d.ts +4 -0
  275. package/dist/types/components/avatar/avatar-profile.component.d.ts.map +1 -0
  276. package/dist/types/components/avatar/avatar-user.component.d.ts +14 -0
  277. package/dist/types/components/avatar/avatar-user.component.d.ts.map +1 -0
  278. package/dist/types/components/avatar/avatar.component.d.ts +20 -0
  279. package/dist/types/components/avatar/avatar.component.d.ts.map +1 -0
  280. package/dist/types/components/avatar/avatar.constant.d.ts +35 -0
  281. package/dist/types/components/avatar/avatar.constant.d.ts.map +1 -0
  282. package/dist/types/components/avatar/avatar.interface.d.ts +28 -0
  283. package/dist/types/components/avatar/avatar.interface.d.ts.map +1 -0
  284. package/dist/types/components/bread-cumbs/bread-crumbs.component.d.ts +21 -0
  285. package/dist/types/components/bread-cumbs/bread-crumbs.component.d.ts.map +1 -0
  286. package/dist/types/components/button/button.component.d.ts +38 -0
  287. package/dist/types/components/button/button.component.d.ts.map +1 -0
  288. package/dist/types/components/button/button.constants.d.ts +33 -0
  289. package/dist/types/components/button/button.constants.d.ts.map +1 -0
  290. package/dist/types/components/button-bar/button-bar.component.d.ts +15 -0
  291. package/dist/types/components/button-bar/button-bar.component.d.ts.map +1 -0
  292. package/dist/types/components/checkbox/checkbox-content.component.d.ts +19 -0
  293. package/dist/types/components/checkbox/checkbox-content.component.d.ts.map +1 -0
  294. package/dist/types/components/checkbox/checkbox.component.d.ts +22 -0
  295. package/dist/types/components/checkbox/checkbox.component.d.ts.map +1 -0
  296. package/dist/types/components/checkbox/checkbox.constant.d.ts +26 -0
  297. package/dist/types/components/checkbox/checkbox.constant.d.ts.map +1 -0
  298. package/dist/types/components/chip/chip.component.d.ts +15 -0
  299. package/dist/types/components/chip/chip.component.d.ts.map +1 -0
  300. package/dist/types/components/chip/chip.constant.d.ts +16 -0
  301. package/dist/types/components/chip/chip.constant.d.ts.map +1 -0
  302. package/dist/types/components/date-field/date-field.component.d.ts +23 -0
  303. package/dist/types/components/date-field/date-field.component.d.ts.map +1 -0
  304. package/dist/types/components/date-range-picker/date-range-picker.component.d.ts +25 -0
  305. package/dist/types/components/date-range-picker/date-range-picker.component.d.ts.map +1 -0
  306. package/dist/types/components/dropdown-field/dropdown-field.component.d.ts +28 -0
  307. package/dist/types/components/dropdown-field/dropdown-field.component.d.ts.map +1 -0
  308. package/dist/types/components/grid/grid.component.d.ts +11 -0
  309. package/dist/types/components/grid/grid.component.d.ts.map +1 -0
  310. package/dist/types/components/icon/icon.element.d.ts +12 -0
  311. package/dist/types/components/icon/icon.element.d.ts.map +1 -0
  312. package/dist/types/components/icon/index.d.ts +2 -0
  313. package/dist/types/components/icon/index.d.ts.map +1 -0
  314. package/dist/types/components/image/image.element.d.ts +13 -0
  315. package/dist/types/components/image/image.element.d.ts.map +1 -0
  316. package/dist/types/components/image/image.enum.d.ts +6 -0
  317. package/dist/types/components/image/image.enum.d.ts.map +1 -0
  318. package/dist/types/components/image/index.d.ts +3 -0
  319. package/dist/types/components/image/index.d.ts.map +1 -0
  320. package/dist/types/components/index.d.ts +28 -0
  321. package/dist/types/components/index.d.ts.map +1 -0
  322. package/dist/types/components/input-stepper/input-stepper-skeleton.d.ts +9 -0
  323. package/dist/types/components/input-stepper/input-stepper-skeleton.d.ts.map +1 -0
  324. package/dist/types/components/input-stepper/input-stepper.component.d.ts +37 -0
  325. package/dist/types/components/input-stepper/input-stepper.component.d.ts.map +1 -0
  326. package/dist/types/components/input-stepper/input-stepper.constant.d.ts +32 -0
  327. package/dist/types/components/input-stepper/input-stepper.constant.d.ts.map +1 -0
  328. package/dist/types/components/link/index.d.ts +3 -0
  329. package/dist/types/components/link/index.d.ts.map +1 -0
  330. package/dist/types/components/link/link-internal.element.d.ts +9 -0
  331. package/dist/types/components/link/link-internal.element.d.ts.map +1 -0
  332. package/dist/types/components/link/link.element.d.ts +8 -0
  333. package/dist/types/components/link/link.element.d.ts.map +1 -0
  334. package/dist/types/components/link-field/link-field.component.d.ts +23 -0
  335. package/dist/types/components/link-field/link-field.component.d.ts.map +1 -0
  336. package/dist/types/components/modal/modal-card.component.d.ts +15 -0
  337. package/dist/types/components/modal/modal-card.component.d.ts.map +1 -0
  338. package/dist/types/components/modal/modal-content.component.d.ts +16 -0
  339. package/dist/types/components/modal/modal-content.component.d.ts.map +1 -0
  340. package/dist/types/components/modal/modal.component.d.ts +11 -0
  341. package/dist/types/components/modal/modal.component.d.ts.map +1 -0
  342. package/dist/types/components/modal/modal.interface.d.ts +20 -0
  343. package/dist/types/components/modal/modal.interface.d.ts.map +1 -0
  344. package/dist/types/components/money-field/money-field.component.d.ts +24 -0
  345. package/dist/types/components/money-field/money-field.component.d.ts.map +1 -0
  346. package/dist/types/components/phone-number-field/phone-number-field.component.d.ts +28 -0
  347. package/dist/types/components/phone-number-field/phone-number-field.component.d.ts.map +1 -0
  348. package/dist/types/components/pin/pin.component.d.ts +23 -0
  349. package/dist/types/components/pin/pin.component.d.ts.map +1 -0
  350. package/dist/types/components/pin/pin.constant.d.ts +25 -0
  351. package/dist/types/components/pin/pin.constant.d.ts.map +1 -0
  352. package/dist/types/components/search-dropdown/search-dropdown.component.d.ts +30 -0
  353. package/dist/types/components/search-dropdown/search-dropdown.component.d.ts.map +1 -0
  354. package/dist/types/components/search-field/search-field.component.d.ts +14 -0
  355. package/dist/types/components/search-field/search-field.component.d.ts.map +1 -0
  356. package/dist/types/components/switch/switch-content.component.d.ts +13 -0
  357. package/dist/types/components/switch/switch-content.component.d.ts.map +1 -0
  358. package/dist/types/components/switch/switch.component.d.ts +12 -0
  359. package/dist/types/components/switch/switch.component.d.ts.map +1 -0
  360. package/dist/types/components/tab/tab.component.d.ts +22 -0
  361. package/dist/types/components/tab/tab.component.d.ts.map +1 -0
  362. package/dist/types/components/tab/tab.constant.d.ts +15 -0
  363. package/dist/types/components/tab/tab.constant.d.ts.map +1 -0
  364. package/dist/types/components/text-area/text-area.component.d.ts +22 -0
  365. package/dist/types/components/text-area/text-area.component.d.ts.map +1 -0
  366. package/dist/types/components/text-field/text-field.component.d.ts +21 -0
  367. package/dist/types/components/text-field/text-field.component.d.ts.map +1 -0
  368. package/dist/types/components/typography/index.d.ts +2 -0
  369. package/dist/types/components/typography/index.d.ts.map +1 -0
  370. package/dist/types/components/typography/typography-limit-one-line.component.d.ts +9 -0
  371. package/dist/types/components/typography/typography-limit-one-line.component.d.ts.map +1 -0
  372. package/dist/types/components/uploader/uploader-item.component.d.ts +17 -0
  373. package/dist/types/components/uploader/uploader-item.component.d.ts.map +1 -0
  374. package/dist/types/components/uploader/uploader-item.styles.d.ts +53 -0
  375. package/dist/types/components/uploader/uploader-item.styles.d.ts.map +1 -0
  376. package/dist/types/components/uploader/uploader.component.d.ts +48 -0
  377. package/dist/types/components/uploader/uploader.component.d.ts.map +1 -0
  378. package/dist/types/constants/apps.data.d.ts +7 -0
  379. package/dist/types/constants/apps.data.d.ts.map +1 -0
  380. package/dist/types/constants/color.constant.d.ts +105 -0
  381. package/dist/types/constants/color.constant.d.ts.map +1 -0
  382. package/dist/types/constants/index.d.ts +5 -0
  383. package/dist/types/constants/index.d.ts.map +1 -0
  384. package/dist/types/constants/style.constant.d.ts +58 -0
  385. package/dist/types/constants/style.constant.d.ts.map +1 -0
  386. package/dist/types/constants/typography.constant.d.ts +710 -0
  387. package/dist/types/constants/typography.constant.d.ts.map +1 -0
  388. package/dist/types/index.d.ts +5 -0
  389. package/dist/types/index.d.ts.map +1 -0
  390. package/dist/types/styles/index.d.ts +2 -0
  391. package/dist/types/styles/index.d.ts.map +1 -0
  392. package/dist/types/styles/stack.style.d.ts +54 -0
  393. package/dist/types/styles/stack.style.d.ts.map +1 -0
  394. package/dist/types/types/index.d.ts +1 -0
  395. package/dist/types/types/index.d.ts.map +1 -0
  396. package/dist/types/utils/index.d.ts +2 -0
  397. package/dist/types/utils/index.d.ts.map +1 -0
  398. package/package.json +54 -0
@@ -0,0 +1,3565 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var material = require('@mui/material');
5
+ var React = require('react');
6
+ var styles = require('@mui/material/styles');
7
+ var LinkIcon = require('@mui/icons-material/Link');
8
+ var CheckIcon = require('@mui/icons-material/Check');
9
+ var RemoveIcon = require('@mui/icons-material/Remove');
10
+ var FiberManualRecordIcon = require('@mui/icons-material/FiberManualRecord');
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
+ var MuiTextField = require('@mui/material/TextField');
17
+ var formik = require('formik');
18
+ var Slider = require('react-slick');
19
+ require('slick-carousel/slick/slick.css');
20
+ require('slick-carousel/slick/slick-theme.css');
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
+
27
+ const AVATAR_SIZES = {
28
+ xs: 24,
29
+ sm: 32,
30
+ md: 40,
31
+ lg: 48,
32
+ xl: 56,
33
+ '2xl': 64,
34
+ };
35
+ const BADGE_SIZES = {
36
+ xs: 8,
37
+ sm: 10,
38
+ md: 12,
39
+ lg: 14,
40
+ xl: 16,
41
+ '2xl': 18,
42
+ };
43
+ const BADGE_FONT_SIZES = {
44
+ xs: 4,
45
+ sm: 5,
46
+ md: 6,
47
+ lg: 7,
48
+ xl: 8,
49
+ '2xl': 9,
50
+ };
51
+ const getBadgePosition = (position) => {
52
+ const positions = {
53
+ 'top-left': { top: 0, left: 0 },
54
+ 'top-right': { top: 0, right: 0 },
55
+ 'top-center': { top: 0, left: '50%', transform: 'translateX(-50%)' },
56
+ 'bottom-left': { bottom: 0, left: 0 },
57
+ 'bottom-right': { bottom: 0, right: 0 },
58
+ 'bottom-center': { bottom: 0, left: '50%', transform: 'translateX(-50%)' },
59
+ };
60
+ return positions[position];
61
+ };
62
+ exports.AvatarColor = void 0;
63
+ (function (AvatarColor) {
64
+ AvatarColor["BACKGROUND_COLOR_BADGE"] = "#000000";
65
+ AvatarColor["COLOR_BADGE"] = "#FFFFFF";
66
+ AvatarColor["COLOR_TITLE"] = "#414651";
67
+ AvatarColor["COLOR_DESCRIPTION"] = "#535862";
68
+ })(exports.AvatarColor || (exports.AvatarColor = {}));
69
+
70
+ const SIZE_LARGE = 32;
71
+ const SIZE_MEDIUM = 26;
72
+ const SIZE_SMALL = 18;
73
+ const SIZE_EXTRA_SMALL = 20;
74
+ const SIZE_AVATAR_GROUP = 80;
75
+ const SIZE_EXTRA_LARGE = 36;
76
+ const MAP_SIZE = {
77
+ large: { width: SIZE_LARGE, height: SIZE_LARGE },
78
+ medium: { width: SIZE_MEDIUM, height: SIZE_MEDIUM },
79
+ small: { width: SIZE_SMALL, height: SIZE_SMALL },
80
+ extra_small: { width: SIZE_EXTRA_SMALL, height: SIZE_EXTRA_SMALL },
81
+ extra_large: { width: SIZE_EXTRA_LARGE, height: SIZE_EXTRA_LARGE },
82
+ avatar_group: { width: SIZE_AVATAR_GROUP, height: SIZE_AVATAR_GROUP },
83
+ };
84
+
85
+ // Brand Colors
86
+ const COLOR_BRAND = {
87
+ 50: '#EDFFFA',
88
+ 100: '#C3FFF2',
89
+ 200: '#87FFEB',
90
+ 300: '#42FFDC',
91
+ 400: '#0CF5CA',
92
+ 500: '#00D8B2',
93
+ 600: '#00AF93',
94
+ 700: '#008A77',
95
+ 800: '#026D60',
96
+ 900: '#07554B',
97
+ 950: '#003733',
98
+ };
99
+ // Neutral Colors
100
+ const COLOR_NEUTRAL = {
101
+ 50: '#FAFAFA',
102
+ 100: '#F5F5F5',
103
+ 200: '#E5E5E5',
104
+ 300: '#D4D4D4',
105
+ 400: '#A3A3A3',
106
+ 500: '#737373',
107
+ 600: '#525252',
108
+ 700: '#404040',
109
+ 800: '#202626',
110
+ 900: '#171717',
111
+ 950: '#0A0A0A',
112
+ };
113
+ // Gray Colors
114
+ const COLOR_GRAY = {
115
+ 50: '#F9AFAB',
116
+ 100: '#F3F4F6',
117
+ 200: '#E5E7EB',
118
+ 300: '#DDD5DB',
119
+ 400: '#9CA3AF',
120
+ 500: '#6B7280',
121
+ 600: '#4B5563',
122
+ 700: '#374151',
123
+ 800: '#1F2937',
124
+ 900: '#111827',
125
+ 950: '#030712',
126
+ };
127
+ // Error Colors
128
+ const COLOR_ERROR = {
129
+ 50: '#FEF2F2',
130
+ 100: '#FEE2E2',
131
+ 200: '#FECACA',
132
+ 300: '#FCASA5',
133
+ 400: '#F87171',
134
+ 500: '#EF4444',
135
+ 600: '#DC2626',
136
+ 700: '#B91C1C',
137
+ 800: '#991B1B',
138
+ 900: '#7F1D1D',
139
+ 950: '#450A0A',
140
+ };
141
+ // Warning Colors
142
+ const COLOR_WARNING = {
143
+ 50: '#FFEEB8',
144
+ 100: '#FFDD93',
145
+ 200: '#FFD08A',
146
+ 300: '#FDE047',
147
+ 400: '#FACC15',
148
+ 500: '#EAB308',
149
+ 600: '#CA8A04',
150
+ 700: '#A16207',
151
+ 800: '#854D0E',
152
+ 900: '#713F12',
153
+ 950: '#422006',
154
+ };
155
+ // Success Colors
156
+ const COLOR_SUCCESS = {
157
+ 50: '#F0FDF4',
158
+ 100: '#DCFCE7',
159
+ 200: '#BBF7D0',
160
+ 300: '#A6E96C',
161
+ 400: '#4ADE80',
162
+ 500: '#22C55E',
163
+ 600: '#16A34A',
164
+ 700: '#15803D',
165
+ 800: '#166534',
166
+ 900: '#14532D',
167
+ 950: '#052E16',
168
+ };
169
+ // Info Colors
170
+ const COLOR_INFO = {
171
+ 50: '#EFF8FF',
172
+ 100: '#0B8AFF',
173
+ 200: '#BFD8FE',
174
+ 300: '#93C5FD',
175
+ 400: '#60A5FA',
176
+ 500: '#3B82F6',
177
+ 600: '#2563EB',
178
+ 700: '#1D4ED8',
179
+ 800: '#1E40AF',
180
+ 900: '#1E3A8A',
181
+ 950: '#172554',
182
+ };
183
+ // Accent Colors
184
+ const COLOR_ACCENT = {
185
+ 50: '#F3F3FF',
186
+ 100: '#F9F9FF',
187
+ 200: '#DDD6FE',
188
+ 300: '#C4B5FD',
189
+ 400: '#A78BFA',
190
+ 500: '#8B5CF6',
191
+ 600: '#7C3AED',
192
+ 700: '#6D28D9',
193
+ 800: '#5B21B6',
194
+ 900: '#4C1D95',
195
+ 950: '#2E1065',
196
+ };
197
+
198
+ // CÁC THÔNG SỐ CÙNG GROUP CÓ TỶ LỆ VỚI NHAU
199
+ //
200
+ const ANIMATION_TIME = 300;
201
+ const SCALE_VALUE = 'scale(1.05)';
202
+ const TRANSITION_TIME = '0.2s';
203
+ //
204
+ const WIDTH_LAYOUT_DESKTOP = `1200px`;
205
+ const HEIGHT_LOGO_DEFAULT = '40px';
206
+ const HEIGHT_IMAGE_DEFAULT = '40px';
207
+ //
208
+ const PADDING_GAP_TAB = '24px';
209
+ const PADDING_GAP_LAYOUT = '16px';
210
+ const PADDING_GAP_BUTTON = '12px';
211
+ const PADDING_LAYOUT_HEADER = '8px 12px';
212
+ const PADDING_GAP_ITEM = '8px';
213
+ const PADDING_GAP_ITEM_SMALL = '6px';
214
+ //
215
+ const HEIGHT_ELEMENT_OTHER = '36px';
216
+ //
217
+ const BORDER_RADIUS_ELEMENT_ACTION = '24px';
218
+ const BORDER_RADIUS_ELEMENT_WRAPPER = '12px';
219
+ const BORDER_RADIUS_ELEMENT = '10px';
220
+ const BORDER_RADIUS_ELEMENT_SMALL = '6px';
221
+ const BORDER_RADIUS_ELEMENT_MIDDLE = '8px';
222
+ const BORDER_RADIUS_ELEMENT_TAG = '3px';
223
+ const HEIGHT_DEFAULT_TEXT_FIELD_BUTTON = '37.13px';
224
+ //
225
+ const TEXT_FIELD = {
226
+ FONT_SIZE_LABEL: 15,
227
+ FONT_SIZE_TITLE: 18,
228
+ FONT_SIZE_CAPTION: 10,
229
+ };
230
+ const FONT_SIZE_ICON = {
231
+ large: '22px',
232
+ xl: '20px',
233
+ medium: '19px',
234
+ small: '12px',
235
+ };
236
+ const FONT_SIZE_LOADING$1 = {
237
+ large: 40,
238
+ medium: 22.5,
239
+ small: 16,
240
+ };
241
+ const VARIANT_BY_SIZE = {
242
+ large: 'h6',
243
+ medium: 'subtitle1',
244
+ small: 'caption',
245
+ };
246
+ const GAP_ICON_CONTENT_BY_SIZE = {
247
+ large: '12px',
248
+ medium: '8px',
249
+ small: '4px',
250
+ };
251
+ const BORDER_COLOR_CARD = 'rgba(0, 0, 0, 0.12)';
252
+ const BORDER_COLOR_LAYOUT = '#E4E6E6';
253
+ const HEIGHT_HEADER = 57;
254
+ const WIDTH_COLLAPSE = 55;
255
+ const WIDTH_SIDEBAR = 224;
256
+ const WIDTH_SIDEBAR_EXPAND = 200;
257
+ const BACKGROUND_SYSTEM = '#F2F2F2';
258
+ const WIDTH_TEXT_FIELD = {
259
+ large: 300,
260
+ medium: 200,
261
+ small: 100,
262
+ };
263
+
264
+ var style_constant = /*#__PURE__*/Object.freeze({
265
+ __proto__: null,
266
+ ANIMATION_TIME: ANIMATION_TIME,
267
+ BACKGROUND_SYSTEM: BACKGROUND_SYSTEM,
268
+ BORDER_COLOR_CARD: BORDER_COLOR_CARD,
269
+ BORDER_COLOR_LAYOUT: BORDER_COLOR_LAYOUT,
270
+ BORDER_RADIUS_ELEMENT: BORDER_RADIUS_ELEMENT,
271
+ BORDER_RADIUS_ELEMENT_ACTION: BORDER_RADIUS_ELEMENT_ACTION,
272
+ BORDER_RADIUS_ELEMENT_MIDDLE: BORDER_RADIUS_ELEMENT_MIDDLE,
273
+ BORDER_RADIUS_ELEMENT_SMALL: BORDER_RADIUS_ELEMENT_SMALL,
274
+ BORDER_RADIUS_ELEMENT_TAG: BORDER_RADIUS_ELEMENT_TAG,
275
+ BORDER_RADIUS_ELEMENT_WRAPPER: BORDER_RADIUS_ELEMENT_WRAPPER,
276
+ FONT_SIZE_ICON: FONT_SIZE_ICON,
277
+ FONT_SIZE_LOADING: FONT_SIZE_LOADING$1,
278
+ GAP_ICON_CONTENT_BY_SIZE: GAP_ICON_CONTENT_BY_SIZE,
279
+ HEIGHT_DEFAULT_TEXT_FIELD_BUTTON: HEIGHT_DEFAULT_TEXT_FIELD_BUTTON,
280
+ HEIGHT_ELEMENT_OTHER: HEIGHT_ELEMENT_OTHER,
281
+ HEIGHT_HEADER: HEIGHT_HEADER,
282
+ HEIGHT_IMAGE_DEFAULT: HEIGHT_IMAGE_DEFAULT,
283
+ HEIGHT_LOGO_DEFAULT: HEIGHT_LOGO_DEFAULT,
284
+ PADDING_GAP_BUTTON: PADDING_GAP_BUTTON,
285
+ PADDING_GAP_ITEM: PADDING_GAP_ITEM,
286
+ PADDING_GAP_ITEM_SMALL: PADDING_GAP_ITEM_SMALL,
287
+ PADDING_GAP_LAYOUT: PADDING_GAP_LAYOUT,
288
+ PADDING_GAP_TAB: PADDING_GAP_TAB,
289
+ PADDING_LAYOUT_HEADER: PADDING_LAYOUT_HEADER,
290
+ SCALE_VALUE: SCALE_VALUE,
291
+ TEXT_FIELD: TEXT_FIELD,
292
+ TRANSITION_TIME: TRANSITION_TIME,
293
+ VARIANT_BY_SIZE: VARIANT_BY_SIZE,
294
+ WIDTH_COLLAPSE: WIDTH_COLLAPSE,
295
+ WIDTH_LAYOUT_DESKTOP: WIDTH_LAYOUT_DESKTOP,
296
+ WIDTH_SIDEBAR: WIDTH_SIDEBAR,
297
+ WIDTH_SIDEBAR_EXPAND: WIDTH_SIDEBAR_EXPAND,
298
+ WIDTH_TEXT_FIELD: WIDTH_TEXT_FIELD
299
+ });
300
+
301
+ const FONT_FAMILY = {
302
+ primary: 'Inter, sans-serif',
303
+ };
304
+ const FONT_SIZE = {
305
+ '5xl': '48px',
306
+ '4xl': '32px',
307
+ '3xl': '28px',
308
+ '2xl': '24px',
309
+ xl: '20px',
310
+ lg: '18px',
311
+ md: '16px',
312
+ base: '14px',
313
+ sm: '12px',
314
+ xs: '10px',
315
+ };
316
+ const FONT_WEIGHT = {
317
+ bold: 700,
318
+ semiBold: 600,
319
+ medium: 500,
320
+ regular: 400,
321
+ };
322
+ const LINE_HEIGHT = {
323
+ tight: 1.2,
324
+ normal: 1.5,
325
+ relaxed: 1.75,
326
+ loose: 2,
327
+ };
328
+ const FONT_STYLE = {
329
+ normal: 'normal',
330
+ underline: 'underline',
331
+ strikethrough: 'line-through',
332
+ };
333
+ // Helper function to combine typography styles
334
+ const createTypography = (fontSize, fontWeight, lineHeight, fontStyle) => ({
335
+ fontFamily: FONT_FAMILY.primary,
336
+ fontSize: typeof fontSize === 'number' ? `${fontSize}px` : fontSize,
337
+ fontWeight: fontWeight ?? FONT_WEIGHT.regular,
338
+ lineHeight: lineHeight ?? LINE_HEIGHT.normal,
339
+ fontStyle: fontStyle ?? FONT_STYLE.normal,
340
+ });
341
+ // Preset typography styles
342
+ const TYPOGRAPHY = {
343
+ h1: createTypography(FONT_SIZE['5xl'], FONT_WEIGHT.bold),
344
+ h2: createTypography(FONT_SIZE['4xl'], FONT_WEIGHT.bold),
345
+ h3: createTypography(FONT_SIZE['3xl'], FONT_WEIGHT.bold),
346
+ h4: createTypography(FONT_SIZE['2xl'], FONT_WEIGHT.bold),
347
+ h5: createTypography(FONT_SIZE['xl'], FONT_WEIGHT.bold),
348
+ h6: createTypography(FONT_SIZE['lg'], FONT_WEIGHT.bold),
349
+ body: createTypography(FONT_SIZE['md'], FONT_WEIGHT.regular),
350
+ caption: createTypography(FONT_SIZE['sm'], FONT_WEIGHT.regular),
351
+ // 14px combinations
352
+ text14Medium: createTypography(FONT_SIZE.base, FONT_WEIGHT.medium),
353
+ text14Regular: createTypography(FONT_SIZE.base, FONT_WEIGHT.regular),
354
+ text14SemiBold: createTypography(FONT_SIZE.base, FONT_WEIGHT.semiBold),
355
+ text14Bold: createTypography(FONT_SIZE.base, FONT_WEIGHT.bold),
356
+ // 12px combinations
357
+ text12Medium: createTypography(FONT_SIZE.sm, FONT_WEIGHT.medium),
358
+ text12Regular: createTypography(FONT_SIZE.sm, FONT_WEIGHT.regular),
359
+ text12SemiBold: createTypography(FONT_SIZE.sm, FONT_WEIGHT.semiBold),
360
+ text12Bold: createTypography(FONT_SIZE.sm, FONT_WEIGHT.bold),
361
+ // 10px combinations
362
+ text10Medium: createTypography(FONT_SIZE.xs, FONT_WEIGHT.medium),
363
+ text10Regular: createTypography(FONT_SIZE.xs, FONT_WEIGHT.regular),
364
+ text10SemiBold: createTypography(FONT_SIZE.xs, FONT_WEIGHT.semiBold),
365
+ text10Bold: createTypography(FONT_SIZE.xs, FONT_WEIGHT.bold),
366
+ // Custom TextField variants
367
+ textFieldLabel: createTypography(FONT_SIZE.base, FONT_WEIGHT.medium, LINE_HEIGHT.relaxed),
368
+ textFieldHelper: createTypography(FONT_SIZE.sm, FONT_WEIGHT.regular, LINE_HEIGHT.relaxed),
369
+ };
370
+ /**
371
+ * ============================================
372
+ * CÁCH SỬ DỤNG TYPOGRAPHY
373
+ * ============================================
374
+ *
375
+ * 1. Sử dụng TYPOGRAPHY presets trực tiếp:
376
+ * ----
377
+ * import { TYPOGRAPHY } from '@/common/constant/typography.constant';
378
+ *
379
+ * <Text style={TYPOGRAPHY.h1}>Heading 1</Text>
380
+ * <Text style={TYPOGRAPHY.text14Medium}>14px Medium</Text>
381
+ * <Text style={TYPOGRAPHY.text12Bold}>12px Bold</Text>
382
+ *
383
+ * 2. Kết hợp với các styles khác (CSS-in-JS):
384
+ * ----
385
+ * const styles = {
386
+ * title: {
387
+ * ...TYPOGRAPHY.h2,
388
+ * color: '#07554B',
389
+ * marginBottom: '16px',
390
+ * }
391
+ * };
392
+ *
393
+ * 3. Sử dụng hàm createTypography để tạo custom style:
394
+ * ----
395
+ * import { createTypography, FONT_SIZE, FONT_WEIGHT, LINE_HEIGHT } from '@/common/constant/typography.constant';
396
+ *
397
+ * const customStyle = createTypography(
398
+ * FONT_SIZE.lg, // 18px
399
+ * FONT_WEIGHT.semiBold, // 600
400
+ * LINE_HEIGHT.relaxed, // 1.75
401
+ * 'underline' // style
402
+ * );
403
+ * <Text style={customStyle}>Custom Text</Text>
404
+ *
405
+ * 4. Sử dụng từng hằng số riêng lẻ:
406
+ * ----
407
+ * import { FONT_SIZE, FONT_WEIGHT, LINE_HEIGHT } from '@/common/constant/typography.constant';
408
+ *
409
+ * <Text style={{
410
+ * fontSize: FONT_SIZE.md,
411
+ * fontWeight: FONT_WEIGHT.bold,
412
+ * lineHeight: LINE_HEIGHT.loose,
413
+ * }}>
414
+ * Custom Combination
415
+ * </Text>
416
+ *
417
+ * 5. Dùng trong Styled Components / Emotion:
418
+ * ----
419
+ * import styled from 'styled-components';
420
+ * import { TYPOGRAPHY } from '@/common/constant/typography.constant';
421
+ *
422
+ * const Title = styled.h1`
423
+ * ${TYPOGRAPHY.h1}
424
+ * color: #07554B;
425
+ * `;
426
+ */
427
+ const TYPOGRAPHY_STYLES = {
428
+ '2xl': {
429
+ regular: {
430
+ fontFamily: '"Inter",sans-serif',
431
+ fontWeight: 400,
432
+ fontStyle: 'normal',
433
+ fontSize: '72px',
434
+ lineHeight: '80px',
435
+ letterSpacing: '0%',
436
+ verticalAlign: 'middle',
437
+ },
438
+ medium: {
439
+ fontFamily: '"Inter",sans-serif',
440
+ fontWeight: 500,
441
+ fontStyle: 'normal',
442
+ fontSize: '72px',
443
+ lineHeight: '80px',
444
+ letterSpacing: '0%',
445
+ verticalAlign: 'middle',
446
+ },
447
+ semiBold: {
448
+ fontFamily: '"Inter",sans-serif',
449
+ fontWeight: 600,
450
+ fontStyle: 'normal',
451
+ fontSize: '72px',
452
+ lineHeight: '80px',
453
+ letterSpacing: '0%',
454
+ verticalAlign: 'middle',
455
+ },
456
+ bold: {
457
+ fontFamily: '"Inter",sans-serif',
458
+ fontWeight: 700,
459
+ fontStyle: 'normal',
460
+ fontSize: '72px',
461
+ lineHeight: '80px',
462
+ letterSpacing: '0%',
463
+ verticalAlign: 'middle',
464
+ },
465
+ },
466
+ xl: {
467
+ regular: {
468
+ fontFamily: '"Inter",sans-serif',
469
+ fontWeight: 400,
470
+ fontStyle: 'normal',
471
+ fontSize: '60px',
472
+ lineHeight: '68px',
473
+ letterSpacing: '0%',
474
+ verticalAlign: 'middle',
475
+ },
476
+ medium: {
477
+ fontFamily: '"Inter",sans-serif',
478
+ fontWeight: 500,
479
+ fontStyle: 'normal',
480
+ fontSize: '60px',
481
+ lineHeight: '68px',
482
+ letterSpacing: '0%',
483
+ verticalAlign: 'middle',
484
+ },
485
+ semiBold: {
486
+ fontFamily: '"Inter",sans-serif',
487
+ fontWeight: 600,
488
+ fontStyle: 'normal',
489
+ fontSize: '60px',
490
+ lineHeight: '68px',
491
+ letterSpacing: '0%',
492
+ verticalAlign: 'middle',
493
+ },
494
+ bold: {
495
+ fontFamily: '"Inter",sans-serif',
496
+ fontWeight: 700,
497
+ fontStyle: 'normal',
498
+ fontSize: '60px',
499
+ lineHeight: '68px',
500
+ letterSpacing: '0%',
501
+ verticalAlign: 'middle',
502
+ },
503
+ },
504
+ lg: {
505
+ regular: {
506
+ fontFamily: '"Inter",sans-serif',
507
+ fontWeight: 400,
508
+ fontStyle: 'normal',
509
+ fontSize: '48px',
510
+ lineHeight: '56px',
511
+ letterSpacing: '0%',
512
+ verticalAlign: 'middle',
513
+ },
514
+ medium: {
515
+ fontFamily: '"Inter",sans-serif',
516
+ fontWeight: 500,
517
+ fontStyle: 'normal',
518
+ fontSize: '48px',
519
+ lineHeight: '56px',
520
+ letterSpacing: '0%',
521
+ verticalAlign: 'middle',
522
+ },
523
+ semiBold: {
524
+ fontFamily: '"Inter",sans-serif',
525
+ fontWeight: 600,
526
+ fontStyle: 'normal',
527
+ fontSize: '48px',
528
+ lineHeight: '56px',
529
+ letterSpacing: '0%',
530
+ verticalAlign: 'middle',
531
+ },
532
+ bold: {
533
+ fontFamily: '"Inter",sans-serif',
534
+ fontWeight: 700,
535
+ fontStyle: 'normal',
536
+ fontSize: '48px',
537
+ lineHeight: '56px',
538
+ letterSpacing: '0%',
539
+ verticalAlign: 'middle',
540
+ },
541
+ },
542
+ md: {
543
+ regular: {
544
+ fontFamily: '"Inter",sans-serif',
545
+ fontWeight: 400,
546
+ fontStyle: 'normal',
547
+ fontSize: '36px',
548
+ lineHeight: '44px',
549
+ letterSpacing: '0%',
550
+ verticalAlign: 'middle',
551
+ },
552
+ medium: {
553
+ fontFamily: '"Inter",sans-serif',
554
+ fontWeight: 500,
555
+ fontStyle: 'normal',
556
+ fontSize: '36px',
557
+ lineHeight: '44px',
558
+ letterSpacing: '0%',
559
+ verticalAlign: 'middle',
560
+ },
561
+ semiBold: {
562
+ fontFamily: '"Inter",sans-serif',
563
+ fontWeight: 600,
564
+ fontStyle: 'normal',
565
+ fontSize: '36px',
566
+ lineHeight: '44px',
567
+ letterSpacing: '0%',
568
+ verticalAlign: 'middle',
569
+ },
570
+ bold: {
571
+ fontFamily: '"Inter",sans-serif',
572
+ fontWeight: 700,
573
+ fontStyle: 'normal',
574
+ fontSize: '36px',
575
+ lineHeight: '44px',
576
+ letterSpacing: '0%',
577
+ verticalAlign: 'middle',
578
+ },
579
+ },
580
+ sm: {
581
+ regular: {
582
+ fontFamily: '"Inter",sans-serif',
583
+ fontWeight: 400,
584
+ fontStyle: 'normal',
585
+ fontSize: '30px',
586
+ lineHeight: '38px',
587
+ letterSpacing: '0%',
588
+ verticalAlign: 'middle',
589
+ },
590
+ medium: {
591
+ fontFamily: '"Inter",sans-serif',
592
+ fontWeight: 500,
593
+ fontStyle: 'normal',
594
+ fontSize: '30px',
595
+ lineHeight: '38px',
596
+ letterSpacing: '0%',
597
+ verticalAlign: 'middle',
598
+ },
599
+ semiBold: {
600
+ fontFamily: '"Inter",sans-serif',
601
+ fontWeight: 600,
602
+ fontStyle: 'normal',
603
+ fontSize: '30px',
604
+ lineHeight: '38px',
605
+ letterSpacing: '0%',
606
+ verticalAlign: 'middle',
607
+ },
608
+ bold: {
609
+ fontFamily: '"Inter",sans-serif',
610
+ fontWeight: 700,
611
+ fontStyle: 'normal',
612
+ fontSize: '30px',
613
+ lineHeight: '38px',
614
+ letterSpacing: '0%',
615
+ verticalAlign: 'middle',
616
+ },
617
+ },
618
+ xs: {
619
+ regular: {
620
+ fontFamily: '"Inter",sans-serif',
621
+ fontWeight: 400,
622
+ fontStyle: 'normal',
623
+ fontSize: '24px',
624
+ lineHeight: '32px',
625
+ letterSpacing: '0%',
626
+ verticalAlign: 'middle',
627
+ },
628
+ medium: {
629
+ fontFamily: '"Inter",sans-serif',
630
+ fontWeight: 500,
631
+ fontStyle: 'normal',
632
+ fontSize: '24px',
633
+ lineHeight: '32px',
634
+ letterSpacing: '0%',
635
+ verticalAlign: 'middle',
636
+ },
637
+ semiBold: {
638
+ fontFamily: '"Inter",sans-serif',
639
+ fontWeight: 600,
640
+ fontStyle: 'normal',
641
+ fontSize: '24px',
642
+ lineHeight: '32px',
643
+ letterSpacing: '0%',
644
+ verticalAlign: 'middle',
645
+ },
646
+ bold: {
647
+ fontFamily: '"Inter",sans-serif',
648
+ fontWeight: 700,
649
+ fontStyle: 'normal',
650
+ fontSize: '24px',
651
+ lineHeight: '32px',
652
+ letterSpacing: '0%',
653
+ verticalAlign: 'middle',
654
+ },
655
+ },
656
+ textXl: {
657
+ regular: {
658
+ fontFamily: '"Inter",sans-serif',
659
+ fontWeight: 400,
660
+ fontStyle: 'normal',
661
+ fontSize: '20px',
662
+ lineHeight: '28px',
663
+ letterSpacing: '0%',
664
+ verticalAlign: 'middle',
665
+ },
666
+ medium: {
667
+ fontFamily: '"Inter",sans-serif',
668
+ fontWeight: 500,
669
+ fontStyle: 'normal',
670
+ fontSize: '20px',
671
+ lineHeight: '28px',
672
+ letterSpacing: '0%',
673
+ verticalAlign: 'middle',
674
+ },
675
+ semiBold: {
676
+ fontFamily: '"Inter",sans-serif',
677
+ fontWeight: 600,
678
+ fontStyle: 'normal',
679
+ fontSize: '20px',
680
+ lineHeight: '28px',
681
+ letterSpacing: '0%',
682
+ verticalAlign: 'middle',
683
+ },
684
+ bold: {
685
+ fontFamily: '"Inter",sans-serif',
686
+ fontWeight: 700,
687
+ fontStyle: 'normal',
688
+ fontSize: '20px',
689
+ lineHeight: '28px',
690
+ letterSpacing: '0%',
691
+ verticalAlign: 'middle',
692
+ },
693
+ },
694
+ textLg: {
695
+ regular: {
696
+ fontFamily: '"Inter",sans-serif',
697
+ fontWeight: 400,
698
+ fontStyle: 'normal',
699
+ fontSize: '18px',
700
+ lineHeight: '26px',
701
+ letterSpacing: '0%',
702
+ verticalAlign: 'middle',
703
+ },
704
+ medium: {
705
+ fontFamily: '"Inter",sans-serif',
706
+ fontWeight: 500,
707
+ fontStyle: 'normal',
708
+ fontSize: '18px',
709
+ lineHeight: '26px',
710
+ letterSpacing: '0%',
711
+ verticalAlign: 'middle',
712
+ },
713
+ semiBold: {
714
+ fontFamily: '"Inter",sans-serif',
715
+ fontWeight: 600,
716
+ fontStyle: 'normal',
717
+ fontSize: '18px',
718
+ lineHeight: '26px',
719
+ letterSpacing: '0%',
720
+ verticalAlign: 'middle',
721
+ },
722
+ bold: {
723
+ fontFamily: '"Inter",sans-serif',
724
+ fontWeight: 700,
725
+ fontStyle: 'normal',
726
+ fontSize: '18px',
727
+ lineHeight: '26px',
728
+ letterSpacing: '0%',
729
+ verticalAlign: 'middle',
730
+ },
731
+ },
732
+ textMd: {
733
+ regular: {
734
+ fontFamily: '"Inter",sans-serif',
735
+ fontWeight: 400,
736
+ fontStyle: 'normal',
737
+ fontSize: '16px',
738
+ lineHeight: '24px',
739
+ letterSpacing: '0%',
740
+ verticalAlign: 'middle',
741
+ },
742
+ medium: {
743
+ fontFamily: '"Inter",sans-serif',
744
+ fontWeight: 500,
745
+ fontStyle: 'normal',
746
+ fontSize: '16px',
747
+ lineHeight: '24px',
748
+ letterSpacing: '0%',
749
+ verticalAlign: 'middle',
750
+ },
751
+ semiBold: {
752
+ fontFamily: '"Inter",sans-serif',
753
+ fontWeight: 600,
754
+ fontStyle: 'normal',
755
+ fontSize: '16px',
756
+ lineHeight: '24px',
757
+ verticalAlign: 'middle',
758
+ },
759
+ bold: {
760
+ fontFamily: '"Inter",sans-serif',
761
+ fontWeight: 700,
762
+ fontStyle: 'normal',
763
+ fontSize: '16px',
764
+ lineHeight: '24px',
765
+ letterSpacing: '0%',
766
+ verticalAlign: 'middle',
767
+ },
768
+ },
769
+ textSm: {
770
+ regular: {
771
+ fontFamily: '"Inter",sans-serif',
772
+ fontWeight: 400,
773
+ fontStyle: 'normal',
774
+ fontSize: '14px',
775
+ lineHeight: '22px',
776
+ letterSpacing: '0%',
777
+ verticalAlign: 'middle',
778
+ },
779
+ medium: {
780
+ fontFamily: '"Inter",sans-serif',
781
+ fontWeight: 500,
782
+ fontStyle: 'normal',
783
+ fontSize: '14px',
784
+ lineHeight: '22px',
785
+ letterSpacing: '0%',
786
+ verticalAlign: 'middle',
787
+ },
788
+ semiBold: {
789
+ fontFamily: '"Inter",sans-serif',
790
+ fontWeight: 600,
791
+ fontStyle: 'normal',
792
+ fontSize: '14px',
793
+ lineHeight: '22px',
794
+ letterSpacing: '0%',
795
+ verticalAlign: 'middle',
796
+ },
797
+ bold: {
798
+ fontFamily: '"Inter",sans-serif',
799
+ fontWeight: 700,
800
+ fontStyle: 'normal',
801
+ fontSize: '14px',
802
+ lineHeight: '22px',
803
+ letterSpacing: '0%',
804
+ verticalAlign: 'middle',
805
+ },
806
+ },
807
+ textXs: {
808
+ regular: {
809
+ fontFamily: '"Inter",sans-serif',
810
+ fontWeight: 400,
811
+ fontStyle: 'normal',
812
+ fontSize: '12px',
813
+ lineHeight: '20px',
814
+ letterSpacing: '0%',
815
+ verticalAlign: 'middle',
816
+ },
817
+ medium: {
818
+ fontFamily: '"Inter",sans-serif',
819
+ fontWeight: 500,
820
+ fontStyle: 'normal',
821
+ fontSize: '12px',
822
+ lineHeight: '20px',
823
+ letterSpacing: '0%',
824
+ verticalAlign: 'middle',
825
+ },
826
+ semiBold: {
827
+ fontFamily: '"Inter",sans-serif',
828
+ fontWeight: 600,
829
+ fontStyle: 'normal',
830
+ fontSize: '12px',
831
+ lineHeight: '20px',
832
+ letterSpacing: '0%',
833
+ verticalAlign: 'middle',
834
+ },
835
+ bold: {
836
+ fontFamily: '"Inter",sans-serif',
837
+ fontWeight: 700,
838
+ fontStyle: 'normal',
839
+ fontSize: '12px',
840
+ lineHeight: '20px',
841
+ letterSpacing: '0%',
842
+ verticalAlign: 'middle',
843
+ },
844
+ },
845
+ textSmall: {
846
+ regular: {
847
+ fontFamily: '"Inter",sans-serif',
848
+ fontWeight: 400,
849
+ fontStyle: 'normal',
850
+ fontSize: '10px',
851
+ lineHeight: '12px',
852
+ letterSpacing: 0.1,
853
+ verticalAlign: 'middle',
854
+ },
855
+ medium: {
856
+ fontFamily: '"Inter",sans-serif',
857
+ fontWeight: 500,
858
+ fontStyle: 'normal',
859
+ fontSize: '10px',
860
+ lineHeight: '12px',
861
+ letterSpacing: '0%',
862
+ verticalAlign: 'middle',
863
+ },
864
+ semiBold: {
865
+ fontFamily: '"Inter",sans-serif',
866
+ fontWeight: 600,
867
+ fontStyle: 'normal',
868
+ fontSize: '10px',
869
+ lineHeight: '12px',
870
+ letterSpacing: 0.1,
871
+ verticalAlign: 'middle',
872
+ },
873
+ bold: {
874
+ fontFamily: '"Inter",sans-serif',
875
+ fontWeight: 700,
876
+ fontStyle: 'normal',
877
+ fontSize: '10px',
878
+ lineHeight: '12px',
879
+ letterSpacing: 0.1,
880
+ verticalAlign: 'middle',
881
+ },
882
+ },
883
+ };
884
+
885
+ const StackRow = styles.styled(material.Stack)(() => ({
886
+ flexDirection: 'row',
887
+ }));
888
+ styles.styled(material.Stack)(() => ({
889
+ flexDirection: 'row',
890
+ flexWrap: 'wrap',
891
+ }));
892
+ const StackRowAlignCenter = styles.styled(material.Stack)(() => ({
893
+ flexDirection: 'row',
894
+ alignItems: 'center',
895
+ }));
896
+ styles.styled(material.Stack)(() => ({
897
+ flexDirection: 'row',
898
+ alignItems: 'flex-end',
899
+ }));
900
+ styles.styled(material.Stack)(() => ({
901
+ flexDirection: 'row',
902
+ justifyContent: 'center',
903
+ }));
904
+ styles.styled(material.Stack)(() => ({
905
+ flexDirection: 'row',
906
+ justifyContent: 'space-around',
907
+ }));
908
+ styles.styled(material.Stack)(() => ({
909
+ flexDirection: 'row',
910
+ alignItems: 'center',
911
+ justifyContent: 'center',
912
+ }));
913
+ const StackRowAlignCenterJustEnd = styles.styled(material.Stack)(() => ({
914
+ flexDirection: 'row',
915
+ alignItems: 'center',
916
+ justifyContent: 'flex-end',
917
+ }));
918
+ styles.styled(material.Stack)(() => ({
919
+ flexDirection: 'row',
920
+ justifyContent: 'flex-end',
921
+ }));
922
+ styles.styled(material.Stack)(() => ({
923
+ flexDirection: 'row',
924
+ justifyContent: 'space-between',
925
+ }));
926
+ const StackRowAlignCenterJustBetween = styles.styled(material.Stack)(() => ({
927
+ flexDirection: 'row',
928
+ alignItems: 'center',
929
+ justifyContent: 'space-between',
930
+ }));
931
+ styles.styled(material.Stack)(() => ({
932
+ flexDirection: 'row',
933
+ alignItems: 'flex-start',
934
+ justifyContent: 'space-between',
935
+ }));
936
+ styles.styled(material.Stack)(({ theme }) => ({
937
+ backgroundColor: theme.palette.background.default,
938
+ padding: PADDING_GAP_LAYOUT,
939
+ borderRadius: BORDER_RADIUS_ELEMENT,
940
+ }));
941
+ styles.styled(material.Stack)(({ theme }) => ({
942
+ backgroundColor: theme.palette.background.paper,
943
+ padding: PADDING_GAP_LAYOUT,
944
+ borderRadius: BORDER_RADIUS_ELEMENT,
945
+ }));
946
+ styles.styled(material.Stack)(() => ({
947
+ flexDirection: 'row',
948
+ alignItems: 'center',
949
+ marginRight: PADDING_GAP_ITEM_SMALL,
950
+ gap: PADDING_GAP_ITEM_SMALL,
951
+ }));
952
+ styles.styled(material.Stack)(({ theme }) => ({
953
+ border: `1px solid ${theme.palette.common.white}`,
954
+ borderRadius: '50%',
955
+ display: 'flex',
956
+ justifyContent: 'center',
957
+ alignItems: 'center',
958
+ background: theme.palette.background.paper,
959
+ width: 16,
960
+ height: 16,
961
+ }));
962
+ styles.styled(material.Stack)(({ theme }) => ({
963
+ borderRadius: BORDER_RADIUS_ELEMENT_TAG,
964
+ // padding: '6px',
965
+ backgroundColor: theme.palette.background.paper,
966
+ boxShadow: theme.shadows[1],
967
+ width: 'fit-content',
968
+ gap: 'unset',
969
+ }));
970
+ styles.styled(material.TableCell)(({ theme }) => ({
971
+ [`&.${material.tableCellClasses.head}`]: {
972
+ backgroundColor: '#008A77',
973
+ color: theme.palette.common.white,
974
+ fontWeight: 600,
975
+ },
976
+ [`&.${material.tableCellClasses.body}`]: {
977
+ fontSize: 14,
978
+ },
979
+ '&:first-of-type': {
980
+ borderBottomLeftRadius: '0 !important',
981
+ },
982
+ '&:last-child': {
983
+ borderBottomRightRadius: '0 !important',
984
+ },
985
+ }));
986
+ styles.styled(material.LinearProgress)(({ theme }) => ({
987
+ height: 10,
988
+ borderRadius: 5,
989
+ [`&.${material.linearProgressClasses.colorPrimary}`]: {
990
+ backgroundColor: theme.palette.grey[200],
991
+ ...theme.applyStyles('dark', {
992
+ backgroundColor: theme.palette.grey[800],
993
+ }),
994
+ },
995
+ [`& .${material.linearProgressClasses.bar}`]: {
996
+ borderRadius: 5,
997
+ backgroundColor: theme.palette.primary,
998
+ },
999
+ }));
1000
+
1001
+ exports.ImageSizeType = void 0;
1002
+ (function (ImageSizeType) {
1003
+ ImageSizeType["CIRCLE"] = "CIRCLE";
1004
+ ImageSizeType["SQUARE"] = "SQUARE";
1005
+ ImageSizeType["FULL_WIDTH"] = "FULL_WIDTH";
1006
+ })(exports.ImageSizeType || (exports.ImageSizeType = {}));
1007
+
1008
+ const ImageWrapper = ({ isWrap = false, children }) => {
1009
+ return isWrap ? (jsxRuntime.jsx(StackRow, { alignItems: "center", className: "jsdsdj", children: children })) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: children }));
1010
+ };
1011
+ const ImageElement = ({ url, onClick, sx = {}, isBorder = false, isWrap = false, sizeType = exports.ImageSizeType.CIRCLE, size = 'medium', ...rest }) => {
1012
+ const { palette } = material.useTheme();
1013
+ const [loaded, setLoaded] = React.useState(false);
1014
+ if (onClick)
1015
+ sx = { ...sx, cursor: 'pointer' };
1016
+ const borderRadius = sizeType === exports.ImageSizeType.CIRCLE
1017
+ ? '50%'
1018
+ : sizeType === exports.ImageSizeType.SQUARE
1019
+ ? BORDER_RADIUS_ELEMENT_SMALL
1020
+ : 0;
1021
+ return (jsxRuntime.jsxs(ImageWrapper, { isWrap: isWrap, children: [!loaded && (jsxRuntime.jsx(material.Skeleton, { variant: "rectangular", sx: {
1022
+ ...MAP_SIZE[size],
1023
+ borderRadius,
1024
+ } })), jsxRuntime.jsx(material.Box, { ...rest, component: "img", src: url, onClick: onClick, onLoad: () => setLoaded(true), onError: (e) => {
1025
+ e.currentTarget.src = '/images/diamond.png';
1026
+ }, sx: {
1027
+ display: loaded ? 'block' : 'none',
1028
+ ...MAP_SIZE[size],
1029
+ objectFit: 'cover',
1030
+ borderRadius,
1031
+ border: isBorder ? `1px solid ${palette.divider}` : 'none',
1032
+ ...sx,
1033
+ } })] }));
1034
+ };
1035
+
1036
+ const AvatarProfileComponent = ({ url, size = 'md', border = false, borderColor = '#C3FFF2', borderWidth = 4, onClick, sx = {}, children, ...rest }) => {
1037
+ return (jsxRuntime.jsx(material.Box, { sx: {
1038
+ width: AVATAR_SIZES[size],
1039
+ height: AVATAR_SIZES[size],
1040
+ borderRadius: '50%',
1041
+ ...(border && {
1042
+ border: `${borderWidth}px solid ${borderColor}`,
1043
+ }),
1044
+ ...sx,
1045
+ }, children: jsxRuntime.jsx(ImageElement, { ...rest, url: url || '/images/avatarDefault.png', onClick: onClick, sx: {
1046
+ width: '100%',
1047
+ height: '100%',
1048
+ ...(onClick && { cursor: 'pointer' }),
1049
+ }, children: children }) }));
1050
+ };
1051
+
1052
+ const BadgeLive = ({ text = 'LIVE', size = 'md' }) => {
1053
+ const { typography } = material.useTheme();
1054
+ return (jsxRuntime.jsx(material.Box, { sx: {
1055
+ bgcolor: exports.AvatarColor.BACKGROUND_COLOR_BADGE,
1056
+ color: exports.AvatarColor.COLOR_BADGE,
1057
+ borderRadius: '12px',
1058
+ padding: '3px 6px',
1059
+ fontSize: BADGE_FONT_SIZES[size],
1060
+ fontWeight: typography.body2.fontWeight,
1061
+ }, children: text }));
1062
+ };
1063
+ const BadgeNumber = ({ number, size = 'md' }) => {
1064
+ const { typography } = material.useTheme();
1065
+ return (jsxRuntime.jsx(material.Box, { sx: {
1066
+ bgcolor: exports.AvatarColor.BACKGROUND_COLOR_BADGE,
1067
+ color: exports.AvatarColor.COLOR_BADGE,
1068
+ borderRadius: '50%',
1069
+ width: BADGE_SIZES[size],
1070
+ height: BADGE_SIZES[size],
1071
+ display: 'flex',
1072
+ alignItems: 'center',
1073
+ justifyContent: 'center',
1074
+ fontSize: BADGE_FONT_SIZES[size],
1075
+ fontWeight: typography.h2.fontWeight,
1076
+ }, children: number }));
1077
+ };
1078
+ const BadgeOnline = ({ size = 'md' }) => (jsxRuntime.jsx(material.Box, { sx: {
1079
+ width: BADGE_SIZES[size],
1080
+ height: BADGE_SIZES[size],
1081
+ borderRadius: '50%',
1082
+ bgcolor: '#4CAF50',
1083
+ border: '2px solid white',
1084
+ } }));
1085
+ const BadgeImage = ({ url, size = 'md' }) => (jsxRuntime.jsx(material.Box, { component: "img", src: url, alt: "badge", sx: {
1086
+ width: BADGE_SIZES[size],
1087
+ height: BADGE_SIZES[size],
1088
+ borderRadius: '50%',
1089
+ objectFit: 'cover',
1090
+ display: 'flex',
1091
+ alignItems: 'center',
1092
+ justifyContent: 'center',
1093
+ } }));
1094
+ const AvatarComponent = ({ url, size = 'md', border = false, borderColor = '#C3FFF2', borderWidth = 4, badge, badgePosition = 'bottom-right', onClick, sx = {}, sxProfile = {}, children, ...rest }) => {
1095
+ // Tự động inject size vào badge
1096
+ const badgeWithSize = badge && React.isValidElement(badge) ? React.cloneElement(badge, { size }) : badge;
1097
+ return (jsxRuntime.jsxs(material.Box, { sx: {
1098
+ position: 'relative',
1099
+ display: 'inline-flex',
1100
+ width: AVATAR_SIZES[size],
1101
+ height: AVATAR_SIZES[size],
1102
+ ...sx,
1103
+ }, children: [jsxRuntime.jsx(AvatarProfileComponent, { url: url, size: size, border: border, borderWidth: borderWidth, borderColor: borderColor, onClick: onClick, sx: sxProfile, ...rest, children: children }), badgeWithSize && (jsxRuntime.jsx(material.Box, { sx: {
1104
+ position: 'absolute',
1105
+ ...getBadgePosition(badgePosition),
1106
+ }, children: badgeWithSize }))] }));
1107
+ };
1108
+
1109
+ const IconElement = ({ icon, size = 'medium', color, disabled, onClick, sx, fill = 0, }) => {
1110
+ const { palette } = material.useTheme();
1111
+ if (disabled) {
1112
+ onClick = undefined;
1113
+ color = 'disabled';
1114
+ }
1115
+ if (onClick)
1116
+ sx = {
1117
+ cursor: 'pointer',
1118
+ '&:hover': {
1119
+ color: color ? 'none' : palette.primary.main,
1120
+ },
1121
+ ...sx,
1122
+ };
1123
+ return (jsxRuntime.jsx(material.Icon, { onClick: onClick, color: color, sx: {
1124
+ cursor: 'inherit',
1125
+ fontSize: FONT_SIZE_ICON[size],
1126
+ fontVariationSettings: `'FILL' ${fill}, 'wght' 100, 'GRAD' 200, 'opsz' 24`,
1127
+ ...sx,
1128
+ }, component: 'span', className: "material-symbols-rounded", children: icon }));
1129
+ };
1130
+
1131
+ const AvatarGroupComponent = ({ avatars = [], maxDisplay = 10, size = 'md', border = true, borderColor = '#FFFFFF', borderWidth = 2, onAddClick, overlap = 8, icon, sxAvatar, sx, }) => {
1132
+ const displayAvatars = avatars.slice(0, maxDisplay);
1133
+ const remainingCount = avatars.length - maxDisplay;
1134
+ return (jsxRuntime.jsxs(StackRowAlignCenter, { sx: { gap: 1, ...sx }, children: [jsxRuntime.jsxs(material.Box, { sx: { display: 'flex', alignItems: 'center' }, children: [displayAvatars.map((avatar, index) => (jsxRuntime.jsx(material.Box, { sx: {
1135
+ marginLeft: index > 0 ? `-${overlap}px` : 0,
1136
+ position: 'relative',
1137
+ }, children: jsxRuntime.jsx(AvatarComponent, { url: avatar.url, size: size, border: border, borderColor: borderColor, borderWidth: borderWidth, sx: sxAvatar }) }, avatar.id || index))), remainingCount > 0 && (jsxRuntime.jsxs(material.Box, { sx: {
1138
+ marginLeft: `-${overlap}px`,
1139
+ position: 'relative',
1140
+ color: '#07554B',
1141
+ backgroundColor: '#EDFFFA',
1142
+ width: AVATAR_SIZES[size],
1143
+ height: AVATAR_SIZES[size],
1144
+ display: 'flex',
1145
+ alignItems: 'center',
1146
+ justifyContent: 'center',
1147
+ border: '2px solid #ffffff',
1148
+ borderRadius: '50%',
1149
+ ...TYPOGRAPHY_STYLES.textMd.medium,
1150
+ }, children: ["+", remainingCount] }))] }), icon && (jsxRuntime.jsx(material.Box, { sx: {
1151
+ width: AVATAR_SIZES[size],
1152
+ height: AVATAR_SIZES[size],
1153
+ borderRadius: '50%',
1154
+ border: `2px dashed #D1D5DB`,
1155
+ display: 'flex',
1156
+ alignItems: 'center',
1157
+ justifyContent: 'center',
1158
+ cursor: 'pointer',
1159
+ transition: 'all 0.2s',
1160
+ '&:hover': {
1161
+ borderColor: 'primary.main',
1162
+ },
1163
+ }, onClick: onAddClick, children: jsxRuntime.jsx(IconElement, { icon: icon, sx: {
1164
+ color: 'primary.main',
1165
+ } }) }))] }));
1166
+ };
1167
+
1168
+ const AvatarLabelGroupComponent = ({ title, description, url, size = 'md', border, borderColor, borderWidth, badge, badgePosition, onClick, sx, sxAvatar, children, ...rest }) => {
1169
+ return (jsxRuntime.jsxs(material.Stack, { direction: "row", alignItems: "center", sx: { gap: BORDER_RADIUS_ELEMENT, ...sx }, children: [jsxRuntime.jsx(AvatarComponent, { url: url, size: size, border: border, borderColor: borderColor, borderWidth: borderWidth, badge: badge, badgePosition: badgePosition, onClick: onClick, sx: sxAvatar, ...rest, children: children }), jsxRuntime.jsxs(material.Stack, { sx: { gap: 0 }, children: [jsxRuntime.jsx(material.Typography, { noWrap: true, sx: { ...TYPOGRAPHY_STYLES.textSm.semiBold, color: exports.AvatarColor.COLOR_TITLE }, children: title }), jsxRuntime.jsx(material.Typography, { noWrap: true, sx: { ...TYPOGRAPHY_STYLES.textXs.regular, color: exports.AvatarColor.COLOR_DESCRIPTION }, children: description })] })] }));
1170
+ };
1171
+
1172
+ const getLimitLineCss = (line) => ({
1173
+ display: '-webkit-box',
1174
+ overflow: 'hidden',
1175
+ WebkitBoxOrient: 'vertical',
1176
+ WebkitLineClamp: line,
1177
+ // textOverflow: 'ellipsis',
1178
+ });
1179
+ const TypographyOneLine = ({ content, sx = {}, ...rest }) => {
1180
+ return (jsxRuntime.jsx(material.Typography, { sx: {
1181
+ ...getLimitLineCss(1),
1182
+ ...sx,
1183
+ }, ...rest, children: content }));
1184
+ };
1185
+
1186
+ const AvatarUserComponent = ({ title, description, descriptionHref, onDescriptionClick, titleColor = '#414651', descriptionColor = '#535862', url, onClick, sx, }) => {
1187
+ return (jsxRuntime.jsxs(material.Stack, { sx: { gap: 1, ...sx }, children: [jsxRuntime.jsx(ImageElement, { sx: {
1188
+ width: 160,
1189
+ height: 160,
1190
+ ...(onClick && { cursor: 'pointer' }),
1191
+ }, url: url || '/images/avatarDefault.png', sizeType: exports.ImageSizeType.SQUARE }), jsxRuntime.jsxs(material.Stack, { sx: { gap: 0 }, children: [jsxRuntime.jsx(TypographyOneLine, { sx: { ...TYPOGRAPHY_STYLES.textLg.semiBold, color: titleColor }, content: title }), description && (jsxRuntime.jsxs(material.Link, { href: descriptionHref, onClick: onDescriptionClick, sx: {
1192
+ display: 'flex',
1193
+ alignItems: 'center',
1194
+ gap: 0.5,
1195
+ textDecoration: 'underline',
1196
+ color: descriptionColor,
1197
+ ...TYPOGRAPHY_STYLES.textSm.regular,
1198
+ cursor: 'pointer',
1199
+ '&:hover': {
1200
+ opacity: 0.8,
1201
+ },
1202
+ }, children: [jsxRuntime.jsx(LinkIcon, { sx: { fontSize: 16, color: descriptionColor } }), description] }))] })] }));
1203
+ };
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
+
1259
+ /** Shade values mapping */
1260
+ const SHADE_VALUES = {
1261
+ light: 100,
1262
+ main: 500,
1263
+ dark: 700,
1264
+ };
1265
+ /** Button size configuration */
1266
+ const SIZES = {
1267
+ xs: { padding: '6px 12px', fontSize: '10px', height: '28px' },
1268
+ sm: { padding: '8px 16px', fontSize: '12px', height: '32px' },
1269
+ md: { padding: '16px 28px', fontSize: '14px', height: '60px', width: '192px' },
1270
+ lg: { padding: '12px 24px', fontSize: '16px', height: '44px' },
1271
+ xl: { padding: '14px 32px', fontSize: '18px', height: '48px' },
1272
+ };
1273
+ /** Color palette mapping */
1274
+ const COLORS = {
1275
+ brand: COLOR_BRAND,
1276
+ neutral: COLOR_NEUTRAL,
1277
+ error: COLOR_ERROR,
1278
+ warning: COLOR_WARNING,
1279
+ success: COLOR_SUCCESS,
1280
+ accent: COLOR_ACCENT,
1281
+ info: COLOR_INFO,
1282
+ };
1283
+ /** Button UI constants */
1284
+ const BUTTON_CONSTANTS = {
1285
+ ACTIVE_DOT_SIZE: 8,
1286
+ ACTIVE_DOT_MARGIN_RIGHT: 8,
1287
+ SPINNER_SIZE: 16,
1288
+ GAP: 12,
1289
+ BORDER_RADIUS: 8,
1290
+ TRANSITION_DURATION: '0.3s',
1291
+ };
1292
+ /** Accessibility constants */
1293
+ const ACCESSIBILITY = {
1294
+ HOVER_TRANSLATE_Y: '-2px',
1295
+ ACTIVE_TRANSLATE_Y: '0',
1296
+ BOX_SHADOW: '0 4px 12px rgba(0, 0, 0, 0.15)',
1297
+ FOCUS_OFFSET: '2px',
1298
+ };
1299
+
1300
+ const getButtonSx = (variant, color, shade, size, fullWidth) => {
1301
+ const colors = COLORS[color];
1302
+ const sizeConf = SIZES[size] || SIZES.md;
1303
+ // Xác định màu sắc theo shade
1304
+ let colorValue;
1305
+ if (typeof shade === 'number') {
1306
+ colorValue = colors[shade] || colors[700];
1307
+ }
1308
+ else {
1309
+ const shadeNum = SHADE_VALUES[shade] || 700;
1310
+ colorValue = colors[shadeNum];
1311
+ }
1312
+ const lightColor = colors[100];
1313
+ const base = {
1314
+ padding: sizeConf.padding,
1315
+ height: sizeConf.height,
1316
+ fontSize: sizeConf.fontSize,
1317
+ width: fullWidth ? '100%' : sizeConf.width || 'auto',
1318
+ fontFamily: TYPOGRAPHY.body.fontFamily,
1319
+ fontWeight: TYPOGRAPHY.body.fontWeight,
1320
+ borderRadius: `${BUTTON_CONSTANTS.BORDER_RADIUS}px`,
1321
+ gap: `${BUTTON_CONSTANTS.GAP}px`,
1322
+ textTransform: 'none',
1323
+ transition: `all ${BUTTON_CONSTANTS.TRANSITION_DURATION} ease`,
1324
+ '&:hover': {
1325
+ transform: `translateY(${ACCESSIBILITY.HOVER_TRANSLATE_Y})`,
1326
+ boxShadow: ACCESSIBILITY.BOX_SHADOW,
1327
+ },
1328
+ '&:active': {
1329
+ transform: `translateY(${ACCESSIBILITY.ACTIVE_TRANSLATE_Y})`,
1330
+ },
1331
+ '&:focus-visible': {
1332
+ outline: `2px solid ${colorValue}`,
1333
+ outlineOffset: ACCESSIBILITY.FOCUS_OFFSET,
1334
+ },
1335
+ };
1336
+ const variants = {
1337
+ solid: {
1338
+ backgroundColor: colorValue,
1339
+ color: '#ffffff',
1340
+ '&:hover': { ...base['&:hover'], backgroundColor: colorValue },
1341
+ '&:focus-visible': { ...base['&:focus-visible'], outline: '2px solid #ffffff' },
1342
+ },
1343
+ outline: {
1344
+ backgroundColor: 'transparent',
1345
+ color: colorValue,
1346
+ border: `2px solid ${colorValue}`,
1347
+ '&:hover': { ...base['&:hover'], backgroundColor: 'transparent', border: `2px solid ${colorValue}` },
1348
+ },
1349
+ ghost: {
1350
+ backgroundColor: lightColor,
1351
+ color: colorValue,
1352
+ '&:hover': { ...base['&:hover'], backgroundColor: lightColor },
1353
+ },
1354
+ text: {
1355
+ backgroundColor: 'transparent',
1356
+ color: colorValue,
1357
+ border: 'none',
1358
+ '&:hover': { ...base['&:hover'], backgroundColor: 'transparent' },
1359
+ },
1360
+ };
1361
+ return { ...base, ...variants[variant] };
1362
+ };
1363
+ const ButtonComponent = ({ variant = 'solid', color = 'brand', shade = 'dark', size = 'md', prefix, suffix, prefixIcon, suffixIcon, iconStyle, loading = false, children, fullWidth = false, disabled = false, active = false, activeDotColor = '#10b981', sx, ...props }) => {
1364
+ // Memoize style calculation
1365
+ const buttonSx = getButtonSx(variant, color, shade, size, fullWidth);
1366
+ // Render prefix element
1367
+ const renderPrefix = () => {
1368
+ if (prefixIcon)
1369
+ return jsxRuntime.jsx(IconElement, { icon: prefixIcon, sx: iconStyle });
1370
+ if (prefix)
1371
+ return prefix;
1372
+ return null;
1373
+ };
1374
+ // Render suffix element
1375
+ const renderSuffix = () => {
1376
+ if (suffixIcon)
1377
+ return jsxRuntime.jsx(IconElement, { icon: suffixIcon, sx: iconStyle });
1378
+ if (suffix)
1379
+ return suffix;
1380
+ return null;
1381
+ };
1382
+ const prefixContent = loading ? (jsxRuntime.jsx(material.CircularProgress, { size: BUTTON_CONSTANTS.SPINNER_SIZE, sx: { color: COLOR_NEUTRAL[50] } })) : (renderPrefix());
1383
+ const suffixContent = renderSuffix();
1384
+ // Nếu chỉ có icon mà không có children, render icon giữa button
1385
+ const isIconOnly = !children && !active && (prefixContent || suffixContent);
1386
+ // Active dot element
1387
+ const activeDot = active ? (jsxRuntime.jsx("span", { style: {
1388
+ width: `${BUTTON_CONSTANTS.ACTIVE_DOT_SIZE}px`,
1389
+ height: `${BUTTON_CONSTANTS.ACTIVE_DOT_SIZE}px`,
1390
+ borderRadius: '50%',
1391
+ backgroundColor: activeDotColor,
1392
+ display: 'inline-block',
1393
+ flexShrink: 0,
1394
+ marginRight: `${BUTTON_CONSTANTS.ACTIVE_DOT_MARGIN_RIGHT}px`,
1395
+ } })) : null;
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] })) }));
1397
+ };
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
+
1410
+ const CHECKBOX_COLORS = {
1411
+ default: {
1412
+ border: '#D0D5DD',
1413
+ background: '#FFFFFF',
1414
+ hoverBg: '#F0FDF9',
1415
+ },
1416
+ checked: {
1417
+ border: '#07554B',
1418
+ filledBg: '#07554B',
1419
+ outlinedBg: '#FFFFFF',
1420
+ icon: '#FFFFFF',
1421
+ },
1422
+ disabled: {
1423
+ border: '#E4E7EC',
1424
+ background: '#F2F4F7',
1425
+ icon: '#98A2B3',
1426
+ },
1427
+ };
1428
+ const CHECKBOX_SIZE = {
1429
+ small: {
1430
+ boxSize: 16,
1431
+ iconSize: 14,
1432
+ titleFontSize: 14,
1433
+ titleFontWeight: 500,
1434
+ },
1435
+ medium: {
1436
+ boxSize: 20,
1437
+ iconSize: 16,
1438
+ titleFontSize: 16,
1439
+ titleFontWeight: 600,
1440
+ },
1441
+ };
1442
+
1443
+ const CheckboxComponent = ({ checked = false, disabled = false, shape = 'square', size = 'medium', variant = 'filled', iconType = 'check', title, children, onChange, sxCheckbox, sxLabel, sx, }) => {
1444
+ const checkboxStyle = CHECKBOX_SIZE[size];
1445
+ const isFilled = variant === 'filled';
1446
+ const handleToggle = () => {
1447
+ if (!disabled) {
1448
+ onChange?.(!checked);
1449
+ }
1450
+ };
1451
+ const backgroundColor = disabled
1452
+ ? CHECKBOX_COLORS.disabled.background
1453
+ : checked
1454
+ ? isFilled
1455
+ ? sxCheckbox?.backgroundColor || CHECKBOX_COLORS.checked.filledBg
1456
+ : CHECKBOX_COLORS.checked.outlinedBg
1457
+ : CHECKBOX_COLORS.default.background;
1458
+ const borderColor = disabled
1459
+ ? CHECKBOX_COLORS.disabled.border
1460
+ : checked
1461
+ ? sxCheckbox?.borderColor || CHECKBOX_COLORS.checked.border
1462
+ : CHECKBOX_COLORS.default.border;
1463
+ const iconColor = disabled
1464
+ ? CHECKBOX_COLORS.disabled.icon
1465
+ : isFilled
1466
+ ? CHECKBOX_COLORS.checked.icon
1467
+ : CHECKBOX_COLORS.checked.border;
1468
+ const renderIcon = () => {
1469
+ if (!checked)
1470
+ return null;
1471
+ const iconSx = {
1472
+ width: checkboxStyle.iconSize,
1473
+ height: checkboxStyle.iconSize,
1474
+ color: iconColor,
1475
+ };
1476
+ switch (iconType) {
1477
+ case 'check':
1478
+ return jsxRuntime.jsx(CheckIcon, { sx: iconSx });
1479
+ case 'minus':
1480
+ return jsxRuntime.jsx(RemoveIcon, { sx: iconSx });
1481
+ case 'dot':
1482
+ return (jsxRuntime.jsx(FiberManualRecordIcon, { sx: { ...iconSx, width: checkboxStyle.iconSize - 3, height: checkboxStyle.iconSize - 3 } }));
1483
+ case 'custom':
1484
+ return children;
1485
+ default:
1486
+ return null;
1487
+ }
1488
+ };
1489
+ const checkbox = (jsxRuntime.jsx(material.Box, { role: "checkbox", tabIndex: disabled ? -1 : 0, "aria-checked": checked, onClick: handleToggle, onKeyDown: (e) => {
1490
+ if (!disabled && (e.key === 'Enter' || e.key === ' ')) {
1491
+ e.preventDefault();
1492
+ handleToggle();
1493
+ }
1494
+ }, sx: {
1495
+ width: checkboxStyle.boxSize,
1496
+ height: checkboxStyle.boxSize,
1497
+ display: 'flex',
1498
+ alignItems: 'center',
1499
+ justifyContent: 'center',
1500
+ cursor: disabled ? 'not-allowed' : 'pointer',
1501
+ userSelect: 'none',
1502
+ borderRadius: shape === 'circle' ? '50%' : '4px',
1503
+ border: `1px solid ${borderColor}`,
1504
+ backgroundColor,
1505
+ transition: 'all 0.2s ease',
1506
+ ...(!disabled &&
1507
+ (!checked || !isFilled) && {
1508
+ '&:hover': {
1509
+ borderColor: sxCheckbox?.backgroundColor || CHECKBOX_COLORS.checked.border,
1510
+ backgroundColor: CHECKBOX_COLORS.default.hoverBg,
1511
+ },
1512
+ }),
1513
+ '&:focus-visible': {
1514
+ outline: 'none',
1515
+ boxShadow: '0 0 0 3px rgba(14, 147, 132, 0.25)',
1516
+ },
1517
+ ...(disabled && { opacity: 0.4 }),
1518
+ }, children: renderIcon() }));
1519
+ if (!title)
1520
+ return checkbox;
1521
+ return (jsxRuntime.jsxs(material.Box, { onClick: handleToggle, sx: {
1522
+ display: 'inline-flex',
1523
+ alignItems: 'center',
1524
+ gap: '8px',
1525
+ cursor: disabled ? 'not-allowed' : 'pointer',
1526
+ ...sx,
1527
+ }, children: [checkbox, jsxRuntime.jsx(material.Typography, { fontSize: checkboxStyle.titleFontSize, fontWeight: checkboxStyle.titleFontWeight, color: disabled ? '#D0D5DD' : '#344054', sx: {
1528
+ userSelect: 'none',
1529
+ ...sxLabel,
1530
+ }, children: title })] }));
1531
+ };
1532
+
1533
+ const CHIP_LABEL_PADDING = {
1534
+ WITH_ICON_LEFT: '4px 8px 4px 4px',
1535
+ WITH_ICON_RIGHT: '4px 4px 4px 8px',
1536
+ NO_ICON: '4px 8px',
1537
+ };
1538
+ const CHIP_SIZE_CONFIG = {
1539
+ small: {
1540
+ height: 24,
1541
+ fontSize: '12px',
1542
+ borderRadius: '12px',
1543
+ iconSize: '16px',
1544
+ },
1545
+ medium: {
1546
+ height: 32,
1547
+ fontSize: '14px',
1548
+ borderRadius: '16px',
1549
+ iconSize: '18px',
1550
+ },
1551
+ large: {
1552
+ height: 40,
1553
+ fontSize: '16px',
1554
+ borderRadius: '20px',
1555
+ iconSize: '22px',
1556
+ },
1557
+ };
1558
+
1559
+ const getLabelPadding = (hasIcon, position) => {
1560
+ if (!hasIcon)
1561
+ return CHIP_LABEL_PADDING.NO_ICON;
1562
+ return position === 'left' ? CHIP_LABEL_PADDING.WITH_ICON_LEFT : CHIP_LABEL_PADDING.WITH_ICON_RIGHT;
1563
+ };
1564
+ const ChipIcon = ({ icon, size, sxIcon }) => (jsxRuntime.jsx(material.Box, { sx: {
1565
+ display: 'inline-flex',
1566
+ alignItems: 'center',
1567
+ justifyContent: 'center',
1568
+ borderRadius: '50%',
1569
+ padding: '2px',
1570
+ '& svg': {
1571
+ width: size,
1572
+ height: size,
1573
+ display: 'block',
1574
+ },
1575
+ ...sxIcon,
1576
+ }, children: icon }));
1577
+ const ChipComponent = ({ label, onAction, icon, disabled = false, clickable = true, sx, sxIcon, iconPosition = 'right', size = 'medium', }) => {
1578
+ const sizeConfig = CHIP_SIZE_CONFIG[size];
1579
+ const hasIcon = Boolean(icon);
1580
+ 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: {
1581
+ height: sizeConfig.height,
1582
+ fontSize: sizeConfig.fontSize,
1583
+ borderRadius: sizeConfig.borderRadius,
1584
+ cursor: clickable ? 'pointer' : 'default',
1585
+ backgroundColor: 'transparent',
1586
+ border: '1px solid #D1D5DB',
1587
+ '& .MuiChip-label': {
1588
+ padding: getLabelPadding(hasIcon, iconPosition),
1589
+ display: 'flex',
1590
+ alignItems: 'center',
1591
+ },
1592
+ '& .MuiChip-label svg': {
1593
+ flexShrink: 0,
1594
+ color: '#4B5563',
1595
+ },
1596
+ '&.Mui-disabled': {
1597
+ opacity: 0.5,
1598
+ color: '#9E9E9E',
1599
+ },
1600
+ ...sx,
1601
+ } }));
1602
+ };
1603
+
1604
+ 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 }) => {
1605
+ // Convert string to Dayjs if needed
1606
+ const dayjsValue = value && typeof value === 'string' ? dayjs(value, format) : value instanceof dayjs ? value : null;
1607
+ const handleDateChange = (date) => {
1608
+ onChange?.(date);
1609
+ };
1610
+ // Disable past dates function
1611
+ const shouldDisableDate = (date) => {
1612
+ if (!disablePastDates)
1613
+ return false;
1614
+ return date.isBefore(dayjs(), 'day');
1615
+ };
1616
+ return (jsxRuntime.jsxs(material.Box, { sx: { ...sx }, children: [label && (jsxRuntime.jsx(material.Typography, { sx: {
1617
+ display: 'block',
1618
+ ...TYPOGRAPHY.textFieldLabel,
1619
+ color: COLOR_GRAY[800],
1620
+ marginBottom: '4px',
1621
+ }, 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: {
1622
+ textField: {
1623
+ placeholder,
1624
+ error: error || false,
1625
+ helperText: error ? errorMessage : helperText,
1626
+ size: 'small',
1627
+ fullWidth: true,
1628
+ disabled: disabled,
1629
+ },
1630
+ openPickerButton: {
1631
+ size: 'small',
1632
+ },
1633
+ }, slots: {
1634
+ openPickerIcon: (props) => jsxRuntime.jsx(IconElement, { icon: "calendar_today", ...props }),
1635
+ }, sx: {
1636
+ width: '100%',
1637
+ '& .MuiPickersInputBase-root': {
1638
+ borderRadius: borderRadius === 'max' ? '100px' : `${borderRadius}px`,
1639
+ '& fieldset': { borderColor: COLOR_NEUTRAL[300] },
1640
+ '&:hover fieldset': { borderColor: COLOR_NEUTRAL[400] },
1641
+ '&.Mui-focused fieldset': { borderColor: COLOR_NEUTRAL[300], borderWidth: '2px' },
1642
+ '&.Mui-focused': {
1643
+ boxShadow: '0 1px 2px 0 rgba(10, 13, 18, 0.05), 0 0 0 4px #FEE4E2',
1644
+ },
1645
+ '&.Mui-disabled': {
1646
+ backgroundColor: COLOR_NEUTRAL[100],
1647
+ '& fieldset': { borderColor: COLOR_NEUTRAL[200] },
1648
+ '& input': { color: COLOR_NEUTRAL[400], WebkitTextFillColor: COLOR_NEUTRAL[400] },
1649
+ },
1650
+ '&.Mui-error fieldset': { borderColor: COLOR_ERROR[500] },
1651
+ '&.Mui-error.Mui-focused fieldset': { borderColor: COLOR_ERROR[500], borderWidth: '2px' },
1652
+ '&.Mui-error.Mui-focused': {
1653
+ boxShadow: `0 1px 2px 0 rgba(10, 13, 18, 0.05), 0 0 0 4px rgba(255, 66, 79, 0.15)`,
1654
+ },
1655
+ ...(success && {
1656
+ '&.Mui-focused': {
1657
+ boxShadow: `0 1px 2px 0 rgba(10, 13, 18, 0.05), 0 0 0 4px ${COLOR_SUCCESS[100]}`,
1658
+ },
1659
+ }),
1660
+ },
1661
+ '& .MuiInputBase-input': {
1662
+ ...TYPOGRAPHY.text14Regular,
1663
+ padding: '12px 8px',
1664
+ color: COLOR_GRAY[900],
1665
+ '&::placeholder': { color: COLOR_NEUTRAL[400], opacity: 0.7 },
1666
+ },
1667
+ }, ...props }) }), success && !error && successMessage && (jsxRuntime.jsx(material.Typography, { sx: {
1668
+ ...TYPOGRAPHY.textFieldHelper,
1669
+ color: COLOR_SUCCESS[500],
1670
+ marginTop: '4px',
1671
+ }, children: successMessage }))] }));
1672
+ };
1673
+
1674
+ 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 }) => {
1675
+ // Convert string to Dayjs if needed
1676
+ const dayjsFromDate = fromDate && typeof fromDate === 'string' ? dayjs(fromDate, format) : fromDate instanceof dayjs ? fromDate : null;
1677
+ const dayjsToDate = toDate && typeof toDate === 'string' ? dayjs(toDate, format) : toDate instanceof dayjs ? toDate : null;
1678
+ // State for picker
1679
+ const [pickerOpen, setPickerOpen] = React.useState(false);
1680
+ const [selectingPhase, setSelectingPhase] = React.useState('from');
1681
+ const inputRef = React.useRef(null);
1682
+ // Disable past dates function
1683
+ const shouldDisableDate = (date) => {
1684
+ if (!disablePastDates)
1685
+ return false;
1686
+ return date.isBefore(dayjs(), 'day');
1687
+ };
1688
+ const handleInputClick = () => {
1689
+ setPickerOpen(true);
1690
+ // Only reset to 'from' if both dates are empty (fresh start)
1691
+ if (!dayjsFromDate && !dayjsToDate) {
1692
+ setSelectingPhase('from');
1693
+ }
1694
+ };
1695
+ const handleDateChange = (date) => {
1696
+ if (selectingPhase === 'from') {
1697
+ onChange?.([date, dayjsToDate]);
1698
+ if (date) {
1699
+ // Auto switch to toDate selection
1700
+ setSelectingPhase('to');
1701
+ }
1702
+ }
1703
+ else {
1704
+ onChange?.([dayjsFromDate, date]);
1705
+ // Keep picker open for user to potentially change toDate
1706
+ }
1707
+ };
1708
+ return (jsxRuntime.jsx(LocalizationProvider.LocalizationProvider, { dateAdapter: AdapterDayjs.AdapterDayjs, adapterLocale: locale, children: jsxRuntime.jsxs(material.Box, { sx: { ...sx }, children: [label && (jsxRuntime.jsx(material.Typography, { sx: {
1709
+ display: 'block',
1710
+ ...TYPOGRAPHY.textFieldLabel,
1711
+ color: COLOR_GRAY[800],
1712
+ marginBottom: '4px',
1713
+ }, children: label })), jsxRuntime.jsxs(material.Box, { ref: inputRef, onClick: !disabled ? handleInputClick : undefined, sx: {
1714
+ display: 'flex',
1715
+ alignItems: 'center',
1716
+ gap: '12px',
1717
+ padding: '12px 8px',
1718
+ borderRadius: borderRadius === 'max' ? '100px' : `${borderRadius}px`,
1719
+ border: `1px solid ${error ? COLOR_ERROR[500] : COLOR_NEUTRAL[300]}`,
1720
+ backgroundColor: disabled ? COLOR_NEUTRAL[100] : 'white',
1721
+ cursor: disabled ? 'default' : 'pointer',
1722
+ transition: 'all 0.2s ease',
1723
+ ...(disabled
1724
+ ? {}
1725
+ : {
1726
+ '&:hover': {
1727
+ borderColor: error ? COLOR_ERROR[500] : COLOR_NEUTRAL[400],
1728
+ },
1729
+ }),
1730
+ }, children: [jsxRuntime.jsxs(material.Typography, { sx: {
1731
+ flex: 1,
1732
+ ...TYPOGRAPHY.text14Regular,
1733
+ color: dayjsFromDate || dayjsToDate ? COLOR_GRAY[900] : COLOR_NEUTRAL[400],
1734
+ }, children: [dayjsFromDate ? dayjsFromDate.format(format) : format, " \u2192", ' ', dayjsToDate ? dayjsToDate.format(format) : format] }), jsxRuntime.jsx(material.Box, { sx: {
1735
+ display: 'flex',
1736
+ alignItems: 'center',
1737
+ justifyContent: 'center',
1738
+ width: '24px',
1739
+ height: '24px',
1740
+ color: COLOR_NEUTRAL[400],
1741
+ }, 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: {
1742
+ textField: {
1743
+ hidden: true,
1744
+ size: 'small',
1745
+ sx: {
1746
+ display: 'none',
1747
+ },
1748
+ },
1749
+ popper: {
1750
+ anchorEl: inputRef.current,
1751
+ placement: 'bottom-start',
1752
+ },
1753
+ } }), helperText && !error && !success && (jsxRuntime.jsx(material.Typography, { sx: {
1754
+ ...TYPOGRAPHY.textFieldHelper,
1755
+ color: COLOR_NEUTRAL[400],
1756
+ marginTop: '4px',
1757
+ }, children: helperText })), error && errorMessage && (jsxRuntime.jsx(material.Typography, { sx: {
1758
+ ...TYPOGRAPHY.textFieldHelper,
1759
+ color: COLOR_ERROR[500],
1760
+ marginTop: '4px',
1761
+ }, children: errorMessage })), success && !error && successMessage && (jsxRuntime.jsx(material.Typography, { sx: {
1762
+ ...TYPOGRAPHY.textFieldHelper,
1763
+ color: COLOR_SUCCESS[500],
1764
+ marginTop: '4px',
1765
+ }, children: successMessage }))] }) }));
1766
+ };
1767
+
1768
+ 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, }) => {
1769
+ const borderRadiusValue = borderRadius === 'max' ? '100px' : `${borderRadius}px`;
1770
+ const selectedOption = React.useMemo(() => options.find((opt) => opt.value === value), [options, value]);
1771
+ const getHelperText = React.useCallback(() => {
1772
+ if (error && errorMessage)
1773
+ return errorMessage;
1774
+ if (success && successMessage)
1775
+ return successMessage;
1776
+ if (helperText)
1777
+ return helperText;
1778
+ return '';
1779
+ }, [error, errorMessage, success, successMessage, helperText]);
1780
+ const getHelperTextColor = React.useCallback(() => {
1781
+ if (error)
1782
+ return COLOR_ERROR[500];
1783
+ if (success)
1784
+ return COLOR_SUCCESS[500];
1785
+ return COLOR_NEUTRAL[400];
1786
+ }, [error, success]);
1787
+ const getBorderColor = React.useCallback(() => {
1788
+ if (error)
1789
+ return COLOR_ERROR[500];
1790
+ if (success)
1791
+ return COLOR_SUCCESS[500];
1792
+ return COLOR_NEUTRAL[300];
1793
+ }, [error, success]);
1794
+ const selectSx = React.useMemo(() => ({
1795
+ '& .MuiOutlinedInput-root': {
1796
+ borderRadius: borderRadiusValue,
1797
+ backgroundColor: disabled ? COLOR_NEUTRAL[100] : 'white',
1798
+ transition: 'all 0.2s ease',
1799
+ '& fieldset': {
1800
+ borderColor: getBorderColor(),
1801
+ },
1802
+ '&:hover fieldset': {
1803
+ borderColor: disabled ? getBorderColor() : error ? COLOR_ERROR[500] : COLOR_NEUTRAL[400],
1804
+ },
1805
+ '&.Mui-focused fieldset': {
1806
+ borderColor: error ? COLOR_ERROR[500] : COLOR_NEUTRAL[400],
1807
+ borderWidth: '1.5px',
1808
+ },
1809
+ },
1810
+ '& .MuiOutlinedInput-input': {
1811
+ padding: '12px 14px',
1812
+ color: COLOR_GRAY[900],
1813
+ '&::placeholder': {
1814
+ color: COLOR_NEUTRAL[400],
1815
+ opacity: 1,
1816
+ },
1817
+ },
1818
+ }), [borderRadiusValue, disabled, error, getBorderColor]);
1819
+ return (jsxRuntime.jsxs(material.Box, { sx: { ...sx }, children: [label && (jsxRuntime.jsx(material.Typography, { sx: {
1820
+ display: 'block',
1821
+ ...TYPOGRAPHY.textFieldLabel,
1822
+ color: COLOR_GRAY[800],
1823
+ marginBottom: '4px',
1824
+ }, children: label })), jsxRuntime.jsx(material.Select, { fullWidth: true, value: value || '', onChange: (e) => {
1825
+ const selectedValue = e.target.value;
1826
+ const matchedOption = options.find((opt) => String(opt.value) === String(selectedValue));
1827
+ if (matchedOption) {
1828
+ onChange?.(matchedOption.value);
1829
+ }
1830
+ }, disabled: disabled, displayEmpty: true, MenuProps: {
1831
+ disableScrollLock: true,
1832
+ }, renderValue: () => {
1833
+ if (!value) {
1834
+ return (jsxRuntime.jsx(material.Box, { sx: { color: COLOR_NEUTRAL[400], display: 'flex', alignItems: 'center', gap: '8px' }, children: placeholder }));
1835
+ }
1836
+ return (jsxRuntime.jsxs(material.Box, { sx: { display: 'flex', alignItems: 'center', gap: '8px' }, children: [selectedOption?.statusIndicator && (jsxRuntime.jsx(material.Box, { sx: {
1837
+ width: '8px',
1838
+ height: '8px',
1839
+ borderRadius: '50%',
1840
+ backgroundColor: '#4CAF50',
1841
+ } })), selectedOption?.avatar && (jsxRuntime.jsx(material.Avatar, { src: selectedOption.avatar, sx: {
1842
+ width: '24px',
1843
+ height: '24px',
1844
+ fontSize: '12px',
1845
+ } })), selectedOption?.icon && jsxRuntime.jsx(IconElement, { icon: selectedOption.icon }), jsxRuntime.jsx(material.Typography, { sx: { color: COLOR_GRAY[900], ...TYPOGRAPHY.text14Regular }, children: selectedOption?.label })] }));
1846
+ }, 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: {
1847
+ width: '8px',
1848
+ height: '8px',
1849
+ borderRadius: '50%',
1850
+ backgroundColor: '#4CAF50',
1851
+ } })), option.avatar && (jsxRuntime.jsx(material.Avatar, { src: option.avatar, sx: {
1852
+ width: '24px',
1853
+ height: '24px',
1854
+ fontSize: '12px',
1855
+ } })), 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: {
1856
+ color: getHelperTextColor(),
1857
+ marginTop: '4px',
1858
+ ...TYPOGRAPHY.textFieldHelper,
1859
+ }, children: getHelperText() }))] }));
1860
+ };
1861
+
1862
+ const BACKGROUND_COLOR_GRID = '#FFFFFF';
1863
+ const COLOR_CONTENT_GRID = '#27272A';
1864
+ const BORDER_RADIUS_GRID_CONTAINER = 8;
1865
+ const BORDER_RADIUS_GRID = 4;
1866
+ const GridComponent = ({ sx = {}, sxContainer = {}, content = 'Grids', children, }) => {
1867
+ return (jsxRuntime.jsxs(material.Stack, { sx: {
1868
+ bgcolor: BACKGROUND_COLOR_GRID,
1869
+ p: BORDER_RADIUS_GRID_CONTAINER,
1870
+ borderRadius: BORDER_RADIUS_GRID_CONTAINER,
1871
+ gap: BORDER_RADIUS_GRID,
1872
+ ...sx,
1873
+ }, children: [content && (jsxRuntime.jsx(material.Typography, { sx: {
1874
+ color: COLOR_CONTENT_GRID,
1875
+ ...TYPOGRAPHY_STYLES.lg.bold,
1876
+ }, children: content })), jsxRuntime.jsx(material.Container, { maxWidth: false, sx: {
1877
+ bgcolor: BACKGROUND_COLOR_GRID,
1878
+ borderRadius: BORDER_RADIUS_GRID,
1879
+ minHeight: 400,
1880
+ boxShadow: '0 0 8px -4px rgba(16, 24, 40, 0.3)',
1881
+ ...sxContainer,
1882
+ }, children: children })] }));
1883
+ };
1884
+
1885
+ var BorderRadius;
1886
+ (function (BorderRadius) {
1887
+ BorderRadius["SQUARE"] = "4px";
1888
+ BorderRadius["CIRCLE"] = "20px";
1889
+ })(BorderRadius || (BorderRadius = {}));
1890
+ var ShapeType;
1891
+ (function (ShapeType) {
1892
+ ShapeType["SQUARE"] = "square";
1893
+ ShapeType["CIRCLE"] = "circle";
1894
+ })(ShapeType || (ShapeType = {}));
1895
+ var Orientation;
1896
+ (function (Orientation) {
1897
+ Orientation["HORIZONTAL"] = "horizontal";
1898
+ Orientation["VERTICAL"] = "vertical";
1899
+ })(Orientation || (Orientation = {}));
1900
+ var ButtonSize;
1901
+ (function (ButtonSize) {
1902
+ ButtonSize[ButtonSize["SMALL"] = 32] = "SMALL";
1903
+ ButtonSize[ButtonSize["MEDIUM"] = 40] = "MEDIUM";
1904
+ })(ButtonSize || (ButtonSize = {}));
1905
+ const Colors = {
1906
+ BORDER_COLOR_BUTTON: '#07554B',
1907
+ BORDER_COLOR_DISABLE: '#0000000D',
1908
+ HOVER_BG_COLOR: 'rgba(7, 85, 75, 0.04)',
1909
+ BACKGROUND_COLOR: '#FFFFFF',
1910
+ TEXT_COLOR_READONLY: '#27272A',
1911
+ };
1912
+ const FONT_SIZE_LOADING = {
1913
+ large: 40,
1914
+ };
1915
+ const BORDER_TEXT_FIELD_LOADING = 20;
1916
+
1917
+ const InputStepperSkeleton = ({ orientation, buttonShape }) => {
1918
+ return (jsxRuntime.jsxs(material.Box, { display: "inline-flex", flexDirection: orientation === Orientation.HORIZONTAL ? 'row' : 'column', alignItems: "center", gap: 1, children: [jsxRuntime.jsx(material.Skeleton, { variant: buttonShape === ShapeType.CIRCLE ? 'circular' : 'rectangular', width: FONT_SIZE_LOADING.large, height: FONT_SIZE_LOADING.large, sx: {
1919
+ borderRadius: buttonShape === ShapeType.CIRCLE ? BorderRadius.CIRCLE : BorderRadius.SQUARE,
1920
+ maxHeight: FONT_SIZE_LOADING.large,
1921
+ } }), jsxRuntime.jsx(material.Skeleton, { width: FONT_SIZE_LOADING.large, sx: {
1922
+ borderRadius: `${BORDER_TEXT_FIELD_LOADING}px`,
1923
+ } }), jsxRuntime.jsx(material.Skeleton, { variant: buttonShape === ShapeType.CIRCLE ? 'circular' : 'rectangular', width: FONT_SIZE_LOADING.large, height: FONT_SIZE_LOADING.large, sx: {
1924
+ borderRadius: buttonShape === ShapeType.CIRCLE ? BorderRadius.CIRCLE : BorderRadius.SQUARE,
1925
+ maxHeight: FONT_SIZE_LOADING.large,
1926
+ } })] }));
1927
+ };
1928
+
1929
+ const InputStepperComponent = ({ value: controlledValue, onChange, min, max, step = 1, disabled = false, readOnly = false, orientation = Orientation.HORIZONTAL, loading = false, sx = {}, sxTextField = {}, // style cho input chứa value
1930
+ sxButton = {}, // style cho 2 button
1931
+ buttonShape = ShapeType.SQUARE, buttonColor, textFieldShape = ShapeType.SQUARE, decrementIcon = jsxRuntime.jsx(RemoveIcon, {}), incrementIcon = jsxRuntime.jsx(AddIcon, {}), }) => {
1932
+ const [internalValue, setInternalValue] = React.useState(controlledValue ?? min ?? 0);
1933
+ const value = controlledValue !== undefined ? controlledValue : internalValue;
1934
+ const updateValue = (newValue) => {
1935
+ let finalValue = newValue;
1936
+ if (min !== undefined && newValue < min)
1937
+ finalValue = min;
1938
+ if (max !== undefined && newValue > max)
1939
+ finalValue = max;
1940
+ if (controlledValue === undefined) {
1941
+ setInternalValue(finalValue);
1942
+ }
1943
+ onChange?.(finalValue);
1944
+ };
1945
+ const handleIncrement = () => {
1946
+ updateValue(Number(value) + step);
1947
+ };
1948
+ const handleDecrement = () => {
1949
+ updateValue(Number(value) - step);
1950
+ };
1951
+ const handleInputChange = (event) => {
1952
+ if (!readOnly) {
1953
+ const newValue = event.target.value === '' ? min || 0 : Number(event.target.value);
1954
+ if (!isNaN(newValue)) {
1955
+ updateValue(newValue);
1956
+ }
1957
+ }
1958
+ };
1959
+ const isDecrementDisabled = disabled || (min !== undefined && Number(value) <= min);
1960
+ const isIncrementDisabled = disabled || (max !== undefined && Number(value) >= max);
1961
+ const buttonSize = ButtonSize.MEDIUM;
1962
+ if (loading) {
1963
+ return jsxRuntime.jsx(InputStepperSkeleton, { orientation: orientation, buttonShape: buttonShape });
1964
+ }
1965
+ return (jsxRuntime.jsxs(material.Box, { display: "inline-flex", flexDirection: orientation === 'horizontal' ? 'row' : 'column', alignItems: "center", gap: PADDING_GAP_ITEM, sx: {
1966
+ opacity: disabled ? 0.5 : 1,
1967
+ pointerEvents: disabled ? 'none' : 'auto',
1968
+ ...sx,
1969
+ }, children: [jsxRuntime.jsx(material.IconButton, { onClick: handleDecrement, disabled: isDecrementDisabled, sx: {
1970
+ borderRadius: buttonShape === 'circle' ? BorderRadius.CIRCLE : BorderRadius.SQUARE,
1971
+ width: buttonSize,
1972
+ height: buttonSize,
1973
+ padding: PADDING_GAP_ITEM,
1974
+ border: isDecrementDisabled
1975
+ ? `1px solid ${Colors.BORDER_COLOR_DISABLE}`
1976
+ : `1px solid ${Colors.BORDER_COLOR_BUTTON}`,
1977
+ backgroundColor: Colors.BACKGROUND_COLOR,
1978
+ color: buttonColor || Colors.BORDER_COLOR_BUTTON,
1979
+ '&:hover': {
1980
+ backgroundColor: Colors.HOVER_BG_COLOR,
1981
+ },
1982
+ ...(isDecrementDisabled ? {} : sxButton),
1983
+ }, children: decrementIcon }), jsxRuntime.jsx(material.TextField, { value: value, onChange: handleInputChange, disabled: disabled, inputProps: {
1984
+ min,
1985
+ max,
1986
+ step,
1987
+ readOnly,
1988
+ }, type: "number", sx: {
1989
+ minWidth: buttonSize,
1990
+ width: sxTextField?.width || buttonSize,
1991
+ minHeight: buttonSize,
1992
+ height: sxTextField?.height || buttonSize,
1993
+ overflow: 'hidden',
1994
+ borderRadius: textFieldShape === 'circle' ? BorderRadius.CIRCLE : BorderRadius.SQUARE,
1995
+ color: readOnly ? Colors.TEXT_COLOR_READONLY : '',
1996
+ backgroundColor: readOnly ? 'transparent !important' : sxTextField?.backgroundColor,
1997
+ '& .MuiOutlinedInput-root': {
1998
+ width: '100%',
1999
+ height: '100%',
2000
+ borderRadius: 'inherit',
2001
+ '& fieldset': {
2002
+ borderColor: readOnly || disabled ? 'transparent' : sxTextField?.borderColor || Colors.BORDER_COLOR_BUTTON,
2003
+ borderWidth: readOnly || disabled ? 0 : 1,
2004
+ borderRadius: textFieldShape === 'circle' ? BorderRadius.CIRCLE : BorderRadius.SQUARE,
2005
+ },
2006
+ '&:hover fieldset': readOnly || disabled
2007
+ ? {}
2008
+ : {
2009
+ borderColor: sxTextField?.borderColorHover || Colors.BORDER_COLOR_BUTTON,
2010
+ },
2011
+ '&.Mui-focused fieldset': readOnly
2012
+ ? {
2013
+ borderColor: 'transparent',
2014
+ borderWidth: 0,
2015
+ }
2016
+ : {
2017
+ borderColor: sxTextField?.borderColorFocused || Colors.BORDER_COLOR_BUTTON,
2018
+ borderWidth: 1,
2019
+ },
2020
+ '&.Mui-disabled fieldset': {
2021
+ borderColor: Colors.BORDER_COLOR_DISABLE,
2022
+ backgroundColor: readOnly ? 'transparent' : Colors.BORDER_COLOR_DISABLE,
2023
+ },
2024
+ },
2025
+ '& input[type=number]::-webkit-outer-spin-button, & input[type=number]::-webkit-inner-spin-button': {
2026
+ WebkitAppearance: 'none',
2027
+ margin: 0,
2028
+ },
2029
+ '& input[type=number]': {
2030
+ MozAppearance: 'textfield',
2031
+ },
2032
+ '& .MuiInputBase-input': {
2033
+ textAlign: sxTextField?.textAlign || 'center',
2034
+ padding: sxTextField?.padding || '4px 8px',
2035
+ fontSize: readOnly ? '16px' : sxTextField?.fontSize || '1rem',
2036
+ cursor: readOnly ? 'not-allowed' : 'text',
2037
+ borderRadius: 'inherit',
2038
+ backgroundColor: readOnly ? 'transparent' : sxTextField?.backgroundColor || 'transparent',
2039
+ color: readOnly ? Colors.TEXT_COLOR_READONLY : sxTextField?.color || 'inherit',
2040
+ fontWeight: sxTextField?.fontWeight || (readOnly ? 700 : 'normal'),
2041
+ },
2042
+ } }), jsxRuntime.jsx(material.IconButton, { onClick: handleIncrement, disabled: isIncrementDisabled, sx: {
2043
+ borderRadius: buttonShape === 'circle' ? BorderRadius.CIRCLE : BorderRadius.SQUARE,
2044
+ width: buttonSize,
2045
+ height: buttonSize,
2046
+ padding: PADDING_GAP_ITEM,
2047
+ border: isIncrementDisabled
2048
+ ? `1px solid ${Colors.BORDER_COLOR_DISABLE}`
2049
+ : `1px solid ${Colors.BORDER_COLOR_BUTTON}`,
2050
+ backgroundColor: Colors.BACKGROUND_COLOR,
2051
+ color: buttonColor || Colors.BORDER_COLOR_BUTTON,
2052
+ '&:hover': {
2053
+ backgroundColor: Colors.HOVER_BG_COLOR,
2054
+ },
2055
+ ...(isIncrementDisabled ? {} : sxButton),
2056
+ }, children: incrementIcon })] }));
2057
+ };
2058
+
2059
+ const LinkInternalElement = ({ content, onClick, sx = {} }) => {
2060
+ return (jsxRuntime.jsx(material.Typography, { onClick: onClick, sx: {
2061
+ color: 'inherit',
2062
+ textDecorationColor: 'inherit',
2063
+ cursor: 'pointer',
2064
+ '&:hover': {
2065
+ textDecoration: 'underline',
2066
+ },
2067
+ ...sx,
2068
+ }, children: content }));
2069
+ };
2070
+
2071
+ const LinkElement = ({ onClick, sx = {}, target = '_self', ...rest }) => {
2072
+ return (jsxRuntime.jsx(material.Link, { target: target, rel: "noopener", sx: { textDecoration: 'none', color: 'unset', ...sx }, onClick: (event) => {
2073
+ if (onClick) {
2074
+ event.preventDefault();
2075
+ onClick();
2076
+ }
2077
+ }, ...rest }));
2078
+ };
2079
+
2080
+ const StyledTextField$3 = styles.styled(MuiTextField)(({ theme }) => {
2081
+ return {
2082
+ '& .MuiOutlinedInput-root': {
2083
+ '& fieldset': { borderColor: COLOR_NEUTRAL[300] },
2084
+ '&:hover fieldset': { borderColor: COLOR_NEUTRAL[400] },
2085
+ '&.Mui-focused fieldset': { borderColor: COLOR_NEUTRAL[300], borderWidth: '2px' },
2086
+ '&.Mui-focused': {
2087
+ boxShadow: '0 1px 2px 0 rgba(10, 13, 18, 0.05), 0 0 0 4px #FEE4E2',
2088
+ },
2089
+ '&.Mui-disabled': {
2090
+ backgroundColor: COLOR_NEUTRAL[100],
2091
+ '& fieldset': { borderColor: COLOR_NEUTRAL[200] },
2092
+ '& input': { color: COLOR_NEUTRAL[400], WebkitTextFillColor: COLOR_NEUTRAL[400] },
2093
+ },
2094
+ '&.Mui-error fieldset': { borderColor: COLOR_ERROR[600], borderWidth: '1px' },
2095
+ '&.Mui-error:hover fieldset': { borderColor: COLOR_ERROR[600] },
2096
+ '&.Mui-error.Mui-focused fieldset': { borderColor: COLOR_ERROR[600], borderWidth: '2px' },
2097
+ '&.Mui-error.Mui-focused': {
2098
+ boxShadow: '0 1px 2px 0 rgba(10, 13, 18, 0.05), 0 0 0 4px rgba(255, 66, 79, 0.15)',
2099
+ },
2100
+ },
2101
+ '& .MuiInputBase-input': {
2102
+ ...TYPOGRAPHY.text14Regular,
2103
+ padding: '12px 8px',
2104
+ color: COLOR_GRAY[900],
2105
+ '&::placeholder': { color: COLOR_NEUTRAL[400], opacity: 0.7 },
2106
+ '&:focus': { outline: 'none' },
2107
+ },
2108
+ '& .MuiInputLabel-root': {
2109
+ ...TYPOGRAPHY.textFieldLabel,
2110
+ color: COLOR_GRAY[800],
2111
+ transform: 'translate(14px, -9px) scale(0.75)',
2112
+ '&.Mui-focused': { color: COLOR_NEUTRAL[500] },
2113
+ '&.Mui-error': { color: COLOR_ERROR[600] },
2114
+ },
2115
+ '& .MuiFormHelperText-root': {
2116
+ ...TYPOGRAPHY.textFieldHelper,
2117
+ margin: '4px 0 0 0',
2118
+ '&.Mui-error': { color: COLOR_ERROR[600] },
2119
+ },
2120
+ };
2121
+ });
2122
+ 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 }) => {
2123
+ const [validationError, setValidationError] = React.useState(false);
2124
+ const isValidLink = (url) => {
2125
+ if (!url)
2126
+ return true; // Empty is valid (optional field)
2127
+ try {
2128
+ const urlToTest = url.includes('://') ? url : `${protocol}${url}`;
2129
+ new URL(urlToTest);
2130
+ // Kiểm tra domain phải có dấu chấm (ít nhất là có TLD)
2131
+ const hostname = new URL(urlToTest).hostname;
2132
+ if (!hostname || !hostname.includes('.')) {
2133
+ return false;
2134
+ }
2135
+ return true;
2136
+ }
2137
+ catch {
2138
+ return false;
2139
+ }
2140
+ };
2141
+ const handleBlur = (event) => {
2142
+ const inputValue = event.target.value;
2143
+ if (inputValue && !isValidLink(inputValue)) {
2144
+ setValidationError(true);
2145
+ }
2146
+ else {
2147
+ setValidationError(false);
2148
+ }
2149
+ };
2150
+ return (jsxRuntime.jsxs(material.Box, { sx: { ...sx }, children: [label && (jsxRuntime.jsx(material.Typography, { sx: {
2151
+ display: 'block',
2152
+ ...TYPOGRAPHY.textFieldLabel,
2153
+ color: COLOR_GRAY[800],
2154
+ marginBottom: '4px',
2155
+ }, 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: {
2156
+ startAdornment: (jsxRuntime.jsx(material.InputAdornment, { position: "start", children: jsxRuntime.jsx(material.Typography, { sx: { color: COLOR_NEUTRAL[300], ...TYPOGRAPHY.text14Regular }, children: protocol }) })),
2157
+ 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] } })) })),
2158
+ }, sx: {
2159
+ '& .MuiOutlinedInput-root': {
2160
+ borderRadius: borderRadius === 'max' ? '100px' : `${borderRadius}px`,
2161
+ ...(success && {
2162
+ '&.Mui-focused': {
2163
+ boxShadow: `0 1px 2px 0 rgba(10, 13, 18, 0.05), 0 0 0 4px ${COLOR_SUCCESS[100]}`,
2164
+ },
2165
+ }),
2166
+ },
2167
+ } }), success && !error && successMessage && (jsxRuntime.jsx(material.Typography, { sx: {
2168
+ ...TYPOGRAPHY.textFieldHelper,
2169
+ color: COLOR_SUCCESS[500],
2170
+ marginTop: '4px',
2171
+ }, children: successMessage }))] }));
2172
+ };
2173
+
2174
+ const MODAL_ICON_COLORS = {
2175
+ check_circle: '#10B981',
2176
+ warning: '#F59E0B',
2177
+ error: '#EF4444',
2178
+ info: '#3B82F6',
2179
+ };
2180
+ const ModalTitle = ({ content }) => {
2181
+ return jsxRuntime.jsx(material.Typography, { sx: { ...TYPOGRAPHY_STYLES.textLg.semiBold, color: '#101828' }, children: content });
2182
+ };
2183
+ const ModalDescription = ({ content }) => {
2184
+ return (jsxRuntime.jsx(material.Typography, { sx: {
2185
+ ...TYPOGRAPHY_STYLES.textSm.regular,
2186
+ color: '#667085',
2187
+ }, children: content }));
2188
+ };
2189
+ const ModalIcon = ({ type, size = 48, }) => {
2190
+ return (jsxRuntime.jsx(material.Box, { sx: {
2191
+ width: size,
2192
+ height: size,
2193
+ borderRadius: '28px',
2194
+ bgcolor: `${MODAL_ICON_COLORS[type]}20`,
2195
+ display: 'flex',
2196
+ alignItems: 'center',
2197
+ justifyContent: 'center',
2198
+ }, children: jsxRuntime.jsx(IconElement, { icon: type, sx: {
2199
+ fontSize: size * 0.6,
2200
+ color: MODAL_ICON_COLORS[type],
2201
+ flex: 1,
2202
+ } }) }));
2203
+ };
2204
+ const DialogWrapper = ({ isForm = false, children }) => {
2205
+ return isForm ? jsxRuntime.jsx(formik.Form, { noValidate: true, children: children }) : jsxRuntime.jsx(React.Fragment, { children: children });
2206
+ };
2207
+
2208
+ const ModalComponent = ({ open, isForm = false, onClose, icon, avatars, title, nodeDescription, nodeContent, buttonLeft, buttonCenter, buttonRight, nodeBottomLeft, align = 'flex-start', direction = 'column', sx, sxContent, sxBottom, }) => {
2209
+ const hasActions = buttonLeft || buttonCenter || buttonRight || nodeBottomLeft;
2210
+ return (jsxRuntime.jsx(material.Dialog, { open: open, disableScrollLock: true, onClose: onClose, maxWidth: false, PaperProps: {
2211
+ sx: {
2212
+ borderRadius: BORDER_RADIUS_ELEMENT_WRAPPER,
2213
+ p: `calc(${PADDING_GAP_LAYOUT} + 8px)`,
2214
+ minWidth: 350,
2215
+ width: 'auto',
2216
+ ...sx,
2217
+ },
2218
+ }, children: jsxRuntime.jsx(DialogWrapper, { isForm: isForm, children: jsxRuntime.jsx(material.DialogContent, { sx: { p: 0, ...sxContent }, children: jsxRuntime.jsxs(material.Stack, { sx: { gap: 0, alignItems: 'center' }, children: [jsxRuntime.jsxs(material.Stack, { direction: direction, sx: {
2219
+ justifyContent: direction === 'row' ? 'flex-start' : align,
2220
+ gap: PADDING_GAP_LAYOUT,
2221
+ alignItems: direction === 'row' ? (nodeDescription ? 'flex-start' : 'center') : align,
2222
+ width: '100%',
2223
+ }, children: [icon && jsxRuntime.jsx(ModalIcon, { type: icon }), avatars && jsxRuntime.jsx(AvatarGroupComponent, { avatars: avatars }), (title || nodeDescription) && (jsxRuntime.jsxs(material.Stack, { sx: {
2224
+ gap: GAP_ICON_CONTENT_BY_SIZE.medium,
2225
+ alignItems: direction === 'row' ? 'flex-start' : align,
2226
+ width: '100%',
2227
+ }, children: [title && jsxRuntime.jsx(ModalTitle, { content: title }), nodeDescription] }))] }), nodeContent && jsxRuntime.jsx(material.Box, { sx: { width: '100%' }, children: nodeContent }), hasActions && (jsxRuntime.jsx(material.DialogActions, { sx: {
2228
+ width: '100%',
2229
+ mt: `calc(${PADDING_GAP_LAYOUT} + 8px)`,
2230
+ gap: GAP_ICON_CONTENT_BY_SIZE.large,
2231
+ ...sxBottom,
2232
+ }, 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 }) }))] }))] }) }))] }) }) }) }));
2233
+ };
2234
+
2235
+ const ModalCardComponent = ({ open, isForm = false, onClose, items, nodeContent, buttonLeft, buttonCenter, buttonRight, nodeBottomLeft, sx, sxContent, sxBottom, }) => {
2236
+ const itemsArray = Array.isArray(items) ? items : [items];
2237
+ const showSlider = itemsArray.length > 1;
2238
+ const hasActions = buttonLeft || buttonCenter || buttonRight || nodeBottomLeft;
2239
+ const sliderSettings = {
2240
+ dots: true,
2241
+ infinite: true,
2242
+ speed: 500,
2243
+ slidesToShow: 1,
2244
+ slidesToScroll: 1,
2245
+ arrows: false,
2246
+ };
2247
+ const renderCard = (item) => (jsxRuntime.jsxs(material.Stack, { sx: { gap: '20px', alignItems: 'center', textAlign: 'center' }, children: [jsxRuntime.jsx(ImageElement, { url: item?.image, sx: {
2248
+ borderRadius: BORDER_RADIUS_ELEMENT_MIDDLE,
2249
+ width: '100%',
2250
+ aspectRatio: 352 / 200,
2251
+ objectFit: 'cover',
2252
+ height: 'auto',
2253
+ } }), jsxRuntime.jsxs(material.Stack, { sx: { gap: 1 }, children: [jsxRuntime.jsx(ModalTitle, { content: item?.title }), jsxRuntime.jsx(ModalDescription, { content: item?.description })] })] }));
2254
+ return (jsxRuntime.jsx(material.Dialog, { open: open, onClose: onClose, PaperProps: {
2255
+ sx: {
2256
+ borderRadius: BORDER_RADIUS_ELEMENT_WRAPPER,
2257
+ p: `calc(${PADDING_GAP_LAYOUT} + 8px)`,
2258
+ minWidth: 350,
2259
+ width: 'auto',
2260
+ ...sx,
2261
+ },
2262
+ }, children: jsxRuntime.jsxs(DialogWrapper, { isForm: isForm, children: [jsxRuntime.jsx(material.DialogContent, { sx: { p: 0, ...sxContent }, children: jsxRuntime.jsxs(material.Stack, { sx: { gap: `calc(${PADDING_GAP_LAYOUT} + 8px)` }, children: [showSlider ? (jsxRuntime.jsx(material.Box, { sx: {
2263
+ '& .slick-slider': {
2264
+ position: 'relative',
2265
+ paddingBottom: '40px',
2266
+ },
2267
+ '& .slick-dots': {
2268
+ bottom: '0px',
2269
+ position: 'absolute',
2270
+ },
2271
+ '& .slick-list': {
2272
+ overflow: 'hidden',
2273
+ },
2274
+ }, children: jsxRuntime.jsx(Slider, { ...sliderSettings, children: itemsArray.map((item, index) => (jsxRuntime.jsx("div", { children: renderCard(item) }, index))) }) })) : (renderCard(itemsArray[0])), nodeContent && jsxRuntime.jsx(material.Box, { sx: { width: '100%' }, children: nodeContent })] }) }), hasActions && (jsxRuntime.jsx(material.DialogActions, { sx: {
2275
+ width: '100%',
2276
+ mt: `calc(${PADDING_GAP_LAYOUT} + 8px)`,
2277
+ gap: GAP_ICON_CONTENT_BY_SIZE.large,
2278
+ ...sxBottom,
2279
+ }, 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 }) }))] }))] }) }))] }) }));
2280
+ };
2281
+
2282
+ const CURRENCIES = ['USD', 'EUR', 'GBP', 'JPY', 'AUD', 'CAD', 'CHF', 'CNY', 'VND', 'INR'];
2283
+ // Format number with thousand separators
2284
+ const formatMoneyDisplay = (value) => {
2285
+ if (!value)
2286
+ return '';
2287
+ const numericOnly = value.replace(/\D/g, '');
2288
+ return numericOnly.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
2289
+ };
2290
+ const StyledTextField$2 = styles.styled(MuiTextField)(({ theme }) => {
2291
+ return {
2292
+ '& .MuiOutlinedInput-root': {
2293
+ '& fieldset': { borderColor: COLOR_NEUTRAL[300] },
2294
+ '&:hover fieldset': { borderColor: COLOR_NEUTRAL[400] },
2295
+ '&.Mui-focused fieldset': { borderColor: COLOR_NEUTRAL[300], borderWidth: '2px' },
2296
+ '&.Mui-focused': {
2297
+ boxShadow: '0 1px 2px 0 rgba(10, 13, 18, 0.05), 0 0 0 4px #FEE4E2',
2298
+ },
2299
+ '&.Mui-disabled': {
2300
+ backgroundColor: COLOR_NEUTRAL[100],
2301
+ '& fieldset': { borderColor: COLOR_NEUTRAL[200] },
2302
+ '& input': { color: COLOR_NEUTRAL[400], WebkitTextFillColor: COLOR_NEUTRAL[400] },
2303
+ },
2304
+ '&.Mui-error fieldset': { borderColor: COLOR_ERROR[600], borderWidth: '1px' },
2305
+ '&.Mui-error:hover fieldset': { borderColor: COLOR_ERROR[600] },
2306
+ '&.Mui-error.Mui-focused fieldset': { borderColor: COLOR_ERROR[600], borderWidth: '2px' },
2307
+ '&.Mui-error.Mui-focused': {
2308
+ boxShadow: '0 1px 2px 0 rgba(10, 13, 18, 0.05), 0 0 0 4px rgba(255, 66, 79, 0.15)',
2309
+ },
2310
+ },
2311
+ '& .MuiInputBase-input': {
2312
+ ...TYPOGRAPHY.text14Regular,
2313
+ padding: '12px 8px',
2314
+ color: COLOR_GRAY[900],
2315
+ '&::placeholder': { color: COLOR_NEUTRAL[400], opacity: 0.7 },
2316
+ '&:focus': { outline: 'none' },
2317
+ },
2318
+ '& .MuiInputLabel-root': {
2319
+ ...TYPOGRAPHY.textFieldLabel,
2320
+ color: COLOR_GRAY[800],
2321
+ transform: 'translate(14px, -9px) scale(0.75)',
2322
+ '&.Mui-focused': { color: COLOR_NEUTRAL[500] },
2323
+ '&.Mui-error': { color: COLOR_ERROR[600] },
2324
+ },
2325
+ '& .MuiFormHelperText-root': {
2326
+ ...TYPOGRAPHY.textFieldHelper,
2327
+ margin: '4px 0 0 0',
2328
+ '&.Mui-error': { color: COLOR_ERROR[600] },
2329
+ },
2330
+ };
2331
+ });
2332
+ 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 }) => {
2333
+ const [selectedCurrency, setSelectedCurrency] = React.useState(currency);
2334
+ const handleCurrencyChange = (e) => {
2335
+ const newCurrency = e.target.value;
2336
+ setSelectedCurrency(newCurrency);
2337
+ onCurrencyChange?.(newCurrency);
2338
+ };
2339
+ const handleMoneyChange = (e) => {
2340
+ const rawValue = e.target.value.replace(/,/g, '');
2341
+ onChange?.({ ...e, target: { ...e.target, value: rawValue } });
2342
+ };
2343
+ return (jsxRuntime.jsxs(material.Box, { sx: { ...sx }, children: [label && (jsxRuntime.jsx(material.Typography, { sx: {
2344
+ display: 'block',
2345
+ ...TYPOGRAPHY.textFieldLabel,
2346
+ color: COLOR_GRAY[800],
2347
+ marginBottom: '4px',
2348
+ }, 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: {
2349
+ startAdornment: (jsxRuntime.jsx(material.InputAdornment, { position: "start", children: iconBefore ? iconBefore : jsxRuntime.jsx(AttachMoneyIcon, { sx: { fontSize: '18px', color: COLOR_GRAY[400], mr: 0.5 } }) })),
2350
+ 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: {
2351
+ border: 'none',
2352
+ outline: 'none',
2353
+ '& .MuiSelect-standard': { border: 'none' },
2354
+ '&.MuiInput-underline:before': { borderBottom: 'none' },
2355
+ '&.MuiInput-underline:hover:before': { borderBottom: 'none' },
2356
+ '&.MuiInput-underline:after': { borderBottom: 'none' },
2357
+ minWidth: '70px',
2358
+ fontSize: '14px',
2359
+ color: COLOR_GRAY[500],
2360
+ }, children: optionCurrencies.map((curr) => (jsxRuntime.jsx(material.MenuItem, { value: curr, children: curr }, curr))) })] }) })),
2361
+ }, sx: {
2362
+ '& .MuiOutlinedInput-root': {
2363
+ borderRadius: borderRadius === 'max' ? '100px' : `${borderRadius}px`,
2364
+ ...(success && {
2365
+ '&.Mui-focused': {
2366
+ boxShadow: `0 1px 2px 0 rgba(10, 13, 18, 0.05), 0 0 0 4px ${COLOR_SUCCESS[100]}`,
2367
+ },
2368
+ }),
2369
+ },
2370
+ } }), success && !error && successMessage && (jsxRuntime.jsx(material.Typography, { sx: {
2371
+ ...TYPOGRAPHY.textFieldHelper,
2372
+ color: COLOR_SUCCESS[600],
2373
+ marginTop: '4px',
2374
+ }, children: successMessage }))] }));
2375
+ };
2376
+
2377
+ const COUNTRY_CODES = [
2378
+ { code: 'US', name: 'United States', flag: '🇺🇸', value: '+1' },
2379
+ { code: 'GB', name: 'United Kingdom', flag: '🇬🇧', value: '+44' },
2380
+ { code: 'CA', name: 'Canada', flag: '🇨🇦', value: '+1' },
2381
+ { code: 'AU', name: 'Australia', flag: '🇦🇺', value: '+61' },
2382
+ { code: 'VN', name: 'Vietnam', flag: '🇻🇳', value: '+84' },
2383
+ { code: 'JP', name: 'Japan', flag: '🇯🇵', value: '+81' },
2384
+ { code: 'CN', name: 'China', flag: '🇨🇳', value: '+86' },
2385
+ { code: 'IN', name: 'India', flag: '🇮🇳', value: '+91' },
2386
+ { code: 'DE', name: 'Germany', flag: '🇩🇪', value: '+49' },
2387
+ { code: 'FR', name: 'France', flag: '🇫🇷', value: '+33' },
2388
+ ];
2389
+ const StyledTextField$1 = styles.styled(MuiTextField)(({ theme }) => {
2390
+ return {
2391
+ '& .MuiOutlinedInput-root': {
2392
+ '& fieldset': { borderColor: COLOR_NEUTRAL[300] },
2393
+ '&:hover fieldset': { borderColor: COLOR_NEUTRAL[400] },
2394
+ '&.Mui-focused fieldset': { borderColor: COLOR_NEUTRAL[300], borderWidth: '2px' },
2395
+ '&.Mui-focused': {
2396
+ boxShadow: '0 1px 2px 0 rgba(10, 13, 18, 0.05), 0 0 0 4px #FEE4E2',
2397
+ },
2398
+ '&.Mui-disabled': {
2399
+ backgroundColor: COLOR_NEUTRAL[100],
2400
+ '& fieldset': { borderColor: COLOR_NEUTRAL[200] },
2401
+ '& input': { color: COLOR_NEUTRAL[400], WebkitTextFillColor: COLOR_NEUTRAL[400] },
2402
+ },
2403
+ '&.Mui-error fieldset': { borderColor: COLOR_ERROR[600], borderWidth: '1px' },
2404
+ '&.Mui-error:hover fieldset': { borderColor: COLOR_ERROR[600] },
2405
+ '&.Mui-error.Mui-focused fieldset': { borderColor: COLOR_ERROR[600], borderWidth: '2px' },
2406
+ '&.Mui-error.Mui-focused': {
2407
+ boxShadow: '0 1px 2px 0 rgba(10, 13, 18, 0.05), 0 0 0 4px rgba(255, 66, 79, 0.15)',
2408
+ },
2409
+ },
2410
+ '& .MuiInputBase-input': {
2411
+ ...TYPOGRAPHY.text14Regular,
2412
+ padding: '12px 8px',
2413
+ color: COLOR_GRAY[900],
2414
+ '&::placeholder': { color: COLOR_NEUTRAL[400], opacity: 0.7 },
2415
+ '&:focus': { outline: 'none' },
2416
+ },
2417
+ '& .MuiInputLabel-root': {
2418
+ ...TYPOGRAPHY.textFieldLabel,
2419
+ color: COLOR_GRAY[800],
2420
+ transform: 'translate(14px, -9px) scale(0.75)',
2421
+ '&.Mui-focused': { color: COLOR_NEUTRAL[500] },
2422
+ '&.Mui-error': { color: COLOR_ERROR[600] },
2423
+ },
2424
+ '& .MuiFormHelperText-root': {
2425
+ ...TYPOGRAPHY.textFieldHelper,
2426
+ margin: '4px 0 0 0',
2427
+ '&.Mui-error': { color: COLOR_ERROR[600] },
2428
+ },
2429
+ };
2430
+ });
2431
+ 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 }) => {
2432
+ const handleCountryChange = (e) => {
2433
+ const newCode = e.target.value;
2434
+ onCountryCodeChange?.(newCode);
2435
+ };
2436
+ return (jsxRuntime.jsxs(material.Box, { sx: { ...sx }, children: [label && (jsxRuntime.jsx(material.Typography, { sx: {
2437
+ display: 'block',
2438
+ ...TYPOGRAPHY.textFieldLabel,
2439
+ color: COLOR_GRAY[800],
2440
+ marginBottom: '4px',
2441
+ }, 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: {
2442
+ startAdornment: (jsxRuntime.jsx(material.InputAdornment, { position: "start", sx: { mr: 0 }, children: jsxRuntime.jsx(material.Select, { value: countryCode, onChange: handleCountryChange, disabled: disabled, variant: "standard", sx: {
2443
+ border: 'none',
2444
+ outline: 'none',
2445
+ '& .MuiSelect-standard': { border: 'none' },
2446
+ '&.MuiInput-underline:before': { borderBottom: 'none' },
2447
+ '&.MuiInput-underline:hover:before': { borderBottom: 'none' },
2448
+ '&.MuiInput-underline:after': { borderBottom: 'none' },
2449
+ minWidth: '50px',
2450
+ fontSize: '14px',
2451
+ color: COLOR_GRAY[500],
2452
+ display: 'flex',
2453
+ alignItems: 'center',
2454
+ gap: 0.5,
2455
+ }, children: countries.map((c) => (jsxRuntime.jsx(material.MenuItem, { value: c.code, children: c.code }, c.code))) }) })),
2456
+ 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] } }) })),
2457
+ }, sx: {
2458
+ '& .MuiOutlinedInput-root': {
2459
+ borderRadius: borderRadius === 'max' ? '100px' : `${borderRadius}px`,
2460
+ ...(success && {
2461
+ '&.Mui-focused': {
2462
+ boxShadow: `0 1px 2px 0 rgba(10, 13, 18, 0.05), 0 0 0 4px ${COLOR_SUCCESS[100]}`,
2463
+ },
2464
+ }),
2465
+ },
2466
+ } }), success && !error && successMessage && (jsxRuntime.jsx(material.Typography, { sx: {
2467
+ ...TYPOGRAPHY.textFieldHelper,
2468
+ color: COLOR_SUCCESS[600],
2469
+ marginTop: '4px',
2470
+ }, children: successMessage }))] }));
2471
+ };
2472
+
2473
+ const PIN_SIZES = {
2474
+ sm: { width: 40, height: 40, fontSize: 18 },
2475
+ md: { width: 48, height: 48, fontSize: 20 },
2476
+ lg: { width: 56, height: 56, fontSize: 24 },
2477
+ };
2478
+ const PIN_SPACING = {
2479
+ sm: 8,
2480
+ md: 12,
2481
+ lg: 16,
2482
+ };
2483
+
2484
+ 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, }) => {
2485
+ const { palette } = material.useTheme();
2486
+ const inputRefs = React.useRef([]);
2487
+ React.useEffect(() => {
2488
+ if (autoFocus && inputRefs.current[0]) {
2489
+ inputRefs.current[0].focus();
2490
+ }
2491
+ }, [autoFocus]);
2492
+ const handleChange = (index, val) => {
2493
+ if (!/^\d*$/.test(val))
2494
+ return;
2495
+ const newValue = value.split('');
2496
+ newValue[index] = val;
2497
+ const updatedValue = newValue.join('').slice(0, length);
2498
+ onChange(updatedValue);
2499
+ if (val && index < length - 1) {
2500
+ inputRefs.current[index + 1]?.focus();
2501
+ }
2502
+ if (updatedValue.length === length) {
2503
+ onComplete?.(updatedValue);
2504
+ }
2505
+ };
2506
+ const handleKeyDown = (index, e) => {
2507
+ if (e.key === 'Backspace' && !value[index] && index > 0) {
2508
+ inputRefs.current[index - 1]?.focus();
2509
+ }
2510
+ };
2511
+ const renderPINDisplay = (index) => {
2512
+ const inputValue = value[index] || '';
2513
+ const isFilled = !!inputValue;
2514
+ const sizeStyle = PIN_SIZES[size];
2515
+ const borderColor = error ? palette.error.main : COLOR_GRAY[200];
2516
+ const borderFocusColorValue = borderFocusColor || (error ? palette.error.main : COLOR_GRAY[900]);
2517
+ if (type === 'bullet') {
2518
+ return (jsxRuntime.jsxs(material.Box, { sx: { position: 'relative', width: sizeStyle.width, height: sizeStyle.height }, children: [jsxRuntime.jsx(material.TextField, { ref: (el) => {
2519
+ const input = el?.querySelector('input');
2520
+ if (input) {
2521
+ inputRefs.current[index] = input;
2522
+ }
2523
+ }, type: "text", inputMode: "numeric", value: inputValue, onChange: (e) => handleChange(index, e.target.value), onKeyDown: (e) => handleKeyDown(index, e), disabled: disabled, error: error, sx: {
2524
+ width: '100%',
2525
+ height: '100%',
2526
+ '& .MuiOutlinedInput-root': {
2527
+ height: '100%',
2528
+ padding: 0,
2529
+ '& input': {
2530
+ textAlign: 'center',
2531
+ fontSize: sizeStyle.fontSize,
2532
+ fontWeight: 600,
2533
+ padding: 0,
2534
+ color: masked && isFilled ? 'transparent' : 'inherit',
2535
+ WebkitTextFillColor: masked && isFilled ? 'transparent' : 'unset',
2536
+ caretColor: palette.primary.main,
2537
+ '&::placeholder': {
2538
+ color: palette.action.disabled,
2539
+ opacity: 1,
2540
+ },
2541
+ },
2542
+ '& fieldset': {
2543
+ borderColor: borderColor,
2544
+ borderRadius: '8px',
2545
+ },
2546
+ '&:hover fieldset': {
2547
+ borderColor: error ? palette.error.main : borderFocusColorValue,
2548
+ },
2549
+ '&.Mui-focused fieldset': {
2550
+ borderColor: borderFocusColorValue,
2551
+ borderWidth: 1,
2552
+ },
2553
+ },
2554
+ '& input': {
2555
+ maxLength: 1,
2556
+ },
2557
+ }, placeholder: "-" }), masked && isFilled && (jsxRuntime.jsx(material.Box, { sx: {
2558
+ position: 'absolute',
2559
+ top: '50%',
2560
+ left: '50%',
2561
+ transform: 'translate(-50%, -50%)',
2562
+ fontSize: sizeStyle.fontSize,
2563
+ fontWeight: 600,
2564
+ color: error ? palette.error.main : palette.text.primary,
2565
+ pointerEvents: 'none',
2566
+ }, children: "\u25CF" }))] }));
2567
+ }
2568
+ if (type === 'circle') {
2569
+ return (jsxRuntime.jsxs(material.Box, { sx: { position: 'relative', width: sizeStyle.width, height: sizeStyle.height }, children: [jsxRuntime.jsx(material.TextField, { ref: (el) => {
2570
+ const input = el?.querySelector('input');
2571
+ if (input) {
2572
+ inputRefs.current[index] = input;
2573
+ }
2574
+ }, type: "text", inputMode: "numeric", value: inputValue, onChange: (e) => handleChange(index, e.target.value), onKeyDown: (e) => handleKeyDown(index, e), disabled: disabled, error: error, sx: {
2575
+ width: '100%',
2576
+ height: '100%',
2577
+ '& .MuiOutlinedInput-root': {
2578
+ height: '100%',
2579
+ padding: 0,
2580
+ borderRadius: '50%',
2581
+ '& input': {
2582
+ textAlign: 'center',
2583
+ fontSize: sizeStyle.fontSize,
2584
+ fontWeight: 600,
2585
+ padding: 0,
2586
+ color: masked && isFilled ? 'transparent' : 'inherit',
2587
+ WebkitTextFillColor: masked && isFilled ? 'transparent' : 'unset',
2588
+ caretColor: palette.primary.main,
2589
+ '&::placeholder': {
2590
+ color: palette.action.disabled,
2591
+ opacity: 1,
2592
+ },
2593
+ },
2594
+ '& fieldset': {
2595
+ borderColor: borderColor,
2596
+ borderRadius: '50%',
2597
+ },
2598
+ '&:hover fieldset': {
2599
+ borderColor: error ? palette.error.main : borderFocusColorValue,
2600
+ },
2601
+ '&.Mui-focused fieldset': {
2602
+ borderColor: borderFocusColorValue,
2603
+ borderWidth: 1,
2604
+ },
2605
+ },
2606
+ '& input': {
2607
+ maxLength: 1,
2608
+ },
2609
+ }, placeholder: "-" }), masked && isFilled && (jsxRuntime.jsx(material.Box, { sx: {
2610
+ position: 'absolute',
2611
+ top: '50%',
2612
+ left: '50%',
2613
+ transform: 'translate(-50%, -50%)',
2614
+ fontSize: sizeStyle.fontSize,
2615
+ fontWeight: 600,
2616
+ color: error ? palette.error.main : palette.text.primary,
2617
+ pointerEvents: 'none',
2618
+ }, children: "\u25CF" }))] }));
2619
+ }
2620
+ // Default text type
2621
+ return (jsxRuntime.jsx(material.TextField, { ref: (el) => {
2622
+ const input = el?.querySelector('input');
2623
+ if (input) {
2624
+ inputRefs.current[index] = input;
2625
+ }
2626
+ }, type: "text", inputMode: "numeric", value: inputValue, onChange: (e) => handleChange(index, e.target.value), onKeyDown: (e) => handleKeyDown(index, e), disabled: disabled, error: error, sx: {
2627
+ width: sizeStyle.width,
2628
+ '& .MuiOutlinedInput-root': {
2629
+ height: sizeStyle.height,
2630
+ padding: 0,
2631
+ '& input': {
2632
+ textAlign: 'center',
2633
+ fontSize: sizeStyle.fontSize,
2634
+ fontWeight: 600,
2635
+ padding: 0,
2636
+ '&::placeholder': {
2637
+ color: palette.action.disabled,
2638
+ opacity: 1,
2639
+ },
2640
+ },
2641
+ '& fieldset': {
2642
+ borderColor: borderColor,
2643
+ },
2644
+ '&:hover fieldset': {
2645
+ borderColor: error ? palette.error.main : borderFocusColorValue,
2646
+ },
2647
+ '&.Mui-focused fieldset': {
2648
+ borderColor: borderFocusColorValue,
2649
+ borderWidth: 1,
2650
+ },
2651
+ },
2652
+ '& input': {
2653
+ maxLength: 1,
2654
+ },
2655
+ }, placeholder: "-" }));
2656
+ };
2657
+ return (jsxRuntime.jsxs(material.Box, { sx: { ...sx }, children: [label && (jsxRuntime.jsx(material.Box, { sx: {
2658
+ mb: 1,
2659
+ fontSize: 14,
2660
+ fontWeight: 500,
2661
+ color: palette.text.primary,
2662
+ }, children: label })), jsxRuntime.jsx(material.Box, { sx: {
2663
+ display: 'flex',
2664
+ gap: `${PIN_SPACING[spacing]}px`,
2665
+ justifyContent: align === 'center' ? 'center' : align === 'right' ? 'flex-end' : 'flex-start',
2666
+ }, children: Array.from({ length }).map((_, index) => (jsxRuntime.jsx(material.Box, { children: renderPINDisplay(index) }, index))) }), error && errorMessage && (jsxRuntime.jsx(material.Box, { sx: {
2667
+ mt: 1,
2668
+ fontSize: 12,
2669
+ color: palette.error.main,
2670
+ textAlign: align,
2671
+ }, children: errorMessage }))] }));
2672
+ };
2673
+
2674
+ const StyledAutocomplete$1 = material.styled(material.Autocomplete)(({ theme }) => ({
2675
+ '& .MuiOutlinedInput-root': {
2676
+ padding: '8px !important',
2677
+ display: 'flex',
2678
+ alignItems: 'flex-start',
2679
+ gap: '4px',
2680
+ minHeight: '44px',
2681
+ '& fieldset': {
2682
+ borderColor: COLOR_NEUTRAL[300],
2683
+ },
2684
+ '&:hover fieldset': {
2685
+ borderColor: COLOR_NEUTRAL[400],
2686
+ },
2687
+ '&.Mui-focused fieldset': {
2688
+ borderColor: COLOR_NEUTRAL[300] + ' !important',
2689
+ borderWidth: '1.5px',
2690
+ },
2691
+ '&.Mui-disabled': {
2692
+ backgroundColor: COLOR_NEUTRAL[100],
2693
+ '& fieldset': {
2694
+ borderColor: COLOR_NEUTRAL[200],
2695
+ },
2696
+ },
2697
+ '&.Mui-error fieldset': {
2698
+ borderColor: COLOR_ERROR[500],
2699
+ },
2700
+ '&.Mui-success fieldset': {
2701
+ borderColor: COLOR_SUCCESS[500],
2702
+ },
2703
+ },
2704
+ '& .MuiInputBase-input': {
2705
+ padding: '4px 4px !important',
2706
+ fontSize: '14px',
2707
+ flex: 1,
2708
+ minWidth: '60px',
2709
+ '&::placeholder': {
2710
+ color: COLOR_NEUTRAL[400],
2711
+ opacity: 1,
2712
+ },
2713
+ '&.Mui-disabled': {
2714
+ color: COLOR_NEUTRAL[400],
2715
+ WebkitTextFillColor: COLOR_NEUTRAL[400],
2716
+ },
2717
+ },
2718
+ '& .MuiAutocomplete-endAdornment': {
2719
+ paddingRight: '4px',
2720
+ },
2721
+ '& .MuiAutocomplete-tag': {
2722
+ backgroundColor: COLOR_ACCENT[50],
2723
+ border: `1px solid ${COLOR_ACCENT[200]}`,
2724
+ color: COLOR_ACCENT[900],
2725
+ fontSize: '12px',
2726
+ margin: '2px',
2727
+ '& .MuiChip-deleteIcon': {
2728
+ color: COLOR_ACCENT[400],
2729
+ '&:hover': {
2730
+ color: COLOR_ACCENT[600],
2731
+ },
2732
+ },
2733
+ },
2734
+ }));
2735
+ 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, }) => {
2736
+ const DEBOUNCE_DELAY = 500;
2737
+ const [inputValue, setInputValue] = React.useState('');
2738
+ const [filteredOptions, setFilteredOptions] = React.useState(options);
2739
+ const [isLoading, setIsLoading] = React.useState(false);
2740
+ const debounceTimerRef = React.useRef(null);
2741
+ const onSearchRef = React.useRef(onSearch);
2742
+ const onInputChangeRef = React.useRef(onInputChange);
2743
+ const optionsRef = React.useRef(options);
2744
+ // Update refs when props change
2745
+ React.useEffect(() => {
2746
+ onSearchRef.current = onSearch;
2747
+ onInputChangeRef.current = onInputChange;
2748
+ optionsRef.current = options;
2749
+ }, [onSearch, onInputChange, options]);
2750
+ // Normalize value to array for internal state
2751
+ const selectedValues = React.useMemo(() => {
2752
+ if (!value)
2753
+ return [];
2754
+ const values = Array.isArray(value) ? value : [value];
2755
+ return values.map((v) => (typeof v === 'object' ? v : { label: String(v), value: v }));
2756
+ }, [value]);
2757
+ // Search logic with debounce
2758
+ React.useEffect(() => {
2759
+ if (debounceTimerRef.current) {
2760
+ clearTimeout(debounceTimerRef.current);
2761
+ }
2762
+ // Reset to original options when input is empty
2763
+ if (!inputValue.trim()) {
2764
+ setFilteredOptions(optionsRef.current);
2765
+ return;
2766
+ }
2767
+ debounceTimerRef.current = setTimeout(async () => {
2768
+ const searchFn = onSearchRef.current;
2769
+ if (searchFn) {
2770
+ // Async search
2771
+ setIsLoading(true);
2772
+ try {
2773
+ const results = await searchFn(inputValue);
2774
+ setFilteredOptions(results);
2775
+ }
2776
+ catch (error) {
2777
+ console.error('Search error:', error);
2778
+ setFilteredOptions([]);
2779
+ }
2780
+ finally {
2781
+ setIsLoading(false);
2782
+ }
2783
+ }
2784
+ else {
2785
+ // Local filtering
2786
+ const filtered = optionsRef.current.filter((opt) => opt.label.toLowerCase().includes(inputValue.toLowerCase()));
2787
+ setFilteredOptions(filtered);
2788
+ }
2789
+ onInputChangeRef.current?.(inputValue);
2790
+ }, DEBOUNCE_DELAY);
2791
+ return () => {
2792
+ if (debounceTimerRef.current) {
2793
+ clearTimeout(debounceTimerRef.current);
2794
+ }
2795
+ };
2796
+ }, [inputValue]);
2797
+ const handleInputChange = (event, newInputValue) => {
2798
+ setInputValue(newInputValue);
2799
+ };
2800
+ const handleChange = (event, newValue) => {
2801
+ if (multiple) {
2802
+ const result = Array.isArray(newValue) ? newValue : newValue ? [newValue] : [];
2803
+ onChange?.(result.length > 0 ? result : null);
2804
+ }
2805
+ else {
2806
+ onChange?.(newValue || null);
2807
+ }
2808
+ };
2809
+ const handleClear = () => {
2810
+ setInputValue('');
2811
+ setFilteredOptions(optionsRef.current);
2812
+ onClear?.();
2813
+ };
2814
+ return (jsxRuntime.jsxs(material.Box, { sx: { width: '100%', ...sx }, children: [label && (jsxRuntime.jsx(material.Typography, { variant: "subtitle2", sx: {
2815
+ fontWeight: 500,
2816
+ color: COLOR_GRAY[900],
2817
+ marginBottom: '6px',
2818
+ display: 'block',
2819
+ }, children: label })), jsxRuntime.jsx(StyledAutocomplete$1, { multiple: multiple, freeSolo: true, options: filteredOptions, getOptionLabel: (option) => {
2820
+ if (!option)
2821
+ return '';
2822
+ if (typeof option === 'object' && 'label' in option)
2823
+ return option.label;
2824
+ return String(option);
2825
+ }, isOptionEqualToValue: (option, val) => {
2826
+ if (!option || !val)
2827
+ return false;
2828
+ if (typeof option === 'object' && typeof val === 'object' && 'value' in option && 'value' in val) {
2829
+ return option.value === val.value;
2830
+ }
2831
+ return false;
2832
+ }, 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: {
2833
+ '& .MuiOutlinedInput-root': {
2834
+ borderRadius: borderRadius === 'max' ? '100px' : `${borderRadius}px`,
2835
+ borderColor: error ? COLOR_ERROR[500] : success ? COLOR_SUCCESS[500] : undefined,
2836
+ },
2837
+ }, renderInput: (params) => (jsxRuntime.jsx(material.TextField, { ...params, placeholder: placeholder, variant: "outlined", size: "small", error: error, InputProps: {
2838
+ ...params.InputProps,
2839
+ 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] })),
2840
+ } })), renderTags: (value, getTagProps) => value.map((option, index) => {
2841
+ const label = typeof option === 'object' && option && 'label' in option ? option.label : String(option);
2842
+ return jsxRuntime.jsx(material.Chip, { ...getTagProps({ index }), label: label, size: "small" });
2843
+ }), renderOption: (props, option) => {
2844
+ const { key, ...otherProps } = props;
2845
+ const label = option?.label || '';
2846
+ return (jsxRuntime.jsx(material.Box, { ...otherProps, component: "li", children: label }, key));
2847
+ }, componentsProps: {
2848
+ clearIndicator: {
2849
+ onClick: handleClear,
2850
+ },
2851
+ } }), error && errorMessage && (jsxRuntime.jsx(material.Box, { sx: {
2852
+ fontSize: '12px',
2853
+ color: COLOR_ERROR[500],
2854
+ marginTop: '4px',
2855
+ }, children: errorMessage })), success && successMessage && (jsxRuntime.jsx(material.Box, { sx: {
2856
+ fontSize: '12px',
2857
+ color: COLOR_SUCCESS[500],
2858
+ marginTop: '4px',
2859
+ }, children: successMessage })), helperText && !error && !success && (jsxRuntime.jsx(material.Box, { sx: {
2860
+ fontSize: '12px',
2861
+ color: COLOR_NEUTRAL[500],
2862
+ marginTop: '4px',
2863
+ }, children: helperText }))] }));
2864
+ };
2865
+
2866
+ const StyledAutocomplete = material.styled(material.Autocomplete)(({ theme }) => ({
2867
+ '& .MuiOutlinedInput-root': {
2868
+ padding: '0 !important',
2869
+ display: 'flex',
2870
+ alignItems: 'center',
2871
+ gap: '8px',
2872
+ '& fieldset': {
2873
+ borderColor: COLOR_NEUTRAL[300],
2874
+ },
2875
+ '&:hover fieldset': {
2876
+ borderColor: COLOR_NEUTRAL[400],
2877
+ },
2878
+ '&.Mui-focused fieldset': {
2879
+ borderColor: COLOR_NEUTRAL[300] + ' !important',
2880
+ },
2881
+ '&.Mui-disabled': {
2882
+ backgroundColor: COLOR_NEUTRAL[100],
2883
+ '& fieldset': {
2884
+ borderColor: COLOR_NEUTRAL[200],
2885
+ },
2886
+ },
2887
+ },
2888
+ '& .MuiInputBase-input': {
2889
+ padding: '8px 8px 8px 0 !important',
2890
+ fontSize: '14px',
2891
+ flex: 1,
2892
+ '&::placeholder': {
2893
+ color: COLOR_NEUTRAL[400],
2894
+ opacity: 1,
2895
+ },
2896
+ '&.Mui-disabled': {
2897
+ color: COLOR_NEUTRAL[400],
2898
+ WebkitTextFillColor: COLOR_NEUTRAL[400],
2899
+ },
2900
+ },
2901
+ '& .MuiAutocomplete-endAdornment': {
2902
+ paddingRight: '8px',
2903
+ },
2904
+ }));
2905
+ const SearchFieldComponent = ({ value, onChange, onClear, onInputChange, borderRadius = 6, disabled = false, placeholder = 'Placeholder', sx, }) => {
2906
+ const DEBOUNCE_DELAY = 1000;
2907
+ const [inputValue, setInputValue] = React.useState('');
2908
+ const debounceTimer = React.useRef(null);
2909
+ React.useEffect(() => {
2910
+ if (debounceTimer.current) {
2911
+ clearTimeout(debounceTimer.current);
2912
+ }
2913
+ debounceTimer.current = setTimeout(() => {
2914
+ onInputChange?.(new Event('debounce'), inputValue, 'debounce');
2915
+ }, DEBOUNCE_DELAY);
2916
+ return () => {
2917
+ if (debounceTimer.current) {
2918
+ clearTimeout(debounceTimer.current);
2919
+ }
2920
+ };
2921
+ }, [inputValue, onInputChange]);
2922
+ const handleInputChange = React.useCallback((event, value) => {
2923
+ setInputValue(value);
2924
+ }, []);
2925
+ const handleClear = React.useCallback(() => {
2926
+ setInputValue('');
2927
+ onClear?.();
2928
+ onInputChange?.(new Event('clear'), '', 'clear');
2929
+ }, [onClear, onInputChange]);
2930
+ return (jsxRuntime.jsx(StyledAutocomplete, { freeSolo: true, options: [], inputValue: inputValue, onInputChange: handleInputChange, disabled: disabled, onChange: onChange, noOptionsText: null, sx: {
2931
+ '& .MuiOutlinedInput-root': {
2932
+ borderRadius: borderRadius === 'max' ? '100px' : `${borderRadius}px`,
2933
+ },
2934
+ ...sx,
2935
+ }, renderInput: (params) => (jsxRuntime.jsx(material.TextField, { ...params, placeholder: placeholder, variant: "outlined", size: "small", InputProps: {
2936
+ ...params.InputProps,
2937
+ startAdornment: (jsxRuntime.jsx(material.InputAdornment, { position: "start", sx: { marginLeft: '8px' }, children: jsxRuntime.jsx(SearchIcon, { sx: { color: '#999', fontSize: '20px' } }) })),
2938
+ } })), componentsProps: {
2939
+ clearIndicator: {
2940
+ onClick: handleClear,
2941
+ },
2942
+ } }));
2943
+ };
2944
+
2945
+ const SWITCH_SIZE = {
2946
+ small: { width: '36px', height: '20px', thumbSize: '16px' },
2947
+ medium: { width: '44px', height: '24px', thumbSize: '20px' },
2948
+ };
2949
+ const SWITCH_COLORS = {
2950
+ dark: {
2951
+ trackBackgroundColor: '#F2F4F7',
2952
+ trackHoverColor: '#EAECF0',
2953
+ trackCheckedColor: '#07554B',
2954
+ thumbFocusColor: '#F4EBFF',
2955
+ },
2956
+ light: {
2957
+ trackBackgroundColor: '#F9F5FF',
2958
+ trackHoverColor: '#F4EBFF',
2959
+ trackCheckedColor: '#E9D7FE',
2960
+ thumbFocusColor: '#F4EBFF',
2961
+ },
2962
+ };
2963
+ const StyledSwitch = material.styled(material.Switch, {
2964
+ shouldForwardProp: (prop) => prop !== 'size',
2965
+ })(({ theme, size = 'medium' }) => {
2966
+ const mode = theme.palette.mode;
2967
+ const { width, height, thumbSize } = SWITCH_SIZE[size];
2968
+ const { trackBackgroundColor, trackHoverColor, trackCheckedColor, thumbFocusColor } = SWITCH_COLORS[mode] || SWITCH_COLORS.light;
2969
+ return {
2970
+ width,
2971
+ height,
2972
+ padding: 0,
2973
+ '& .MuiSwitch-switchBase': {
2974
+ padding: 0,
2975
+ margin: 2,
2976
+ transitionDuration: '300ms',
2977
+ '&.Mui-checked': {
2978
+ transform: `translateX(${size === 'small' ? '16px' : '20px'})`,
2979
+ color: '#FFFFFF',
2980
+ '& + .MuiSwitch-track': {
2981
+ backgroundColor: trackCheckedColor,
2982
+ opacity: 1,
2983
+ border: 0,
2984
+ },
2985
+ },
2986
+ '&.Mui-focusVisible .MuiSwitch-thumb': {
2987
+ color: thumbFocusColor,
2988
+ border: '6px solid #fff',
2989
+ boxShadow: '0 0 0 4px #F4EBFF',
2990
+ },
2991
+ '&.Mui-disabled .MuiSwitch-thumb': {
2992
+ color: '#FFFFFF',
2993
+ },
2994
+ '&.Mui-disabled + .MuiSwitch-track': {
2995
+ backgroundColor: trackBackgroundColor,
2996
+ },
2997
+ },
2998
+ '& .MuiSwitch-thumb': {
2999
+ boxSizing: 'border-box',
3000
+ width: thumbSize,
3001
+ height: thumbSize,
3002
+ },
3003
+ '& .MuiSwitch-track': {
3004
+ borderRadius: 26 / 2,
3005
+ backgroundColor: trackBackgroundColor,
3006
+ opacity: 1,
3007
+ transition: theme.transitions.create(['background-color'], {
3008
+ duration: 500,
3009
+ }),
3010
+ '&:hover': {
3011
+ backgroundColor: trackHoverColor,
3012
+ },
3013
+ },
3014
+ };
3015
+ });
3016
+ const SwitchComponent = ({ title, sx, ...switchProps }) => {
3017
+ if (!title) {
3018
+ return jsxRuntime.jsx(StyledSwitch, { disableRipple: true, ...switchProps });
3019
+ }
3020
+ return (jsxRuntime.jsxs(StackRowAlignCenterJustEnd, { sx: {
3021
+ display: 'inline-flex',
3022
+ alignItems: 'center',
3023
+ gap: '12px',
3024
+ ...sx,
3025
+ }, children: [jsxRuntime.jsx(StyledSwitch, { disableRipple: true, ...switchProps }), title] }));
3026
+ };
3027
+
3028
+ const TAB_STYLES = {
3029
+ position: 'relative',
3030
+ padding: '18px 16px',
3031
+ cursor: 'pointer',
3032
+ minHeight: 44,
3033
+ '&:hover': {
3034
+ bgcolor: '#F3F4F6',
3035
+ },
3036
+ };
3037
+ const TAB_UNDERLINE_STYLES = {
3038
+ width: '1px',
3039
+ alignSelf: 'stretch',
3040
+ bgcolor: '#E5E7EB',
3041
+ };
3042
+ const TABS_CONTAINER_HORIZONTAL = {
3043
+ display: 'flex',
3044
+ alignItems: 'center',
3045
+ borderBottom: '2px solid #E5E7EB',
3046
+ };
3047
+ const TAB_ACTIVE_BACKGROUND_HORIZONTAL = {
3048
+ position: 'absolute',
3049
+ bottom: -2,
3050
+ left: 0,
3051
+ right: 0,
3052
+ height: '2px',
3053
+ bgcolor: '#0F766E',
3054
+ };
3055
+ const TABS_CONTAINER_VERTICAL = {
3056
+ position: 'relative',
3057
+ padding: '10px',
3058
+ cursor: 'pointer',
3059
+ minHeight: 40,
3060
+ '&:hover': {
3061
+ bgcolor: '#F3F4F6',
3062
+ },
3063
+ width: '100%',
3064
+ };
3065
+ const TAB_ACTIVE_BACKGROUND_VERTICAL = {
3066
+ position: 'absolute',
3067
+ inset: 0,
3068
+ bgcolor: '#E6EEED',
3069
+ borderRadius: 1,
3070
+ };
3071
+ var TabColors;
3072
+ (function (TabColors) {
3073
+ TabColors["ACTIVE_TEXT"] = "#0F766E";
3074
+ TabColors["INACTIVE_TEXT"] = "#6B7280";
3075
+ TabColors["HOVER_BACKGROUND"] = "#F3F4F6";
3076
+ TabColors["MENU_ACTIVE_BACKGROUND"] = "#E0F2FE";
3077
+ })(TabColors || (TabColors = {}));
3078
+
3079
+ const TabsComponent = ({ idSelect, tabs, size, direction = 'row', maxDisplay, onChange, sx, sxTabs, sxWrapper, }) => {
3080
+ // state
3081
+ const [selected, setSelected] = React.useState(idSelect);
3082
+ const [anchorEl, setAnchorEl] = React.useState(null);
3083
+ const layoutGroupId = React.useId();
3084
+ React.useEffect(() => {
3085
+ setSelected(idSelect);
3086
+ }, [idSelect]);
3087
+ const isVertical = direction === 'column';
3088
+ const showOverflow = !isVertical && maxDisplay && tabs.length > maxDisplay;
3089
+ const visibleTabs = showOverflow ? tabs.slice(0, maxDisplay) : tabs;
3090
+ const overflowTabs = showOverflow ? tabs.slice(maxDisplay) : [];
3091
+ // function
3092
+ const handleOpenDropdown = (event) => {
3093
+ setAnchorEl(event.currentTarget);
3094
+ };
3095
+ const handleTabClick = (tab) => {
3096
+ setSelected(tab.id);
3097
+ onChange?.(tab.id);
3098
+ if (tab.onClick) {
3099
+ tab.onClick();
3100
+ }
3101
+ };
3102
+ const handleOverflowItemClick = (tab) => {
3103
+ handleTabClick(tab);
3104
+ setAnchorEl(null);
3105
+ };
3106
+ 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) => {
3107
+ const isActive = tab.id === selected;
3108
+ 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: {
3109
+ ...TABS_CONTAINER_VERTICAL,
3110
+ color: isActive ? TabColors.ACTIVE_TEXT : TabColors.INACTIVE_TEXT,
3111
+ }, onTap: () => handleTabClick(tab), children: jsxRuntime.jsxs(material.Box, { sx: {
3112
+ ...TYPOGRAPHY_STYLES.textMd.medium,
3113
+ display: 'flex',
3114
+ alignItems: 'center',
3115
+ gap: tab.icon ? 0.5 : 0,
3116
+ position: 'relative',
3117
+ zIndex: 1,
3118
+ ...sx,
3119
+ }, 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));
3120
+ }) }) })) : (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) => {
3121
+ const isActive = tab.id === selected;
3122
+ return (jsxRuntime.jsx(LinkElement, { href: tab.href, onClick: tab.onClick, id: tab.id, children: jsxRuntime.jsxs(material.Stack, { component: framerMotion.motion.div, sx: {
3123
+ color: isActive ? TabColors.ACTIVE_TEXT : TabColors.INACTIVE_TEXT,
3124
+ position: 'relative',
3125
+ padding: '18px 16px',
3126
+ cursor: 'pointer',
3127
+ minHeight: 40,
3128
+ '&:hover': {
3129
+ bgcolor: TabColors.HOVER_BACKGROUND,
3130
+ },
3131
+ ...sxTabs,
3132
+ }, onTap: () => handleTabClick(tab), children: [jsxRuntime.jsxs(material.Box, { sx: {
3133
+ ...TYPOGRAPHY_STYLES.textMd.medium,
3134
+ display: 'flex',
3135
+ alignItems: 'center',
3136
+ gap: tab.icon ? 0.5 : 0,
3137
+ ...sx,
3138
+ }, 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));
3139
+ }), showOverflow && (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx(material.Box, { sx: { ...TAB_UNDERLINE_STYLES } }), jsxRuntime.jsx(material.Stack, { sx: {
3140
+ ...TAB_STYLES,
3141
+ }, 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: {
3142
+ vertical: 'bottom',
3143
+ horizontal: 'left',
3144
+ }, transformOrigin: {
3145
+ vertical: 'top',
3146
+ horizontal: 'left',
3147
+ }, children: overflowTabs.map((tab) => {
3148
+ const isActive = tab.id === selected;
3149
+ return (jsxRuntime.jsx(material.MenuItem, { onClick: () => handleOverflowItemClick(tab), sx: {
3150
+ color: isActive ? TabColors.ACTIVE_TEXT : TabColors.INACTIVE_TEXT,
3151
+ bgcolor: isActive ? TabColors.MENU_ACTIVE_BACKGROUND : 'transparent',
3152
+ '&:hover': {
3153
+ bgcolor: isActive ? TabColors.MENU_ACTIVE_BACKGROUND : TabColors.HOVER_BACKGROUND,
3154
+ },
3155
+ }, children: jsxRuntime.jsxs(material.Box, { sx: {
3156
+ display: 'flex',
3157
+ alignItems: 'center',
3158
+ gap: tab.icon ? 0.5 : 0,
3159
+ }, children: [tab.icon && jsxRuntime.jsx(IconElement, { size: size, icon: tab.icon }), tab.name] }) }, tab.id));
3160
+ }) })] }) })) }));
3161
+ };
3162
+
3163
+ const TextAreaComponent = ({ label = '', placeholder = '', value = '', disabled = false, error = false, success = false, errorMessage, successMessage, borderRadius = 6, onChange, onBlur, helperText = '', rows = 4, maxLength, sx, }) => {
3164
+ const borderRadiusValue = borderRadius === 'max' ? '100px' : `${borderRadius}px`;
3165
+ const getHelperText = () => {
3166
+ if (error && errorMessage)
3167
+ return errorMessage;
3168
+ if (success && successMessage)
3169
+ return successMessage;
3170
+ if (helperText)
3171
+ return helperText;
3172
+ return '';
3173
+ };
3174
+ const getHelperTextColor = () => {
3175
+ if (error)
3176
+ return COLOR_ERROR[500];
3177
+ if (success)
3178
+ return COLOR_SUCCESS[500];
3179
+ return COLOR_NEUTRAL[400];
3180
+ };
3181
+ const getBorderColor = () => {
3182
+ if (error)
3183
+ return COLOR_ERROR[500];
3184
+ if (success)
3185
+ return COLOR_SUCCESS[500];
3186
+ return COLOR_NEUTRAL[300];
3187
+ };
3188
+ return (jsxRuntime.jsxs(material.Box, { sx: { ...sx }, children: [label && (jsxRuntime.jsx(material.Typography, { sx: {
3189
+ display: 'block',
3190
+ ...TYPOGRAPHY.textFieldLabel,
3191
+ color: COLOR_GRAY[800],
3192
+ marginBottom: '4px',
3193
+ }, 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: {
3194
+ maxLength: maxLength,
3195
+ style: {
3196
+ ...TYPOGRAPHY.text14Regular,
3197
+ paddingBottom: maxLength ? '24px' : '0px',
3198
+ },
3199
+ }, sx: {
3200
+ '& .MuiOutlinedInput-root': {
3201
+ borderRadius: borderRadiusValue,
3202
+ backgroundColor: disabled ? COLOR_NEUTRAL[100] : 'white',
3203
+ transition: 'all 0.2s ease',
3204
+ '& fieldset': {
3205
+ borderColor: getBorderColor(),
3206
+ },
3207
+ '&:hover fieldset': {
3208
+ borderColor: disabled ? getBorderColor() : error ? COLOR_ERROR[500] : COLOR_NEUTRAL[400],
3209
+ },
3210
+ '&.Mui-focused fieldset': {
3211
+ borderColor: error ? COLOR_ERROR[500] : COLOR_NEUTRAL[400],
3212
+ borderWidth: '1.5px',
3213
+ },
3214
+ },
3215
+ '& .MuiOutlinedInput-input': {
3216
+ color: value ? COLOR_GRAY[900] : COLOR_NEUTRAL[400],
3217
+ '&::placeholder': {
3218
+ color: COLOR_NEUTRAL[400],
3219
+ opacity: 1,
3220
+ },
3221
+ '&:disabled': {
3222
+ color: COLOR_NEUTRAL[400],
3223
+ WebkitTextFillColor: COLOR_NEUTRAL[400],
3224
+ },
3225
+ },
3226
+ '& .MuiOutlinedInput-notchedOutline': {
3227
+ borderColor: getBorderColor(),
3228
+ },
3229
+ } }), maxLength && (jsxRuntime.jsxs(material.Box, { sx: {
3230
+ position: 'absolute',
3231
+ bottom: '8px',
3232
+ right: '12px',
3233
+ fontSize: '12px',
3234
+ color: COLOR_NEUTRAL[400],
3235
+ pointerEvents: 'none',
3236
+ }, children: ["(", value?.length, "/", maxLength, ")"] }))] }), getHelperText() && (jsxRuntime.jsx(material.Box, { sx: {
3237
+ color: getHelperTextColor(),
3238
+ marginTop: '4px',
3239
+ ...TYPOGRAPHY.textFieldHelper,
3240
+ }, children: getHelperText() }))] }));
3241
+ };
3242
+
3243
+ const StyledTextField = styles.styled(MuiTextField)(({ theme }) => {
3244
+ return {
3245
+ '& .MuiOutlinedInput-root': {
3246
+ '& fieldset': { borderColor: COLOR_NEUTRAL[300] },
3247
+ '&:hover fieldset': { borderColor: COLOR_NEUTRAL[400] },
3248
+ '&.Mui-focused fieldset': { borderColor: COLOR_NEUTRAL[300], borderWidth: '2px' },
3249
+ '&.Mui-focused': {
3250
+ boxShadow: '0 1px 2px 0 rgba(10, 13, 18, 0.05), 0 0 0 4px #FEE4E2',
3251
+ },
3252
+ '&.Mui-disabled': {
3253
+ backgroundColor: COLOR_NEUTRAL[100],
3254
+ '& fieldset': { borderColor: COLOR_NEUTRAL[200] },
3255
+ '& input': { color: COLOR_NEUTRAL[400], WebkitTextFillColor: COLOR_NEUTRAL[400] },
3256
+ },
3257
+ '&.Mui-error fieldset': { borderColor: COLOR_ERROR[500], borderWidth: '1px' },
3258
+ '&.Mui-error:hover fieldset': { borderColor: COLOR_ERROR[500] },
3259
+ '&.Mui-error.Mui-focused fieldset': { borderColor: COLOR_ERROR[500], borderWidth: '2px' },
3260
+ '&.Mui-error.Mui-focused': {
3261
+ boxShadow: '0 1px 2px 0 rgba(10, 13, 18, 0.05), 0 0 0 4px rgba(255, 66, 79, 0.15)',
3262
+ },
3263
+ },
3264
+ '& .MuiInputBase-input': {
3265
+ ...TYPOGRAPHY.text14Regular,
3266
+ padding: '12px 16px',
3267
+ color: COLOR_GRAY[900],
3268
+ '&::placeholder': { color: COLOR_NEUTRAL[400], opacity: 0.7 },
3269
+ '&:focus': { outline: 'none' },
3270
+ },
3271
+ '& .MuiInputLabel-root': {
3272
+ ...TYPOGRAPHY.textFieldLabel,
3273
+ color: COLOR_GRAY[800],
3274
+ transform: 'translate(14px, -9px) scale(0.75)',
3275
+ '&.Mui-focused': { color: COLOR_NEUTRAL[500] },
3276
+ '&.Mui-error': { color: COLOR_ERROR[600] },
3277
+ },
3278
+ '& .MuiFormHelperText-root': {
3279
+ ...TYPOGRAPHY.textFieldHelper,
3280
+ margin: '4px 0 0 0',
3281
+ '&.Mui-error': { color: COLOR_ERROR[600] },
3282
+ },
3283
+ };
3284
+ });
3285
+ const TextFieldComponent = ({ label, placeholder = 'Placeholder', value, disabled = false, error = false, success = false, errorMessage, successMessage, borderRadius = 6, helperText, onChange, iconBefore, iconAfter, sx, ...props }) => {
3286
+ return (jsxRuntime.jsxs(material.Box, { sx: { ...sx }, children: [label && (jsxRuntime.jsx(material.Typography, { sx: {
3287
+ display: 'block',
3288
+ ...TYPOGRAPHY.textFieldLabel,
3289
+ color: COLOR_GRAY[800],
3290
+ marginBottom: '4px',
3291
+ }, children: label })), jsxRuntime.jsx(StyledTextField, { placeholder: placeholder, value: value, disabled: disabled, error: error, helperText: error ? errorMessage : helperText, size: "small", fullWidth: true, onChange: onChange, InputProps: {
3292
+ startAdornment: iconBefore ? jsxRuntime.jsx(material.InputAdornment, { position: "start", children: iconBefore }) : undefined,
3293
+ endAdornment: iconAfter ? jsxRuntime.jsx(material.InputAdornment, { position: "end", children: iconAfter }) : undefined,
3294
+ }, sx: {
3295
+ '& .MuiOutlinedInput-root': {
3296
+ borderRadius: borderRadius === 'max' ? '100px' : `${borderRadius}px`,
3297
+ ...(success && {
3298
+ '&.Mui-focused': {
3299
+ boxShadow: `0 1px 2px 0 rgba(10, 13, 18, 0.05), 0 0 0 4px ${COLOR_SUCCESS[100]}`,
3300
+ },
3301
+ }),
3302
+ },
3303
+ }, ...props }), success && !error && successMessage && (jsxRuntime.jsx(material.Typography, { sx: {
3304
+ ...TYPOGRAPHY.textFieldHelper,
3305
+ color: COLOR_SUCCESS[500],
3306
+ marginTop: '4px',
3307
+ }, children: successMessage }))] }));
3308
+ };
3309
+
3310
+ const SX_STYLES = {
3311
+ progressBar: {
3312
+ position: 'absolute',
3313
+ top: 0,
3314
+ left: 0,
3315
+ height: '100%',
3316
+ backgroundColor: COLOR_GRAY[200],
3317
+ opacity: 0.8,
3318
+ transition: 'width 0.3s ease, opacity 0.3s ease',
3319
+ animation: 'wave 1.5s linear infinite',
3320
+ '@keyframes wave': {
3321
+ '0%': { backgroundPosition: '0% 0%' },
3322
+ '50%': { backgroundPosition: '100% 0%' },
3323
+ '100%': { backgroundPosition: '0% 0%' },
3324
+ },
3325
+ },
3326
+ imageIcon: {
3327
+ width: '40px',
3328
+ height: '40px',
3329
+ flexShrink: 0,
3330
+ position: 'relative',
3331
+ zIndex: 1,
3332
+ },
3333
+ contentBox: {
3334
+ flexGrow: 1,
3335
+ minWidth: 0,
3336
+ position: 'relative',
3337
+ zIndex: 1,
3338
+ },
3339
+ textBox: {
3340
+ minWidth: 0,
3341
+ flexGrow: 1,
3342
+ mr: 2,
3343
+ },
3344
+ actionBox: {
3345
+ flexShrink: 0,
3346
+ display: 'flex',
3347
+ alignItems: 'center',
3348
+ position: 'relative',
3349
+ zIndex: 1,
3350
+ },
3351
+ linearProgress: {
3352
+ mt: 1,
3353
+ width: '100%',
3354
+ },
3355
+ };
3356
+
3357
+ const VIDEO_EXTENSIONS = ['mp4', 'mov', 'avi', 'wmv', 'flv', 'mkv', 'webm'];
3358
+ const ICON_PATH = {
3359
+ VIDEO: '/images/icon/film.svg',
3360
+ FILE: '/images/icon/file.svg',
3361
+ };
3362
+ // ============================================================================
3363
+ // Helper Functions
3364
+ // ============================================================================
3365
+ const formatFileSize = (bytes) => {
3366
+ if (bytes === 0)
3367
+ return '0 Bytes';
3368
+ const k = 1024;
3369
+ const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
3370
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
3371
+ return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
3372
+ };
3373
+ const getFileIcon = (fileName) => {
3374
+ const ext = fileName.split('.').pop()?.toLowerCase();
3375
+ return ext && VIDEO_EXTENSIONS.includes(ext) ? ICON_PATH.VIDEO : ICON_PATH.FILE;
3376
+ };
3377
+ // ============================================================================
3378
+ // Component
3379
+ // ============================================================================
3380
+ const UploaderItemComponent = ({ file, progress = 0, status = 'pending', onDelete, onRetry, isProcess = true, borderSuccess, borderError = COLOR_ERROR[600], sx, }) => {
3381
+ // Memoize
3382
+ const iconSrc = React.useMemo(() => getFileIcon(file.name), [file.name]);
3383
+ // Status flags
3384
+ const isCompleted = status === 'success';
3385
+ const isFailed = status === 'failed';
3386
+ const isUploading = status === 'uploading';
3387
+ // Determine colors based on status
3388
+ const borderColor = isFailed
3389
+ ? String(borderError)
3390
+ : isCompleted && borderSuccess
3391
+ ? String(borderSuccess)
3392
+ : '#e0e0e0';
3393
+ const textColor = isFailed ? String(borderError) : '#737373';
3394
+ const subtitleColor = isFailed ? String(borderError) : '#a3a3a3';
3395
+ // Render progress info
3396
+ const renderProgressInfo = () => {
3397
+ if (isUploading && !isCompleted)
3398
+ return ` • ${Math.round(progress)}% uploaded`;
3399
+ if (isFailed)
3400
+ return ' • Upload failed';
3401
+ return '';
3402
+ };
3403
+ return (jsxRuntime.jsxs(material.Box, { sx: {
3404
+ display: 'flex',
3405
+ alignItems: 'flex-start',
3406
+ padding: '16px',
3407
+ border: '1px solid',
3408
+ borderColor: borderColor,
3409
+ borderRadius: '8px',
3410
+ gap: '16px',
3411
+ position: 'relative',
3412
+ overflow: 'hidden',
3413
+ transition: 'background-color 0.3s ease',
3414
+ backgroundColor: 'background.paper',
3415
+ ...sx,
3416
+ }, 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 } }) }))] })] }));
3417
+ };
3418
+
3419
+ const UploaderComponent = ({ onFilesSelected, accept = '*', multiple = true, children, sx, labelSx, uploadLabel = 'Click to upload', appearance, files: externalFiles, onDeleteFile, onRetryFile, borderError, }) => {
3420
+ const fileInputRef = React.useRef(null);
3421
+ const [isDragging, setIsDragging] = React.useState(false);
3422
+ // Sử dụng external files nếu có, nếu không hiển thị rỗng
3423
+ const displayFiles = externalFiles || [];
3424
+ const handleClick = () => {
3425
+ fileInputRef.current?.click();
3426
+ };
3427
+ const handleFileChange = (event) => {
3428
+ const selectedFiles = event.target.files;
3429
+ if (selectedFiles) {
3430
+ const fileArray = Array.from(selectedFiles);
3431
+ onFilesSelected(fileArray);
3432
+ }
3433
+ event.target.value = '';
3434
+ };
3435
+ const handleDeleteFile = (file) => {
3436
+ if (onDeleteFile) {
3437
+ onDeleteFile(file);
3438
+ }
3439
+ };
3440
+ const handleDragOver = (e) => {
3441
+ e.preventDefault();
3442
+ e.stopPropagation();
3443
+ setIsDragging(true);
3444
+ };
3445
+ const handleDragLeave = (e) => {
3446
+ e.preventDefault();
3447
+ e.stopPropagation();
3448
+ setIsDragging(false);
3449
+ };
3450
+ const handleDrop = (e) => {
3451
+ e.preventDefault();
3452
+ e.stopPropagation();
3453
+ setIsDragging(false);
3454
+ const files = e.dataTransfer.files;
3455
+ if (files) {
3456
+ onFilesSelected(Array.from(files));
3457
+ }
3458
+ };
3459
+ return (jsxRuntime.jsxs(material.Box, { sx: {
3460
+ border: '2px solid',
3461
+ borderColor: appearance?.borderColor || 'action.selected',
3462
+ borderRadius: '8px',
3463
+ padding: '32px 24px',
3464
+ textAlign: 'center',
3465
+ cursor: 'pointer',
3466
+ transition: 'all 0.3s ease',
3467
+ backgroundColor: isDragging ? 'action.selected' : appearance?.background || 'background.paper',
3468
+ '&:hover': {
3469
+ borderColor: appearance?.borderColorHover || appearance?.borderColor || 'primary.main',
3470
+ filter: 'brightness(0.92)',
3471
+ },
3472
+ ...sx,
3473
+ }, 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: {
3474
+ color: 'primary.main',
3475
+ textDecoration: 'underline',
3476
+ fontWeight: 500,
3477
+ fontSize: '14px',
3478
+ marginTop: '12px',
3479
+ margin: '12px 0 0 0',
3480
+ ...labelSx,
3481
+ }, 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: {
3482
+ width: '46px',
3483
+ height: '46px',
3484
+ marginBottom: '12px',
3485
+ } }), jsxRuntime.jsxs(material.Box, { component: "p", sx: {
3486
+ color: 'primary.main',
3487
+ textDecoration: 'underline',
3488
+ fontWeight: 500,
3489
+ fontSize: '14px',
3490
+ margin: 0,
3491
+ ...labelSx,
3492
+ }, children: [uploadLabel, " or drag and drop"] })] })) })), displayFiles && displayFiles.length > 0 && (jsxRuntime.jsx(material.Box, { sx: {
3493
+ marginTop: '24px',
3494
+ display: 'flex',
3495
+ flexDirection: 'column',
3496
+ gap: '12px',
3497
+ textAlign: 'left',
3498
+ }, 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))) }))] }));
3499
+ };
3500
+
3501
+ exports.AVATAR_SIZES = AVATAR_SIZES;
3502
+ exports.AvatarComponent = AvatarComponent;
3503
+ exports.AvatarGroup = AvatarGroupComponent;
3504
+ exports.AvatarLabelGroup = AvatarLabelGroupComponent;
3505
+ exports.AvatarProfile = AvatarProfileComponent;
3506
+ exports.AvatarUser = AvatarUserComponent;
3507
+ exports.BADGE_FONT_SIZES = BADGE_FONT_SIZES;
3508
+ exports.BADGE_SIZES = BADGE_SIZES;
3509
+ exports.BadgeImage = BadgeImage;
3510
+ exports.BadgeLive = BadgeLive;
3511
+ exports.BadgeNumber = BadgeNumber;
3512
+ exports.BadgeOnline = BadgeOnline;
3513
+ exports.Breadcrumbs = BreadcrumbsComponent;
3514
+ exports.ButtonBar = ButtonBarComponent;
3515
+ exports.ButtonComponent = ButtonComponent;
3516
+ exports.COLOR_ACCENT = COLOR_ACCENT;
3517
+ exports.COLOR_BRAND = COLOR_BRAND;
3518
+ exports.COLOR_ERROR = COLOR_ERROR;
3519
+ exports.COLOR_GRAY = COLOR_GRAY;
3520
+ exports.COLOR_INFO = COLOR_INFO;
3521
+ exports.COLOR_NEUTRAL = COLOR_NEUTRAL;
3522
+ exports.COLOR_SUCCESS = COLOR_SUCCESS;
3523
+ exports.COLOR_WARNING = COLOR_WARNING;
3524
+ exports.Checkbox = CheckboxComponent;
3525
+ exports.Chip = ChipComponent;
3526
+ exports.DateField = DateFieldComponent;
3527
+ exports.DateRangePicker = DateRangePickerComponent;
3528
+ exports.DialogWrapper = DialogWrapper;
3529
+ exports.DropdownField = DropdownFieldComponent;
3530
+ exports.FONT_FAMILY = FONT_FAMILY;
3531
+ exports.FONT_SIZE = FONT_SIZE;
3532
+ exports.FONT_STYLE = FONT_STYLE;
3533
+ exports.FONT_WEIGHT = FONT_WEIGHT;
3534
+ exports.Grid = GridComponent;
3535
+ exports.IconElement = IconElement;
3536
+ exports.ImageElement = ImageElement;
3537
+ exports.InputStepper = InputStepperComponent;
3538
+ exports.LINE_HEIGHT = LINE_HEIGHT;
3539
+ exports.LinkElement = LinkElement;
3540
+ exports.LinkField = LinkFieldComponent;
3541
+ exports.LinkInternalElement = LinkInternalElement;
3542
+ exports.MAP_SIZE = MAP_SIZE;
3543
+ exports.Modal = ModalComponent;
3544
+ exports.ModalCard = ModalCardComponent;
3545
+ exports.ModalDescription = ModalDescription;
3546
+ exports.ModalIcon = ModalIcon;
3547
+ exports.ModalTitle = ModalTitle;
3548
+ exports.MoneyField = MoneyFieldComponent;
3549
+ exports.PIN = PINComponent;
3550
+ exports.PhoneField = PhoneNumberFieldComponent;
3551
+ exports.SIZE_EXTRA_LARGE = SIZE_EXTRA_LARGE;
3552
+ exports.STYLE = style_constant;
3553
+ exports.SearchDropdown = SearchDropdownComponent;
3554
+ exports.SearchField = SearchFieldComponent;
3555
+ exports.Switch = SwitchComponent;
3556
+ exports.TYPOGRAPHY = TYPOGRAPHY;
3557
+ exports.TYPOGRAPHY_STYLES = TYPOGRAPHY_STYLES;
3558
+ exports.Tabs = TabsComponent;
3559
+ exports.TextArea = TextAreaComponent;
3560
+ exports.TextField = TextFieldComponent;
3561
+ exports.TypographyOneLine = TypographyOneLine;
3562
+ exports.Uploader = UploaderComponent;
3563
+ exports.createTypography = createTypography;
3564
+ exports.getBadgePosition = getBadgePosition;
3565
+ //# sourceMappingURL=index.js.map