@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,178 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.FloatingNotification = void 0;
7
- var _const = require("./const");
8
- var _utils = require("./utils");
9
- var _breakpoint = require("../../../src/constant/breakpoint");
10
- var _featuredIcon = require("../featuredIcon");
11
- var _ButtonCloseX = require("../shared/ButtonCloseX");
12
- class FloatingNotification {
13
- constructor(options) {
14
- this.options = {
15
- color: 'neutral',
16
- className: '',
17
- actions: [],
18
- autoClose: 0,
19
- supportingText: undefined,
20
- ...options
21
- };
22
- this.element = this.createElement();
23
- this.bindEvents();
24
- this.setupAutoClose();
25
- this.setupMobileListener();
26
- }
27
- createElement() {
28
- const {
29
- title,
30
- supportingText,
31
- color,
32
- className,
33
- actions,
34
- onClose
35
- } = this.options;
36
- // 플로팅 알림에서 info 색상 사용 시 neutral로 대체
37
- let actualColor = color;
38
- if (color === 'info') {
39
- console.warn('Floating notification does not support "info" color. Using "neutral" instead.');
40
- actualColor = 'neutral';
41
- }
42
- const wrapper = (0, _utils.createWrapperElement)(_const.CLASS_NAMES.FLOATING.BASE, actualColor, className);
43
- const iconFunction = _const.FLOATING_ICON_MAP[actualColor];
44
- const mobile = (0, _utils.isMobile)();
45
- // FeaturedIcon 생성
46
- let featuredIconElement = null;
47
- if (iconFunction) {
48
- const size = _const.getSizes.featuredIcon(mobile);
49
- const iconSize = _const.getSizes.iconPixel(mobile);
50
- const iconSvg = iconFunction(iconSize);
51
- this.featuredIcon = _featuredIcon.FeaturedIcon.create({
52
- svgString: iconSvg,
53
- theme: 'dark-circle',
54
- color: actualColor,
55
- size: size
56
- });
57
- featuredIconElement = this.featuredIcon.getElement();
58
- }
59
- wrapper.innerHTML = this.buildTemplate({
60
- title,
61
- supportingText,
62
- actions,
63
- onClose,
64
- isMobile: mobile
65
- });
66
- // FeaturedIcon을 container에 추가
67
- if (featuredIconElement) {
68
- const container = wrapper.querySelector(`.${_const.CLASS_NAMES.FLOATING.CONTAINER}`);
69
- if (container) {
70
- container.insertBefore(featuredIconElement, container.firstChild);
71
- }
72
- }
73
- return wrapper;
74
- }
75
- buildTemplate(params) {
76
- const {
77
- title,
78
- supportingText,
79
- actions,
80
- onClose,
81
- isMobile
82
- } = params;
83
- return `
84
- <div class="${_const.CLASS_NAMES.FLOATING.CONTENT}">
85
- <div class="${_const.CLASS_NAMES.FLOATING.CONTAINER}">
86
- <div class="${_const.CLASS_NAMES.FLOATING.TEXT_CONTAINER}">
87
- <div class="${_const.CLASS_NAMES.FLOATING.TITLE_WRAPPER}">
88
- <span class="${_const.CLASS_NAMES.FLOATING.TITLE}">${title}</span>
89
- </div>
90
- ${(0, _utils.renderSupportingText)(supportingText, _const.CLASS_NAMES.FLOATING.SUPPORTING_TEXT)}
91
- ${actions && actions.length > 0 ? (0, _utils.renderActions)(actions, _const.CLASS_NAMES.FLOATING.ACTIONS) : ''}
92
- </div>
93
- </div>
94
- </div>
95
- ${this.renderCloseButton(onClose, isMobile)}
96
- `;
97
- }
98
- renderCloseButton(onClose) {
99
- let isMobile = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
100
- if (!onClose) return '';
101
- const size = _const.getSizes.closeButton(isMobile);
102
- return (0, _ButtonCloseX.ButtonCloseX)(size, 'light', _const.CLASS_NAMES.FLOATING.CLOSE_BUTTON, '알림 닫기', onClose);
103
- }
104
- setupMobileListener() {
105
- const mediaQuery = window.matchMedia(_breakpoint.MEDIA_QUERY.mobile);
106
- const handleChange = e => {
107
- this.updateMobileStyles(e.matches);
108
- if (e.matches && this.options.onClose) {
109
- this.options.onClose();
110
- this.remove();
111
- }
112
- };
113
- handleChange({
114
- matches: mediaQuery.matches
115
- });
116
- mediaQuery.addEventListener('change', handleChange);
117
- this.mobileCleanup = () => {
118
- mediaQuery.removeEventListener('change', handleChange);
119
- };
120
- }
121
- updateMobileStyles(mobile) {
122
- if (this.featuredIcon) {
123
- const newSize = _const.getSizes.featuredIcon(mobile);
124
- this.featuredIcon.updateSize(newSize);
125
- }
126
- const closeButton = this.element.querySelector('.ncua-button-close-x');
127
- if (closeButton) {
128
- const newSize = _const.getSizes.closeButton(mobile);
129
- const newSvgSize = _const.getSizes.closeButtonSvg(newSize);
130
- closeButton.className = closeButton.className.replace(/ncua-button-close-x--(xs|sm)/, `ncua-button-close-x--${newSize}`);
131
- const svg = closeButton.querySelector('svg');
132
- if (svg) {
133
- svg.setAttribute('width', newSvgSize.toString());
134
- svg.setAttribute('height', newSvgSize.toString());
135
- }
136
- }
137
- }
138
- bindEvents() {
139
- (0, _utils.bindNotificationEvents)(this.element, this.options.actions, this.options.onClose, () => this.remove());
140
- }
141
- setupAutoClose() {
142
- this.autoCloseTimer = (0, _utils.setupAutoClose)(this.options.autoClose, this.options.onClose, () => this.remove());
143
- }
144
- // Public methods
145
- getElement() {
146
- return this.element;
147
- }
148
- appendTo(parent) {
149
- parent.appendChild(this.element);
150
- }
151
- remove() {
152
- if (this.autoCloseTimer) {
153
- clearTimeout(this.autoCloseTimer);
154
- this.autoCloseTimer = undefined;
155
- }
156
- if (this.element && this.element.parentNode) {
157
- this.element.parentNode.removeChild(this.element);
158
- }
159
- }
160
- destroy() {
161
- // FeaturedIcon 정리
162
- if (this.featuredIcon) {
163
- this.featuredIcon.destroy();
164
- this.featuredIcon = undefined;
165
- }
166
- // 모바일 리스너 정리
167
- if (this.mobileCleanup) {
168
- this.mobileCleanup();
169
- this.mobileCleanup = undefined;
170
- }
171
- this.remove();
172
- }
173
- // Static factory methods
174
- static create(options) {
175
- return new FloatingNotification(options);
176
- }
177
- }
178
- exports.FloatingNotification = FloatingNotification;
@@ -1,132 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.FullWidthNotification = void 0;
7
- var _const = require("./const");
8
- var _utils = require("./utils");
9
- class FullWidthNotification {
10
- constructor(options) {
11
- this.options = {
12
- color: 'neutral',
13
- className: '',
14
- actions: [],
15
- autoClose: 0,
16
- supportingText: undefined,
17
- ...options
18
- };
19
- this.element = this.createElement();
20
- this.bindEvents();
21
- this.setupAutoClose();
22
- }
23
- createElement() {
24
- const {
25
- title,
26
- supportingText,
27
- color,
28
- className,
29
- actions,
30
- onClose,
31
- supportTextLink,
32
- onHidePermanently
33
- } = this.options;
34
- const wrapper = (0, _utils.createWrapperElement)(_const.CLASS_NAMES.FULL_WIDTH.BASE, color, className);
35
- const iconHtml = _const.FULL_WIDTH_ICON_MAP[color](_const.FULL_WIDTH_SIZES.ICON);
36
- wrapper.innerHTML = this.buildTemplate({
37
- iconHtml,
38
- title,
39
- supportingText,
40
- actions,
41
- onClose,
42
- supportTextLink,
43
- onHidePermanently
44
- });
45
- return wrapper;
46
- }
47
- buildTemplate(params) {
48
- const {
49
- iconHtml,
50
- title,
51
- supportingText,
52
- actions,
53
- onClose,
54
- supportTextLink,
55
- onHidePermanently
56
- } = params;
57
- return `
58
- <div class="${_const.CLASS_NAMES.FULL_WIDTH.CONTAINER}">
59
- <div class="${_const.CLASS_NAMES.FULL_WIDTH.CONTENT}">
60
- <div class="${_const.CLASS_NAMES.FULL_WIDTH.CONTENT_WRAPPER}">
61
- <div class="${_const.CLASS_NAMES.FULL_WIDTH.ICON}">${iconHtml}</div>
62
- <div class="${_const.CLASS_NAMES.FULL_WIDTH.TEXT_CONTAINER}">
63
- <span class="${_const.CLASS_NAMES.FULL_WIDTH.TITLE}">${title}</span>
64
- ${(0, _utils.renderSupportingText)(supportingText, _const.CLASS_NAMES.FULL_WIDTH.SUPPORTING_TEXT, supportTextLink)}
65
- </div>
66
- </div>
67
- <div class="${_const.CLASS_NAMES.FULL_WIDTH.ACTIONS_CONTAINER}">
68
- ${actions && actions.length > 0 ? (0, _utils.renderActions)(actions, _const.CLASS_NAMES.FULL_WIDTH.ACTIONS) : ''}
69
- ${this.renderHidePermanentlyButton(onHidePermanently)}
70
- ${this.renderCloseButton(onClose)}
71
- </div>
72
- </div>
73
- </div>
74
- `;
75
- }
76
- renderHidePermanentlyButton(onHidePermanently) {
77
- if (!onHidePermanently) return '';
78
- return `
79
- <button type="button" class="ncua-notification__action-button ncua-notification__action-button--text ncua-full-width-notification__link" data-hide-permanently="true">
80
- 다시보지 않기
81
- </button>
82
- `;
83
- }
84
- renderCloseButton(onClose) {
85
- if (!onClose) return '';
86
- return `
87
- <button type="button" class="${_const.CLASS_NAMES.FULL_WIDTH.CLOSE_BUTTON}" aria-label="알림 닫기">
88
- ${_const.SVG_ICONS['x-close'](_const.FULL_WIDTH_SIZES.CLOSE_BUTTON)}
89
- </button>
90
- `;
91
- }
92
- bindEvents() {
93
- (0, _utils.bindNotificationEvents)(this.element, this.options.actions, this.options.onClose, () => this.remove());
94
- // 다시보지 않기 버튼 이벤트 바인딩
95
- if (this.options.onHidePermanently) {
96
- const hidePermanentlyButton = this.element.querySelector('[data-hide-permanently="true"]');
97
- if (hidePermanentlyButton) {
98
- hidePermanentlyButton.addEventListener('click', () => {
99
- this.options.onHidePermanently?.();
100
- this.remove();
101
- });
102
- }
103
- }
104
- }
105
- setupAutoClose() {
106
- this.autoCloseTimer = (0, _utils.setupAutoClose)(this.options.autoClose, this.options.onClose, () => this.remove());
107
- }
108
- // Public methods
109
- getElement() {
110
- return this.element;
111
- }
112
- appendTo(parent) {
113
- parent.appendChild(this.element);
114
- }
115
- remove() {
116
- if (this.autoCloseTimer) {
117
- clearTimeout(this.autoCloseTimer);
118
- this.autoCloseTimer = undefined;
119
- }
120
- if (this.element && this.element.parentNode) {
121
- this.element.parentNode.removeChild(this.element);
122
- }
123
- }
124
- destroy() {
125
- this.remove();
126
- }
127
- // Static factory methods
128
- static create(options) {
129
- return new FullWidthNotification(options);
130
- }
131
- }
132
- exports.FullWidthNotification = FullWidthNotification;
@@ -1,159 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.MessageNotification = void 0;
7
- var _const = require("./const");
8
- var _featuredIcon = require("../featuredIcon");
9
- var _utils = require("./utils");
10
- class MessageNotification {
11
- constructor(options) {
12
- this.options = {
13
- color: 'neutral',
14
- className: '',
15
- actions: [],
16
- autoClose: 0,
17
- supportingText: undefined,
18
- ...options
19
- };
20
- this.element = this.createElement();
21
- this.bindEvents();
22
- this.setupAutoClose();
23
- }
24
- createElement() {
25
- const {
26
- title,
27
- supportingText,
28
- color,
29
- className,
30
- actions,
31
- onClose,
32
- onHidePermanently
33
- } = this.options;
34
- // message 타입은 neutral, error, warning, success 4가지 색상만 지원
35
- let actualColor = color;
36
- if (color === 'info') {
37
- console.warn('Message notification does not support "info" color. Using "neutral" instead.');
38
- actualColor = 'neutral';
39
- }
40
- const wrapper = (0, _utils.createWrapperElement)(_const.CLASS_NAMES.MESSAGE.BASE, actualColor, className);
41
- const iconFunction = _const.FLOATING_ICON_MAP[actualColor];
42
- // FeaturedIcon 생성
43
- let featuredIconElement = null;
44
- if (iconFunction) {
45
- const iconSvg = iconFunction(_const.MESSAGE_SIZES.ICON_PIXEL);
46
- this.featuredIcon = _featuredIcon.FeaturedIcon.create({
47
- svgString: iconSvg,
48
- theme: 'light-circle',
49
- color: actualColor,
50
- size: _const.MESSAGE_SIZES.FEATURED_ICON
51
- });
52
- featuredIconElement = this.featuredIcon.getElement();
53
- }
54
- wrapper.innerHTML = this.buildTemplate({
55
- title,
56
- supportingText,
57
- actions,
58
- onClose,
59
- onHidePermanently
60
- });
61
- // FeaturedIcon을 content-wrapper에 추가
62
- if (featuredIconElement) {
63
- const contentWrapper = wrapper.querySelector(`.${_const.CLASS_NAMES.MESSAGE.CONTENT_WRAPPER}`);
64
- if (contentWrapper) {
65
- contentWrapper.insertBefore(featuredIconElement, contentWrapper.firstChild);
66
- }
67
- }
68
- return wrapper;
69
- }
70
- buildTemplate(params) {
71
- const {
72
- title,
73
- supportingText,
74
- actions,
75
- onClose,
76
- onHidePermanently
77
- } = params;
78
- return `
79
- <div class="${_const.CLASS_NAMES.MESSAGE.CONTAINER}">
80
- <div class="${_const.CLASS_NAMES.MESSAGE.CONTENT}">
81
- <div class="${_const.CLASS_NAMES.MESSAGE.CONTENT_WRAPPER}">
82
- <div class="${_const.CLASS_NAMES.MESSAGE.TEXT_CONTAINER}">
83
- <span class="${_const.CLASS_NAMES.MESSAGE.TITLE}">${title}</span>
84
- ${(0, _utils.renderSupportingText)(supportingText, _const.CLASS_NAMES.MESSAGE.SUPPORTING_TEXT)}
85
- </div>
86
- </div>
87
- <div class="${_const.CLASS_NAMES.MESSAGE.ACTIONS_CONTAINER}">
88
- ${actions && actions.length > 0 ? (0, _utils.renderActions)(actions, _const.CLASS_NAMES.MESSAGE.ACTIONS) : ''}
89
- </div>
90
- <div class="${_const.CLASS_NAMES.MESSAGE.ACTIONS_CONTAINER}">
91
- ${this.renderHidePermanentlyButton(onHidePermanently)}
92
- ${this.renderCloseButton(onClose)}
93
- </div>
94
- </div>
95
- </div>
96
- `;
97
- }
98
- renderHidePermanentlyButton(onHidePermanently) {
99
- if (!onHidePermanently) return '';
100
- return `
101
- <button type="button" class="${_const.CLASS_NAMES.COMMON.ACTION_BUTTON} ${_const.CLASS_NAMES.COMMON.ACTION_BUTTON}--text ${_const.CLASS_NAMES.MESSAGE.HIDE_LINK}" data-hide-permanently="true">
102
- 다시 보지 않기
103
- </button>
104
- `;
105
- }
106
- renderCloseButton(onClose) {
107
- if (!onClose) return '';
108
- return `
109
- <button type="button" class="${_const.CLASS_NAMES.MESSAGE.CLOSE_BUTTON}" aria-label="알림 닫기">
110
- ${_const.SVG_ICONS['x-close'](_const.MESSAGE_SIZES.CLOSE_BUTTON).replace('stroke="currentColor"', `stroke="#2F2F30"`)}
111
- </button>
112
- `;
113
- }
114
- bindEvents() {
115
- (0, _utils.bindNotificationEvents)(this.element, this.options.actions, this.options.onClose, () => this.remove());
116
- // 다시보지 않기 버튼 이벤트 바인딩
117
- if (this.options.onHidePermanently) {
118
- const hidePermanentlyButton = this.element.querySelector('[data-hide-permanently="true"]');
119
- if (hidePermanentlyButton) {
120
- hidePermanentlyButton.addEventListener('click', () => {
121
- this.options.onHidePermanently?.();
122
- this.remove();
123
- });
124
- }
125
- }
126
- }
127
- setupAutoClose() {
128
- this.autoCloseTimer = (0, _utils.setupAutoClose)(this.options.autoClose, this.options.onClose, () => this.remove());
129
- }
130
- // Public methods
131
- getElement() {
132
- return this.element;
133
- }
134
- appendTo(parent) {
135
- parent.appendChild(this.element);
136
- }
137
- remove() {
138
- if (this.autoCloseTimer) {
139
- clearTimeout(this.autoCloseTimer);
140
- this.autoCloseTimer = undefined;
141
- }
142
- if (this.element && this.element.parentNode) {
143
- this.element.parentNode.removeChild(this.element);
144
- }
145
- }
146
- destroy() {
147
- // FeaturedIcon 정리
148
- if (this.featuredIcon) {
149
- this.featuredIcon.destroy();
150
- this.featuredIcon = undefined;
151
- }
152
- this.remove();
153
- }
154
- // Static factory methods
155
- static create(options) {
156
- return new MessageNotification(options);
157
- }
158
- }
159
- exports.MessageNotification = MessageNotification;
@@ -1,101 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.Notification = void 0;
7
- var _FullWidthNotification = require("./FullWidthNotification");
8
- var _FloatingNotification = require("./FloatingNotification");
9
- var _MessageNotification = require("./MessageNotification");
10
- // 통합 Notification 클래스
11
- class Notification {
12
- constructor(options) {
13
- const {
14
- type = 'floating',
15
- ...baseOptions
16
- } = options;
17
- if (type === 'message') {
18
- this.instance = new _MessageNotification.MessageNotification(baseOptions);
19
- } else if (type === 'full-width') {
20
- this.instance = new _FullWidthNotification.FullWidthNotification(baseOptions);
21
- } else {
22
- this.instance = new _FloatingNotification.FloatingNotification(baseOptions);
23
- }
24
- }
25
- // 모든 메서드를 instance에 위임
26
- getElement() {
27
- return this.instance.getElement();
28
- }
29
- appendTo(parent) {
30
- return this.instance.appendTo(parent);
31
- }
32
- remove() {
33
- return this.instance.remove();
34
- }
35
- destroy() {
36
- return this.instance.destroy();
37
- }
38
- show(parent) {
39
- if (parent) {
40
- this.instance.appendTo(parent);
41
- } else {
42
- this.instance.appendTo(document.body);
43
- }
44
- }
45
- // Static factory methods
46
- static create(options) {
47
- return new Notification(options);
48
- }
49
- // Convenience method for creating notifications with specific color
50
- static createWithColor(color, title, supportingText, options) {
51
- const autoCloseMap = {
52
- success: 3000,
53
- error: 5000,
54
- warning: 3000,
55
- info: 3000,
56
- neutral: 0
57
- };
58
- return new Notification({
59
- title,
60
- supportingText,
61
- color,
62
- type: 'floating',
63
- autoClose: autoCloseMap[color],
64
- ...options
65
- });
66
- }
67
- // 클래스를 생성하지 않고도 기본 floating 알림 생성을 하기 위한 함수들
68
- static success(title, supportingText, options) {
69
- const notification = this.createWithColor('success', title, supportingText, options);
70
- notification.show();
71
- return notification;
72
- }
73
- static error(title, supportingText, options) {
74
- const notification = this.createWithColor('error', title, supportingText, options);
75
- notification.show();
76
- return notification;
77
- }
78
- static warning(title, supportingText, options) {
79
- const notification = this.createWithColor('warning', title, supportingText, options);
80
- notification.show();
81
- return notification;
82
- }
83
- static info(title, supportingText, options) {
84
- const notification = this.createWithColor('info', title, supportingText, options);
85
- notification.show();
86
- return notification;
87
- }
88
- static neutral(title, supportingText, options) {
89
- const notification = this.createWithColor('neutral', title, supportingText, options);
90
- notification.show();
91
- return notification;
92
- }
93
- // showFullWidth method for backward compatibility
94
- static showFullWidth(options) {
95
- return new Notification({
96
- ...options,
97
- type: 'full-width'
98
- });
99
- }
100
- }
101
- exports.Notification = Notification;
@@ -1,50 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.CLASS_NAMES = void 0;
7
- // CSS class names
8
- const CLASS_NAMES = exports.CLASS_NAMES = {
9
- FULL_WIDTH: {
10
- BASE: 'ncua-full-width-notification',
11
- CONTAINER: 'ncua-full-width-notification__container',
12
- CONTENT: 'ncua-full-width-notification__content',
13
- CONTENT_WRAPPER: 'ncua-full-width-notification__content-wrapper',
14
- ICON: 'ncua-full-width-notification__icon',
15
- TEXT_CONTAINER: 'ncua-full-width-notification__text-container',
16
- TITLE: 'ncua-full-width-notification__title',
17
- SUPPORTING_TEXT: 'ncua-full-width-notification__supporting-text',
18
- ACTIONS_CONTAINER: 'ncua-full-width-notification__actions-container',
19
- ACTIONS: 'ncua-full-width-notification__actions',
20
- CLOSE_BUTTON: 'ncua-full-width-notification__close-button'
21
- },
22
- FLOATING: {
23
- BASE: 'ncua-floating-notification',
24
- CONTAINER: 'ncua-floating-notification__container',
25
- CONTENT: 'ncua-floating-notification__content',
26
- TEXT_CONTAINER: 'ncua-floating-notification__text-container',
27
- TITLE_WRAPPER: 'ncua-floating-notification__title-wrapper',
28
- TITLE: 'ncua-floating-notification__title',
29
- SUPPORTING_TEXT: 'ncua-floating-notification__supporting-text',
30
- ACTIONS: 'ncua-floating-notification__actions',
31
- CLOSE_BUTTON: 'ncua-floating-notification__close-button'
32
- },
33
- MESSAGE: {
34
- BASE: 'ncua-message-notification',
35
- CONTAINER: 'ncua-message-notification__container',
36
- CONTENT: 'ncua-message-notification__content',
37
- CONTENT_WRAPPER: 'ncua-message-notification__content-wrapper',
38
- ICON: 'ncua-message-notification__icon',
39
- TEXT_CONTAINER: 'ncua-message-notification__text-container',
40
- TITLE: 'ncua-message-notification__title',
41
- SUPPORTING_TEXT: 'ncua-message-notification__supporting-text',
42
- ACTIONS_CONTAINER: 'ncua-message-notification__actions-container',
43
- ACTIONS: 'ncua-message-notification__actions',
44
- HIDE_LINK: 'ncua-message-notification__hide-link',
45
- CLOSE_BUTTON: 'ncua-message-notification__close-button'
46
- },
47
- COMMON: {
48
- ACTION_BUTTON: 'ncua-notification__action-button'
49
- }
50
- };
@@ -1,31 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.SVG_ICONS = exports.ICON_MAP = exports.FULL_WIDTH_ICON_MAP = exports.FLOATING_ICON_MAP = void 0;
7
- // SVG 아이콘들 (크기는 동적으로 설정)
8
- const SVG_ICONS = exports.SVG_ICONS = {
9
- 'pin-02': size => `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" fill="none" viewBox="0 0 24 24" stroke="none"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.377 15.616 2.72 21.273m8.974-14.631-1.56 1.56a2 2 0 0 1-.264.242 1 1 0 0 1-.207.111c-.082.032-.17.05-.347.085l-3.665.733c-.952.19-1.428.286-1.65.537a1 1 0 0 0-.243.8c.046.333.39.677 1.076 1.363l7.086 7.086c.686.687 1.03 1.03 1.362 1.076a1 1 0 0 0 .801-.242c.251-.223.346-.7.537-1.651l.733-3.665c.035-.176.053-.265.085-.347a1 1 0 0 1 .11-.207c.051-.072.115-.136.242-.263l1.561-1.561c.082-.082.122-.122.167-.158q.06-.047.126-.085c.05-.029.103-.051.208-.097l2.495-1.069c.727-.312 1.091-.467 1.256-.72a1 1 0 0 0 .144-.747c-.06-.295-.34-.575-.9-1.135l-5.142-5.143c-.56-.56-.84-.84-1.135-.9a1 1 0 0 0-.748.145c-.252.165-.407.529-.72 1.256l-1.068 2.495a2 2 0 0 1-.097.208 1 1 0 0 1-.085.126 2 2 0 0 1-.158.167"></path></svg>`,
10
- 'alert-triangle': size => `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" fill="none" viewBox="0 0 24 24" stroke="none"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v4m0 4h.01M10.615 3.892 2.39 18.098c-.456.788-.684 1.182-.65 1.506a1 1 0 0 0 .406.705c.263.191.718.191 1.629.191h16.45c.91 0 1.365 0 1.628-.191a1 1 0 0 0 .407-.705c.034-.324-.195-.718-.65-1.506L13.383 3.892c-.454-.785-.681-1.178-.978-1.31a1 1 0 0 0-.812 0c-.297.132-.524.525-.979 1.31"></path></svg>`,
11
- 'alert-circle': size => `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" fill="none" viewBox="0 0 24 24" stroke="none"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10"></path></svg>`,
12
- 'check-circle': size => `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" fill="none" viewBox="0 0 24 24" stroke="none"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m7.5 12 3 3 6-6m5.5 3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10"></path></svg>`,
13
- 'info-circle': size => `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" fill="none" viewBox="0 0 24 24" stroke="none" color="#5720B7" class="ncua-full-width-notification__icon"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 16v-4m0-4h.01M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10"></path></svg>`,
14
- 'message-chat-square': size => `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" fill="none" viewBox="0 0 24 24" stroke="none" color="#0C111D" class="ncua-full-width-notification__icon"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m10 15-3.075 3.114c-.43.434-.644.651-.828.666a.5.5 0 0 1-.421-.172c-.12-.14-.12-.446-.12-1.056v-1.56c0-.548-.449-.944-.99-1.024v0a3 3 0 0 1-2.534-2.533C2 12.219 2 11.96 2 11.445V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 2 5.12 2 6.8 2h7.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C19 4.28 19 5.12 19 6.8V11m0 11-2.176-1.513c-.306-.213-.46-.32-.626-.395a2 2 0 0 0-.462-.145c-.18-.033-.367-.033-.74-.033H13.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C10 18.394 10 17.834 10 16.714V14.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C11.52 11 12.08 11 13.2 11h5.6c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C22 12.52 22 13.08 22 14.2v2.714c0 .932 0 1.398-.152 1.766a2 2 0 0 1-1.083 1.082c-.367.152-.833.152-1.765.152z"></path></svg>`,
15
- 'x-close': size => `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" fill="none" viewBox="0 0 24 24" stroke="none"><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 6 6 18M6 6l12 12"></path></svg>`
16
- };
17
- const FLOATING_ICON_MAP = exports.FLOATING_ICON_MAP = {
18
- neutral: SVG_ICONS['pin-02'],
19
- error: SVG_ICONS['alert-triangle'],
20
- warning: SVG_ICONS['alert-circle'],
21
- success: SVG_ICONS['check-circle']
22
- // info는 floating에서는 지원하지 않음
23
- };
24
- const FULL_WIDTH_ICON_MAP = exports.FULL_WIDTH_ICON_MAP = {
25
- neutral: SVG_ICONS['message-chat-square'],
26
- error: SVG_ICONS['alert-triangle'],
27
- warning: SVG_ICONS['alert-triangle'],
28
- success: SVG_ICONS['check-circle'],
29
- info: SVG_ICONS['info-circle']
30
- };
31
- const ICON_MAP = exports.ICON_MAP = FULL_WIDTH_ICON_MAP;