@ncds/ui-admin 1.8.0 → 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 (448) hide show
  1. package/dist/cjs/src/components/badge/index.js +11 -0
  2. package/dist/cjs/src/components/combo-box/ComboBox.js +1 -0
  3. package/dist/cjs/src/components/date-picker/index.js +11 -0
  4. package/dist/cjs/src/components/image-file-input/components/index.js +16 -0
  5. package/dist/cjs/src/components/image-file-input/index.js +11 -0
  6. package/dist/cjs/src/components/progress-bar/components/index.js +27 -0
  7. package/dist/cjs/src/components/progress-bar/hooks/index.js +16 -0
  8. package/dist/cjs/src/components/progress-bar/index.js +33 -0
  9. package/dist/cjs/src/components/select/Select.js +0 -1
  10. package/dist/cjs/src/components/select-dropdown/index.js +11 -7
  11. package/dist/cjs/src/components/switch/index.js +11 -7
  12. package/dist/cjs/src/components/table/Table.js +128 -16
  13. package/dist/cjs/src/components/tooltip/Tooltip.js +170 -104
  14. package/dist/cjs/src/hooks/dropdown/index.js +61 -37
  15. package/dist/cjs/src/hooks/index.js +31 -25
  16. package/dist/cjs/vitest.config.js +13 -0
  17. package/dist/esm/src/components/badge/index.js +2 -1
  18. package/dist/esm/src/components/combo-box/ComboBox.js +1 -0
  19. package/dist/esm/src/components/date-picker/index.js +1 -0
  20. package/dist/esm/src/components/empty-state/EmptyState.js +2 -3
  21. package/dist/esm/src/components/image-file-input/components/index.js +1 -0
  22. package/dist/esm/src/components/image-file-input/index.js +2 -1
  23. package/dist/esm/src/components/progress-bar/components/index.js +2 -0
  24. package/dist/esm/src/components/progress-bar/hooks/index.js +1 -0
  25. package/dist/esm/src/components/progress-bar/index.js +4 -1
  26. package/dist/esm/src/components/select/Select.js +0 -1
  27. package/dist/esm/src/components/select-dropdown/index.js +1 -1
  28. package/dist/esm/src/components/switch/index.js +1 -1
  29. package/dist/esm/src/components/table/Table.js +129 -17
  30. package/dist/esm/src/components/tag/Tag.js +2 -3
  31. package/dist/esm/src/components/tooltip/Tooltip.js +172 -106
  32. package/dist/esm/src/hooks/dropdown/index.js +6 -6
  33. package/dist/esm/src/hooks/index.js +3 -3
  34. package/dist/esm/src/types/component-meta.js +2 -0
  35. package/dist/esm/vitest.config.js +7 -0
  36. package/dist/temp/src/components/badge/index.d.ts +1 -0
  37. package/dist/temp/src/components/badge/index.js +1 -0
  38. package/dist/temp/src/components/combo-box/ComboBox.js +1 -0
  39. package/dist/temp/src/components/date-picker/index.d.ts +1 -0
  40. package/dist/temp/src/components/date-picker/index.js +1 -0
  41. package/dist/temp/src/components/empty-state/EmptyState.d.ts +3 -5
  42. package/dist/temp/src/components/empty-state/EmptyState.js +1 -2
  43. package/dist/temp/src/components/image-file-input/components/index.d.ts +1 -0
  44. package/dist/temp/src/components/image-file-input/components/index.js +1 -0
  45. package/dist/temp/src/components/image-file-input/index.d.ts +1 -0
  46. package/dist/temp/src/components/image-file-input/index.js +1 -0
  47. package/dist/temp/src/components/progress-bar/components/index.d.ts +2 -0
  48. package/dist/temp/src/components/progress-bar/components/index.js +2 -0
  49. package/dist/temp/src/components/progress-bar/hooks/index.d.ts +1 -0
  50. package/dist/temp/src/components/progress-bar/hooks/index.js +1 -0
  51. package/dist/temp/src/components/progress-bar/index.d.ts +3 -0
  52. package/dist/temp/src/components/progress-bar/index.js +3 -0
  53. package/dist/temp/src/components/select/Select.js +1 -1
  54. package/dist/temp/src/components/select-dropdown/index.d.ts +1 -1
  55. package/dist/temp/src/components/select-dropdown/index.js +1 -1
  56. package/dist/temp/src/components/spinner/Spinner.d.ts +1 -2
  57. package/dist/temp/src/components/switch/index.d.ts +1 -2
  58. package/dist/temp/src/components/switch/index.js +1 -1
  59. package/dist/temp/src/components/table/Table.d.ts +4 -2
  60. package/dist/temp/src/components/table/Table.js +95 -11
  61. package/dist/temp/src/components/table/types.d.ts +3 -1
  62. package/dist/temp/src/components/tag/Tag.d.ts +3 -5
  63. package/dist/temp/src/components/tag/Tag.js +1 -2
  64. package/dist/temp/src/components/tooltip/Tooltip.d.ts +4 -2
  65. package/dist/temp/src/components/tooltip/Tooltip.js +126 -68
  66. package/dist/temp/src/hooks/dropdown/index.d.ts +6 -6
  67. package/dist/temp/src/hooks/dropdown/index.js +6 -6
  68. package/dist/temp/src/hooks/index.d.ts +3 -3
  69. package/dist/temp/src/hooks/index.js +3 -3
  70. package/dist/temp/src/types/component-meta.d.ts +26 -0
  71. package/dist/temp/src/types/component-meta.js +2 -0
  72. package/dist/temp/src/types/dropdown/option.d.ts +2 -4
  73. package/dist/temp/src/types/side-slot.d.ts +9 -1
  74. package/dist/temp/vitest.config.d.ts +2 -0
  75. package/dist/temp/vitest.config.js +7 -0
  76. package/dist/types/src/components/badge/index.d.ts +1 -0
  77. package/dist/types/src/components/date-picker/index.d.ts +1 -0
  78. package/dist/types/src/components/empty-state/EmptyState.d.ts +3 -5
  79. package/dist/types/src/components/image-file-input/components/index.d.ts +1 -0
  80. package/dist/types/src/components/image-file-input/index.d.ts +1 -0
  81. package/dist/types/src/components/progress-bar/components/index.d.ts +2 -0
  82. package/dist/types/src/components/progress-bar/hooks/index.d.ts +1 -0
  83. package/dist/types/src/components/progress-bar/index.d.ts +3 -0
  84. package/dist/types/src/components/select-dropdown/index.d.ts +1 -1
  85. package/dist/types/src/components/spinner/Spinner.d.ts +1 -2
  86. package/dist/types/src/components/switch/index.d.ts +1 -2
  87. package/dist/types/src/components/table/Table.d.ts +4 -2
  88. package/dist/types/src/components/table/types.d.ts +3 -1
  89. package/dist/types/src/components/tag/Tag.d.ts +3 -5
  90. package/dist/types/src/components/tooltip/Tooltip.d.ts +4 -2
  91. package/dist/types/src/hooks/dropdown/index.d.ts +6 -6
  92. package/dist/types/src/hooks/index.d.ts +3 -3
  93. package/dist/types/src/types/component-meta.d.ts +26 -0
  94. package/dist/types/src/types/dropdown/option.d.ts +2 -4
  95. package/dist/types/src/types/side-slot.d.ts +9 -1
  96. package/dist/types/vitest.config.d.ts +2 -0
  97. package/dist/ui-admin/assets/styles/style.css +178 -60
  98. package/package.json +6 -1
  99. package/dist/cjs/assets/scripts/baseBox.js +0 -146
  100. package/dist/cjs/assets/scripts/comboBox.js +0 -137
  101. package/dist/cjs/assets/scripts/datePicker.js +0 -671
  102. package/dist/cjs/assets/scripts/featuredIcon.js +0 -87
  103. package/dist/cjs/assets/scripts/fileInput/const/classNames.js +0 -25
  104. package/dist/cjs/assets/scripts/fileInput/const/index.js +0 -27
  105. package/dist/cjs/assets/scripts/fileInput/const/types.js +0 -13
  106. package/dist/cjs/assets/scripts/fileInput/fileInput.js +0 -78
  107. package/dist/cjs/assets/scripts/fileInput/fileInputModel.js +0 -53
  108. package/dist/cjs/assets/scripts/fileInput/fileInputView.js +0 -152
  109. package/dist/cjs/assets/scripts/fileInput/index.js +0 -44
  110. package/dist/cjs/assets/scripts/imageFileInput/ImageFileInput.js +0 -184
  111. package/dist/cjs/assets/scripts/imageFileInput/ImageFileInputModel.js +0 -222
  112. package/dist/cjs/assets/scripts/imageFileInput/ImageFileInputView.js +0 -356
  113. package/dist/cjs/assets/scripts/imageFileInput/const/classNames.js +0 -31
  114. package/dist/cjs/assets/scripts/imageFileInput/const/index.js +0 -27
  115. package/dist/cjs/assets/scripts/imageFileInput/const/types.js +0 -13
  116. package/dist/cjs/assets/scripts/imageFileInput/index.js +0 -44
  117. package/dist/cjs/assets/scripts/index.js +0 -32
  118. package/dist/cjs/assets/scripts/modal/Modal.js +0 -104
  119. package/dist/cjs/assets/scripts/modal/ModalActions.js +0 -116
  120. package/dist/cjs/assets/scripts/modal/ModalContent.js +0 -46
  121. package/dist/cjs/assets/scripts/modal/ModalHeader.js +0 -104
  122. package/dist/cjs/assets/scripts/modal/const/classNames.js +0 -33
  123. package/dist/cjs/assets/scripts/modal/const/index.js +0 -27
  124. package/dist/cjs/assets/scripts/modal/index.js +0 -61
  125. package/dist/cjs/assets/scripts/modal/utils/contentUtils.js +0 -35
  126. package/dist/cjs/assets/scripts/notification/FloatingNotification.js +0 -178
  127. package/dist/cjs/assets/scripts/notification/FullWidthNotification.js +0 -132
  128. package/dist/cjs/assets/scripts/notification/MessageNotification.js +0 -159
  129. package/dist/cjs/assets/scripts/notification/Notification.js +0 -101
  130. package/dist/cjs/assets/scripts/notification/const/classNames.js +0 -50
  131. package/dist/cjs/assets/scripts/notification/const/icons.js +0 -31
  132. package/dist/cjs/assets/scripts/notification/const/index.js +0 -87
  133. package/dist/cjs/assets/scripts/notification/const/sizes.js +0 -46
  134. package/dist/cjs/assets/scripts/notification/const/types.js +0 -14
  135. package/dist/cjs/assets/scripts/notification/index.js +0 -92
  136. package/dist/cjs/assets/scripts/notification/utils.js +0 -97
  137. package/dist/cjs/assets/scripts/progress-bar/ProgressBar.js +0 -271
  138. package/dist/cjs/assets/scripts/progress-bar/index.js +0 -12
  139. package/dist/cjs/assets/scripts/selectBox.js +0 -169
  140. package/dist/cjs/assets/scripts/shared/ButtonCloseX.js +0 -45
  141. package/dist/cjs/assets/scripts/tab.js +0 -40
  142. package/dist/cjs/assets/scripts/table/Table.js +0 -377
  143. package/dist/cjs/assets/scripts/table/const/classNames.js +0 -33
  144. package/dist/cjs/assets/scripts/table/const/index.js +0 -27
  145. package/dist/cjs/assets/scripts/table/const/types.js +0 -5
  146. package/dist/cjs/assets/scripts/table/index.js +0 -43
  147. package/dist/cjs/assets/scripts/tag/Tag.js +0 -261
  148. package/dist/cjs/assets/scripts/tag/const/classNames.js +0 -20
  149. package/dist/cjs/assets/scripts/tag/const/index.js +0 -38
  150. package/dist/cjs/assets/scripts/tag/const/sizes.js +0 -13
  151. package/dist/cjs/assets/scripts/tag/const/types.js +0 -5
  152. package/dist/cjs/assets/scripts/tag/index.js +0 -44
  153. package/dist/cjs/assets/scripts/tooltip/Tooltip.js +0 -353
  154. package/dist/cjs/assets/scripts/tooltip/TooltipLayerManager.js +0 -82
  155. package/dist/cjs/assets/scripts/tooltip/const/classNames.js +0 -29
  156. package/dist/cjs/assets/scripts/tooltip/const/constants.js +0 -56
  157. package/dist/cjs/assets/scripts/tooltip/const/icons.js +0 -15
  158. package/dist/cjs/assets/scripts/tooltip/const/index.js +0 -123
  159. package/dist/cjs/assets/scripts/tooltip/const/templates.js +0 -66
  160. package/dist/cjs/assets/scripts/tooltip/const/types.js +0 -5
  161. package/dist/cjs/assets/scripts/tooltip/index.js +0 -57
  162. package/dist/cjs/assets/scripts/tooltip/utils.js +0 -40
  163. package/dist/cjs/assets/scripts/utils/debounce.js +0 -32
  164. package/dist/cjs/assets/scripts/utils/unifiedBox/domRenderer.js +0 -370
  165. package/dist/cjs/assets/scripts/utils/unifiedBox/dropdownModel.js +0 -285
  166. package/dist/cjs/assets/scripts/utils/unifiedBox/unifiedBoxController.js +0 -622
  167. package/dist/cjs/assets/scripts/utils/unifiedBox/unifiedBoxManager.js +0 -473
  168. package/dist/esm/assets/scripts/baseBox.js +0 -139
  169. package/dist/esm/assets/scripts/comboBox.js +0 -130
  170. package/dist/esm/assets/scripts/datePicker.js +0 -663
  171. package/dist/esm/assets/scripts/featuredIcon.js +0 -80
  172. package/dist/esm/assets/scripts/fileInput/const/classNames.js +0 -16
  173. package/dist/esm/assets/scripts/fileInput/const/index.js +0 -2
  174. package/dist/esm/assets/scripts/fileInput/const/types.js +0 -7
  175. package/dist/esm/assets/scripts/fileInput/fileInput.js +0 -71
  176. package/dist/esm/assets/scripts/fileInput/fileInputModel.js +0 -46
  177. package/dist/esm/assets/scripts/fileInput/fileInputView.js +0 -145
  178. package/dist/esm/assets/scripts/fileInput/index.js +0 -9
  179. package/dist/esm/assets/scripts/imageFileInput/ImageFileInput.js +0 -177
  180. package/dist/esm/assets/scripts/imageFileInput/ImageFileInputModel.js +0 -215
  181. package/dist/esm/assets/scripts/imageFileInput/ImageFileInputView.js +0 -349
  182. package/dist/esm/assets/scripts/imageFileInput/const/classNames.js +0 -20
  183. package/dist/esm/assets/scripts/imageFileInput/const/index.js +0 -2
  184. package/dist/esm/assets/scripts/imageFileInput/const/types.js +0 -7
  185. package/dist/esm/assets/scripts/imageFileInput/index.js +0 -9
  186. package/dist/esm/assets/scripts/index.js +0 -30
  187. package/dist/esm/assets/scripts/modal/Modal.js +0 -98
  188. package/dist/esm/assets/scripts/modal/ModalActions.js +0 -109
  189. package/dist/esm/assets/scripts/modal/ModalContent.js +0 -39
  190. package/dist/esm/assets/scripts/modal/ModalHeader.js +0 -97
  191. package/dist/esm/assets/scripts/modal/const/classNames.js +0 -23
  192. package/dist/esm/assets/scripts/modal/const/index.js +0 -2
  193. package/dist/esm/assets/scripts/modal/const/types.js +0 -1
  194. package/dist/esm/assets/scripts/modal/index.js +0 -15
  195. package/dist/esm/assets/scripts/modal/utils/contentUtils.js +0 -28
  196. package/dist/esm/assets/scripts/notification/FloatingNotification.js +0 -172
  197. package/dist/esm/assets/scripts/notification/FullWidthNotification.js +0 -125
  198. package/dist/esm/assets/scripts/notification/MessageNotification.js +0 -152
  199. package/dist/esm/assets/scripts/notification/Notification.js +0 -94
  200. package/dist/esm/assets/scripts/notification/const/classNames.js +0 -44
  201. package/dist/esm/assets/scripts/notification/const/icons.js +0 -25
  202. package/dist/esm/assets/scripts/notification/const/index.js +0 -4
  203. package/dist/esm/assets/scripts/notification/const/sizes.js +0 -40
  204. package/dist/esm/assets/scripts/notification/const/types.js +0 -8
  205. package/dist/esm/assets/scripts/notification/index.js +0 -11
  206. package/dist/esm/assets/scripts/notification/utils.js +0 -84
  207. package/dist/esm/assets/scripts/progress-bar/ProgressBar.js +0 -264
  208. package/dist/esm/assets/scripts/progress-bar/index.js +0 -1
  209. package/dist/esm/assets/scripts/selectBox.js +0 -162
  210. package/dist/esm/assets/scripts/shared/ButtonCloseX.js +0 -37
  211. package/dist/esm/assets/scripts/tab.js +0 -33
  212. package/dist/esm/assets/scripts/table/Table.js +0 -370
  213. package/dist/esm/assets/scripts/table/const/classNames.js +0 -27
  214. package/dist/esm/assets/scripts/table/const/index.js +0 -2
  215. package/dist/esm/assets/scripts/table/const/types.js +0 -1
  216. package/dist/esm/assets/scripts/table/index.js +0 -8
  217. package/dist/esm/assets/scripts/tag/Tag.js +0 -254
  218. package/dist/esm/assets/scripts/tag/const/classNames.js +0 -12
  219. package/dist/esm/assets/scripts/tag/const/index.js +0 -3
  220. package/dist/esm/assets/scripts/tag/const/sizes.js +0 -7
  221. package/dist/esm/assets/scripts/tag/const/types.js +0 -1
  222. package/dist/esm/assets/scripts/tag/index.js +0 -9
  223. package/dist/esm/assets/scripts/tooltip/Tooltip.js +0 -346
  224. package/dist/esm/assets/scripts/tooltip/TooltipLayerManager.js +0 -75
  225. package/dist/esm/assets/scripts/tooltip/const/classNames.js +0 -23
  226. package/dist/esm/assets/scripts/tooltip/const/constants.js +0 -50
  227. package/dist/esm/assets/scripts/tooltip/const/icons.js +0 -9
  228. package/dist/esm/assets/scripts/tooltip/const/index.js +0 -4
  229. package/dist/esm/assets/scripts/tooltip/const/templates.js +0 -59
  230. package/dist/esm/assets/scripts/tooltip/const/types.js +0 -1
  231. package/dist/esm/assets/scripts/tooltip/index.js +0 -10
  232. package/dist/esm/assets/scripts/tooltip/utils.js +0 -34
  233. package/dist/esm/assets/scripts/utils/debounce.js +0 -26
  234. package/dist/esm/assets/scripts/utils/unifiedBox/domRenderer.js +0 -363
  235. package/dist/esm/assets/scripts/utils/unifiedBox/dropdownModel.js +0 -279
  236. package/dist/esm/assets/scripts/utils/unifiedBox/unifiedBoxController.js +0 -615
  237. package/dist/esm/assets/scripts/utils/unifiedBox/unifiedBoxManager.js +0 -466
  238. package/dist/temp/assets/scripts/baseBox.d.ts +0 -55
  239. package/dist/temp/assets/scripts/baseBox.js +0 -140
  240. package/dist/temp/assets/scripts/comboBox.d.ts +0 -60
  241. package/dist/temp/assets/scripts/comboBox.js +0 -132
  242. package/dist/temp/assets/scripts/datePicker.d.ts +0 -86
  243. package/dist/temp/assets/scripts/datePicker.js +0 -699
  244. package/dist/temp/assets/scripts/featuredIcon.d.ts +0 -22
  245. package/dist/temp/assets/scripts/featuredIcon.js +0 -79
  246. package/dist/temp/assets/scripts/fileInput/const/classNames.d.ts +0 -15
  247. package/dist/temp/assets/scripts/fileInput/const/classNames.js +0 -16
  248. package/dist/temp/assets/scripts/fileInput/const/index.d.ts +0 -2
  249. package/dist/temp/assets/scripts/fileInput/const/index.js +0 -2
  250. package/dist/temp/assets/scripts/fileInput/const/types.d.ts +0 -88
  251. package/dist/temp/assets/scripts/fileInput/const/types.js +0 -7
  252. package/dist/temp/assets/scripts/fileInput/fileInput.d.ts +0 -13
  253. package/dist/temp/assets/scripts/fileInput/fileInput.js +0 -71
  254. package/dist/temp/assets/scripts/fileInput/fileInputModel.d.ts +0 -12
  255. package/dist/temp/assets/scripts/fileInput/fileInputModel.js +0 -37
  256. package/dist/temp/assets/scripts/fileInput/fileInputView.d.ts +0 -42
  257. package/dist/temp/assets/scripts/fileInput/fileInputView.js +0 -145
  258. package/dist/temp/assets/scripts/fileInput/index.d.ts +0 -3
  259. package/dist/temp/assets/scripts/fileInput/index.js +0 -9
  260. package/dist/temp/assets/scripts/imageFileInput/ImageFileInput.d.ts +0 -63
  261. package/dist/temp/assets/scripts/imageFileInput/ImageFileInput.js +0 -180
  262. package/dist/temp/assets/scripts/imageFileInput/ImageFileInputModel.d.ts +0 -73
  263. package/dist/temp/assets/scripts/imageFileInput/ImageFileInputModel.js +0 -214
  264. package/dist/temp/assets/scripts/imageFileInput/ImageFileInputView.d.ts +0 -79
  265. package/dist/temp/assets/scripts/imageFileInput/ImageFileInputView.js +0 -350
  266. package/dist/temp/assets/scripts/imageFileInput/const/classNames.d.ts +0 -19
  267. package/dist/temp/assets/scripts/imageFileInput/const/classNames.js +0 -20
  268. package/dist/temp/assets/scripts/imageFileInput/const/index.d.ts +0 -2
  269. package/dist/temp/assets/scripts/imageFileInput/const/index.js +0 -2
  270. package/dist/temp/assets/scripts/imageFileInput/const/types.d.ts +0 -125
  271. package/dist/temp/assets/scripts/imageFileInput/const/types.js +0 -7
  272. package/dist/temp/assets/scripts/imageFileInput/index.d.ts +0 -3
  273. package/dist/temp/assets/scripts/imageFileInput/index.js +0 -9
  274. package/dist/temp/assets/scripts/index.d.ts +0 -34
  275. package/dist/temp/assets/scripts/index.js +0 -30
  276. package/dist/temp/assets/scripts/modal/Modal.d.ts +0 -27
  277. package/dist/temp/assets/scripts/modal/Modal.js +0 -100
  278. package/dist/temp/assets/scripts/modal/ModalActions.d.ts +0 -18
  279. package/dist/temp/assets/scripts/modal/ModalActions.js +0 -117
  280. package/dist/temp/assets/scripts/modal/ModalContent.d.ts +0 -13
  281. package/dist/temp/assets/scripts/modal/ModalContent.js +0 -39
  282. package/dist/temp/assets/scripts/modal/ModalHeader.d.ts +0 -15
  283. package/dist/temp/assets/scripts/modal/ModalHeader.js +0 -96
  284. package/dist/temp/assets/scripts/modal/const/classNames.d.ts +0 -22
  285. package/dist/temp/assets/scripts/modal/const/classNames.js +0 -23
  286. package/dist/temp/assets/scripts/modal/const/index.d.ts +0 -2
  287. package/dist/temp/assets/scripts/modal/const/index.js +0 -2
  288. package/dist/temp/assets/scripts/modal/const/types.d.ts +0 -61
  289. package/dist/temp/assets/scripts/modal/const/types.js +0 -1
  290. package/dist/temp/assets/scripts/modal/index.d.ts +0 -7
  291. package/dist/temp/assets/scripts/modal/index.js +0 -15
  292. package/dist/temp/assets/scripts/modal/utils/contentUtils.d.ts +0 -10
  293. package/dist/temp/assets/scripts/modal/utils/contentUtils.js +0 -29
  294. package/dist/temp/assets/scripts/notification/FloatingNotification.d.ts +0 -24
  295. package/dist/temp/assets/scripts/notification/FloatingNotification.js +0 -157
  296. package/dist/temp/assets/scripts/notification/FullWidthNotification.d.ts +0 -21
  297. package/dist/temp/assets/scripts/notification/FullWidthNotification.js +0 -110
  298. package/dist/temp/assets/scripts/notification/MessageNotification.d.ts +0 -22
  299. package/dist/temp/assets/scripts/notification/MessageNotification.js +0 -140
  300. package/dist/temp/assets/scripts/notification/Notification.d.ts +0 -21
  301. package/dist/temp/assets/scripts/notification/Notification.js +0 -94
  302. package/dist/temp/assets/scripts/notification/const/classNames.d.ts +0 -43
  303. package/dist/temp/assets/scripts/notification/const/classNames.js +0 -44
  304. package/dist/temp/assets/scripts/notification/const/icons.d.ts +0 -25
  305. package/dist/temp/assets/scripts/notification/const/icons.js +0 -25
  306. package/dist/temp/assets/scripts/notification/const/index.d.ts +0 -5
  307. package/dist/temp/assets/scripts/notification/const/index.js +0 -4
  308. package/dist/temp/assets/scripts/notification/const/sizes.d.ts +0 -32
  309. package/dist/temp/assets/scripts/notification/const/sizes.js +0 -40
  310. package/dist/temp/assets/scripts/notification/const/types.d.ts +0 -19
  311. package/dist/temp/assets/scripts/notification/const/types.js +0 -8
  312. package/dist/temp/assets/scripts/notification/index.d.ts +0 -7
  313. package/dist/temp/assets/scripts/notification/index.js +0 -11
  314. package/dist/temp/assets/scripts/notification/utils.d.ts +0 -8
  315. package/dist/temp/assets/scripts/notification/utils.js +0 -89
  316. package/dist/temp/assets/scripts/progress-bar/ProgressBar.d.ts +0 -67
  317. package/dist/temp/assets/scripts/progress-bar/ProgressBar.js +0 -263
  318. package/dist/temp/assets/scripts/progress-bar/index.d.ts +0 -1
  319. package/dist/temp/assets/scripts/progress-bar/index.js +0 -1
  320. package/dist/temp/assets/scripts/selectBox.d.ts +0 -50
  321. package/dist/temp/assets/scripts/selectBox.js +0 -170
  322. package/dist/temp/assets/scripts/shared/ButtonCloseX.d.ts +0 -5
  323. package/dist/temp/assets/scripts/shared/ButtonCloseX.js +0 -33
  324. package/dist/temp/assets/scripts/tab.d.ts +0 -7
  325. package/dist/temp/assets/scripts/tab.js +0 -33
  326. package/dist/temp/assets/scripts/table/Table.d.ts +0 -41
  327. package/dist/temp/assets/scripts/table/Table.js +0 -378
  328. package/dist/temp/assets/scripts/table/const/classNames.d.ts +0 -27
  329. package/dist/temp/assets/scripts/table/const/classNames.js +0 -27
  330. package/dist/temp/assets/scripts/table/const/index.d.ts +0 -2
  331. package/dist/temp/assets/scripts/table/const/index.js +0 -2
  332. package/dist/temp/assets/scripts/table/const/types.d.ts +0 -23
  333. package/dist/temp/assets/scripts/table/const/types.js +0 -1
  334. package/dist/temp/assets/scripts/table/index.d.ts +0 -3
  335. package/dist/temp/assets/scripts/table/index.js +0 -8
  336. package/dist/temp/assets/scripts/tag/Tag.d.ts +0 -27
  337. package/dist/temp/assets/scripts/tag/Tag.js +0 -259
  338. package/dist/temp/assets/scripts/tag/const/classNames.d.ts +0 -11
  339. package/dist/temp/assets/scripts/tag/const/classNames.js +0 -12
  340. package/dist/temp/assets/scripts/tag/const/index.d.ts +0 -3
  341. package/dist/temp/assets/scripts/tag/const/index.js +0 -3
  342. package/dist/temp/assets/scripts/tag/const/sizes.d.ts +0 -7
  343. package/dist/temp/assets/scripts/tag/const/sizes.js +0 -7
  344. package/dist/temp/assets/scripts/tag/const/types.d.ts +0 -33
  345. package/dist/temp/assets/scripts/tag/const/types.js +0 -1
  346. package/dist/temp/assets/scripts/tag/index.d.ts +0 -3
  347. package/dist/temp/assets/scripts/tag/index.js +0 -9
  348. package/dist/temp/assets/scripts/tooltip/Tooltip.d.ts +0 -54
  349. package/dist/temp/assets/scripts/tooltip/Tooltip.js +0 -335
  350. package/dist/temp/assets/scripts/tooltip/TooltipLayerManager.d.ts +0 -21
  351. package/dist/temp/assets/scripts/tooltip/TooltipLayerManager.js +0 -71
  352. package/dist/temp/assets/scripts/tooltip/const/classNames.d.ts +0 -17
  353. package/dist/temp/assets/scripts/tooltip/const/classNames.js +0 -23
  354. package/dist/temp/assets/scripts/tooltip/const/constants.d.ts +0 -33
  355. package/dist/temp/assets/scripts/tooltip/const/constants.js +0 -46
  356. package/dist/temp/assets/scripts/tooltip/const/icons.d.ts +0 -4
  357. package/dist/temp/assets/scripts/tooltip/const/icons.js +0 -9
  358. package/dist/temp/assets/scripts/tooltip/const/index.d.ts +0 -5
  359. package/dist/temp/assets/scripts/tooltip/const/index.js +0 -4
  360. package/dist/temp/assets/scripts/tooltip/const/templates.d.ts +0 -16
  361. package/dist/temp/assets/scripts/tooltip/const/templates.js +0 -59
  362. package/dist/temp/assets/scripts/tooltip/const/types.d.ts +0 -14
  363. package/dist/temp/assets/scripts/tooltip/const/types.js +0 -1
  364. package/dist/temp/assets/scripts/tooltip/index.d.ts +0 -6
  365. package/dist/temp/assets/scripts/tooltip/index.js +0 -10
  366. package/dist/temp/assets/scripts/tooltip/utils.d.ts +0 -2
  367. package/dist/temp/assets/scripts/tooltip/utils.js +0 -33
  368. package/dist/temp/assets/scripts/utils/debounce.d.ts +0 -8
  369. package/dist/temp/assets/scripts/utils/debounce.js +0 -23
  370. package/dist/temp/assets/scripts/utils/unifiedBox/domRenderer.d.ts +0 -107
  371. package/dist/temp/assets/scripts/utils/unifiedBox/domRenderer.js +0 -367
  372. package/dist/temp/assets/scripts/utils/unifiedBox/dropdownModel.d.ts +0 -142
  373. package/dist/temp/assets/scripts/utils/unifiedBox/dropdownModel.js +0 -286
  374. package/dist/temp/assets/scripts/utils/unifiedBox/unifiedBoxController.d.ts +0 -156
  375. package/dist/temp/assets/scripts/utils/unifiedBox/unifiedBoxController.js +0 -604
  376. package/dist/temp/assets/scripts/utils/unifiedBox/unifiedBoxManager.d.ts +0 -95
  377. package/dist/temp/assets/scripts/utils/unifiedBox/unifiedBoxManager.js +0 -482
  378. package/dist/types/assets/scripts/baseBox.d.ts +0 -55
  379. package/dist/types/assets/scripts/comboBox.d.ts +0 -60
  380. package/dist/types/assets/scripts/datePicker.d.ts +0 -86
  381. package/dist/types/assets/scripts/featuredIcon.d.ts +0 -22
  382. package/dist/types/assets/scripts/fileInput/const/classNames.d.ts +0 -15
  383. package/dist/types/assets/scripts/fileInput/const/index.d.ts +0 -2
  384. package/dist/types/assets/scripts/fileInput/const/types.d.ts +0 -88
  385. package/dist/types/assets/scripts/fileInput/fileInput.d.ts +0 -13
  386. package/dist/types/assets/scripts/fileInput/fileInputModel.d.ts +0 -12
  387. package/dist/types/assets/scripts/fileInput/fileInputView.d.ts +0 -42
  388. package/dist/types/assets/scripts/fileInput/index.d.ts +0 -3
  389. package/dist/types/assets/scripts/imageFileInput/ImageFileInput.d.ts +0 -63
  390. package/dist/types/assets/scripts/imageFileInput/ImageFileInputModel.d.ts +0 -73
  391. package/dist/types/assets/scripts/imageFileInput/ImageFileInputView.d.ts +0 -79
  392. package/dist/types/assets/scripts/imageFileInput/const/classNames.d.ts +0 -19
  393. package/dist/types/assets/scripts/imageFileInput/const/index.d.ts +0 -2
  394. package/dist/types/assets/scripts/imageFileInput/const/types.d.ts +0 -125
  395. package/dist/types/assets/scripts/imageFileInput/index.d.ts +0 -3
  396. package/dist/types/assets/scripts/index.d.ts +0 -34
  397. package/dist/types/assets/scripts/modal/Modal.d.ts +0 -27
  398. package/dist/types/assets/scripts/modal/ModalActions.d.ts +0 -18
  399. package/dist/types/assets/scripts/modal/ModalContent.d.ts +0 -13
  400. package/dist/types/assets/scripts/modal/ModalHeader.d.ts +0 -15
  401. package/dist/types/assets/scripts/modal/const/classNames.d.ts +0 -22
  402. package/dist/types/assets/scripts/modal/const/index.d.ts +0 -2
  403. package/dist/types/assets/scripts/modal/const/types.d.ts +0 -61
  404. package/dist/types/assets/scripts/modal/index.d.ts +0 -7
  405. package/dist/types/assets/scripts/modal/utils/contentUtils.d.ts +0 -10
  406. package/dist/types/assets/scripts/notification/FloatingNotification.d.ts +0 -24
  407. package/dist/types/assets/scripts/notification/FullWidthNotification.d.ts +0 -21
  408. package/dist/types/assets/scripts/notification/MessageNotification.d.ts +0 -22
  409. package/dist/types/assets/scripts/notification/Notification.d.ts +0 -21
  410. package/dist/types/assets/scripts/notification/const/classNames.d.ts +0 -43
  411. package/dist/types/assets/scripts/notification/const/icons.d.ts +0 -25
  412. package/dist/types/assets/scripts/notification/const/index.d.ts +0 -5
  413. package/dist/types/assets/scripts/notification/const/sizes.d.ts +0 -32
  414. package/dist/types/assets/scripts/notification/const/types.d.ts +0 -19
  415. package/dist/types/assets/scripts/notification/index.d.ts +0 -7
  416. package/dist/types/assets/scripts/notification/utils.d.ts +0 -8
  417. package/dist/types/assets/scripts/progress-bar/ProgressBar.d.ts +0 -67
  418. package/dist/types/assets/scripts/progress-bar/index.d.ts +0 -1
  419. package/dist/types/assets/scripts/selectBox.d.ts +0 -50
  420. package/dist/types/assets/scripts/shared/ButtonCloseX.d.ts +0 -5
  421. package/dist/types/assets/scripts/tab.d.ts +0 -7
  422. package/dist/types/assets/scripts/table/Table.d.ts +0 -41
  423. package/dist/types/assets/scripts/table/const/classNames.d.ts +0 -27
  424. package/dist/types/assets/scripts/table/const/index.d.ts +0 -2
  425. package/dist/types/assets/scripts/table/const/types.d.ts +0 -23
  426. package/dist/types/assets/scripts/table/index.d.ts +0 -3
  427. package/dist/types/assets/scripts/tag/Tag.d.ts +0 -27
  428. package/dist/types/assets/scripts/tag/const/classNames.d.ts +0 -11
  429. package/dist/types/assets/scripts/tag/const/index.d.ts +0 -3
  430. package/dist/types/assets/scripts/tag/const/sizes.d.ts +0 -7
  431. package/dist/types/assets/scripts/tag/const/types.d.ts +0 -33
  432. package/dist/types/assets/scripts/tag/index.d.ts +0 -3
  433. package/dist/types/assets/scripts/tooltip/Tooltip.d.ts +0 -54
  434. package/dist/types/assets/scripts/tooltip/TooltipLayerManager.d.ts +0 -21
  435. package/dist/types/assets/scripts/tooltip/const/classNames.d.ts +0 -17
  436. package/dist/types/assets/scripts/tooltip/const/constants.d.ts +0 -33
  437. package/dist/types/assets/scripts/tooltip/const/icons.d.ts +0 -4
  438. package/dist/types/assets/scripts/tooltip/const/index.d.ts +0 -5
  439. package/dist/types/assets/scripts/tooltip/const/templates.d.ts +0 -16
  440. package/dist/types/assets/scripts/tooltip/const/types.d.ts +0 -14
  441. package/dist/types/assets/scripts/tooltip/index.d.ts +0 -6
  442. package/dist/types/assets/scripts/tooltip/utils.d.ts +0 -2
  443. package/dist/types/assets/scripts/utils/debounce.d.ts +0 -8
  444. package/dist/types/assets/scripts/utils/unifiedBox/domRenderer.d.ts +0 -107
  445. package/dist/types/assets/scripts/utils/unifiedBox/dropdownModel.d.ts +0 -142
  446. package/dist/types/assets/scripts/utils/unifiedBox/unifiedBoxController.d.ts +0 -156
  447. package/dist/types/assets/scripts/utils/unifiedBox/unifiedBoxManager.d.ts +0 -95
  448. /package/dist/cjs/{assets/scripts/modal/const/types.js → src/types/component-meta.js} +0 -0
