@ncds/ui-admin 1.3.0 → 1.4.1

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 (368) hide show
  1. package/dist/cjs/assets/scripts/comboBox.js +262 -0
  2. package/dist/cjs/assets/scripts/datePicker.js +178 -60
  3. package/dist/cjs/assets/scripts/featuredIcon.js +95 -0
  4. package/dist/cjs/assets/scripts/fileInput/FileInput.js +183 -0
  5. package/dist/cjs/assets/scripts/fileInput/FileInputModel.js +246 -0
  6. package/dist/cjs/assets/scripts/fileInput/FileInputView.js +455 -0
  7. package/dist/cjs/assets/scripts/fileInput/const/classNames.js +35 -0
  8. package/dist/cjs/assets/scripts/fileInput/const/index.js +27 -0
  9. package/dist/cjs/assets/scripts/fileInput/const/types.js +13 -0
  10. package/dist/cjs/assets/scripts/fileInput/index.js +44 -0
  11. package/dist/cjs/assets/scripts/imageFileInput/ImageFileInput.js +187 -0
  12. package/dist/cjs/assets/scripts/imageFileInput/ImageFileInputModel.js +268 -0
  13. package/dist/cjs/assets/scripts/imageFileInput/ImageFileInputView.js +354 -0
  14. package/dist/cjs/assets/scripts/imageFileInput/const/classNames.js +41 -0
  15. package/dist/cjs/assets/scripts/imageFileInput/const/index.js +27 -0
  16. package/dist/cjs/assets/scripts/imageFileInput/const/types.js +13 -0
  17. package/dist/cjs/assets/scripts/imageFileInput/index.js +44 -0
  18. package/dist/cjs/assets/scripts/index.js +21 -1
  19. package/dist/cjs/assets/scripts/modal/Modal.js +116 -0
  20. package/dist/cjs/assets/scripts/modal/ModalActions.js +128 -0
  21. package/dist/cjs/assets/scripts/modal/ModalContent.js +46 -0
  22. package/dist/cjs/assets/scripts/modal/ModalHeader.js +115 -0
  23. package/dist/cjs/assets/scripts/modal/const/classNames.js +41 -0
  24. package/dist/cjs/assets/scripts/modal/const/index.js +27 -0
  25. package/dist/cjs/assets/scripts/modal/const/types.js +5 -0
  26. package/dist/cjs/assets/scripts/modal/index.js +61 -0
  27. package/dist/cjs/assets/scripts/modal/utils/contentUtils.js +35 -0
  28. package/dist/cjs/assets/scripts/notification/FloatingNotification.js +180 -0
  29. package/dist/cjs/assets/scripts/notification/FullWidthNotification.js +120 -0
  30. package/dist/cjs/assets/scripts/notification/Notification.js +113 -0
  31. package/dist/cjs/assets/scripts/notification/const/classNames.js +36 -0
  32. package/dist/cjs/assets/scripts/notification/const/icons.js +45 -0
  33. package/dist/cjs/assets/scripts/notification/const/index.js +74 -0
  34. package/dist/cjs/assets/scripts/notification/const/sizes.js +48 -0
  35. package/dist/cjs/assets/scripts/notification/const/types.js +5 -0
  36. package/dist/cjs/assets/scripts/notification/index.js +84 -0
  37. package/dist/cjs/assets/scripts/notification/utils.js +92 -0
  38. package/dist/cjs/assets/scripts/progress-bar/ProgressBar.js +272 -0
  39. package/dist/cjs/assets/scripts/progress-bar/index.js +12 -0
  40. package/dist/cjs/assets/scripts/selectBox.js +319 -0
  41. package/dist/cjs/assets/scripts/shared/ButtonCloseX.js +46 -0
  42. package/dist/cjs/assets/scripts/tag/Tag.js +268 -0
  43. package/dist/cjs/assets/scripts/tag/const/classNames.js +24 -0
  44. package/dist/cjs/assets/scripts/tag/const/index.js +38 -0
  45. package/dist/cjs/assets/scripts/tag/const/sizes.js +13 -0
  46. package/dist/cjs/assets/scripts/tag/const/types.js +5 -0
  47. package/dist/cjs/assets/scripts/tag/index.js +44 -0
  48. package/dist/cjs/assets/scripts/tooltip/Tooltip.js +380 -0
  49. package/dist/cjs/assets/scripts/tooltip/TooltipLayerManager.js +84 -0
  50. package/dist/cjs/assets/scripts/tooltip/const/classNames.js +29 -0
  51. package/dist/cjs/assets/scripts/tooltip/const/constants.js +56 -0
  52. package/dist/cjs/assets/scripts/tooltip/const/icons.js +15 -0
  53. package/dist/cjs/assets/scripts/tooltip/const/index.js +123 -0
  54. package/dist/cjs/assets/scripts/tooltip/const/templates.js +49 -0
  55. package/dist/cjs/assets/scripts/tooltip/const/types.js +5 -0
  56. package/dist/cjs/assets/scripts/tooltip/index.js +57 -0
  57. package/dist/cjs/assets/scripts/tooltip/utils.js +41 -0
  58. package/dist/cjs/assets/scripts/utils/selectbox/DOMRenderer.js +384 -0
  59. package/dist/cjs/assets/scripts/utils/selectbox/DropdownModel.js +361 -0
  60. package/dist/cjs/assets/scripts/utils/selectbox/SelectBoxController.js +681 -0
  61. package/dist/cjs/assets/scripts/utils/selectbox/UnifiedSelectBox.js +677 -0
  62. package/dist/cjs/constant/color.js +2 -0
  63. package/dist/cjs/src/components/button/Button.js +9 -35
  64. package/dist/cjs/src/components/button/ButtonGroup.js +9 -10
  65. package/dist/cjs/src/components/checkbox/Checkbox.js +20 -19
  66. package/dist/cjs/src/components/checkbox/CheckboxInput.js +22 -45
  67. package/dist/cjs/src/components/combobox/ComboBox.js +337 -0
  68. package/dist/cjs/src/components/combobox/index.js +12 -0
  69. package/dist/cjs/src/components/date-picker/CustomInput.js +52 -0
  70. package/dist/cjs/src/components/date-picker/DatePicker.js +86 -23
  71. package/dist/cjs/src/components/date-picker/RangeDatePicker.js +1 -1
  72. package/dist/cjs/src/components/{input → file-upload}/FileInput.js +17 -9
  73. package/dist/cjs/src/components/file-upload/index.js +16 -0
  74. package/dist/cjs/src/components/image-file-input/ImageFileInput.js +263 -0
  75. package/dist/cjs/src/components/image-file-input/components/ImagePreview.js +44 -0
  76. package/dist/cjs/src/components/image-file-input/index.js +16 -0
  77. package/dist/cjs/src/components/index.js +44 -0
  78. package/dist/cjs/src/components/input/InputBase.js +54 -10
  79. package/dist/cjs/src/components/input/Textarea.js +12 -20
  80. package/dist/cjs/src/components/input/index.js +0 -11
  81. package/dist/cjs/src/components/modal/Modal.js +7 -3
  82. package/dist/cjs/src/components/notification/FloatingNotification.js +34 -3
  83. package/dist/cjs/src/components/notification/FullWidthNotification.js +54 -5
  84. package/dist/cjs/src/components/pagination/NavButton.js +1 -13
  85. package/dist/cjs/src/components/pagination/Pagination.js +6 -20
  86. package/dist/cjs/src/components/progress-bar/ProgressBar.js +89 -20
  87. package/dist/cjs/src/components/progress-bar/components/SegmentBar.js +25 -0
  88. package/dist/cjs/src/components/progress-bar/components/SegmentLabels.js +74 -0
  89. package/dist/cjs/src/components/progress-bar/hooks/useProgressBar.js +119 -0
  90. package/dist/cjs/src/components/progress-bar/index.js +11 -0
  91. package/dist/cjs/src/components/progress-bar/types.js +5 -0
  92. package/dist/cjs/src/components/progress-bar/utils.js +31 -0
  93. package/dist/cjs/src/components/radio/Radio.js +5 -6
  94. package/dist/cjs/src/components/select/Select.js +7 -4
  95. package/dist/cjs/src/components/select-dropdown/SelectDropdown.js +146 -0
  96. package/dist/cjs/src/components/select-dropdown/index.js +12 -0
  97. package/dist/cjs/src/components/selectbox/SelectBox.js +283 -0
  98. package/dist/cjs/src/components/selectbox/index.js +12 -0
  99. package/dist/cjs/src/components/shared/hintText/HintText.js +1 -1
  100. package/dist/cjs/src/components/switch/Switch.js +123 -0
  101. package/dist/cjs/src/components/switch/index.js +12 -0
  102. package/dist/cjs/src/components/tab/HorizontalTab.js +8 -20
  103. package/dist/cjs/src/components/tab/TabButton.js +33 -16
  104. package/dist/cjs/src/components/tab/VerticalTab.js +15 -30
  105. package/dist/cjs/src/components/tag/Tag.js +92 -3
  106. package/dist/cjs/src/components/tooltip/Tooltip.js +125 -28
  107. package/dist/cjs/src/hooks/dropdown/index.js +47 -0
  108. package/dist/cjs/src/hooks/dropdown/useDropdown.js +109 -0
  109. package/dist/cjs/src/hooks/dropdown/useDropdownKeyboard.js +131 -0
  110. package/dist/cjs/src/hooks/dropdown/useDropdownPosition.js +27 -0
  111. package/dist/cjs/src/hooks/dropdown/useOutsideClick.js +33 -0
  112. package/dist/cjs/src/hooks/dropdown/useScrollLock.js +78 -0
  113. package/dist/cjs/src/hooks/dropdown/useWindowResize.js +52 -0
  114. package/dist/cjs/src/hooks/index.js +18 -1
  115. package/dist/cjs/src/types/dropdown/dropdown.js +5 -0
  116. package/dist/cjs/src/types/dropdown/index.js +27 -0
  117. package/dist/cjs/src/types/dropdown/option.js +5 -0
  118. package/dist/cjs/src/types/index.js +16 -0
  119. package/dist/cjs/src/utils/date-picker.js +37 -1
  120. package/dist/cjs/src/utils/dropdown/dropdownUtils.js +107 -0
  121. package/dist/cjs/src/utils/dropdown/index.js +27 -0
  122. package/dist/cjs/src/utils/dropdown/multiSelect.js +100 -0
  123. package/dist/cjs/src/utils/index.js +27 -0
  124. package/dist/esm/assets/scripts/comboBox.js +257 -0
  125. package/dist/esm/assets/scripts/datePicker.js +175 -59
  126. package/dist/esm/assets/scripts/featuredIcon.js +90 -0
  127. package/dist/esm/assets/scripts/fileInput/FileInput.js +178 -0
  128. package/dist/esm/assets/scripts/fileInput/FileInputModel.js +241 -0
  129. package/dist/esm/assets/scripts/fileInput/FileInputView.js +450 -0
  130. package/dist/esm/assets/scripts/fileInput/const/classNames.js +25 -0
  131. package/dist/esm/assets/scripts/fileInput/const/index.js +2 -0
  132. package/dist/esm/assets/scripts/fileInput/const/types.js +7 -0
  133. package/dist/esm/assets/scripts/fileInput/index.js +9 -0
  134. package/dist/esm/assets/scripts/imageFileInput/ImageFileInput.js +182 -0
  135. package/dist/esm/assets/scripts/imageFileInput/ImageFileInputModel.js +263 -0
  136. package/dist/esm/assets/scripts/imageFileInput/ImageFileInputView.js +349 -0
  137. package/dist/esm/assets/scripts/imageFileInput/const/classNames.js +30 -0
  138. package/dist/esm/assets/scripts/imageFileInput/const/index.js +2 -0
  139. package/dist/esm/assets/scripts/imageFileInput/const/types.js +7 -0
  140. package/dist/esm/assets/scripts/imageFileInput/index.js +9 -0
  141. package/dist/esm/assets/scripts/index.js +21 -1
  142. package/dist/esm/assets/scripts/modal/Modal.js +110 -0
  143. package/dist/esm/assets/scripts/modal/ModalActions.js +123 -0
  144. package/dist/esm/assets/scripts/modal/ModalContent.js +41 -0
  145. package/dist/esm/assets/scripts/modal/ModalHeader.js +110 -0
  146. package/dist/esm/assets/scripts/modal/const/classNames.js +31 -0
  147. package/dist/esm/assets/scripts/modal/const/index.js +2 -0
  148. package/dist/esm/assets/scripts/modal/const/types.js +1 -0
  149. package/dist/esm/assets/scripts/modal/index.js +15 -0
  150. package/dist/esm/assets/scripts/modal/utils/contentUtils.js +28 -0
  151. package/dist/esm/assets/scripts/notification/FloatingNotification.js +176 -0
  152. package/dist/esm/assets/scripts/notification/FullWidthNotification.js +115 -0
  153. package/dist/esm/assets/scripts/notification/Notification.js +108 -0
  154. package/dist/esm/assets/scripts/notification/const/classNames.js +30 -0
  155. package/dist/esm/assets/scripts/notification/const/icons.js +39 -0
  156. package/dist/esm/assets/scripts/notification/const/index.js +3 -0
  157. package/dist/esm/assets/scripts/notification/const/sizes.js +42 -0
  158. package/dist/esm/assets/scripts/notification/const/types.js +1 -0
  159. package/dist/esm/assets/scripts/notification/index.js +10 -0
  160. package/dist/esm/assets/scripts/notification/utils.js +79 -0
  161. package/dist/esm/assets/scripts/progress-bar/ProgressBar.js +267 -0
  162. package/dist/esm/assets/scripts/progress-bar/index.js +1 -0
  163. package/dist/esm/assets/scripts/selectBox.js +314 -0
  164. package/dist/esm/assets/scripts/shared/ButtonCloseX.js +38 -0
  165. package/dist/esm/assets/scripts/tag/Tag.js +263 -0
  166. package/dist/esm/assets/scripts/tag/const/classNames.js +16 -0
  167. package/dist/esm/assets/scripts/tag/const/index.js +3 -0
  168. package/dist/esm/assets/scripts/tag/const/sizes.js +7 -0
  169. package/dist/esm/assets/scripts/tag/const/types.js +1 -0
  170. package/dist/esm/assets/scripts/tag/index.js +9 -0
  171. package/dist/esm/assets/scripts/tooltip/Tooltip.js +375 -0
  172. package/dist/esm/assets/scripts/tooltip/TooltipLayerManager.js +79 -0
  173. package/dist/esm/assets/scripts/tooltip/const/classNames.js +23 -0
  174. package/dist/esm/assets/scripts/tooltip/const/constants.js +50 -0
  175. package/dist/esm/assets/scripts/tooltip/const/icons.js +9 -0
  176. package/dist/esm/assets/scripts/tooltip/const/index.js +4 -0
  177. package/dist/esm/assets/scripts/tooltip/const/templates.js +42 -0
  178. package/dist/esm/assets/scripts/tooltip/const/types.js +1 -0
  179. package/dist/esm/assets/scripts/tooltip/index.js +10 -0
  180. package/dist/esm/assets/scripts/tooltip/utils.js +35 -0
  181. package/dist/esm/assets/scripts/utils/selectbox/DOMRenderer.js +379 -0
  182. package/dist/esm/assets/scripts/utils/selectbox/DropdownModel.js +356 -0
  183. package/dist/esm/assets/scripts/utils/selectbox/SelectBoxController.js +676 -0
  184. package/dist/esm/assets/scripts/utils/selectbox/UnifiedSelectBox.js +672 -0
  185. package/dist/esm/constant/color.js +2 -0
  186. package/dist/esm/src/components/button/Button.js +10 -36
  187. package/dist/esm/src/components/button/ButtonGroup.js +9 -10
  188. package/dist/esm/src/components/checkbox/Checkbox.js +21 -19
  189. package/dist/esm/src/components/checkbox/CheckboxInput.js +24 -47
  190. package/dist/esm/src/components/combobox/ComboBox.js +330 -0
  191. package/dist/esm/src/components/combobox/index.js +1 -0
  192. package/dist/esm/src/components/date-picker/CustomInput.js +45 -0
  193. package/dist/esm/src/components/date-picker/DatePicker.js +87 -24
  194. package/dist/esm/src/components/date-picker/RangeDatePicker.js +1 -1
  195. package/dist/esm/src/components/{input → file-upload}/FileInput.js +17 -9
  196. package/dist/esm/src/components/file-upload/index.js +1 -0
  197. package/dist/esm/src/components/image-file-input/ImageFileInput.js +256 -0
  198. package/dist/esm/src/components/image-file-input/components/ImagePreview.js +37 -0
  199. package/dist/esm/src/components/image-file-input/index.js +1 -0
  200. package/dist/esm/src/components/index.js +4 -0
  201. package/dist/esm/src/components/input/InputBase.js +55 -11
  202. package/dist/esm/src/components/input/Textarea.js +12 -20
  203. package/dist/esm/src/components/input/index.js +1 -2
  204. package/dist/esm/src/components/modal/Modal.js +7 -3
  205. package/dist/esm/src/components/notification/FloatingNotification.js +35 -4
  206. package/dist/esm/src/components/notification/FullWidthNotification.js +55 -6
  207. package/dist/esm/src/components/pagination/NavButton.js +1 -13
  208. package/dist/esm/src/components/pagination/Pagination.js +6 -20
  209. package/dist/esm/src/components/progress-bar/ProgressBar.js +89 -20
  210. package/dist/esm/src/components/progress-bar/components/SegmentBar.js +18 -0
  211. package/dist/esm/src/components/progress-bar/components/SegmentLabels.js +66 -0
  212. package/dist/esm/src/components/progress-bar/hooks/useProgressBar.js +112 -0
  213. package/dist/esm/src/components/progress-bar/index.js +2 -1
  214. package/dist/esm/src/components/progress-bar/types.js +1 -0
  215. package/dist/esm/src/components/progress-bar/utils.js +22 -0
  216. package/dist/esm/src/components/radio/Radio.js +5 -5
  217. package/dist/esm/src/components/select/Select.js +7 -4
  218. package/dist/esm/src/components/select-dropdown/SelectDropdown.js +139 -0
  219. package/dist/esm/src/components/select-dropdown/index.js +1 -0
  220. package/dist/esm/src/components/selectbox/SelectBox.js +276 -0
  221. package/dist/esm/src/components/selectbox/index.js +1 -0
  222. package/dist/esm/src/components/shared/hintText/HintText.js +1 -1
  223. package/dist/esm/src/components/switch/Switch.js +116 -0
  224. package/dist/esm/src/components/switch/index.js +1 -0
  225. package/dist/esm/src/components/tab/HorizontalTab.js +7 -19
  226. package/dist/esm/src/components/tab/TabButton.js +34 -17
  227. package/dist/esm/src/components/tab/VerticalTab.js +15 -30
  228. package/dist/esm/src/components/tag/Tag.js +92 -3
  229. package/dist/esm/src/components/tooltip/Tooltip.js +125 -28
  230. package/dist/esm/src/hooks/dropdown/index.js +6 -0
  231. package/dist/esm/src/hooks/dropdown/useDropdown.js +102 -0
  232. package/dist/esm/src/hooks/dropdown/useDropdownKeyboard.js +124 -0
  233. package/dist/esm/src/hooks/dropdown/useDropdownPosition.js +20 -0
  234. package/dist/esm/src/hooks/dropdown/useOutsideClick.js +26 -0
  235. package/dist/esm/src/hooks/dropdown/useScrollLock.js +71 -0
  236. package/dist/esm/src/hooks/dropdown/useWindowResize.js +45 -0
  237. package/dist/esm/src/hooks/index.js +4 -1
  238. package/dist/esm/src/types/dropdown/dropdown.js +1 -0
  239. package/dist/esm/src/types/dropdown/index.js +2 -0
  240. package/dist/esm/src/types/dropdown/option.js +1 -0
  241. package/dist/esm/src/types/index.js +2 -0
  242. package/dist/esm/src/utils/date-picker.js +33 -1
  243. package/dist/esm/src/utils/dropdown/dropdownUtils.js +97 -0
  244. package/dist/esm/src/utils/dropdown/index.js +2 -0
  245. package/dist/esm/src/utils/dropdown/multiSelect.js +88 -0
  246. package/dist/esm/src/utils/index.js +4 -0
  247. package/dist/types/assets/scripts/comboBox.d.ts +79 -0
  248. package/dist/types/assets/scripts/datePicker.d.ts +16 -13
  249. package/dist/types/assets/scripts/featuredIcon.d.ts +23 -0
  250. package/dist/types/assets/scripts/fileInput/FileInput.d.ts +67 -0
  251. package/dist/types/assets/scripts/fileInput/FileInputModel.d.ts +70 -0
  252. package/dist/types/assets/scripts/fileInput/FileInputView.d.ts +77 -0
  253. package/dist/types/assets/scripts/fileInput/const/classNames.d.ts +17 -0
  254. package/dist/types/assets/scripts/fileInput/const/index.d.ts +3 -0
  255. package/dist/types/assets/scripts/fileInput/const/types.d.ts +132 -0
  256. package/dist/types/assets/scripts/fileInput/index.d.ts +4 -0
  257. package/dist/types/assets/scripts/imageFileInput/ImageFileInput.d.ts +64 -0
  258. package/dist/types/assets/scripts/imageFileInput/ImageFileInputModel.d.ts +74 -0
  259. package/dist/types/assets/scripts/imageFileInput/ImageFileInputView.d.ts +80 -0
  260. package/dist/types/assets/scripts/imageFileInput/const/classNames.d.ts +20 -0
  261. package/dist/types/assets/scripts/imageFileInput/const/index.d.ts +3 -0
  262. package/dist/types/assets/scripts/imageFileInput/const/types.d.ts +126 -0
  263. package/dist/types/assets/scripts/imageFileInput/index.d.ts +4 -0
  264. package/dist/types/assets/scripts/index.d.ts +28 -2
  265. package/dist/types/assets/scripts/modal/Modal.d.ts +28 -0
  266. package/dist/types/assets/scripts/modal/ModalActions.d.ts +19 -0
  267. package/dist/types/assets/scripts/modal/ModalContent.d.ts +14 -0
  268. package/dist/types/assets/scripts/modal/ModalHeader.d.ts +16 -0
  269. package/dist/types/assets/scripts/modal/const/classNames.d.ts +23 -0
  270. package/dist/types/assets/scripts/modal/const/index.d.ts +3 -0
  271. package/dist/types/assets/scripts/modal/const/types.d.ts +62 -0
  272. package/dist/types/assets/scripts/modal/index.d.ts +8 -0
  273. package/dist/types/assets/scripts/modal/utils/contentUtils.d.ts +11 -0
  274. package/dist/types/assets/scripts/notification/FloatingNotification.d.ts +25 -0
  275. package/dist/types/assets/scripts/notification/FullWidthNotification.d.ts +22 -0
  276. package/dist/types/assets/scripts/notification/Notification.d.ts +22 -0
  277. package/dist/types/assets/scripts/notification/const/classNames.d.ts +30 -0
  278. package/dist/types/assets/scripts/notification/const/icons.d.ts +26 -0
  279. package/dist/types/assets/scripts/notification/const/index.d.ts +5 -0
  280. package/dist/types/assets/scripts/notification/const/sizes.d.ts +28 -0
  281. package/dist/types/assets/scripts/notification/const/types.d.ts +19 -0
  282. package/dist/types/assets/scripts/notification/index.d.ts +7 -0
  283. package/dist/types/assets/scripts/notification/utils.d.ts +9 -0
  284. package/dist/types/assets/scripts/progress-bar/ProgressBar.d.ts +68 -0
  285. package/dist/types/assets/scripts/progress-bar/index.d.ts +2 -0
  286. package/dist/types/assets/scripts/selectBox.d.ts +77 -0
  287. package/dist/types/assets/scripts/shared/ButtonCloseX.d.ts +6 -0
  288. package/dist/types/assets/scripts/tag/Tag.d.ts +28 -0
  289. package/dist/types/assets/scripts/tag/const/classNames.d.ts +12 -0
  290. package/dist/types/assets/scripts/tag/const/index.d.ts +4 -0
  291. package/dist/types/assets/scripts/tag/const/sizes.d.ts +8 -0
  292. package/dist/types/assets/scripts/tag/const/types.d.ts +34 -0
  293. package/dist/types/assets/scripts/tag/index.d.ts +4 -0
  294. package/dist/types/assets/scripts/tooltip/Tooltip.d.ts +55 -0
  295. package/dist/types/assets/scripts/tooltip/TooltipLayerManager.d.ts +22 -0
  296. package/dist/types/assets/scripts/tooltip/const/classNames.d.ts +18 -0
  297. package/dist/types/assets/scripts/tooltip/const/constants.d.ts +34 -0
  298. package/dist/types/assets/scripts/tooltip/const/icons.d.ts +5 -0
  299. package/dist/types/assets/scripts/tooltip/const/index.d.ts +6 -0
  300. package/dist/types/assets/scripts/tooltip/const/templates.d.ts +17 -0
  301. package/dist/types/assets/scripts/tooltip/const/types.d.ts +15 -0
  302. package/dist/types/assets/scripts/tooltip/index.d.ts +7 -0
  303. package/dist/types/assets/scripts/tooltip/utils.d.ts +3 -0
  304. package/dist/types/assets/scripts/utils/selectbox/DOMRenderer.d.ts +108 -0
  305. package/dist/types/assets/scripts/utils/selectbox/DropdownModel.d.ts +154 -0
  306. package/dist/types/assets/scripts/utils/selectbox/SelectBoxController.d.ts +171 -0
  307. package/dist/types/assets/scripts/utils/selectbox/UnifiedSelectBox.d.ts +80 -0
  308. package/dist/types/constant/color.d.ts +3 -1
  309. package/dist/types/src/components/button/Button.d.ts +14 -12
  310. package/dist/types/src/components/button/ButtonGroup.d.ts +4 -289
  311. package/dist/types/src/components/checkbox/Checkbox.d.ts +2 -3
  312. package/dist/types/src/components/combobox/ComboBox.d.ts +28 -0
  313. package/dist/types/src/components/combobox/index.d.ts +3 -0
  314. package/dist/types/src/components/date-picker/CustomInput.d.ts +12 -0
  315. package/dist/types/src/components/date-picker/DatePicker.d.ts +2 -0
  316. package/dist/types/src/components/{input → file-upload}/FileInput.d.ts +1 -1
  317. package/dist/types/src/components/file-upload/index.d.ts +2 -0
  318. package/dist/types/src/components/image-file-input/ImageFileInput.d.ts +78 -0
  319. package/dist/types/src/components/image-file-input/components/ImagePreview.d.ts +6 -0
  320. package/dist/types/src/components/image-file-input/index.d.ts +2 -0
  321. package/dist/types/src/components/index.d.ts +4 -0
  322. package/dist/types/src/components/input/InputBase.d.ts +2 -0
  323. package/dist/types/src/components/input/index.d.ts +0 -1
  324. package/dist/types/src/components/modal/Modal.d.ts +3 -2
  325. package/dist/types/src/components/notification/FloatingNotification.d.ts +5 -0
  326. package/dist/types/src/components/notification/FullWidthNotification.d.ts +15 -1
  327. package/dist/types/src/components/notification/Notification.d.ts +8 -2
  328. package/dist/types/src/components/pagination/NavButton.d.ts +1 -4
  329. package/dist/types/src/components/pagination/Pagination.d.ts +2 -13
  330. package/dist/types/src/components/progress-bar/ProgressBar.d.ts +2 -6
  331. package/dist/types/src/components/progress-bar/components/SegmentBar.d.ts +8 -0
  332. package/dist/types/src/components/progress-bar/components/SegmentLabels.d.ts +16 -0
  333. package/dist/types/src/components/progress-bar/hooks/useProgressBar.d.ts +14 -0
  334. package/dist/types/src/components/progress-bar/index.d.ts +1 -0
  335. package/dist/types/src/components/progress-bar/types.d.ts +16 -0
  336. package/dist/types/src/components/progress-bar/utils.d.ts +13 -0
  337. package/dist/types/src/components/radio/Radio.d.ts +2 -3
  338. package/dist/types/src/components/select/Select.d.ts +1 -4
  339. package/dist/types/src/components/select-dropdown/SelectDropdown.d.ts +28 -0
  340. package/dist/types/src/components/select-dropdown/index.d.ts +2 -0
  341. package/dist/types/src/components/selectbox/SelectBox.d.ts +25 -0
  342. package/dist/types/src/components/selectbox/index.d.ts +2 -0
  343. package/dist/types/src/components/switch/Switch.d.ts +22 -0
  344. package/dist/types/src/components/switch/index.d.ts +3 -0
  345. package/dist/types/src/components/tab/HorizontalTab.d.ts +1 -2
  346. package/dist/types/src/components/tab/TabButton.d.ts +9 -12
  347. package/dist/types/src/components/tab/VerticalTab.d.ts +2 -2
  348. package/dist/types/src/components/tag/Tag.d.ts +3 -1
  349. package/dist/types/src/components/tooltip/Tooltip.d.ts +4 -2
  350. package/dist/types/src/hooks/dropdown/index.d.ts +7 -0
  351. package/dist/types/src/hooks/dropdown/useDropdown.d.ts +30 -0
  352. package/dist/types/src/hooks/dropdown/useDropdownKeyboard.d.ts +11 -0
  353. package/dist/types/src/hooks/dropdown/useDropdownPosition.d.ts +10 -0
  354. package/dist/types/src/hooks/dropdown/useOutsideClick.d.ts +6 -0
  355. package/dist/types/src/hooks/dropdown/useScrollLock.d.ts +5 -0
  356. package/dist/types/src/hooks/dropdown/useWindowResize.d.ts +8 -0
  357. package/dist/types/src/hooks/index.d.ts +2 -1
  358. package/dist/types/src/types/dropdown/dropdown.d.ts +40 -0
  359. package/dist/types/src/types/dropdown/index.d.ts +3 -0
  360. package/dist/types/src/types/dropdown/option.d.ts +20 -0
  361. package/dist/types/src/types/index.d.ts +2 -0
  362. package/dist/types/src/utils/date-picker.d.ts +3 -0
  363. package/dist/types/src/utils/dropdown/dropdownUtils.d.ts +18 -0
  364. package/dist/types/src/utils/dropdown/index.d.ts +3 -0
  365. package/dist/types/src/utils/dropdown/multiSelect.d.ts +32 -0
  366. package/dist/types/src/utils/index.d.ts +3 -0
  367. package/dist/ui-admin/assets/styles/style.css +1744 -358
  368. package/package.json +8 -4
