@ncds/ui-admin 1.8.1 → 1.8.2

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 (438) hide show
  1. package/dist/cjs/src/components/badge/index.js +11 -0
  2. package/dist/cjs/src/components/date-picker/index.js +11 -0
  3. package/dist/cjs/src/components/image-file-input/components/index.js +16 -0
  4. package/dist/cjs/src/components/image-file-input/index.js +11 -0
  5. package/dist/cjs/src/components/progress-bar/components/index.js +27 -0
  6. package/dist/cjs/src/components/progress-bar/hooks/index.js +16 -0
  7. package/dist/cjs/src/components/progress-bar/index.js +33 -0
  8. package/dist/cjs/src/components/select/Select.js +0 -1
  9. package/dist/cjs/src/components/select-dropdown/index.js +11 -7
  10. package/dist/cjs/src/components/switch/index.js +11 -7
  11. package/dist/cjs/src/components/tooltip/Tooltip.js +170 -104
  12. package/dist/cjs/src/hooks/dropdown/index.js +61 -37
  13. package/dist/cjs/src/hooks/index.js +31 -25
  14. package/dist/cjs/vitest.config.js +13 -0
  15. package/dist/esm/src/components/badge/index.js +2 -1
  16. package/dist/esm/src/components/date-picker/index.js +1 -0
  17. package/dist/esm/src/components/empty-state/EmptyState.js +2 -3
  18. package/dist/esm/src/components/image-file-input/components/index.js +1 -0
  19. package/dist/esm/src/components/image-file-input/index.js +2 -1
  20. package/dist/esm/src/components/progress-bar/components/index.js +2 -0
  21. package/dist/esm/src/components/progress-bar/hooks/index.js +1 -0
  22. package/dist/esm/src/components/progress-bar/index.js +4 -1
  23. package/dist/esm/src/components/select/Select.js +0 -1
  24. package/dist/esm/src/components/select-dropdown/index.js +1 -1
  25. package/dist/esm/src/components/switch/index.js +1 -1
  26. package/dist/esm/src/components/tag/Tag.js +2 -3
  27. package/dist/esm/src/components/tooltip/Tooltip.js +172 -106
  28. package/dist/esm/src/hooks/dropdown/index.js +6 -6
  29. package/dist/esm/src/hooks/index.js +3 -3
  30. package/dist/esm/src/types/component-meta.js +2 -0
  31. package/dist/esm/vitest.config.js +7 -0
  32. package/dist/temp/src/components/badge/index.d.ts +1 -0
  33. package/dist/temp/src/components/badge/index.js +1 -0
  34. package/dist/temp/src/components/date-picker/index.d.ts +1 -0
  35. package/dist/temp/src/components/date-picker/index.js +1 -0
  36. package/dist/temp/src/components/empty-state/EmptyState.d.ts +3 -5
  37. package/dist/temp/src/components/empty-state/EmptyState.js +1 -2
  38. package/dist/temp/src/components/image-file-input/components/index.d.ts +1 -0
  39. package/dist/temp/src/components/image-file-input/components/index.js +1 -0
  40. package/dist/temp/src/components/image-file-input/index.d.ts +1 -0
  41. package/dist/temp/src/components/image-file-input/index.js +1 -0
  42. package/dist/temp/src/components/progress-bar/components/index.d.ts +2 -0
  43. package/dist/temp/src/components/progress-bar/components/index.js +2 -0
  44. package/dist/temp/src/components/progress-bar/hooks/index.d.ts +1 -0
  45. package/dist/temp/src/components/progress-bar/hooks/index.js +1 -0
  46. package/dist/temp/src/components/progress-bar/index.d.ts +3 -0
  47. package/dist/temp/src/components/progress-bar/index.js +3 -0
  48. package/dist/temp/src/components/select/Select.js +1 -1
  49. package/dist/temp/src/components/select-dropdown/index.d.ts +1 -1
  50. package/dist/temp/src/components/select-dropdown/index.js +1 -1
  51. package/dist/temp/src/components/spinner/Spinner.d.ts +1 -2
  52. package/dist/temp/src/components/switch/index.d.ts +1 -2
  53. package/dist/temp/src/components/switch/index.js +1 -1
  54. package/dist/temp/src/components/tag/Tag.d.ts +3 -5
  55. package/dist/temp/src/components/tag/Tag.js +1 -2
  56. package/dist/temp/src/components/tooltip/Tooltip.d.ts +4 -2
  57. package/dist/temp/src/components/tooltip/Tooltip.js +126 -68
  58. package/dist/temp/src/hooks/dropdown/index.d.ts +6 -6
  59. package/dist/temp/src/hooks/dropdown/index.js +6 -6
  60. package/dist/temp/src/hooks/index.d.ts +3 -3
  61. package/dist/temp/src/hooks/index.js +3 -3
  62. package/dist/temp/src/types/component-meta.d.ts +26 -0
  63. package/dist/temp/src/types/component-meta.js +2 -0
  64. package/dist/temp/src/types/dropdown/option.d.ts +2 -4
  65. package/dist/temp/src/types/side-slot.d.ts +9 -1
  66. package/dist/temp/vitest.config.d.ts +2 -0
  67. package/dist/temp/vitest.config.js +7 -0
  68. package/dist/types/src/components/badge/index.d.ts +1 -0
  69. package/dist/types/src/components/date-picker/index.d.ts +1 -0
  70. package/dist/types/src/components/empty-state/EmptyState.d.ts +3 -5
  71. package/dist/types/src/components/image-file-input/components/index.d.ts +1 -0
  72. package/dist/types/src/components/image-file-input/index.d.ts +1 -0
  73. package/dist/types/src/components/progress-bar/components/index.d.ts +2 -0
  74. package/dist/types/src/components/progress-bar/hooks/index.d.ts +1 -0
  75. package/dist/types/src/components/progress-bar/index.d.ts +3 -0
  76. package/dist/types/src/components/select-dropdown/index.d.ts +1 -1
  77. package/dist/types/src/components/spinner/Spinner.d.ts +1 -2
  78. package/dist/types/src/components/switch/index.d.ts +1 -2
  79. package/dist/types/src/components/tag/Tag.d.ts +3 -5
  80. package/dist/types/src/components/tooltip/Tooltip.d.ts +4 -2
  81. package/dist/types/src/hooks/dropdown/index.d.ts +6 -6
  82. package/dist/types/src/hooks/index.d.ts +3 -3
  83. package/dist/types/src/types/component-meta.d.ts +26 -0
  84. package/dist/types/src/types/dropdown/option.d.ts +2 -4
  85. package/dist/types/src/types/side-slot.d.ts +9 -1
  86. package/dist/types/vitest.config.d.ts +2 -0
  87. package/dist/ui-admin/assets/styles/style.css +18 -7
  88. package/package.json +6 -1
  89. package/dist/cjs/assets/scripts/baseBox.js +0 -146
  90. package/dist/cjs/assets/scripts/comboBox.js +0 -137
  91. package/dist/cjs/assets/scripts/datePicker.js +0 -671
  92. package/dist/cjs/assets/scripts/featuredIcon.js +0 -87
  93. package/dist/cjs/assets/scripts/fileInput/const/classNames.js +0 -25
  94. package/dist/cjs/assets/scripts/fileInput/const/index.js +0 -27
  95. package/dist/cjs/assets/scripts/fileInput/const/types.js +0 -13
  96. package/dist/cjs/assets/scripts/fileInput/fileInput.js +0 -78
  97. package/dist/cjs/assets/scripts/fileInput/fileInputModel.js +0 -53
  98. package/dist/cjs/assets/scripts/fileInput/fileInputView.js +0 -152
  99. package/dist/cjs/assets/scripts/fileInput/index.js +0 -44
  100. package/dist/cjs/assets/scripts/imageFileInput/ImageFileInput.js +0 -184
  101. package/dist/cjs/assets/scripts/imageFileInput/ImageFileInputModel.js +0 -222
  102. package/dist/cjs/assets/scripts/imageFileInput/ImageFileInputView.js +0 -356
  103. package/dist/cjs/assets/scripts/imageFileInput/const/classNames.js +0 -31
  104. package/dist/cjs/assets/scripts/imageFileInput/const/index.js +0 -27
  105. package/dist/cjs/assets/scripts/imageFileInput/const/types.js +0 -13
  106. package/dist/cjs/assets/scripts/imageFileInput/index.js +0 -44
  107. package/dist/cjs/assets/scripts/index.js +0 -32
  108. package/dist/cjs/assets/scripts/modal/Modal.js +0 -104
  109. package/dist/cjs/assets/scripts/modal/ModalActions.js +0 -116
  110. package/dist/cjs/assets/scripts/modal/ModalContent.js +0 -46
  111. package/dist/cjs/assets/scripts/modal/ModalHeader.js +0 -104
  112. package/dist/cjs/assets/scripts/modal/const/classNames.js +0 -33
  113. package/dist/cjs/assets/scripts/modal/const/index.js +0 -27
  114. package/dist/cjs/assets/scripts/modal/index.js +0 -61
  115. package/dist/cjs/assets/scripts/modal/utils/contentUtils.js +0 -35
  116. package/dist/cjs/assets/scripts/notification/FloatingNotification.js +0 -178
  117. package/dist/cjs/assets/scripts/notification/FullWidthNotification.js +0 -132
  118. package/dist/cjs/assets/scripts/notification/MessageNotification.js +0 -159
  119. package/dist/cjs/assets/scripts/notification/Notification.js +0 -101
  120. package/dist/cjs/assets/scripts/notification/const/classNames.js +0 -50
  121. package/dist/cjs/assets/scripts/notification/const/icons.js +0 -31
  122. package/dist/cjs/assets/scripts/notification/const/index.js +0 -87
  123. package/dist/cjs/assets/scripts/notification/const/sizes.js +0 -46
  124. package/dist/cjs/assets/scripts/notification/const/types.js +0 -14
  125. package/dist/cjs/assets/scripts/notification/index.js +0 -92
  126. package/dist/cjs/assets/scripts/notification/utils.js +0 -97
  127. package/dist/cjs/assets/scripts/progress-bar/ProgressBar.js +0 -271
  128. package/dist/cjs/assets/scripts/progress-bar/index.js +0 -12
  129. package/dist/cjs/assets/scripts/selectBox.js +0 -169
  130. package/dist/cjs/assets/scripts/shared/ButtonCloseX.js +0 -45
  131. package/dist/cjs/assets/scripts/tab.js +0 -40
  132. package/dist/cjs/assets/scripts/table/Table.js +0 -377
  133. package/dist/cjs/assets/scripts/table/const/classNames.js +0 -33
  134. package/dist/cjs/assets/scripts/table/const/index.js +0 -27
  135. package/dist/cjs/assets/scripts/table/const/types.js +0 -5
  136. package/dist/cjs/assets/scripts/table/index.js +0 -43
  137. package/dist/cjs/assets/scripts/tag/Tag.js +0 -261
  138. package/dist/cjs/assets/scripts/tag/const/classNames.js +0 -20
  139. package/dist/cjs/assets/scripts/tag/const/index.js +0 -38
  140. package/dist/cjs/assets/scripts/tag/const/sizes.js +0 -13
  141. package/dist/cjs/assets/scripts/tag/const/types.js +0 -5
  142. package/dist/cjs/assets/scripts/tag/index.js +0 -44
  143. package/dist/cjs/assets/scripts/tooltip/Tooltip.js +0 -353
  144. package/dist/cjs/assets/scripts/tooltip/TooltipLayerManager.js +0 -82
  145. package/dist/cjs/assets/scripts/tooltip/const/classNames.js +0 -29
  146. package/dist/cjs/assets/scripts/tooltip/const/constants.js +0 -56
  147. package/dist/cjs/assets/scripts/tooltip/const/icons.js +0 -15
  148. package/dist/cjs/assets/scripts/tooltip/const/index.js +0 -123
  149. package/dist/cjs/assets/scripts/tooltip/const/templates.js +0 -66
  150. package/dist/cjs/assets/scripts/tooltip/const/types.js +0 -5
  151. package/dist/cjs/assets/scripts/tooltip/index.js +0 -57
  152. package/dist/cjs/assets/scripts/tooltip/utils.js +0 -40
  153. package/dist/cjs/assets/scripts/utils/debounce.js +0 -32
  154. package/dist/cjs/assets/scripts/utils/unifiedBox/domRenderer.js +0 -370
  155. package/dist/cjs/assets/scripts/utils/unifiedBox/dropdownModel.js +0 -285
  156. package/dist/cjs/assets/scripts/utils/unifiedBox/unifiedBoxController.js +0 -622
  157. package/dist/cjs/assets/scripts/utils/unifiedBox/unifiedBoxManager.js +0 -473
  158. package/dist/esm/assets/scripts/baseBox.js +0 -139
  159. package/dist/esm/assets/scripts/comboBox.js +0 -130
  160. package/dist/esm/assets/scripts/datePicker.js +0 -663
  161. package/dist/esm/assets/scripts/featuredIcon.js +0 -80
  162. package/dist/esm/assets/scripts/fileInput/const/classNames.js +0 -16
  163. package/dist/esm/assets/scripts/fileInput/const/index.js +0 -2
  164. package/dist/esm/assets/scripts/fileInput/const/types.js +0 -7
  165. package/dist/esm/assets/scripts/fileInput/fileInput.js +0 -71
  166. package/dist/esm/assets/scripts/fileInput/fileInputModel.js +0 -46
  167. package/dist/esm/assets/scripts/fileInput/fileInputView.js +0 -145
  168. package/dist/esm/assets/scripts/fileInput/index.js +0 -9
  169. package/dist/esm/assets/scripts/imageFileInput/ImageFileInput.js +0 -177
  170. package/dist/esm/assets/scripts/imageFileInput/ImageFileInputModel.js +0 -215
  171. package/dist/esm/assets/scripts/imageFileInput/ImageFileInputView.js +0 -349
  172. package/dist/esm/assets/scripts/imageFileInput/const/classNames.js +0 -20
  173. package/dist/esm/assets/scripts/imageFileInput/const/index.js +0 -2
  174. package/dist/esm/assets/scripts/imageFileInput/const/types.js +0 -7
  175. package/dist/esm/assets/scripts/imageFileInput/index.js +0 -9
  176. package/dist/esm/assets/scripts/index.js +0 -30
  177. package/dist/esm/assets/scripts/modal/Modal.js +0 -98
  178. package/dist/esm/assets/scripts/modal/ModalActions.js +0 -109
  179. package/dist/esm/assets/scripts/modal/ModalContent.js +0 -39
  180. package/dist/esm/assets/scripts/modal/ModalHeader.js +0 -97
  181. package/dist/esm/assets/scripts/modal/const/classNames.js +0 -23
  182. package/dist/esm/assets/scripts/modal/const/index.js +0 -2
  183. package/dist/esm/assets/scripts/modal/const/types.js +0 -1
  184. package/dist/esm/assets/scripts/modal/index.js +0 -15
  185. package/dist/esm/assets/scripts/modal/utils/contentUtils.js +0 -28
  186. package/dist/esm/assets/scripts/notification/FloatingNotification.js +0 -172
  187. package/dist/esm/assets/scripts/notification/FullWidthNotification.js +0 -125
  188. package/dist/esm/assets/scripts/notification/MessageNotification.js +0 -152
  189. package/dist/esm/assets/scripts/notification/Notification.js +0 -94
  190. package/dist/esm/assets/scripts/notification/const/classNames.js +0 -44
  191. package/dist/esm/assets/scripts/notification/const/icons.js +0 -25
  192. package/dist/esm/assets/scripts/notification/const/index.js +0 -4
  193. package/dist/esm/assets/scripts/notification/const/sizes.js +0 -40
  194. package/dist/esm/assets/scripts/notification/const/types.js +0 -8
  195. package/dist/esm/assets/scripts/notification/index.js +0 -11
  196. package/dist/esm/assets/scripts/notification/utils.js +0 -84
  197. package/dist/esm/assets/scripts/progress-bar/ProgressBar.js +0 -264
  198. package/dist/esm/assets/scripts/progress-bar/index.js +0 -1
  199. package/dist/esm/assets/scripts/selectBox.js +0 -162
  200. package/dist/esm/assets/scripts/shared/ButtonCloseX.js +0 -37
  201. package/dist/esm/assets/scripts/tab.js +0 -33
  202. package/dist/esm/assets/scripts/table/Table.js +0 -370
  203. package/dist/esm/assets/scripts/table/const/classNames.js +0 -27
  204. package/dist/esm/assets/scripts/table/const/index.js +0 -2
  205. package/dist/esm/assets/scripts/table/const/types.js +0 -1
  206. package/dist/esm/assets/scripts/table/index.js +0 -8
  207. package/dist/esm/assets/scripts/tag/Tag.js +0 -254
  208. package/dist/esm/assets/scripts/tag/const/classNames.js +0 -12
  209. package/dist/esm/assets/scripts/tag/const/index.js +0 -3
  210. package/dist/esm/assets/scripts/tag/const/sizes.js +0 -7
  211. package/dist/esm/assets/scripts/tag/const/types.js +0 -1
  212. package/dist/esm/assets/scripts/tag/index.js +0 -9
  213. package/dist/esm/assets/scripts/tooltip/Tooltip.js +0 -346
  214. package/dist/esm/assets/scripts/tooltip/TooltipLayerManager.js +0 -75
  215. package/dist/esm/assets/scripts/tooltip/const/classNames.js +0 -23
  216. package/dist/esm/assets/scripts/tooltip/const/constants.js +0 -50
  217. package/dist/esm/assets/scripts/tooltip/const/icons.js +0 -9
  218. package/dist/esm/assets/scripts/tooltip/const/index.js +0 -4
  219. package/dist/esm/assets/scripts/tooltip/const/templates.js +0 -59
  220. package/dist/esm/assets/scripts/tooltip/const/types.js +0 -1
  221. package/dist/esm/assets/scripts/tooltip/index.js +0 -10
  222. package/dist/esm/assets/scripts/tooltip/utils.js +0 -34
  223. package/dist/esm/assets/scripts/utils/debounce.js +0 -26
  224. package/dist/esm/assets/scripts/utils/unifiedBox/domRenderer.js +0 -363
  225. package/dist/esm/assets/scripts/utils/unifiedBox/dropdownModel.js +0 -279
  226. package/dist/esm/assets/scripts/utils/unifiedBox/unifiedBoxController.js +0 -615
  227. package/dist/esm/assets/scripts/utils/unifiedBox/unifiedBoxManager.js +0 -466
  228. package/dist/temp/assets/scripts/baseBox.d.ts +0 -55
  229. package/dist/temp/assets/scripts/baseBox.js +0 -140
  230. package/dist/temp/assets/scripts/comboBox.d.ts +0 -60
  231. package/dist/temp/assets/scripts/comboBox.js +0 -132
  232. package/dist/temp/assets/scripts/datePicker.d.ts +0 -86
  233. package/dist/temp/assets/scripts/datePicker.js +0 -699
  234. package/dist/temp/assets/scripts/featuredIcon.d.ts +0 -22
  235. package/dist/temp/assets/scripts/featuredIcon.js +0 -79
  236. package/dist/temp/assets/scripts/fileInput/const/classNames.d.ts +0 -15
  237. package/dist/temp/assets/scripts/fileInput/const/classNames.js +0 -16
  238. package/dist/temp/assets/scripts/fileInput/const/index.d.ts +0 -2
  239. package/dist/temp/assets/scripts/fileInput/const/index.js +0 -2
  240. package/dist/temp/assets/scripts/fileInput/const/types.d.ts +0 -88
  241. package/dist/temp/assets/scripts/fileInput/const/types.js +0 -7
  242. package/dist/temp/assets/scripts/fileInput/fileInput.d.ts +0 -13
  243. package/dist/temp/assets/scripts/fileInput/fileInput.js +0 -71
  244. package/dist/temp/assets/scripts/fileInput/fileInputModel.d.ts +0 -12
  245. package/dist/temp/assets/scripts/fileInput/fileInputModel.js +0 -37
  246. package/dist/temp/assets/scripts/fileInput/fileInputView.d.ts +0 -42
  247. package/dist/temp/assets/scripts/fileInput/fileInputView.js +0 -145
  248. package/dist/temp/assets/scripts/fileInput/index.d.ts +0 -3
  249. package/dist/temp/assets/scripts/fileInput/index.js +0 -9
  250. package/dist/temp/assets/scripts/imageFileInput/ImageFileInput.d.ts +0 -63
  251. package/dist/temp/assets/scripts/imageFileInput/ImageFileInput.js +0 -180
  252. package/dist/temp/assets/scripts/imageFileInput/ImageFileInputModel.d.ts +0 -73
  253. package/dist/temp/assets/scripts/imageFileInput/ImageFileInputModel.js +0 -214
  254. package/dist/temp/assets/scripts/imageFileInput/ImageFileInputView.d.ts +0 -79
  255. package/dist/temp/assets/scripts/imageFileInput/ImageFileInputView.js +0 -350
  256. package/dist/temp/assets/scripts/imageFileInput/const/classNames.d.ts +0 -19
  257. package/dist/temp/assets/scripts/imageFileInput/const/classNames.js +0 -20
  258. package/dist/temp/assets/scripts/imageFileInput/const/index.d.ts +0 -2
  259. package/dist/temp/assets/scripts/imageFileInput/const/index.js +0 -2
  260. package/dist/temp/assets/scripts/imageFileInput/const/types.d.ts +0 -125
  261. package/dist/temp/assets/scripts/imageFileInput/const/types.js +0 -7
  262. package/dist/temp/assets/scripts/imageFileInput/index.d.ts +0 -3
  263. package/dist/temp/assets/scripts/imageFileInput/index.js +0 -9
  264. package/dist/temp/assets/scripts/index.d.ts +0 -34
  265. package/dist/temp/assets/scripts/index.js +0 -30
  266. package/dist/temp/assets/scripts/modal/Modal.d.ts +0 -27
  267. package/dist/temp/assets/scripts/modal/Modal.js +0 -100
  268. package/dist/temp/assets/scripts/modal/ModalActions.d.ts +0 -18
  269. package/dist/temp/assets/scripts/modal/ModalActions.js +0 -117
  270. package/dist/temp/assets/scripts/modal/ModalContent.d.ts +0 -13
  271. package/dist/temp/assets/scripts/modal/ModalContent.js +0 -39
  272. package/dist/temp/assets/scripts/modal/ModalHeader.d.ts +0 -15
  273. package/dist/temp/assets/scripts/modal/ModalHeader.js +0 -96
  274. package/dist/temp/assets/scripts/modal/const/classNames.d.ts +0 -22
  275. package/dist/temp/assets/scripts/modal/const/classNames.js +0 -23
  276. package/dist/temp/assets/scripts/modal/const/index.d.ts +0 -2
  277. package/dist/temp/assets/scripts/modal/const/index.js +0 -2
  278. package/dist/temp/assets/scripts/modal/const/types.d.ts +0 -61
  279. package/dist/temp/assets/scripts/modal/const/types.js +0 -1
  280. package/dist/temp/assets/scripts/modal/index.d.ts +0 -7
  281. package/dist/temp/assets/scripts/modal/index.js +0 -15
  282. package/dist/temp/assets/scripts/modal/utils/contentUtils.d.ts +0 -10
  283. package/dist/temp/assets/scripts/modal/utils/contentUtils.js +0 -29
  284. package/dist/temp/assets/scripts/notification/FloatingNotification.d.ts +0 -24
  285. package/dist/temp/assets/scripts/notification/FloatingNotification.js +0 -157
  286. package/dist/temp/assets/scripts/notification/FullWidthNotification.d.ts +0 -21
  287. package/dist/temp/assets/scripts/notification/FullWidthNotification.js +0 -110
  288. package/dist/temp/assets/scripts/notification/MessageNotification.d.ts +0 -22
  289. package/dist/temp/assets/scripts/notification/MessageNotification.js +0 -140
  290. package/dist/temp/assets/scripts/notification/Notification.d.ts +0 -21
  291. package/dist/temp/assets/scripts/notification/Notification.js +0 -94
  292. package/dist/temp/assets/scripts/notification/const/classNames.d.ts +0 -43
  293. package/dist/temp/assets/scripts/notification/const/classNames.js +0 -44
  294. package/dist/temp/assets/scripts/notification/const/icons.d.ts +0 -25
  295. package/dist/temp/assets/scripts/notification/const/icons.js +0 -25
  296. package/dist/temp/assets/scripts/notification/const/index.d.ts +0 -5
  297. package/dist/temp/assets/scripts/notification/const/index.js +0 -4
  298. package/dist/temp/assets/scripts/notification/const/sizes.d.ts +0 -32
  299. package/dist/temp/assets/scripts/notification/const/sizes.js +0 -40
  300. package/dist/temp/assets/scripts/notification/const/types.d.ts +0 -19
  301. package/dist/temp/assets/scripts/notification/const/types.js +0 -8
  302. package/dist/temp/assets/scripts/notification/index.d.ts +0 -7
  303. package/dist/temp/assets/scripts/notification/index.js +0 -11
  304. package/dist/temp/assets/scripts/notification/utils.d.ts +0 -8
  305. package/dist/temp/assets/scripts/notification/utils.js +0 -89
  306. package/dist/temp/assets/scripts/progress-bar/ProgressBar.d.ts +0 -67
  307. package/dist/temp/assets/scripts/progress-bar/ProgressBar.js +0 -263
  308. package/dist/temp/assets/scripts/progress-bar/index.d.ts +0 -1
  309. package/dist/temp/assets/scripts/progress-bar/index.js +0 -1
  310. package/dist/temp/assets/scripts/selectBox.d.ts +0 -50
  311. package/dist/temp/assets/scripts/selectBox.js +0 -170
  312. package/dist/temp/assets/scripts/shared/ButtonCloseX.d.ts +0 -5
  313. package/dist/temp/assets/scripts/shared/ButtonCloseX.js +0 -33
  314. package/dist/temp/assets/scripts/tab.d.ts +0 -7
  315. package/dist/temp/assets/scripts/tab.js +0 -33
  316. package/dist/temp/assets/scripts/table/Table.d.ts +0 -41
  317. package/dist/temp/assets/scripts/table/Table.js +0 -378
  318. package/dist/temp/assets/scripts/table/const/classNames.d.ts +0 -27
  319. package/dist/temp/assets/scripts/table/const/classNames.js +0 -27
  320. package/dist/temp/assets/scripts/table/const/index.d.ts +0 -2
  321. package/dist/temp/assets/scripts/table/const/index.js +0 -2
  322. package/dist/temp/assets/scripts/table/const/types.d.ts +0 -23
  323. package/dist/temp/assets/scripts/table/const/types.js +0 -1
  324. package/dist/temp/assets/scripts/table/index.d.ts +0 -3
  325. package/dist/temp/assets/scripts/table/index.js +0 -8
  326. package/dist/temp/assets/scripts/tag/Tag.d.ts +0 -27
  327. package/dist/temp/assets/scripts/tag/Tag.js +0 -259
  328. package/dist/temp/assets/scripts/tag/const/classNames.d.ts +0 -11
  329. package/dist/temp/assets/scripts/tag/const/classNames.js +0 -12
  330. package/dist/temp/assets/scripts/tag/const/index.d.ts +0 -3
  331. package/dist/temp/assets/scripts/tag/const/index.js +0 -3
  332. package/dist/temp/assets/scripts/tag/const/sizes.d.ts +0 -7
  333. package/dist/temp/assets/scripts/tag/const/sizes.js +0 -7
  334. package/dist/temp/assets/scripts/tag/const/types.d.ts +0 -33
  335. package/dist/temp/assets/scripts/tag/const/types.js +0 -1
  336. package/dist/temp/assets/scripts/tag/index.d.ts +0 -3
  337. package/dist/temp/assets/scripts/tag/index.js +0 -9
  338. package/dist/temp/assets/scripts/tooltip/Tooltip.d.ts +0 -54
  339. package/dist/temp/assets/scripts/tooltip/Tooltip.js +0 -335
  340. package/dist/temp/assets/scripts/tooltip/TooltipLayerManager.d.ts +0 -21
  341. package/dist/temp/assets/scripts/tooltip/TooltipLayerManager.js +0 -71
  342. package/dist/temp/assets/scripts/tooltip/const/classNames.d.ts +0 -17
  343. package/dist/temp/assets/scripts/tooltip/const/classNames.js +0 -23
  344. package/dist/temp/assets/scripts/tooltip/const/constants.d.ts +0 -33
  345. package/dist/temp/assets/scripts/tooltip/const/constants.js +0 -46
  346. package/dist/temp/assets/scripts/tooltip/const/icons.d.ts +0 -4
  347. package/dist/temp/assets/scripts/tooltip/const/icons.js +0 -9
  348. package/dist/temp/assets/scripts/tooltip/const/index.d.ts +0 -5
  349. package/dist/temp/assets/scripts/tooltip/const/index.js +0 -4
  350. package/dist/temp/assets/scripts/tooltip/const/templates.d.ts +0 -16
  351. package/dist/temp/assets/scripts/tooltip/const/templates.js +0 -59
  352. package/dist/temp/assets/scripts/tooltip/const/types.d.ts +0 -14
  353. package/dist/temp/assets/scripts/tooltip/const/types.js +0 -1
  354. package/dist/temp/assets/scripts/tooltip/index.d.ts +0 -6
  355. package/dist/temp/assets/scripts/tooltip/index.js +0 -10
  356. package/dist/temp/assets/scripts/tooltip/utils.d.ts +0 -2
  357. package/dist/temp/assets/scripts/tooltip/utils.js +0 -33
  358. package/dist/temp/assets/scripts/utils/debounce.d.ts +0 -8
  359. package/dist/temp/assets/scripts/utils/debounce.js +0 -23
  360. package/dist/temp/assets/scripts/utils/unifiedBox/domRenderer.d.ts +0 -107
  361. package/dist/temp/assets/scripts/utils/unifiedBox/domRenderer.js +0 -367
  362. package/dist/temp/assets/scripts/utils/unifiedBox/dropdownModel.d.ts +0 -142
  363. package/dist/temp/assets/scripts/utils/unifiedBox/dropdownModel.js +0 -286
  364. package/dist/temp/assets/scripts/utils/unifiedBox/unifiedBoxController.d.ts +0 -156
  365. package/dist/temp/assets/scripts/utils/unifiedBox/unifiedBoxController.js +0 -604
  366. package/dist/temp/assets/scripts/utils/unifiedBox/unifiedBoxManager.d.ts +0 -95
  367. package/dist/temp/assets/scripts/utils/unifiedBox/unifiedBoxManager.js +0 -482
  368. package/dist/types/assets/scripts/baseBox.d.ts +0 -55
  369. package/dist/types/assets/scripts/comboBox.d.ts +0 -60
  370. package/dist/types/assets/scripts/datePicker.d.ts +0 -86
  371. package/dist/types/assets/scripts/featuredIcon.d.ts +0 -22
  372. package/dist/types/assets/scripts/fileInput/const/classNames.d.ts +0 -15
  373. package/dist/types/assets/scripts/fileInput/const/index.d.ts +0 -2
  374. package/dist/types/assets/scripts/fileInput/const/types.d.ts +0 -88
  375. package/dist/types/assets/scripts/fileInput/fileInput.d.ts +0 -13
  376. package/dist/types/assets/scripts/fileInput/fileInputModel.d.ts +0 -12
  377. package/dist/types/assets/scripts/fileInput/fileInputView.d.ts +0 -42
  378. package/dist/types/assets/scripts/fileInput/index.d.ts +0 -3
  379. package/dist/types/assets/scripts/imageFileInput/ImageFileInput.d.ts +0 -63
  380. package/dist/types/assets/scripts/imageFileInput/ImageFileInputModel.d.ts +0 -73
  381. package/dist/types/assets/scripts/imageFileInput/ImageFileInputView.d.ts +0 -79
  382. package/dist/types/assets/scripts/imageFileInput/const/classNames.d.ts +0 -19
  383. package/dist/types/assets/scripts/imageFileInput/const/index.d.ts +0 -2
  384. package/dist/types/assets/scripts/imageFileInput/const/types.d.ts +0 -125
  385. package/dist/types/assets/scripts/imageFileInput/index.d.ts +0 -3
  386. package/dist/types/assets/scripts/index.d.ts +0 -34
  387. package/dist/types/assets/scripts/modal/Modal.d.ts +0 -27
  388. package/dist/types/assets/scripts/modal/ModalActions.d.ts +0 -18
  389. package/dist/types/assets/scripts/modal/ModalContent.d.ts +0 -13
  390. package/dist/types/assets/scripts/modal/ModalHeader.d.ts +0 -15
  391. package/dist/types/assets/scripts/modal/const/classNames.d.ts +0 -22
  392. package/dist/types/assets/scripts/modal/const/index.d.ts +0 -2
  393. package/dist/types/assets/scripts/modal/const/types.d.ts +0 -61
  394. package/dist/types/assets/scripts/modal/index.d.ts +0 -7
  395. package/dist/types/assets/scripts/modal/utils/contentUtils.d.ts +0 -10
  396. package/dist/types/assets/scripts/notification/FloatingNotification.d.ts +0 -24
  397. package/dist/types/assets/scripts/notification/FullWidthNotification.d.ts +0 -21
  398. package/dist/types/assets/scripts/notification/MessageNotification.d.ts +0 -22
  399. package/dist/types/assets/scripts/notification/Notification.d.ts +0 -21
  400. package/dist/types/assets/scripts/notification/const/classNames.d.ts +0 -43
  401. package/dist/types/assets/scripts/notification/const/icons.d.ts +0 -25
  402. package/dist/types/assets/scripts/notification/const/index.d.ts +0 -5
  403. package/dist/types/assets/scripts/notification/const/sizes.d.ts +0 -32
  404. package/dist/types/assets/scripts/notification/const/types.d.ts +0 -19
  405. package/dist/types/assets/scripts/notification/index.d.ts +0 -7
  406. package/dist/types/assets/scripts/notification/utils.d.ts +0 -8
  407. package/dist/types/assets/scripts/progress-bar/ProgressBar.d.ts +0 -67
  408. package/dist/types/assets/scripts/progress-bar/index.d.ts +0 -1
  409. package/dist/types/assets/scripts/selectBox.d.ts +0 -50
  410. package/dist/types/assets/scripts/shared/ButtonCloseX.d.ts +0 -5
  411. package/dist/types/assets/scripts/tab.d.ts +0 -7
  412. package/dist/types/assets/scripts/table/Table.d.ts +0 -41
  413. package/dist/types/assets/scripts/table/const/classNames.d.ts +0 -27
  414. package/dist/types/assets/scripts/table/const/index.d.ts +0 -2
  415. package/dist/types/assets/scripts/table/const/types.d.ts +0 -23
  416. package/dist/types/assets/scripts/table/index.d.ts +0 -3
  417. package/dist/types/assets/scripts/tag/Tag.d.ts +0 -27
  418. package/dist/types/assets/scripts/tag/const/classNames.d.ts +0 -11
  419. package/dist/types/assets/scripts/tag/const/index.d.ts +0 -3
  420. package/dist/types/assets/scripts/tag/const/sizes.d.ts +0 -7
  421. package/dist/types/assets/scripts/tag/const/types.d.ts +0 -33
  422. package/dist/types/assets/scripts/tag/index.d.ts +0 -3
  423. package/dist/types/assets/scripts/tooltip/Tooltip.d.ts +0 -54
  424. package/dist/types/assets/scripts/tooltip/TooltipLayerManager.d.ts +0 -21
  425. package/dist/types/assets/scripts/tooltip/const/classNames.d.ts +0 -17
  426. package/dist/types/assets/scripts/tooltip/const/constants.d.ts +0 -33
  427. package/dist/types/assets/scripts/tooltip/const/icons.d.ts +0 -4
  428. package/dist/types/assets/scripts/tooltip/const/index.d.ts +0 -5
  429. package/dist/types/assets/scripts/tooltip/const/templates.d.ts +0 -16
  430. package/dist/types/assets/scripts/tooltip/const/types.d.ts +0 -14
  431. package/dist/types/assets/scripts/tooltip/index.d.ts +0 -6
  432. package/dist/types/assets/scripts/tooltip/utils.d.ts +0 -2
  433. package/dist/types/assets/scripts/utils/debounce.d.ts +0 -8
  434. package/dist/types/assets/scripts/utils/unifiedBox/domRenderer.d.ts +0 -107
  435. package/dist/types/assets/scripts/utils/unifiedBox/dropdownModel.d.ts +0 -142
  436. package/dist/types/assets/scripts/utils/unifiedBox/unifiedBoxController.d.ts +0 -156
  437. package/dist/types/assets/scripts/utils/unifiedBox/unifiedBoxManager.d.ts +0 -95
  438. /package/dist/cjs/{assets/scripts/modal/const/types.js → src/types/component-meta.js} +0 -0