@@ -1,2 +1,5 @@
1
1
  export * from './ProgressBar';
2
+ export * from './components';
3
+ export * from './hooks';
2
4
  export * from './types';
5
+ export * from './utils';
@@ -1,2 +1,5 @@
1
1
  export * from './ProgressBar';
2
+ export * from './components';
3
+ export * from './hooks';
2
4
  export * from './types';
5
+ export * from './utils';
@@ -6,5 +6,5 @@ export const Select = forwardRef(({ placeholder, disabledPlaceholder = false, id
6
6
  return (_jsxs("span", { className: classNames('ncua-select', {
7
7
  destructive: destructive,
8
8
  'ncua-select--simple': type === 'simple',
9
- }, className, `ncua-select--${size}`), children: [_jsx("span", { className: "ncua-select__content", children: _jsxs("select", { value: value, ref: ref, id: id, className: classNames('ncua-select__tag', className), disabled: disabled, ...register, ...props, children: [placeholder && (_jsx("option", { value: "", selected: true, disabled: disabledPlaceholder, children: placeholder })), optionItems?.map((item) => (_jsx("option", { value: item.id, children: item.label }, item.id))), children] }) }), hintText && (_jsx(HintText, { destructive: destructive, className: "ncua-hint-text", children: hintText }))] }));
9
+ }, className, `ncua-select--${size}`), children: [_jsx("span", { className: "ncua-select__content", children: _jsxs("select", { value: value, ref: ref, id: id, className: classNames('ncua-select__tag', className), disabled: disabled, ...register, ...props, children: [placeholder && (_jsx("option", { value: "", disabled: disabledPlaceholder, children: placeholder })), optionItems?.map((item) => (_jsx("option", { value: item.id, children: item.label }, item.id))), children] }) }), hintText && (_jsx(HintText, { destructive: destructive, className: "ncua-hint-text", children: hintText }))] }));
10
10
  });