@@ -0,0 +1,115 @@
1
+ var __assign = this && this.__assign || function () {
2
+ __assign = Object.assign || function (t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
6
+ }
7
+ return t;
8
+ };
9
+ return __assign.apply(this, arguments);
10
+ };
11
+ import { SVG_ICONS, CLASS_NAMES, FULL_WIDTH_ICON_MAP, FULL_WIDTH_SIZES } from './const';
12
+ import { createWrapperElement, renderSupportingText, renderActions, bindNotificationEvents, setupAutoClose } from './utils';
13
+ var FullWidthNotification = /** @class */function () {
14
+ function FullWidthNotification(options) {
15
+ this.options = __assign({
16
+ color: 'neutral',
17
+ className: '',
18
+ actions: [],
19
+ autoClose: 0,
20
+ supportingText: undefined
21
+ }, options);
22
+ this.element = this.createElement();
23
+ this.bindEvents();
24
+ this.setupAutoClose();
25
+ }
26
+ FullWidthNotification.prototype.createElement = function () {
27
+ var _a = this.options,
28
+ title = _a.title,
29
+ supportingText = _a.supportingText,
30
+ color = _a.color,
31
+ className = _a.className,
32
+ actions = _a.actions,
33
+ onClose = _a.onClose,
34
+ supportTextLink = _a.supportTextLink,
35
+ onHidePermanently = _a.onHidePermanently;
36
+ var wrapper = createWrapperElement(CLASS_NAMES.FULL_WIDTH.BASE, color, className);
37
+ var iconHtml = FULL_WIDTH_ICON_MAP[color](FULL_WIDTH_SIZES.ICON);
38
+ wrapper.innerHTML = this.buildTemplate({
39
+ iconHtml: iconHtml,
40
+ title: title,
41
+ supportingText: supportingText,
42
+ actions: actions,
43
+ onClose: onClose,
44
+ supportTextLink: supportTextLink,
45
+ onHidePermanently: onHidePermanently
46
+ });
47
+ return wrapper;
48
+ };
49
+ FullWidthNotification.prototype.buildTemplate = function (params) {
50
+ var iconHtml = params.iconHtml,
51
+ title = params.title,
52
+ supportingText = params.supportingText,
53
+ actions = params.actions,
54
+ onClose = params.onClose,
55
+ supportTextLink = params.supportTextLink,
56
+ onHidePermanently = params.onHidePermanently;
57
+ return "\n <div class=\"".concat(CLASS_NAMES.FULL_WIDTH.CONTAINER, "\">\n <div class=\"").concat(CLASS_NAMES.FULL_WIDTH.CONTENT, "\">\n <div class=\"").concat(CLASS_NAMES.FULL_WIDTH.CONTENT_WRAPPER, "\">\n <div class=\"").concat(CLASS_NAMES.FULL_WIDTH.ICON, "\">").concat(iconHtml, "</div>\n <div class=\"").concat(CLASS_NAMES.FULL_WIDTH.TEXT_CONTAINER, "\">\n <span class=\"").concat(CLASS_NAMES.FULL_WIDTH.TITLE, "\">").concat(title, "</span>\n ").concat(renderSupportingText(supportingText, CLASS_NAMES.FULL_WIDTH.SUPPORTING_TEXT, supportTextLink), "\n </div>\n </div>\n <div class=\"").concat(CLASS_NAMES.FULL_WIDTH.ACTIONS_CONTAINER, "\">\n ").concat(actions && actions.length > 0 ? renderActions(actions, CLASS_NAMES.FULL_WIDTH.ACTIONS) : '', "\n ").concat(this.renderHidePermanentlyButton(onHidePermanently), "\n ").concat(this.renderCloseButton(onClose), "\n </div>\n </div>\n </div>\n ");
58
+ };
59
+ FullWidthNotification.prototype.renderHidePermanentlyButton = function (onHidePermanently) {
60
+ if (!onHidePermanently) return '';
61
+ return "\n <button type=\"button\" class=\"ncua-notification__action-button ncua-notification__action-button--text ncua-full-width-notification__link\" data-hide-permanently=\"true\">\n \uB2E4\uC2DC\uBCF4\uC9C0 \uC54A\uAE30\n </button>\n ";
62
+ };
63
+ FullWidthNotification.prototype.renderCloseButton = function (onClose) {
64
+ if (!onClose) return '';
65
+ return "\n <button type=\"button\" class=\"".concat(CLASS_NAMES.FULL_WIDTH.CLOSE_BUTTON, "\" aria-label=\"\uC54C\uB9BC \uB2EB\uAE30\">\n ").concat(SVG_ICONS['x-close'](FULL_WIDTH_SIZES.CLOSE_BUTTON), "\n </button>\n ");
66
+ };
67
+ FullWidthNotification.prototype.bindEvents = function () {
68
+ var _this = this;
69
+ bindNotificationEvents(this.element, this.options.actions, this.options.onClose, function () {
70
+ return _this.remove();
71
+ });
72
+ // 다시보지 않기 버튼 이벤트 바인딩
73
+ if (this.options.onHidePermanently) {
74
+ var hidePermanentlyButton = this.element.querySelector('[data-hide-permanently="true"]');
75
+ if (hidePermanentlyButton) {
76
+ hidePermanentlyButton.addEventListener('click', function () {
77
+ var _a, _b;
78
+ (_b = (_a = _this.options).onHidePermanently) === null || _b === void 0 ? void 0 : _b.call(_a);
79
+ _this.remove();
80
+ });
81
+ }
82
+ }
83
+ };
84
+ FullWidthNotification.prototype.setupAutoClose = function () {
85
+ var _this = this;
86
+ this.autoCloseTimer = setupAutoClose(this.options.autoClose, this.options.onClose, function () {
87
+ return _this.remove();
88
+ });
89
+ };
90
+ // Public methods
91
+ FullWidthNotification.prototype.getElement = function () {
92
+ return this.element;
93
+ };
94
+ FullWidthNotification.prototype.appendTo = function (parent) {
95
+ parent.appendChild(this.element);
96
+ };
97
+ FullWidthNotification.prototype.remove = function () {
98
+ if (this.autoCloseTimer) {
99
+ clearTimeout(this.autoCloseTimer);
100
+ this.autoCloseTimer = undefined;
101
+ }
102
+ if (this.element && this.element.parentNode) {
103
+ this.element.parentNode.removeChild(this.element);
104
+ }
105
+ };
106
+ FullWidthNotification.prototype.destroy = function () {
107
+ this.remove();
108
+ };
109
+ // Static factory methods
110
+ FullWidthNotification.create = function (options) {
111
+ return new FullWidthNotification(options);
112
+ };
113
+ return FullWidthNotification;
114
+ }();
115
+ export { FullWidthNotification };
@@ -0,0 +1,108 @@
1
+ var __assign = this && this.__assign || function () {
2
+ __assign = Object.assign || function (t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
6
+ }
7
+ return t;
8
+ };
9
+ return __assign.apply(this, arguments);
10
+ };
11
+ var __rest = this && this.__rest || function (s, e) {
12
+ var t = {};
13
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
14
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
15
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
16
+ }
17
+ return t;
18
+ };
19
+ import { FullWidthNotification } from './FullWidthNotification';
20
+ import { FloatingNotification } from './FloatingNotification';
21
+ // 통합 Notification 클래스
22
+ var Notification = /** @class */function () {
23
+ function Notification(options) {
24
+ var _a = options.type,
25
+ type = _a === void 0 ? 'floating' : _a,
26
+ baseOptions = __rest(options, ["type"]);
27
+ if (type === 'floating') {
28
+ this.instance = new FloatingNotification(baseOptions);
29
+ } else {
30
+ this.instance = new FullWidthNotification(baseOptions);
31
+ }
32
+ }
33
+ // 모든 메서드를 instance에 위임
34
+ Notification.prototype.getElement = function () {
35
+ return this.instance.getElement();
36
+ };
37
+ Notification.prototype.appendTo = function (parent) {
38
+ return this.instance.appendTo(parent);
39
+ };
40
+ Notification.prototype.remove = function () {
41
+ return this.instance.remove();
42
+ };
43
+ Notification.prototype.destroy = function () {
44
+ return this.instance.destroy();
45
+ };
46
+ Notification.prototype.show = function (parent) {
47
+ if (parent) {
48
+ this.instance.appendTo(parent);
49
+ } else {
50
+ this.instance.appendTo(document.body);
51
+ }
52
+ };
53
+ // Static factory methods
54
+ Notification.create = function (options) {
55
+ return new Notification(options);
56
+ };
57
+ // Convenience method for creating notifications with specific color
58
+ Notification.createWithColor = function (color, title, supportingText, options) {
59
+ var autoCloseMap = {
60
+ success: 3000,
61
+ error: 5000,
62
+ warning: 3000,
63
+ info: 3000,
64
+ neutral: 0
65
+ };
66
+ return new Notification(__assign({
67
+ title: title,
68
+ supportingText: supportingText,
69
+ color: color,
70
+ type: 'floating',
71
+ autoClose: autoCloseMap[color]
72
+ }, options));
73
+ };
74
+ // 클래스를 생성하지 않고도 기본 floating 알림 생성을 하기 위한 함수들
75
+ Notification.success = function (title, supportingText, options) {
76
+ var notification = this.createWithColor('success', title, supportingText, options);
77
+ notification.show();
78
+ return notification;
79
+ };
80
+ Notification.error = function (title, supportingText, options) {
81
+ var notification = this.createWithColor('error', title, supportingText, options);
82
+ notification.show();
83
+ return notification;
84
+ };
85
+ Notification.warning = function (title, supportingText, options) {
86
+ var notification = this.createWithColor('warning', title, supportingText, options);
87
+ notification.show();
88
+ return notification;
89
+ };
90
+ Notification.info = function (title, supportingText, options) {
91
+ var notification = this.createWithColor('info', title, supportingText, options);
92
+ notification.show();
93
+ return notification;
94
+ };
95
+ Notification.neutral = function (title, supportingText, options) {
96
+ var notification = this.createWithColor('neutral', title, supportingText, options);
97
+ notification.show();
98
+ return notification;
99
+ };
100
+ // showFullWidth method for backward compatibility
101
+ Notification.showFullWidth = function (options) {
102
+ return new Notification(__assign(__assign({}, options), {
103
+ type: 'full-width'
104
+ }));
105
+ };
106
+ return Notification;
107
+ }();
108
+ export { Notification };
@@ -0,0 +1,30 @@
1
+ // CSS class names
2
+ export var CLASS_NAMES = {
3
+ FULL_WIDTH: {
4
+ BASE: 'ncua-full-width-notification',
5
+ CONTAINER: 'ncua-full-width-notification__container',
6
+ CONTENT: 'ncua-full-width-notification__content',
7
+ CONTENT_WRAPPER: 'ncua-full-width-notification__content-wrapper',
8
+ ICON: 'ncua-full-width-notification__icon',
9
+ TEXT_CONTAINER: 'ncua-full-width-notification__text-container',
10
+ TITLE: 'ncua-full-width-notification__title',
11
+ SUPPORTING_TEXT: 'ncua-full-width-notification__supporting-text',
12
+ ACTIONS_CONTAINER: 'ncua-full-width-notification__actions-container',
13
+ ACTIONS: 'ncua-full-width-notification__actions',
14
+ CLOSE_BUTTON: 'ncua-full-width-notification__close-button'
15
+ },
16
+ FLOATING: {
17
+ BASE: 'ncua-floating-notification',
18
+ CONTAINER: 'ncua-floating-notification__container',
19
+ CONTENT: 'ncua-floating-notification__content',
20
+ TEXT_CONTAINER: 'ncua-floating-notification__text-container',
21
+ TITLE_WRAPPER: 'ncua-floating-notification__title-wrapper',
22
+ TITLE: 'ncua-floating-notification__title',
23
+ SUPPORTING_TEXT: 'ncua-floating-notification__supporting-text',
24
+ ACTIONS: 'ncua-floating-notification__actions',
25
+ CLOSE_BUTTON: 'ncua-floating-notification__close-button'
26
+ },
27
+ COMMON: {
28
+ ACTION_BUTTON: 'ncua-notification__action-button'
29
+ }
30
+ };
@@ -0,0 +1,39 @@
1
+ // SVG 아이콘들 (크기는 동적으로 설정)
2
+ export var SVG_ICONS = {
3
+ 'pin-02': function (size) {
4
+ return "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"".concat(size, "\" height=\"").concat(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>");
5
+ },
6
+ 'alert-triangle': function (size) {
7
+ return "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"".concat(size, "\" height=\"").concat(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>");
8
+ },
9
+ 'alert-circle': function (size) {
10
+ return "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"".concat(size, "\" height=\"").concat(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>");
11
+ },
12
+ 'check-circle': function (size) {
13
+ return "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"".concat(size, "\" height=\"").concat(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>");
14
+ },
15
+ 'info-circle': function (size) {
16
+ return "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"".concat(size, "\" height=\"").concat(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>");
17
+ },
18
+ 'message-chat-square': function (size) {
19
+ return "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"".concat(size, "\" height=\"").concat(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>");
20
+ },
21
+ 'x-close': function (size) {
22
+ return "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"".concat(size, "\" height=\"").concat(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>");
23
+ }
24
+ };
25
+ export var FLOATING_ICON_MAP = {
26
+ neutral: SVG_ICONS['pin-02'],
27
+ error: SVG_ICONS['alert-triangle'],
28
+ warning: SVG_ICONS['alert-circle'],
29
+ success: SVG_ICONS['check-circle']
30
+ // info는 floating에서는 지원하지 않음
31
+ };
32
+ export var FULL_WIDTH_ICON_MAP = {
33
+ neutral: SVG_ICONS['message-chat-square'],
34
+ error: SVG_ICONS['alert-triangle'],
35
+ warning: SVG_ICONS['alert-triangle'],
36
+ success: SVG_ICONS['check-circle'],
37
+ info: SVG_ICONS['info-circle']
38
+ };
39
+ export var ICON_MAP = FULL_WIDTH_ICON_MAP;
@@ -0,0 +1,3 @@
1
+ export { SVG_ICONS, FLOATING_ICON_MAP, FULL_WIDTH_ICON_MAP, ICON_MAP } from './icons';
2
+ export { CLASS_NAMES } from './classNames';
3
+ export { FEATURED_ICON_SIZES, ICON_PIXEL_SIZES, CLOSE_BUTTON_SIZES, CLOSE_BUTTON_SVG_SIZES, FULL_WIDTH_SIZES, getSizes } from './sizes';
@@ -0,0 +1,42 @@
1
+ // 알림 컴포넌트 사이즈 관련 상수들
2
+ // FeaturedIcon 사이즈
3
+ export var FEATURED_ICON_SIZES = {
4
+ MOBILE: 'md',
5
+ DESKTOP: 'sm'
6
+ };
7
+ // SVG 아이콘 픽셀 사이즈
8
+ export var ICON_PIXEL_SIZES = {
9
+ MOBILE: '20',
10
+ DESKTOP: '16',
11
+ FULL_WIDTH: '16' // Full-width는 항상 고정
12
+ };
13
+ // 닫기 버튼 사이즈
14
+ export var CLOSE_BUTTON_SIZES = {
15
+ MOBILE: 'sm',
16
+ DESKTOP: 'xs'
17
+ };
18
+ // 닫기 버튼 SVG 픽셀 사이즈
19
+ export var CLOSE_BUTTON_SVG_SIZES = {
20
+ xs: 16,
21
+ sm: 20
22
+ };
23
+ // Full-width 알림 고정 사이즈
24
+ export var FULL_WIDTH_SIZES = {
25
+ ICON: '16',
26
+ CLOSE_BUTTON: '20'
27
+ };
28
+ // 사이즈 유틸리티 함수들
29
+ export var getSizes = {
30
+ featuredIcon: function (isMobile) {
31
+ return isMobile ? FEATURED_ICON_SIZES.MOBILE : FEATURED_ICON_SIZES.DESKTOP;
32
+ },
33
+ iconPixel: function (isMobile) {
34
+ return isMobile ? ICON_PIXEL_SIZES.MOBILE : ICON_PIXEL_SIZES.DESKTOP;
35
+ },
36
+ closeButton: function (isMobile) {
37
+ return isMobile ? CLOSE_BUTTON_SIZES.MOBILE : CLOSE_BUTTON_SIZES.DESKTOP;
38
+ },
39
+ closeButtonSvg: function (size) {
40
+ return CLOSE_BUTTON_SVG_SIZES[size];
41
+ }
42
+ };
@@ -0,0 +1,10 @@
1
+ export { Notification } from './Notification';
2
+ export { FullWidthNotification } from './FullWidthNotification';
3
+ export { FloatingNotification } from './FloatingNotification';
4
+ export * from './utils';
5
+ export { SVG_ICONS, CLASS_NAMES, ICON_MAP, FLOATING_ICON_MAP, FULL_WIDTH_ICON_MAP } from './const';
6
+ // 전역 등록 ( 추후 index.ts와 개별동작 할 수 있게끔 대비 )
7
+ if (typeof window !== 'undefined') {
8
+ window.ncua = window.ncua || {};
9
+ window.ncua.Notification = Notification;
10
+ }
@@ -0,0 +1,79 @@
1
+ import { CLASS_NAMES } from './const';
2
+ import { BREAKPOINT } from '../../../src/constant/breakpoint';
3
+ // 공통 유틸리티 함수들
4
+ export function createWrapperElement(baseClass, color, className) {
5
+ var wrapper = document.createElement('div');
6
+ wrapper.className = buildClassName(baseClass, color, className);
7
+ wrapper.setAttribute('role', 'alert');
8
+ return wrapper;
9
+ }
10
+ export function buildClassName(baseClass, color, className) {
11
+ var classes = [baseClass, "".concat(baseClass, "--").concat(color)];
12
+ if (className) {
13
+ classes.push(className);
14
+ }
15
+ return classes.join(' ');
16
+ }
17
+ export function renderSupportingText(supportingText, className, supportTextLink) {
18
+ if (!supportingText) return '';
19
+ if (supportTextLink) {
20
+ return "<a href=\"".concat(supportTextLink, "\" class=\"ncua-full-width-notification__link\"><span class=\"").concat(className, "\">").concat(supportingText, "</span></a>");
21
+ }
22
+ return "<span class=\"".concat(className, "\">").concat(supportingText, "</span>");
23
+ }
24
+ export function renderActions(actions, wrapperClass) {
25
+ // 액션이 없으면 빈 문자열 반환
26
+ if (!actions || actions.length === 0) {
27
+ return '';
28
+ }
29
+ var buttonsHtml = actions.map(function (action) {
30
+ var buttonHtml = "\n <button \n class=\"ncua-notification__action-button ncua-notification__action-button--".concat(action.hierarchy || 'link', "\"\n data-action=\"").concat(action.label, "-").concat(action.hierarchy, "\"\n >\n ").concat(action.label, "\n </button>");
31
+ return buttonHtml;
32
+ }).join('');
33
+ return "<div class=\"".concat(wrapperClass, "\">").concat(buttonsHtml, "</div>");
34
+ }
35
+ // 공통 이벤트 처리
36
+ export function bindNotificationEvents(element, actions, onClose, onRemove) {
37
+ element.addEventListener('click', function (event) {
38
+ var target = event.target;
39
+ // 닫기 버튼 클릭 처리
40
+ if (target.matches(".".concat(CLASS_NAMES.FULL_WIDTH.CLOSE_BUTTON, ", .").concat(CLASS_NAMES.FLOATING.CLOSE_BUTTON)) || target.closest(".".concat(CLASS_NAMES.FULL_WIDTH.CLOSE_BUTTON, ", .").concat(CLASS_NAMES.FLOATING.CLOSE_BUTTON))) {
41
+ onClose === null || onClose === void 0 ? void 0 : onClose();
42
+ onRemove === null || onRemove === void 0 ? void 0 : onRemove();
43
+ return;
44
+ }
45
+ // 액션 버튼 클릭 처리
46
+ var actionButton = target.closest('.ncua-notification__action-button[data-action]');
47
+ if (actionButton && actions) {
48
+ var actionData = actionButton.getAttribute('data-action');
49
+ if (actionData) {
50
+ var matchedAction = null;
51
+ for (var _i = 0, actions_1 = actions; _i < actions_1.length; _i++) {
52
+ var action = actions_1[_i];
53
+ var expectedDataAction = "".concat(action.label, "-").concat(action.hierarchy || 'link');
54
+ if (actionData === expectedDataAction) {
55
+ matchedAction = action;
56
+ break;
57
+ }
58
+ }
59
+ if (matchedAction === null || matchedAction === void 0 ? void 0 : matchedAction.onClick) {
60
+ matchedAction.onClick();
61
+ }
62
+ }
63
+ }
64
+ });
65
+ }
66
+ // 자동 닫기 설정
67
+ export function setupAutoClose(autoClose, onClose, onRemove) {
68
+ if (autoClose > 0) {
69
+ return window.setTimeout(function () {
70
+ onClose === null || onClose === void 0 ? void 0 : onClose();
71
+ onRemove === null || onRemove === void 0 ? void 0 : onRemove();
72
+ }, autoClose);
73
+ }
74
+ return undefined;
75
+ }
76
+ // Mobile detection utility
77
+ export var isMobile = function () {
78
+ return window.innerWidth <= parseInt(BREAKPOINT.mobile);
79
+ };