@@ -1,350 +0,0 @@
1
- import { IMAGE_FILE_INPUT_CLASS_NAMES, getFileInputSizeClassName, getHintTextClassName, getImageFileInputSizeClassName, getLabelClassName, } from './const/classNames';
2
- export class ImageFileInputView {
3
- constructor(options, model) {
4
- this.renderedFiles = []; // 이미 렌더링된 파일들 추적
5
- this.previewUrls = new Map(); // 파일 URL 추적
6
- this.options = options;
7
- this.model = model;
8
- this.element = this.createElement();
9
- this.previewsContainer = this.element.querySelector(`.${IMAGE_FILE_INPUT_CLASS_NAMES.previews}`);
10
- this.fileInputElement = this.element.querySelector('input[type="file"]');
11
- this.buttonElement = this.element.querySelector('button.ncua-btn');
12
- }
13
- /**
14
- * 메인 DOM 요소 생성
15
- */
16
- createElement() {
17
- const mainContainer = document.createElement('div');
18
- const baseClasses = `${IMAGE_FILE_INPUT_CLASS_NAMES.imageFileInput} ${getImageFileInputSizeClassName(this.options.size)}`;
19
- const customClasses = this.options.className ? ` ${this.options.className}` : '';
20
- mainContainer.className = baseClasses + customClasses;
21
- // Image previews container
22
- const previewsContainer = document.createElement('div');
23
- previewsContainer.className = IMAGE_FILE_INPUT_CLASS_NAMES.previews;
24
- mainContainer.appendChild(previewsContainer);
25
- // File input container
26
- const fileInputContainer = document.createElement('div');
27
- const fileInputClasses = `${IMAGE_FILE_INPUT_CLASS_NAMES.fileInput} ${getFileInputSizeClassName(this.options.size)}`;
28
- fileInputContainer.className = fileInputClasses;
29
- // Hidden file input 생성
30
- fileInputContainer.appendChild(this.createFileInput());
31
- // Input container
32
- fileInputContainer.appendChild(this.createInputContainer());
33
- // Hint list
34
- if (this.options.hintItems && this.options.hintItems.length > 0) {
35
- fileInputContainer.appendChild(this.createHintList());
36
- }
37
- mainContainer.appendChild(fileInputContainer);
38
- return mainContainer;
39
- }
40
- /**
41
- * Hidden file input 생성
42
- */
43
- createFileInput() {
44
- const input = document.createElement('input');
45
- input.type = 'file';
46
- input.hidden = true;
47
- input.tabIndex = -1;
48
- input.setAttribute('aria-hidden', 'true');
49
- input.classList.add('no-filestyle');
50
- if (this.options.accept) {
51
- input.accept = this.options.accept;
52
- }
53
- if (this.options.multiple) {
54
- input.multiple = true;
55
- }
56
- if (this.options.fileInputName) {
57
- input.name = this.options.fileInputName;
58
- }
59
- return input;
60
- }
61
- /**
62
- * Input container 생성
63
- */
64
- createInputContainer() {
65
- const container = document.createElement('div');
66
- container.className = IMAGE_FILE_INPUT_CLASS_NAMES.inputContainer;
67
- // Label
68
- if (this.options.label) {
69
- container.appendChild(this.createLabelContainer());
70
- }
71
- // Button
72
- container.appendChild(this.createButton());
73
- // Hint text
74
- if (this.options.hintText) {
75
- container.appendChild(this.createHintText());
76
- }
77
- return container;
78
- }
79
- /**
80
- * Label container 생성
81
- */
82
- createLabelContainer() {
83
- const container = document.createElement('div');
84
- container.className = IMAGE_FILE_INPUT_CLASS_NAMES.label;
85
- const label = document.createElement('label');
86
- label.className = getLabelClassName(this.options.isRequired);
87
- label.textContent = this.options.label;
88
- container.appendChild(label);
89
- if (this.options.showHelpIcon) {
90
- container.appendChild(this.createHelpIcon());
91
- }
92
- return container;
93
- }
94
- /**
95
- * Help icon 생성
96
- */
97
- createHelpIcon() {
98
- const iconContainer = document.createElement('span');
99
- iconContainer.className = IMAGE_FILE_INPUT_CLASS_NAMES.helpIcon;
100
- const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
101
- svg.setAttribute('width', '16');
102
- svg.setAttribute('height', '16');
103
- svg.setAttribute('viewBox', '0 0 24 24');
104
- svg.setAttribute('fill', 'none');
105
- svg.setAttribute('stroke', 'currentColor');
106
- const circle = document.createElementNS('http://www.w3.org/2000/svg', 'circle');
107
- circle.setAttribute('cx', '12');
108
- circle.setAttribute('cy', '12');
109
- circle.setAttribute('r', '10');
110
- circle.setAttribute('stroke-width', '2');
111
- const path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
112
- path.setAttribute('d', 'M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3');
113
- path.setAttribute('stroke-width', '2');
114
- path.setAttribute('stroke-linecap', 'round');
115
- path.setAttribute('stroke-linejoin', 'round');
116
- const line = document.createElementNS('http://www.w3.org/2000/svg', 'line');
117
- line.setAttribute('x1', '12');
118
- line.setAttribute('y1', '17');
119
- line.setAttribute('x2', '12.01');
120
- line.setAttribute('y2', '17');
121
- line.setAttribute('stroke-width', '2');
122
- line.setAttribute('stroke-linecap', 'round');
123
- svg.appendChild(circle);
124
- svg.appendChild(path);
125
- svg.appendChild(line);
126
- iconContainer.appendChild(svg);
127
- return iconContainer;
128
- }
129
- /**
130
- * Button 생성 (파일 찾기)
131
- */
132
- createButton() {
133
- const button = document.createElement('button');
134
- button.type = 'button';
135
- button.className = `ncua-btn ncua-btn--xs ncua-btn--secondary-gray`;
136
- button.disabled = this.options.disabled;
137
- const iconSvg = this.createShareIcon();
138
- button.appendChild(iconSvg);
139
- const label = document.createElement('span');
140
- label.className = 'ncua-btn__label';
141
- label.textContent = this.options.buttonLabel;
142
- button.appendChild(label);
143
- return button;
144
- }
145
- /**
146
- * Share icon (업로드 아이콘) 생성
147
- */
148
- createShareIcon() {
149
- const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
150
- svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
151
- svg.setAttribute('width', '14');
152
- svg.setAttribute('height', '14');
153
- svg.setAttribute('viewBox', '0 0 24 24');
154
- svg.setAttribute('fill', 'none');
155
- svg.setAttribute('stroke', 'none');
156
- svg.classList.add('ncua-btn__icon');
157
- const path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
158
- path.setAttribute('stroke', 'currentColor');
159
- path.setAttribute('stroke-linecap', 'round');
160
- path.setAttribute('stroke-linejoin', 'round');
161
- path.setAttribute('stroke-width', '2');
162
- path.setAttribute('d', 'M21 12v4.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V12m13-5-4-4m0 0L8 7m4-4v12');
163
- svg.appendChild(path);
164
- return svg;
165
- }
166
- /**
167
- * Trash icon (삭제 아이콘) 생성
168
- */
169
- createTrashIcon() {
170
- const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
171
- svg.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
172
- svg.setAttribute('width', '20');
173
- svg.setAttribute('height', '20');
174
- svg.setAttribute('viewBox', '0 0 24 24');
175
- svg.setAttribute('fill', 'none');
176
- svg.setAttribute('stroke', 'currentColor');
177
- svg.classList.add('ncua-btn__icon');
178
- const path1 = document.createElementNS('http://www.w3.org/2000/svg', 'path');
179
- path1.setAttribute('stroke', 'currentColor');
180
- path1.setAttribute('stroke-linecap', 'round');
181
- path1.setAttribute('stroke-linejoin', 'round');
182
- path1.setAttribute('stroke-width', '2');
183
- path1.setAttribute('d', 'M16 6v-.8c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C14.48 2 13.92 2 12.8 2h-1.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C8 3.52 8 4.08 8 5.2V6m2 5.5v5m4-5v5M3 6h18m-2 0v11.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C16.72 22 15.88 22 14.2 22H9.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C5 19.72 5 18.88 5 17.2V6');
184
- svg.appendChild(path1);
185
- return svg;
186
- }
187
- /**
188
- * Hint text 생성
189
- */
190
- createHintText() {
191
- const hintText = document.createElement('div');
192
- hintText.className = getHintTextClassName(this.options.destructive);
193
- hintText.textContent = this.options.hintText;
194
- return hintText;
195
- }
196
- /**
197
- * Hint list 생성
198
- * Note: 힌트 리스트는 컴포넌트 size와 관계없이 항상 xs 사이즈로 고정됨
199
- */
200
- createHintList() {
201
- const ul = document.createElement('ul');
202
- ul.className = IMAGE_FILE_INPUT_CLASS_NAMES.hintList;
203
- this.options.hintItems?.forEach((hint) => {
204
- const li = document.createElement('li');
205
- li.className = IMAGE_FILE_INPUT_CLASS_NAMES.hintItem;
206
- li.textContent = hint;
207
- ul.appendChild(li);
208
- });
209
- return ul;
210
- }
211
- /**
212
- * 이미지 프리뷰 렌더링
213
- */
214
- renderImagePreviews(files, onRemove, onBrowseClick) {
215
- // 기존 프리뷰 정리
216
- this.cleanupPreviews();
217
- // 새로운 프리뷰 렌더링
218
- files.forEach((file, index) => {
219
- const previewContainer = this.createImagePreview(file, index, onRemove);
220
- this.previewsContainer.appendChild(previewContainer);
221
- this.renderedFiles.push(file);
222
- });
223
- // 빈 슬롯 표시 여부 확인
224
- const showEmptySlot = this.options.maxFileCount ? files.length < this.options.maxFileCount : files.length === 0;
225
- if (showEmptySlot) {
226
- const emptySlot = this.createEmptySlot(onBrowseClick);
227
- this.previewsContainer.appendChild(emptySlot);
228
- }
229
- }
230
- /**
231
- * 이미지 프리뷰 생성
232
- */
233
- createImagePreview(file, index, onRemove) {
234
- const container = document.createElement('div');
235
- container.className = IMAGE_FILE_INPUT_CLASS_NAMES.previewContainer;
236
- // 이미지 요소 생성
237
- const img = document.createElement('img');
238
- img.className = IMAGE_FILE_INPUT_CLASS_NAMES.previewImage;
239
- img.alt = file.name;
240
- // 이미지 URL 생성
241
- const isInitialFile = this.model.isInitialFile(file);
242
- if (isInitialFile) {
243
- // 초기 파일: fileImageUrl 사용
244
- const imageUrl = this.model.getInitialFileImageUrl(file);
245
- if (imageUrl) {
246
- img.src = imageUrl;
247
- }
248
- }
249
- else {
250
- // 새로 추가된 파일: createObjectURL 사용
251
- const url = URL.createObjectURL(file);
252
- img.src = url;
253
- this.previewUrls.set(file, url);
254
- }
255
- container.appendChild(img);
256
- // 삭제 버튼 생성
257
- const removeButton = document.createElement('button');
258
- removeButton.type = 'button';
259
- removeButton.className = `ncua-btn ncua-btn--sm ncua-btn--text ${IMAGE_FILE_INPUT_CLASS_NAMES.previewRemoveButton}`;
260
- removeButton.setAttribute('aria-label', 'Remove image');
261
- const trashIcon = this.createTrashIcon();
262
- removeButton.appendChild(trashIcon);
263
- removeButton.addEventListener('click', () => onRemove(index));
264
- container.appendChild(removeButton);
265
- return container;
266
- }
267
- /**
268
- * 빈 슬롯 생성 (파일 찾기 버튼)
269
- */
270
- createEmptySlot(onBrowseClick) {
271
- const wrapper = document.createElement('div');
272
- wrapper.className = 'ncua-image-file-input__empty-slot-wrapper';
273
- const button = document.createElement('button');
274
- button.type = 'button';
275
- button.className = `ncua-btn ncua-btn--${this.options.size} ncua-btn--secondary-gray ${IMAGE_FILE_INPUT_CLASS_NAMES.previewContainer}`;
276
- button.disabled = this.options.disabled;
277
- button.setAttribute('aria-label', this.options.imagePreviewTooltipLabel);
278
- button.addEventListener('click', onBrowseClick);
279
- wrapper.addEventListener('click', onBrowseClick);
280
- wrapper.appendChild(button);
281
- // Tooltip 생성 및 추가
282
- const tooltip = this.createTooltip();
283
- wrapper.appendChild(tooltip);
284
- // Hover 이벤트로 tooltip 표시/숨김
285
- wrapper.addEventListener('mouseenter', () => {
286
- if (!this.options.disabled) {
287
- tooltip.style.display = 'block';
288
- }
289
- });
290
- wrapper.addEventListener('mouseleave', () => {
291
- tooltip.style.display = 'none';
292
- });
293
- return wrapper;
294
- }
295
- /**
296
- * Tooltip 생성
297
- */
298
- createTooltip() {
299
- const iconSize = this.options.size === 'xs' ? '48' : '80';
300
- const tooltipHTML = `
301
- <svg width="${iconSize}" height="${iconSize}" viewBox="0 0 24 24" fill="none" stroke="currentColor" style="opacity: 0; cursor: pointer;">
302
- <circle cx="12" cy="12" r="10" stroke-width="2"></circle>
303
- </svg>
304
- <span class="ncua-tooltip__bg ncua-tooltip__bg--black ncua-tooltip__bg--bottom ncua-tooltip__bg--visible">
305
- <span class="ncua-tooltip__content">${this.options.imagePreviewTooltipLabel}</span>
306
- </span>
307
- `;
308
- const tooltip = document.createElement('span');
309
- tooltip.className = 'ncua-tooltip ncua-tooltip--sm ncua-tooltip--short';
310
- tooltip.style.display = 'none';
311
- tooltip.innerHTML = tooltipHTML;
312
- return tooltip;
313
- }
314
- /**
315
- * 기존 프리뷰 정리
316
- */
317
- cleanupPreviews() {
318
- // Blob URL 정리
319
- this.previewUrls.forEach((url) => {
320
- URL.revokeObjectURL(url);
321
- });
322
- this.previewUrls.clear();
323
- // DOM 정리
324
- this.previewsContainer.innerHTML = '';
325
- this.renderedFiles = [];
326
- }
327
- setButtonDisabled(disabled) {
328
- this.buttonElement.disabled = disabled;
329
- // 빈 슬롯 wrapper 내부의 버튼도 disabled 설정
330
- const emptySlotWrapper = this.previewsContainer.querySelector('.ncua-image-file-input__empty-slot-wrapper');
331
- if (emptySlotWrapper) {
332
- const emptySlotButton = emptySlotWrapper.querySelector(`.${IMAGE_FILE_INPUT_CLASS_NAMES.previewContainer}.ncua-btn`);
333
- if (emptySlotButton) {
334
- emptySlotButton.disabled = disabled;
335
- }
336
- }
337
- }
338
- getElement() {
339
- return this.element;
340
- }
341
- getFileInputElement() {
342
- return this.fileInputElement;
343
- }
344
- getButtonElement() {
345
- return this.buttonElement;
346
- }
347
- destroy() {
348
- this.cleanupPreviews();
349
- }
350
- }
@@ -1,19 +0,0 @@
1
- export declare const IMAGE_FILE_INPUT_CLASS_NAMES: {
2
- imageFileInput: string;
3
- previews: string;
4
- previewContainer: string;
5
- previewImage: string;
6
- previewRemoveButton: string;
7
- fileInput: string;
8
- inputContainer: string;
9
- label: string;
10
- helpIcon: string;
11
- hintText: string;
12
- hintList: string;
13
- hintItem: string;
14
- };
15
- export declare const getImageFileInputSizeClassName: (size: string) => string;
16
- export declare const getFileInputSizeClassName: (size: string) => string;
17
- export declare const getButtonSizeClassName: (size: string) => string;
18
- export declare const getLabelClassName: (isRequired?: boolean) => "ncua-label" | "ncua-label ncua-label--required";
19
- export declare const getHintTextClassName: (destructive?: boolean) => "ncua-input__hint-text" | "ncua-input__hint-text ncua-input__hint-text--destructive";
@@ -1,20 +0,0 @@
1
- // ImageFileInput 관련 CSS 클래스명 상수
2
- export const IMAGE_FILE_INPUT_CLASS_NAMES = {
3
- imageFileInput: 'ncua-image-file-input',
4
- previews: 'ncua-image-file-input__previews',
5
- previewContainer: 'ncua-image-file-input__preview-container',
6
- previewImage: 'ncua-image-file-input__preview-image',
7
- previewRemoveButton: 'ncua-image-file-input__preview-remove-button',
8
- fileInput: 'ncua-file-input',
9
- inputContainer: 'ncua-file-input__input-container',
10
- label: 'ncua-file-input__label',
11
- helpIcon: 'ncua-input__help-icon',
12
- hintText: 'ncua-input__hint-text',
13
- hintList: 'ncua-file-input__hint-list',
14
- hintItem: 'ncua-file-input__hint-item',
15
- };
16
- export const getImageFileInputSizeClassName = (size) => `ncua-image-file-input--${size}`;
17
- export const getFileInputSizeClassName = (size) => `ncua-file-input--${size}`;
18
- export const getButtonSizeClassName = (size) => `ncua-button--${size}`;
19
- export const getLabelClassName = (isRequired) => isRequired ? 'ncua-label ncua-label--required' : 'ncua-label';
20
- export const getHintTextClassName = (destructive) => destructive ? 'ncua-input__hint-text ncua-input__hint-text--destructive' : 'ncua-input__hint-text';
@@ -1,2 +0,0 @@
1
- export * from './classNames';
2
- export * from './types';
@@ -1,2 +0,0 @@
1
- export * from './classNames';
2
- export * from './types';
@@ -1,125 +0,0 @@
1
- export declare enum ImageFileInputErrorType {
2
- ALREADY_UPLOADED = "ALREADY_UPLOADED",
3
- EXCEED_MAX_FILE_SIZE = "EXCEED_MAX_FILE_SIZE",
4
- EXCEED_MAX_FILE_COUNT = "EXCEED_MAX_FILE_COUNT"
5
- }
6
- export interface InvalidFile extends Omit<File, 'constructor'> {
7
- errorType: ImageFileInputErrorType;
8
- }
9
- export type ImageFileInputSize = 'xs' | 'sm' | 'md' | 'lg';
10
- export type UploadedFile = {
11
- fileName: string;
12
- fileImageUrl?: string;
13
- };
14
- export interface BaseImageFileInputOptions {
15
- /**
16
- * Size of the input
17
- */
18
- size?: ImageFileInputSize;
19
- /**
20
- * Accepted file types
21
- * e.g. '.jpg,.png,.pdf' or 'image/*'
22
- */
23
- accept?: string;
24
- /**
25
- * Allow multiple file selection
26
- */
27
- multiple?: boolean;
28
- /**
29
- * Maximum number of files
30
- */
31
- maxFileCount?: number;
32
- /**
33
- * Maximum file size in bytes
34
- */
35
- maxFileSize?: number;
36
- /**
37
- * Initial files (controlled mode)
38
- */
39
- value?: File[];
40
- /**
41
- * Callback when files change (controlled mode)
42
- */
43
- onChange?: (files: File[]) => void;
44
- /**
45
- * Callback when files are selected (uncontrolled mode)
46
- */
47
- onFileSelect?: (files: File[]) => void;
48
- /**
49
- * Callback when file selection fails
50
- */
51
- onFail?: (files: InvalidFile[]) => void;
52
- /**
53
- * Label shown on the button
54
- */
55
- buttonLabel?: string;
56
- /**
57
- * Label shown on the image preview
58
- */
59
- imagePreviewTooltipLabel?: string;
60
- /**
61
- * Whether the input is disabled
62
- */
63
- disabled?: boolean;
64
- /**
65
- * Label text
66
- */
67
- label?: string;
68
- /**
69
- * Hint text items to display as a list
70
- */
71
- hintItems?: string[];
72
- /**
73
- * Whether the input is required
74
- */
75
- isRequired?: boolean;
76
- /**
77
- * Whether to show the help icon
78
- */
79
- showHelpIcon?: boolean;
80
- /**
81
- * Hint text to display
82
- */
83
- hintText?: string;
84
- /**
85
- * Validation state
86
- */
87
- validation?: boolean;
88
- /**
89
- * Destructive state
90
- */
91
- destructive?: boolean;
92
- /**
93
- * Name attribute for file input (for PHP form submission)
94
- */
95
- fileInputName?: string;
96
- /**
97
- * Container element or selector to automatically append the image file input
98
- * Can be a DOM element, element ID, or CSS selector
99
- */
100
- container?: HTMLElement | string;
101
- /**
102
- * Additional CSS class names to add to the main image file input element
103
- */
104
- className?: string;
105
- }
106
- export interface RequiredImageFileInputProps extends Required<Pick<BaseImageFileInputOptions, 'size' | 'buttonLabel' | 'imagePreviewTooltipLabel'>> {
107
- accept?: string;
108
- multiple: boolean;
109
- maxFileCount?: number;
110
- maxFileSize?: number;
111
- value?: File[];
112
- onChange?: (files: File[]) => void;
113
- onFileSelect?: (files: File[]) => void;
114
- onFail?: (files: InvalidFile[]) => void;
115
- disabled: boolean;
116
- label?: string;
117
- hintItems?: string[];
118
- isRequired?: boolean;
119
- showHelpIcon?: boolean;
120
- hintText?: string;
121
- validation?: boolean;
122
- destructive?: boolean;
123
- fileInputName?: string;
124
- className?: string;
125
- }
@@ -1,7 +0,0 @@
1
- // ImageFileInput 관련 타입 정의 (React ImageFileInput.tsx와 동일)
2
- export var ImageFileInputErrorType;
3
- (function (ImageFileInputErrorType) {
4
- ImageFileInputErrorType["ALREADY_UPLOADED"] = "ALREADY_UPLOADED";
5
- ImageFileInputErrorType["EXCEED_MAX_FILE_SIZE"] = "EXCEED_MAX_FILE_SIZE";
6
- ImageFileInputErrorType["EXCEED_MAX_FILE_COUNT"] = "EXCEED_MAX_FILE_COUNT";
7
- })(ImageFileInputErrorType || (ImageFileInputErrorType = {}));
@@ -1,3 +0,0 @@
1
- export * from './const/classNames';
2
- export * from './const/types';
3
- export { ImageFileInput } from './ImageFileInput';
@@ -1,9 +0,0 @@
1
- import { ImageFileInput } from './ImageFileInput';
2
- export * from './const/classNames';
3
- export * from './const/types';
4
- export { ImageFileInput } from './ImageFileInput';
5
- // 전역 등록 (추후 index.ts와 개별동작 할 수 있게끔 대비)
6
- if (typeof window !== 'undefined') {
7
- window.ncua = window.ncua || {};
8
- window.ncua.ImageFileInput = ImageFileInput;
9
- }
@@ -1,34 +0,0 @@
1
- import { ComboBox } from './comboBox';
2
- import { DatePicker } from './datePicker';
3
- import { FeaturedIcon } from './featuredIcon';
4
- import { FileInput } from './fileInput';
5
- import { ImageFileInput } from './imageFileInput';
6
- import { Modal } from './modal';
7
- import { Notification } from './notification';
8
- import { ProgressBar } from './progress-bar';
9
- import { SelectBox } from './selectBox';
10
- import { Slider } from './slider';
11
- import { Tab } from './tab';
12
- import { Table } from './table';
13
- import { Tag } from './tag';
14
- import { Tooltip } from './tooltip';
15
- declare global {
16
- interface Window {
17
- ncua: {
18
- Slider?: typeof Slider;
19
- Tab?: typeof Tab;
20
- Table?: typeof Table;
21
- Tag?: typeof Tag;
22
- DatePicker?: typeof DatePicker;
23
- FeaturedIcon?: typeof FeaturedIcon;
24
- FileInput?: typeof FileInput;
25
- Modal?: typeof Modal;
26
- Notification?: typeof Notification;
27
- ProgressBar?: typeof ProgressBar;
28
- Tooltip?: typeof Tooltip;
29
- SelectBox?: typeof SelectBox;
30
- ComboBox?: typeof ComboBox;
31
- ImageFileInput?: typeof ImageFileInput;
32
- };
33
- }
34
- }
@@ -1,30 +0,0 @@
1
- import { ComboBox } from './comboBox';
2
- import { DatePicker } from './datePicker';
3
- import { FeaturedIcon } from './featuredIcon';
4
- import { FileInput } from './fileInput';
5
- import { ImageFileInput } from './imageFileInput';
6
- import { Modal } from './modal';
7
- import { Notification } from './notification';
8
- import { ProgressBar } from './progress-bar';
9
- import { SelectBox } from './selectBox';
10
- import { Slider } from './slider';
11
- import { Tab } from './tab';
12
- import { Table } from './table';
13
- import { Tag } from './tag';
14
- import { Tooltip } from './tooltip';
15
- window.ncua = {
16
- Slider: Slider,
17
- Tab: Tab,
18
- Table: Table,
19
- Tag: Tag,
20
- DatePicker: DatePicker,
21
- SelectBox: SelectBox,
22
- ComboBox: ComboBox,
23
- FeaturedIcon: FeaturedIcon,
24
- FileInput: FileInput,
25
- Modal: Modal,
26
- Notification: Notification,
27
- ProgressBar: ProgressBar,
28
- Tooltip: Tooltip,
29
- ImageFileInput: ImageFileInput,
30
- };
@@ -1,27 +0,0 @@
1
- import { BaseModalOptions } from './const/types';
2
- import { ModalHeader } from './ModalHeader';
3
- import { ModalContent } from './ModalContent';
4
- import { ModalActions } from './ModalActions';
5
- export declare class Modal {
6
- private element;
7
- private modalElement;
8
- private isOpen;
9
- private options;
10
- constructor(options?: BaseModalOptions);
11
- private createElement;
12
- private getBackdropClasses;
13
- private getModalClasses;
14
- private handleBackdropClick;
15
- private handleKeyDown;
16
- open(): void;
17
- close(): void;
18
- destroy(): void;
19
- setContent(content: string | HTMLElement): void;
20
- getElement(): HTMLDivElement;
21
- getModalElement(): HTMLDivElement;
22
- isModalOpen(): boolean;
23
- static create(options?: BaseModalOptions): Modal;
24
- static Header: typeof ModalHeader;
25
- static Content: typeof ModalContent;
26
- static Actions: typeof ModalActions;
27
- }