@@ -1 +1 @@
1
- export { type DropdownDirection, SelectDropdown, type SelectDropdownProps } from './SelectDropdown';
1
+ export * from './SelectDropdown';
@@ -1 +1 @@
1
- export { SelectDropdown } from './SelectDropdown';
1
+ export * from './SelectDropdown';
@@ -1,9 +1,8 @@
1
1
  import type { ElementType, ReactNode } from 'react';
2
- interface SpinnerProps {
2
+ export interface SpinnerProps {
3
3
  as?: ElementType;
4
4
  size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
5
5
  children?: ReactNode;
6
6
  backdrop?: boolean;
7
7
  }
8
8
  export declare const Spinner: ({ as, size, children, backdrop }: SpinnerProps) => import("react/jsx-runtime").JSX.Element;
9
- export {};
@@ -1,2 +1 @@
1
- export type { SwitchProps } from './Switch';
2
- export { Switch } from './Switch';
1
+ export * from './Switch';
@@ -1 +1 @@
1
- export { Switch } from './Switch';
1
+ export * from './Switch';
@@ -1,5 +1,5 @@
1
1
  import { type ReactNode } from 'react';
2
- import type { SortDirection, TableBodyProps, TableCellProps, TableColGroupProps, TableEmptyProps, TableFooterProps, TableHeaderProps, TablePaginationProps } from './types';
2
+ import type { SortDirection, TableBodyProps, TableColGroupProps, TableEmptyProps, TableFooterProps, TableHeaderProps, TablePaginationProps } from './types';
3
3
  export declare const Table: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
4
4
  type?: import("./types").TableType | undefined;
5
5
  fixedHeader?: boolean | undefined;
@@ -25,7 +25,9 @@ export declare const Table: import("react").ForwardRefExoticComponent<Omit<impor
25
25
  onSort?: (() => void) | undefined;
26
26
  width?: string | number | undefined;
27
27
  } & import("react").RefAttributes<HTMLTableCellElement>>;
28
- Cell: import("react").ForwardRefExoticComponent<TableCellProps & import("react").RefAttributes<HTMLTableCellElement>>;
28
+ Cell: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, "ref"> & {
29
+ isHeader?: boolean | undefined;
30
+ } & import("react").RefAttributes<HTMLTableCellElement>>;
29
31
  Footer: {
30
32
  ({ children, className }: TableFooterProps): import("react/jsx-runtime").JSX.Element;
31
33
  displayName: string;
@@ -1,8 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { ChevronDown, ChevronSelectorVertical, ChevronUp } from '@ncds/ui-admin-icon';
3
3
  import classNames from 'classnames';
4
- import { Children, forwardRef } from 'react';
4
+ import { Children, forwardRef, useEffect, useRef, } from 'react';
5
5
  // ──────────────────────────────────────────────
6
+ // $table-header-height 와 동기화 — sticky thead가 차지하는 높이를 maxHeight에 보상
7
+ const TABLE_HEADER_HEIGHT = 40;
8
+ // 스크롤바 트랙 상하 여백 합계 (top 8px + bottom 8px) — SCSS &--fixed-header &__scrollbar 오프셋과 동기화
9
+ const SCROLLBAR_TRACK_OFFSET = 16;
10
+ const SCROLLBAR_THUMB_MIN_HEIGHT = 40;
6
11
  // Sort Icons (@ncds/ui-admin-icon)
7
12
  // ──────────────────────────────────────────────
8
13
  const SORT_ICONS = {
@@ -36,7 +41,12 @@ const HeaderCell = forwardRef(({ children, className, sortDirection, onSort, wid
36
41
  }), style: { ...style, width }, "aria-sort": isSortable ? ARIA_SORT_MAP[sortDirection] : undefined, onClick: isSortable ? onSort : undefined, ...rest, children: isSortable && SortIcon ? (_jsxs("span", { className: "ncua-table__header-cell-inner", children: [_jsx("span", { className: "ncua-table__header-cell-text", children: children }), _jsx("span", { className: "ncua-table__sort-icon", children: _jsx(SortIcon, { width: 16, height: 16 }) })] })) : (children) }));
37
42
  });
38
43
  HeaderCell.displayName = 'Table.HeaderCell';
39
- const Cell = forwardRef(({ children, className, ...rest }, ref) => (_jsx("td", { ref: ref, className: classNames('ncua-table__cell', className), ...rest, children: children })));
44
+ const Cell = forwardRef(({ children, className, isHeader, ...rest }, ref) => {
45
+ if (isHeader) {
46
+ return (_jsx("th", { ref: ref, scope: "row", className: classNames('ncua-table__cell', className), ...rest, children: children }));
47
+ }
48
+ return (_jsx("td", { ref: ref, className: classNames('ncua-table__cell', className), ...rest, children: children }));
49
+ });
40
50
  Cell.displayName = 'Table.Cell';
41
51
  const Footer = ({ children, className }) => (_jsx("div", { className: classNames('ncua-table__footer', className), children: children }));
42
52
  Footer.displayName = 'Table.Footer';
@@ -50,10 +60,9 @@ const ColGroup = ({ widths }) => {
50
60
  return `${width}px`;
51
61
  return width;
52
62
  };
53
- return (_jsx("colgroup", { children: widths.map((width, index) => {
54
- const duplicateCount = widths.slice(0, index).filter((v) => v === width).length;
55
- return _jsx("col", { style: { width: resolveColWidth(width) } }, `col-${width}-${duplicateCount}`);
56
- }) }));
63
+ return (_jsx("colgroup", { children: widths.map((width, index) => (
64
+ // biome-ignore lint/suspicious/noArrayIndexKey: colgroup columns never reorder or change
65
+ _jsx("col", { style: { width: resolveColWidth(width) } }, index))) }));
57
66
  };
58
67
  ColGroup.displayName = 'Table.ColGroup';
59
68
  const Empty = ({ colSpan, children }) => (_jsx("tr", { children: _jsx("td", { colSpan: colSpan, className: "ncua-table__empty", role: "status", "aria-live": "polite", children: children || '등록된 게시물이 없습니다.' }) }));
@@ -69,12 +78,24 @@ const categorizeChild = (child, result) => {
69
78
  else if (child.type === Pagination) {
70
79
  result.paginationContent.push(child);
71
80
  }
81
+ else if (child.type === Header) {
82
+ result.headerContent.push(child);
83
+ }
84
+ else if (child.type === ColGroup) {
85
+ result.colGroupContent.push(child);
86
+ }
72
87
  else {
73
88
  result.tableContent.push(child);
74
89
  }
75
90
  };
76
91
  const sortChildren = (children) => {
77
- const result = { tableContent: [], footerContent: [], paginationContent: [] };
92
+ const result = {
93
+ headerContent: [],
94
+ colGroupContent: [],
95
+ tableContent: [],
96
+ footerContent: [],
97
+ paginationContent: [],
98
+ };
78
99
  Children.forEach(children, (child) => {
79
100
  categorizeChild(child, result);
80
101
  });
@@ -91,12 +112,75 @@ const TableComponent = forwardRef(({ type = 'horizontal', fixedHeader = false, m
91
112
  'ncua-table--hoverable': hoverable && type === 'horizontal',
92
113
  'ncua-table--selectable': selectable,
93
114
  });
94
- const { tableContent, footerContent, paginationContent } = sortChildren(children);
115
+ const { headerContent, colGroupContent, tableContent, footerContent, paginationContent } = sortChildren(children);
95
116
  const scrollStyle = fixedHeader && maxHeight
96
- ? { maxHeight: typeof maxHeight === 'number' ? `${maxHeight}px` : maxHeight }
117
+ ? {
118
+ maxHeight: typeof maxHeight === 'number'
119
+ ? `${maxHeight + TABLE_HEADER_HEIGHT}px`
120
+ : `calc(${maxHeight} + ${TABLE_HEADER_HEIGHT}px)`,
121
+ }
97
122
  : undefined;
98
- const tableElement = (_jsx("table", { className: "ncua-table__table", role: "table", children: tableContent }));
99
- return (_jsxs("div", { ref: ref, className: "ncua-table-wrapper", children: [_jsxs("div", { className: tableClasses, ...rest, children: [fixedHeader && maxHeight ? (_jsx("div", { className: "ncua-table__scroll-container", style: scrollStyle, children: tableElement })) : (tableElement), footerContent] }), paginationContent] }));
123
+ // Custom scrollbar refs (used only in fixed-header mode)
124
+ const scrollContainerRef = useRef(null);
125
+ const scrollAreaRef = useRef(null);
126
+ const thumbRef = useRef(null);
127
+ useEffect(() => {
128
+ if (!fixedHeader || !maxHeight)
129
+ return;
130
+ const scrollEl = scrollContainerRef.current;
131
+ const thumbEl = thumbRef.current;
132
+ if (!scrollEl || !thumbEl)
133
+ return;
134
+ const update = () => {
135
+ const { scrollTop, scrollHeight, clientHeight } = scrollEl;
136
+ if (scrollHeight <= clientHeight) {
137
+ thumbEl.style.height = '0';
138
+ return;
139
+ }
140
+ const trackHeight = (scrollAreaRef.current?.clientHeight ?? clientHeight) - TABLE_HEADER_HEIGHT - SCROLLBAR_TRACK_OFFSET;
141
+ const thumbHeight = Math.max(SCROLLBAR_THUMB_MIN_HEIGHT, (clientHeight / scrollHeight) * trackHeight);
142
+ const thumbTop = (scrollTop / (scrollHeight - clientHeight)) * (trackHeight - thumbHeight);
143
+ thumbEl.style.height = `${thumbHeight}px`;
144
+ thumbEl.style.transform = `translateY(${thumbTop}px)`;
145
+ };
146
+ scrollEl.addEventListener('scroll', update, { passive: true });
147
+ const observer = new ResizeObserver(update);
148
+ observer.observe(scrollEl);
149
+ update();
150
+ return () => {
151
+ scrollEl.removeEventListener('scroll', update);
152
+ observer.disconnect();
153
+ };
154
+ }, [fixedHeader, maxHeight]);
155
+ const handleThumbMouseDown = (e) => {
156
+ e.preventDefault();
157
+ const scrollEl = scrollContainerRef.current;
158
+ const thumbEl = thumbRef.current;
159
+ const areaEl = scrollAreaRef.current;
160
+ if (!scrollEl || !thumbEl)
161
+ return;
162
+ areaEl?.setAttribute('data-dragging', '');
163
+ const startY = e.clientY;
164
+ const startScrollTop = scrollEl.scrollTop;
165
+ const { scrollHeight, clientHeight } = scrollEl;
166
+ const thumbHeight = thumbEl.offsetHeight;
167
+ const scrollRatio = (scrollHeight - clientHeight) / (clientHeight - thumbHeight);
168
+ const onMove = (ev) => {
169
+ scrollEl.scrollTop = startScrollTop + (ev.clientY - startY) * scrollRatio;
170
+ };
171
+ const onUp = () => {
172
+ areaEl?.removeAttribute('data-dragging');
173
+ document.removeEventListener('mousemove', onMove);
174
+ document.removeEventListener('mouseup', onUp);
175
+ };
176
+ document.addEventListener('mousemove', onMove);
177
+ document.addEventListener('mouseup', onUp);
178
+ };
179
+ if (fixedHeader && maxHeight) {
180
+ return (_jsxs("div", { ref: ref, className: "ncua-table-wrapper", children: [_jsxs("div", { className: tableClasses, ...rest, children: [_jsxs("div", { ref: scrollAreaRef, className: "ncua-table__scroll-area", children: [_jsx("div", { ref: scrollContainerRef, className: "ncua-table__scroll-container", style: scrollStyle, children: _jsxs("table", { className: "ncua-table__table", role: "table", children: [colGroupContent, headerContent, tableContent] }) }), _jsx("div", { className: "ncua-table__scrollbar", "aria-hidden": "true", children: _jsx("div", { ref: thumbRef, className: "ncua-table__scrollbar-thumb", onMouseDown: handleThumbMouseDown }) })] }), footerContent] }), paginationContent] }));
181
+ }
182
+ const tableElement = (_jsxs("table", { className: "ncua-table__table", role: "table", children: [colGroupContent, headerContent, tableContent] }));
183
+ return (_jsxs("div", { ref: ref, className: "ncua-table-wrapper", children: [_jsxs("div", { className: tableClasses, ...rest, children: [tableElement, footerContent] }), paginationContent] }));
100
184
  });
101
185
  TableComponent.displayName = 'Table';
102
186
  // ──────────────────────────────────────────────
@@ -27,7 +27,9 @@ export type TableHeaderCellProps = Omit<ComponentProps<'th'>, 'ref'> & {
27
27
  onSort?: () => void;
28
28
  width?: string | number;
29
29
  };
30
- export type TableCellProps = Omit<ComponentProps<'td'>, 'ref'>;
30
+ export type TableCellProps = Omit<ComponentProps<'td'>, 'ref'> & {
31
+ isHeader?: boolean;
32
+ };
31
33
  export type TableFooterProps = {
32
34
  children: ReactNode;
33
35
  className?: string;
@@ -1,7 +1,7 @@
1
1
  import { type MouseEventHandler } from 'react';
2
2
  import type { Size } from '../../../constant/size';
3
3
  import type { SideSlotType } from '../../types/side-slot';
4
- interface TagProps {
4
+ export interface TagProps {
5
5
  size?: Extract<Size, 'sm' | 'md'>;
6
6
  icon?: SideSlotType;
7
7
  text: string;
@@ -11,7 +11,5 @@ interface TagProps {
11
11
  onButtonClick?: MouseEventHandler<HTMLButtonElement>;
12
12
  maxLength?: number;
13
13
  }
14
- type CalculatedPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
15
- declare const Tag: ({ size, icon, text, count, close, onButtonClick, maxLength }: TagProps) => import("react/jsx-runtime").JSX.Element;
16
- export type { CalculatedPosition };
17
- export { Tag };
14
+ export type CalculatedPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
15
+ export declare const Tag: ({ size, icon, text, count, close, onButtonClick, maxLength }: TagProps) => import("react/jsx-runtime").JSX.Element;
@@ -41,7 +41,7 @@ const calculateOptimalPosition = (triggerElement, tooltipElement) => {
41
41
  const fallbackPosition = hasTopSpace ? 'top-right' : 'bottom-right';
42
42
  return fallbackPosition;
43
43
  };
44
- const Tag = ({ size = 'sm', icon, text, count, close, onButtonClick, maxLength = 20 }) => {
44
+ export const Tag = ({ size = 'sm', icon, text, count, close, onButtonClick, maxLength = 20 }) => {
45
45
  const [isTooltipVisible, setIsTooltipVisible] = useState(false);
46
46
  const [calculatedPosition, setCalculatedPosition] = useState('top-right');
47
47
  const tagRef = useRef(null);
@@ -93,4 +93,3 @@ const Tag = ({ size = 'sm', icon, text, count, close, onButtonClick, maxLength =
93
93
  'ncua-tag--truncated': shouldTruncate,
94
94
  }), onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: [icon && sideSlotRender(icon), _jsx("span", { className: "ncua-tag__text", children: displayText }), count && _jsx("span", { className: "ncua-tag__count", children: count }), close && (_jsx("button", { type: "button", className: "ncua-tag__close", onClick: onButtonClick, children: _jsx(XClose, { color: COLOR.gray300, width: iconSize[size], height: iconSize[size] }) })), shouldTruncate && isTooltipVisible && (_jsx("span", { ref: tooltipRef, className: classNames('ncua-tag__tooltip', `ncua-tag__tooltip--${calculatedPosition}`), children: _jsx("span", { className: "ncua-tag__tooltip-content", children: text }) }))] }));
95
95
  };
96
- export { Tag };
@@ -1,7 +1,8 @@
1
+ type CalculatedPosition = 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
1
2
  interface TooltipProps {
2
3
  tooltipType?: 'white' | 'black';
3
4
  iconType?: 'stroke' | 'fill';
4
- position?: 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'auto';
5
+ position?: CalculatedPosition | 'auto';
5
6
  size?: 'sm' | 'md';
6
7
  hideArrow?: boolean;
7
8
  title?: string;
@@ -10,6 +11,7 @@ interface TooltipProps {
10
11
  className?: string;
11
12
  iconColor?: string;
12
13
  iconStyle?: 'help-circle' | 'alert-circle';
14
+ zIndex?: number;
13
15
  }
14
- export declare const Tooltip: ({ tooltipType, iconType, position, size, title, content, hideArrow, type, iconColor, iconStyle, className, }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const Tooltip: ({ tooltipType, iconType, position, size, title, content, hideArrow, type, iconColor, iconStyle, className, zIndex, }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
15
17
  export {};
@@ -1,82 +1,133 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { AlertCircle, AlertCircleFill, HelpCircle, HelpCircleFill } from '@ncds/ui-admin-icon';
3
3
  import classNames from 'classnames';
4
- import { useCallback, useMemo, useRef, useState } from 'react';
4
+ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
5
+ import { createPortal } from 'react-dom';
5
6
  import { ButtonCloseX } from '../button/ButtonCloseX';
6
7
  const ICON_SIZE_SM = 14;
7
8
  const ICON_SIZE_DEFAULT = 16;
8
- const MARGIN = 10;
9
- const DEFAULT_TOOLTIP_WIDTH = 200;
10
- const DEFAULT_TOOLTIP_HEIGHT = 60;
11
- const POSITION_PRIORITY = ['bottom', 'top', 'right', 'left'];
12
- // 수직 위치(top/bottom)일 때 수평 정렬 보정
13
- const resolveVerticalAlignment = (position, triggerRect, tooltipWidth, viewportWidth) => {
14
- const centerX = triggerRect.left + triggerRect.width / 2;
15
- const tooltipHalfWidth = tooltipWidth / 2;
16
- if (centerX - tooltipHalfWidth < MARGIN) {
17
- return `${position}-left`;
9
+ // HTML 구현체(assets/scripts/tooltip)와 동일한 상수
10
+ const TOOLTIP_OFFSET = 6;
11
+ const VIEWPORT_MARGIN = 8;
12
+ const EDGE_ALIGN_OFFSET = 12;
13
+ const OFFSCREEN = -99999;
14
+ // HTML 구현체(TooltipLayerManager)가 body에 만드는 `#tooltip-global-layer`와 동일 id.
15
+ // 한쪽만 바뀌면 포털이 body로 fallback되며 사일런트 동작 이상이 날 수 있으므로 함께 유지한다.
16
+ const GLOBAL_LAYER_ID = 'tooltip-global-layer';
17
+ // body 하위의 전역 레이어를 찾거나 없으면 body로 fallback
18
+ const resolvePortalTarget = () => {
19
+ if (typeof document === 'undefined')
20
+ return null;
21
+ return document.getElementById(GLOBAL_LAYER_ID) ?? document.body;
22
+ };
23
+ // 앵커 rect와 패널 rect를 기반으로 viewport 고정 좌표 계산
24
+ const computePanelCoords = (prefer, anchor, panel) => {
25
+ let resolved = prefer;
26
+ if (resolved === 'auto') {
27
+ const enoughTop = anchor.top - TOOLTIP_OFFSET - panel.height >= VIEWPORT_MARGIN;
28
+ resolved = enoughTop ? 'top' : 'bottom';
18
29
  }
19
- if (centerX + tooltipHalfWidth > viewportWidth - MARGIN) {
20
- return `${position}-right`;
30
+ let top = 0;
31
+ let left = 0;
32
+ let calculatedPosition = 'bottom';
33
+ if (resolved === 'bottom') {
34
+ top = anchor.bottom + TOOLTIP_OFFSET;
35
+ left = anchor.left + anchor.width / 2 - panel.width / 2;
36
+ calculatedPosition = 'bottom';
21
37
  }
22
- return position;
23
- };
24
- // 해당 위치에 툴팁을 배치할 충분한 공간이 있는지 확인
25
- const hasEnoughSpace = (position, spaces, tooltipWidth, tooltipHeight) => {
26
- const isVertical = position === 'bottom' || position === 'top';
27
- const requiredSpace = isVertical ? tooltipHeight : tooltipWidth;
28
- return spaces[position] >= requiredSpace + MARGIN;
29
- };
30
- // 위치 계산 position='auto' 일 때 사용
31
- const calculateOptimalPosition = (triggerElement, tooltipElement, preferredPosition = 'bottom') => {
32
- const triggerRect = triggerElement.getBoundingClientRect();
33
- const tooltipRect = tooltipElement.getBoundingClientRect();
34
- const { innerWidth: viewportWidth, innerHeight: viewportHeight } = window;
35
- const spaces = {
36
- top: triggerRect.top,
37
- bottom: viewportHeight - triggerRect.bottom,
38
- left: triggerRect.left,
39
- right: viewportWidth - triggerRect.right,
40
- };
41
- const tooltipWidth = tooltipRect.width || DEFAULT_TOOLTIP_WIDTH;
42
- const tooltipHeight = tooltipRect.height || DEFAULT_TOOLTIP_HEIGHT;
43
- for (const position of POSITION_PRIORITY) {
44
- if (!hasEnoughSpace(position, spaces, tooltipWidth, tooltipHeight)) {
45
- continue;
46
- }
47
- const isVertical = position === 'bottom' || position === 'top';
48
- if (isVertical) {
49
- return resolveVerticalAlignment(position, triggerRect, tooltipWidth, viewportWidth);
50
- }
51
- return position;
38
+ else if (resolved === 'top') {
39
+ top = anchor.top - panel.height - TOOLTIP_OFFSET;
40
+ left = anchor.left + anchor.width / 2 - panel.width / 2;
41
+ calculatedPosition = 'top';
42
+ }
43
+ else if (resolved === 'left') {
44
+ top = anchor.top + anchor.height / 2 - panel.height / 2;
45
+ left = anchor.left - panel.width - TOOLTIP_OFFSET;
46
+ calculatedPosition = 'left';
47
+ }
48
+ else if (resolved === 'right') {
49
+ top = anchor.top + anchor.height / 2 - panel.height / 2;
50
+ left = anchor.right + TOOLTIP_OFFSET;
51
+ calculatedPosition = 'right';
52
+ }
53
+ else if (resolved === 'top-left') {
54
+ top = anchor.top - panel.height - TOOLTIP_OFFSET;
55
+ left = anchor.left - EDGE_ALIGN_OFFSET;
56
+ calculatedPosition = 'top-left';
52
57
  }
53
- return preferredPosition;
58
+ else if (resolved === 'top-right') {
59
+ top = anchor.top - panel.height - TOOLTIP_OFFSET;
60
+ left = anchor.right - panel.width + EDGE_ALIGN_OFFSET;
61
+ calculatedPosition = 'top-right';
62
+ }
63
+ else if (resolved === 'bottom-left') {
64
+ top = anchor.bottom + TOOLTIP_OFFSET;
65
+ left = anchor.left - EDGE_ALIGN_OFFSET;
66
+ calculatedPosition = 'bottom-left';
67
+ }
68
+ else if (resolved === 'bottom-right') {
69
+ top = anchor.bottom + TOOLTIP_OFFSET;
70
+ left = anchor.right - panel.width + EDGE_ALIGN_OFFSET;
71
+ calculatedPosition = 'bottom-right';
72
+ }
73
+ left = Math.max(VIEWPORT_MARGIN, Math.min(left, window.innerWidth - panel.width - VIEWPORT_MARGIN));
74
+ top = Math.max(VIEWPORT_MARGIN, Math.min(top, window.innerHeight - panel.height - VIEWPORT_MARGIN));
75
+ return { top: Math.round(top), left: Math.round(left), calculatedPosition };
54
76
  };
55
- export const Tooltip = ({ tooltipType = 'white', iconType = 'stroke', position = 'auto', size = 'sm', title, content, hideArrow = false, type = 'short', iconColor = 'var(--gray-300)', iconStyle = 'help-circle', className, }) => {
77
+ export const Tooltip = ({ tooltipType = 'white', iconType = 'stroke', position = 'auto', size = 'sm', title, content, hideArrow = false, type = 'short', iconColor = 'var(--gray-300)', iconStyle = 'help-circle', className, zIndex, }) => {
56
78
  const iconSize = size === 'sm' ? ICON_SIZE_SM : ICON_SIZE_DEFAULT;
57
- const tooltipRef = useRef(null);
58
- const tooltipBgRef = useRef(null);
79
+ const anchorRef = useRef(null);
80
+ const panelRef = useRef(null);
81
+ const rafIdRef = useRef(null);
82
+ const [mounted, setMounted] = useState(false);
83
+ const [coords, setCoords] = useState({ top: OFFSCREEN, left: OFFSCREEN });
59
84
  const [calculatedPosition, setCalculatedPosition] = useState(position === 'auto' ? 'bottom' : position);
60
85
  const [isVisible, setIsVisible] = useState(false);
61
86
  const [isManuallyClose, setIsManuallyClose] = useState(false);
62
- const [isMeasuring, setIsMeasuring] = useState(false);
87
+ useEffect(() => {
88
+ setMounted(true);
89
+ return () => {
90
+ if (rafIdRef.current !== null) {
91
+ cancelAnimationFrame(rafIdRef.current);
92
+ rafIdRef.current = null;
93
+ }
94
+ };
95
+ }, []);
96
+ const updatePosition = useCallback(() => {
97
+ if (!anchorRef.current || !panelRef.current)
98
+ return;
99
+ const anchor = anchorRef.current.getBoundingClientRect();
100
+ const panel = panelRef.current.getBoundingClientRect();
101
+ const next = computePanelCoords(position, anchor, panel);
102
+ setCoords({ top: next.top, left: next.left });
103
+ setCalculatedPosition(next.calculatedPosition);
104
+ }, [position]);
105
+ useEffect(() => {
106
+ if (!isVisible)
107
+ return;
108
+ updatePosition();
109
+ window.addEventListener('resize', updatePosition, { passive: true });
110
+ window.addEventListener('scroll', updatePosition, { passive: true, capture: true });
111
+ return () => {
112
+ window.removeEventListener('resize', updatePosition);
113
+ window.removeEventListener('scroll', updatePosition, { capture: true });
114
+ };
115
+ }, [isVisible, updatePosition]);
63
116
  const handleMouseEnter = useCallback(() => {
64
117
  if (isManuallyClose)
65
118
  return;
119
+ // opacity 전환 전에 좌표 확정 (ref 가드는 updatePosition 내부)
120
+ updatePosition();
121
+ // 웹폰트 로드·max-content 재계산 등 비동기 layout 안정화 후 한 번 더 보정
122
+ // 빠른 hover in/out 시 이전 프레임 요청은 취소해 중복/unmount 후 실행 방지
123
+ if (rafIdRef.current !== null)
124
+ cancelAnimationFrame(rafIdRef.current);
125
+ rafIdRef.current = requestAnimationFrame(() => {
126
+ rafIdRef.current = null;
127
+ updatePosition();
128
+ });
66
129
  setIsVisible(true);
67
- if (position === 'auto' && tooltipRef.current && tooltipBgRef.current) {
68
- // 크기 측정을 위해 임시로 measuring 클래스 추가
69
- setIsMeasuring(true);
70
- // 다음 렌더링 사이클에서 크기 측정
71
- setTimeout(() => {
72
- if (tooltipRef.current && tooltipBgRef.current) {
73
- const optimalPosition = calculateOptimalPosition(tooltipRef.current, tooltipBgRef.current, 'bottom');
74
- setCalculatedPosition(optimalPosition);
75
- setIsMeasuring(false);
76
- }
77
- }, 0);
78
- }
79
- }, [position, isManuallyClose]);
130
+ }, [isManuallyClose, updatePosition]);
80
131
  const handleMouseLeave = useCallback(() => {
81
132
  if (type === 'short') {
82
133
  setIsVisible(false);
@@ -93,12 +144,19 @@ export const Tooltip = ({ tooltipType = 'white', iconType = 'stroke', position =
93
144
  'ncua-tooltip--stroke': iconType === 'stroke',
94
145
  'ncua-tooltip--auto': position === 'auto',
95
146
  }, className), [size, type, hideArrow, iconType, position, className]);
96
- const tooltipBgClassName = useMemo(() => classNames('ncua-tooltip__bg', `ncua-tooltip__bg--${tooltipType}`, `ncua-tooltip__bg--${finalPosition}`, {
147
+ const panelClassName = useMemo(() => classNames('ncua-tooltip-panel', 'ncua-tooltip__bg', `ncua-tooltip__bg--${tooltipType}`, `ncua-tooltip__bg--${finalPosition}`, {
97
148
  'ncua-tooltip__bg--visible': isVisible,
98
- 'ncua-tooltip__bg--measuring': isMeasuring,
99
149
  'ncua-tooltip__bg--force-hidden': isManuallyClose,
100
- }), [tooltipType, finalPosition, isVisible, isMeasuring, isManuallyClose]);
101
- return (_jsxs("span", { ref: tooltipRef, className: tooltipClassName, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: [iconStyle === 'help-circle' &&
102
- (iconType === 'stroke' ? (_jsx(HelpCircle, { width: iconSize, height: iconSize, color: iconColor })) : (_jsx(HelpCircleFill, { width: iconSize, height: iconSize, color: iconColor }))), iconStyle === 'alert-circle' &&
103
- (iconType === 'stroke' ? (_jsx(AlertCircle, { width: iconSize, height: iconSize, color: iconColor })) : (_jsx(AlertCircleFill, { width: iconSize, height: iconSize, color: iconColor }))), _jsxs("span", { ref: tooltipBgRef, className: tooltipBgClassName, children: [title && _jsx("span", { className: "ncua-tooltip__title", children: title }), content && _jsx("span", { className: "ncua-tooltip__content", children: content }), type === 'long' && (_jsx(ButtonCloseX, { className: "ncua-tooltip__close-button", size: "xs", theme: tooltipType === 'white' ? 'dark' : 'light', onClick: handleCloseClick, "aria-label": "\uD234\uD301 \uB2EB\uAE30" }))] })] }));
150
+ }), [tooltipType, finalPosition, isVisible, isManuallyClose]);
151
+ const panelStyle = {
152
+ top: `${coords.top}px`,
153
+ left: `${coords.left}px`,
154
+ opacity: isVisible ? 1 : 0,
155
+ ...(zIndex && { zIndex }),
156
+ };
157
+ const portalTarget = mounted ? resolvePortalTarget() : null;
158
+ const panel = (_jsxs("span", { ref: panelRef, className: panelClassName, style: panelStyle, children: [title && _jsx("span", { className: "ncua-tooltip__title", children: title }), content && _jsx("span", { className: "ncua-tooltip__content", children: content }), type === 'long' && (_jsx(ButtonCloseX, { className: "ncua-tooltip__close-button", size: "xs", theme: tooltipType === 'white' ? 'dark' : 'light', onClick: handleCloseClick, "aria-label": "\uD234\uD301 \uB2EB\uAE30" }))] }));
159
+ return (_jsxs(_Fragment, { children: [_jsxs("span", { ref: anchorRef, className: tooltipClassName, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, children: [iconStyle === 'help-circle' &&
160
+ (iconType === 'stroke' ? (_jsx(HelpCircle, { width: iconSize, height: iconSize, color: iconColor })) : (_jsx(HelpCircleFill, { width: iconSize, height: iconSize, color: iconColor }))), iconStyle === 'alert-circle' &&
161
+ (iconType === 'stroke' ? (_jsx(AlertCircle, { width: iconSize, height: iconSize, color: iconColor })) : (_jsx(AlertCircleFill, { width: iconSize, height: iconSize, color: iconColor })))] }), portalTarget && createPortal(panel, portalTarget)] }));
104
162
  };
@@ -1,6 +1,6 @@
1
- export { useDropdown } from './useDropdown';
2
- export { useDropdownKeyboard } from './useDropdownKeyboard';
3
- export { useDropdownPosition } from './useDropdownPosition';
4
- export { useOutsideClick } from './useOutsideClick';
5
- export { useScrollLock } from './useScrollLock';
6
- export { useWindowResize } from './useWindowResize';
1
+ export * from './useDropdown';
2
+ export * from './useDropdownKeyboard';
3
+ export * from './useDropdownPosition';
4
+ export * from './useOutsideClick';
5
+ export * from './useScrollLock';
6
+ export * from './useWindowResize';
@@ -1,6 +1,6 @@
1
- export { useDropdown } from './useDropdown';
2
- export { useDropdownKeyboard } from './useDropdownKeyboard';
3
- export { useDropdownPosition } from './useDropdownPosition';
4
- export { useOutsideClick } from './useOutsideClick';
5
- export { useScrollLock } from './useScrollLock';
6
- export { useWindowResize } from './useWindowResize';
1
+ export * from './useDropdown';
2
+ export * from './useDropdownKeyboard';
3
+ export * from './useDropdownPosition';
4
+ export * from './useOutsideClick';
5
+ export * from './useScrollLock';
6
+ export * from './useWindowResize';
@@ -1,4 +1,4 @@
1
1
  export * from './dropdown';
2
- export { useCallbackRef } from './useCallbackRef';
3
- export { useMediaQuery } from './useMediaQuery';
4
- export { useMergeRefs } from './useMergeRefs';
2
+ export * from './useCallbackRef';
3
+ export * from './useMediaQuery';
4
+ export * from './useMergeRefs';
@@ -1,6 +1,6 @@
1
1
  // 기존 공통 hooks
2
2
  // 드롭다운 관련 hooks
3
3
  export * from './dropdown';
4
- export { useCallbackRef } from './useCallbackRef';
5
- export { useMediaQuery } from './useMediaQuery';
6
- export { useMergeRefs } from './useMergeRefs';
4
+ export * from './useCallbackRef';
5
+ export * from './useMediaQuery';
6
+ export * from './useMergeRefs';
@@ -0,0 +1,26 @@
1
+ /** AI 에이전트용 컴포넌트 메타데이터 타입 */
2
+ /** DES INDEX §3-1~§3-8 기준 카테고리 (commerce-rag design 네임스페이스) */
3
+ export type ComponentCategory = 'action' | 'input' | 'icon' | 'overlay' | 'navigation' | 'feedback' | 'layout' | 'data-display';
4
+ export interface ComponentMeta {
5
+ category: ComponentCategory;
6
+ aliases: string[];
7
+ hasChildren: boolean;
8
+ description: string;
9
+ whenToUse: string[];
10
+ forbiddenRules: string[];
11
+ seeAlso: string[];
12
+ jsRequired: boolean;
13
+ /** Props가 확장하는 HTML 요소 — 에이전트가 표준 HTML 속성 사용 가능 여부를 판단 */
14
+ htmlElement?: string;
15
+ /**
16
+ * render_to_html에 전달할 실제 사용 예시 props.
17
+ *
18
+ * 작성 규칙 (props-type-guide.md § usageExamples 참조):
19
+ * - key: 시나리오 이름 (예: "default", "withIcon", "rangePicker")
20
+ * - value: render_to_html의 props 파라미터에 그대로 전달 가능한 객체
21
+ * - 모든 required prop 포함 필수. optional은 시나리오에 필요한 것만.
22
+ * - 에이전트가 복사해서 바로 사용할 수 있는 수준의 실제 데이터.
23
+ * - 빈 문자열(""), 빈 객체({}) 금지. 의미 있는 값을 넣을 것.
24
+ */
25
+ usageExamples?: Record<string, Record<string, unknown>>;
26
+ }
@@ -0,0 +1,2 @@
1
+ /** AI 에이전트용 컴포넌트 메타데이터 타입 */
2
+ export {};
@@ -1,13 +1,11 @@
1
+ import type { SlotIconComponent } from '../side-slot';
1
2
  /**
2
3
  * 기본 옵션 타입
3
4
  */
4
5
  export type OptionType = {
5
6
  id: string | number;
6
7
  label: string;
7
- icon?: React.ComponentType<{
8
- width?: number;
9
- height?: number;
10
- }>;
8
+ icon?: SlotIconComponent;
11
9
  };
12
10
  /**
13
11
  * 옵션 값 타입 (단일 또는 다중 선택)