@ncds/ui-admin 1.8.27 → 1.8.28-alpha.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 (528) hide show
  1. package/dist/cjs/assets/scripts/notification/const/icons.js +1 -2
  2. package/dist/cjs/assets/scripts/notification/const/index.js +0 -30
  3. package/dist/cjs/assets/scripts/notification/const/sizes.js +5 -5
  4. package/dist/cjs/assets/scripts/notification/index.js +0 -7
  5. package/dist/cjs/assets/scripts/shared/ButtonCloseX.js +5 -4
  6. package/dist/cjs/assets/scripts/tooltip/const/classNames.js +29 -0
  7. package/dist/cjs/assets/scripts/tooltip/const/constants.js +58 -0
  8. package/dist/cjs/assets/scripts/tooltip/const/icons.js +15 -0
  9. package/dist/cjs/assets/scripts/tooltip/const/index.js +117 -0
  10. package/dist/cjs/assets/scripts/tooltip/const/templates.js +67 -0
  11. package/dist/cjs/assets/scripts/tooltip/const/types.js +5 -0
  12. package/dist/cjs/assets/scripts/utils/sanitize.js +0 -13
  13. package/dist/cjs/src/__tests__/helpers/dom.js +14 -0
  14. package/dist/cjs/src/__tests__/helpers/fileInput.js +92 -0
  15. package/dist/cjs/src/__tests__/helpers/fixedToday.js +17 -0
  16. package/dist/cjs/src/__tests__/helpers/matchMedia.js +50 -0
  17. package/dist/cjs/src/__tests__/helpers/rect.js +25 -0
  18. package/dist/cjs/src/components/action/button/__tests__/Button.test.js +260 -0
  19. package/dist/cjs/src/components/action/button-group/__tests__/ButtonGroup.test.js +267 -0
  20. package/dist/cjs/src/components/data-display/data-grid/__tests__/DataGrid.test.js +350 -0
  21. package/dist/cjs/src/components/data-display/table/__tests__/Table.dnd.dragCell.test.js +320 -0
  22. package/dist/cjs/src/components/data-display/table/__tests__/Table.dnd.test.js +313 -0
  23. package/dist/cjs/src/components/data-display/table/__tests__/Table.scroll.test.js +194 -0
  24. package/dist/cjs/src/components/data-display/table/__tests__/Table.test.js +382 -0
  25. package/dist/cjs/src/components/data-display/table/__tests__/dnd-context.test.js +61 -0
  26. package/dist/cjs/src/components/data-display/table/__tests__/dnd-preview.test.js +230 -0
  27. package/dist/cjs/src/components/data-display/table/__tests__/tableDndTestUtils.js +266 -0
  28. package/dist/cjs/src/components/data-display/table/__tests__/tableTestUtils.js +48 -0
  29. package/dist/cjs/src/components/data-display/table/__tests__/useTableScrollbars.ownership.test.js +362 -0
  30. package/dist/cjs/src/components/data-display/table/useTableScrollbars.js +0 -24
  31. package/dist/cjs/src/components/feedback-and-status/badge/Badge.js +1 -1
  32. package/dist/cjs/src/components/feedback-and-status/badge/__tests__/Badge.test.js +189 -0
  33. package/dist/cjs/src/components/feedback-and-status/badge-group/__tests__/BadgeGroup.test.js +119 -0
  34. package/dist/cjs/src/components/feedback-and-status/carousel-arrow/__tests__/CarouselArrow.test.js +94 -0
  35. package/dist/cjs/src/components/feedback-and-status/carousel-number-group/__tests__/CarouselNumberGroup.test.js +64 -0
  36. package/dist/cjs/src/components/feedback-and-status/empty-state/__tests__/EmptyState.test.js +126 -0
  37. package/dist/cjs/src/components/feedback-and-status/progress-bar/__tests__/ProgressBar.test.js +277 -0
  38. package/dist/cjs/src/components/feedback-and-status/progress-bar/__tests__/useProgressBar.test.js +249 -0
  39. package/dist/cjs/src/components/feedback-and-status/progress-bar/__tests__/utils.test.js +22 -0
  40. package/dist/cjs/src/components/feedback-and-status/progress-circle/__tests__/ProgressCircle.test.js +102 -0
  41. package/dist/cjs/src/components/feedback-and-status/spinner/__tests__/Spinner.test.js +76 -0
  42. package/dist/cjs/src/components/feedback-and-status/tag/__tests__/Tag.test.js +604 -0
  43. package/dist/cjs/src/components/forms-and-input/checkbox/__tests__/Checkbox.test.js +213 -0
  44. package/dist/cjs/src/components/forms-and-input/combo-box/ComboBox.js +2 -2
  45. package/dist/cjs/src/components/forms-and-input/combo-box/__tests__/ComboBox.interaction.test.js +442 -0
  46. package/dist/cjs/src/components/forms-and-input/combo-box/__tests__/ComboBox.register.test.js +153 -0
  47. package/dist/cjs/src/components/forms-and-input/combo-box/__tests__/comboBoxTestUtils.js +92 -0
  48. package/dist/cjs/src/components/forms-and-input/date-picker/__tests__/DatePicker.input.test.js +546 -0
  49. package/dist/cjs/src/components/forms-and-input/date-picker/__tests__/DatePicker.position.test.js +550 -0
  50. package/dist/cjs/src/components/forms-and-input/date-picker/__tests__/utils.test.js +34 -0
  51. package/dist/cjs/src/components/forms-and-input/file-input/__tests__/FileInput.select.test.js +266 -0
  52. package/dist/cjs/src/components/forms-and-input/image-file-input/__tests__/ImageFileInput.select.test.js +416 -0
  53. package/dist/cjs/src/components/forms-and-input/input-base/__tests__/InputBase.slots.test.js +236 -0
  54. package/dist/cjs/src/components/forms-and-input/number-input/__tests__/NumberInput.test.js +570 -0
  55. package/dist/cjs/src/components/forms-and-input/password-input/__tests__/PasswordInput.toggle.test.js +113 -0
  56. package/dist/cjs/src/components/forms-and-input/radio/__tests__/Radio.test.js +57 -0
  57. package/dist/cjs/src/components/forms-and-input/range-date-picker/__tests__/RangeDatePicker.test.js +275 -0
  58. package/dist/cjs/src/components/forms-and-input/range-date-picker-with-buttons/__tests__/RangeDatePickerWithButtons.test.js +235 -2
  59. package/dist/cjs/src/components/forms-and-input/select/__tests__/Select.test.js +275 -0
  60. package/dist/cjs/src/components/forms-and-input/select-box/SelectBox.js +2 -2
  61. package/dist/cjs/src/components/forms-and-input/select-box/__tests__/SelectBox.portal.test.js +371 -0
  62. package/dist/cjs/src/components/forms-and-input/select-box/__tests__/SelectBox.test.js +1335 -0
  63. package/dist/cjs/src/components/forms-and-input/slider/__tests__/Slider.test.js +390 -0
  64. package/dist/cjs/src/components/forms-and-input/switch/__tests__/Switch.test.js +317 -0
  65. package/dist/cjs/src/components/forms-and-input/textarea/__tests__/Textarea.test.js +255 -0
  66. package/dist/cjs/src/components/forms-and-input/textarea/__tests__/Textarea.unmount.test.js +158 -0
  67. package/dist/cjs/src/components/forms-and-input/toggle/__tests__/Toggle.test.js +138 -0
  68. package/dist/cjs/src/components/image-and-icons/featured-icon/__tests__/FeaturedIcon.test.js +67 -0
  69. package/dist/cjs/src/components/layout/block-container/__tests__/BlockContainer.test.js +59 -0
  70. package/dist/cjs/src/components/layout/block-header/__tests__/BlockHeader.test.js +169 -0
  71. package/dist/cjs/src/components/layout/block-header/__tests__/SubTitle.test.js +77 -0
  72. package/dist/cjs/src/components/layout/divider/__tests__/Divider.test.js +65 -0
  73. package/dist/cjs/src/components/layout/ncua-scope/__tests__/NcuaScope.test.js +146 -0
  74. package/dist/cjs/src/components/layout/page-title/__tests__/PageTitle.test.js +164 -0
  75. package/dist/cjs/src/components/layout/page-title/__tests__/pageTitleStyle.test.js +94 -0
  76. package/dist/cjs/src/components/navigation/context-tab/__tests__/ContextTab.test.js +616 -0
  77. package/dist/cjs/src/components/navigation/context-tab/__tests__/useContextTabScroll.test.js +592 -0
  78. package/dist/cjs/src/components/navigation/horizontal-tab/__tests__/HorizontalTab.test.js +211 -0
  79. package/dist/cjs/src/components/navigation/pagination/__tests__/Pagination.navigation.test.js +285 -0
  80. package/dist/cjs/src/components/navigation/vertical-tab/__tests__/VerticalTab.test.js +255 -0
  81. package/dist/cjs/src/components/overlays/dropdown/__tests__/Dropdown.dnd.test.js +558 -0
  82. package/dist/cjs/src/components/overlays/dropdown/__tests__/Dropdown.test.js +1020 -0
  83. package/dist/cjs/src/components/overlays/dropdown/__tests__/dropdownTestUtils.js +24 -0
  84. package/dist/cjs/src/components/overlays/dropdown/__tests__/utils.test.js +56 -0
  85. package/dist/cjs/src/components/overlays/modal/__tests__/Modal.test.js +426 -0
  86. package/dist/cjs/src/components/overlays/notification/__tests__/FloatingNotification.test.js +284 -0
  87. package/dist/cjs/src/components/overlays/notification/__tests__/MessageNotification.test.js +12 -0
  88. package/dist/cjs/src/components/overlays/postcode-search-modal/PostcodeSearchModalTip.js +2 -2
  89. package/dist/cjs/src/components/overlays/postcode-search-modal/__tests__/PostcodeSearchModal.viewport.test.js +141 -0
  90. package/dist/cjs/src/components/overlays/tooltip/__tests__/Tooltip.test.js +829 -0
  91. package/dist/cjs/src/components/tab/__tests__/TabButton.test.js +252 -0
  92. package/dist/cjs/src/generated/scoped-css.js +1 -1
  93. package/dist/cjs/src/hooks/__tests__/useCallbackRef.test.js +152 -0
  94. package/dist/cjs/src/hooks/__tests__/useMediaQuery.test.js +119 -0
  95. package/dist/cjs/src/hooks/__tests__/usePortalState.ssr.test.js +25 -0
  96. package/dist/cjs/src/hooks/dropdown/__tests__/dropdownHooks.test.js +168 -0
  97. package/dist/cjs/src/types/component-meta.js +0 -4
  98. package/dist/cjs/src/utils/__tests__/date-picker.test.js +105 -0
  99. package/dist/cjs/src/utils/dropdown/__tests__/dropdownUtils.test.js +24 -0
  100. package/dist/cjs/src/utils/dropdown/__tests__/multiSelect.test.js +49 -0
  101. package/dist/cjs/src/utils/dropdown/multiSelect.js +1 -6
  102. package/dist/cjs/src/utils/portal-position/__tests__/portalPosition.nullAnchor.test.js +67 -0
  103. package/dist/cjs/vitest.config.js +22 -5
  104. package/dist/esm/assets/scripts/notification/const/icons.js +0 -1
  105. package/dist/esm/assets/scripts/notification/const/index.js +2 -2
  106. package/dist/esm/assets/scripts/notification/const/sizes.js +4 -4
  107. package/dist/esm/assets/scripts/notification/index.js +1 -1
  108. package/dist/esm/assets/scripts/shared/ButtonCloseX.js +6 -3
  109. package/dist/esm/assets/scripts/tooltip/const/classNames.js +23 -0
  110. package/dist/esm/assets/scripts/tooltip/const/constants.js +52 -0
  111. package/dist/esm/assets/scripts/tooltip/const/icons.js +9 -0
  112. package/dist/esm/assets/scripts/tooltip/const/index.js +5 -0
  113. package/dist/esm/assets/scripts/tooltip/const/templates.js +60 -0
  114. package/dist/esm/assets/scripts/tooltip/const/types.js +1 -0
  115. package/dist/esm/assets/scripts/utils/sanitize.js +0 -12
  116. package/dist/esm/src/__tests__/helpers/dom.js +8 -0
  117. package/dist/esm/src/__tests__/helpers/fileInput.js +78 -0
  118. package/dist/esm/src/__tests__/helpers/fixedToday.js +10 -0
  119. package/dist/esm/src/__tests__/helpers/matchMedia.js +44 -0
  120. package/dist/esm/src/__tests__/helpers/rect.js +18 -0
  121. package/dist/esm/src/components/action/button/__tests__/Button.test.js +257 -0
  122. package/dist/esm/src/components/action/button-group/__tests__/ButtonGroup.test.js +264 -0
  123. package/dist/esm/src/components/data-display/data-grid/__tests__/DataGrid.test.js +347 -0
  124. package/dist/esm/src/components/data-display/table/__tests__/Table.dnd.dragCell.test.js +317 -0
  125. package/dist/esm/src/components/data-display/table/__tests__/Table.dnd.test.js +310 -0
  126. package/dist/esm/src/components/data-display/table/__tests__/Table.scroll.test.js +191 -0
  127. package/dist/esm/src/components/data-display/table/__tests__/Table.test.js +379 -0
  128. package/dist/esm/src/components/data-display/table/__tests__/dnd-context.test.js +58 -0
  129. package/dist/esm/src/components/data-display/table/__tests__/dnd-preview.test.js +227 -0
  130. package/dist/esm/src/components/data-display/table/__tests__/tableDndTestUtils.js +240 -0
  131. package/dist/esm/src/components/data-display/table/__tests__/tableTestUtils.js +40 -0
  132. package/dist/esm/src/components/data-display/table/__tests__/useTableScrollbars.ownership.test.js +359 -0
  133. package/dist/esm/src/components/data-display/table/useTableScrollbars.js +1 -1
  134. package/dist/esm/src/components/feedback-and-status/badge/Badge.js +1 -1
  135. package/dist/esm/src/components/feedback-and-status/badge/__tests__/Badge.test.js +186 -0
  136. package/dist/esm/src/components/feedback-and-status/badge-group/__tests__/BadgeGroup.test.js +116 -0
  137. package/dist/esm/src/components/feedback-and-status/carousel-arrow/__tests__/CarouselArrow.test.js +91 -0
  138. package/dist/esm/src/components/feedback-and-status/carousel-number-group/__tests__/CarouselNumberGroup.test.js +61 -0
  139. package/dist/esm/src/components/feedback-and-status/empty-state/__tests__/EmptyState.test.js +123 -0
  140. package/dist/esm/src/components/feedback-and-status/progress-bar/__tests__/ProgressBar.test.js +274 -0
  141. package/dist/esm/src/components/feedback-and-status/progress-bar/__tests__/useProgressBar.test.js +246 -0
  142. package/dist/esm/src/components/feedback-and-status/progress-bar/__tests__/utils.test.js +19 -0
  143. package/dist/esm/src/components/feedback-and-status/progress-circle/__tests__/ProgressCircle.test.js +99 -0
  144. package/dist/esm/src/components/feedback-and-status/spinner/__tests__/Spinner.test.js +73 -0
  145. package/dist/esm/src/components/feedback-and-status/tag/__tests__/Tag.test.js +601 -0
  146. package/dist/esm/src/components/forms-and-input/checkbox/__tests__/Checkbox.test.js +210 -0
  147. package/dist/esm/src/components/forms-and-input/combo-box/ComboBox.js +1 -1
  148. package/dist/esm/src/components/forms-and-input/combo-box/__tests__/ComboBox.interaction.test.js +439 -0
  149. package/dist/esm/src/components/forms-and-input/combo-box/__tests__/ComboBox.register.test.js +151 -0
  150. package/dist/esm/src/components/forms-and-input/combo-box/__tests__/comboBoxTestUtils.js +77 -0
  151. package/dist/esm/src/components/forms-and-input/date-picker/__tests__/DatePicker.input.test.js +544 -0
  152. package/dist/esm/src/components/forms-and-input/date-picker/__tests__/DatePicker.position.test.js +546 -0
  153. package/dist/esm/src/components/forms-and-input/date-picker/__tests__/utils.test.js +31 -0
  154. package/dist/esm/src/components/forms-and-input/file-input/__tests__/FileInput.select.test.js +263 -0
  155. package/dist/esm/src/components/forms-and-input/image-file-input/__tests__/ImageFileInput.select.test.js +413 -0
  156. package/dist/esm/src/components/forms-and-input/input-base/__tests__/InputBase.slots.test.js +233 -0
  157. package/dist/esm/src/components/forms-and-input/number-input/__tests__/NumberInput.test.js +567 -0
  158. package/dist/esm/src/components/forms-and-input/password-input/__tests__/PasswordInput.toggle.test.js +110 -0
  159. package/dist/esm/src/components/forms-and-input/radio/__tests__/Radio.test.js +54 -0
  160. package/dist/esm/src/components/forms-and-input/range-date-picker/__tests__/RangeDatePicker.test.js +275 -0
  161. package/dist/esm/src/components/forms-and-input/range-date-picker-with-buttons/__tests__/RangeDatePickerWithButtons.test.js +235 -1
  162. package/dist/esm/src/components/forms-and-input/select/__tests__/Select.test.js +272 -0
  163. package/dist/esm/src/components/forms-and-input/select-box/SelectBox.js +1 -1
  164. package/dist/esm/src/components/forms-and-input/select-box/__tests__/SelectBox.portal.test.js +368 -0
  165. package/dist/esm/src/components/forms-and-input/select-box/__tests__/SelectBox.test.js +1332 -0
  166. package/dist/esm/src/components/forms-and-input/slider/__tests__/Slider.test.js +387 -0
  167. package/dist/esm/src/components/forms-and-input/switch/__tests__/Switch.test.js +314 -0
  168. package/dist/esm/src/components/forms-and-input/textarea/__tests__/Textarea.test.js +252 -0
  169. package/dist/esm/src/components/forms-and-input/textarea/__tests__/Textarea.unmount.test.js +155 -0
  170. package/dist/esm/src/components/forms-and-input/toggle/__tests__/Toggle.test.js +135 -0
  171. package/dist/esm/src/components/image-and-icons/featured-icon/__tests__/FeaturedIcon.test.js +64 -0
  172. package/dist/esm/src/components/layout/block-container/__tests__/BlockContainer.test.js +56 -0
  173. package/dist/esm/src/components/layout/block-header/__tests__/BlockHeader.test.js +166 -0
  174. package/dist/esm/src/components/layout/block-header/__tests__/SubTitle.test.js +74 -0
  175. package/dist/esm/src/components/layout/divider/__tests__/Divider.test.js +62 -0
  176. package/dist/esm/src/components/layout/ncua-scope/__tests__/NcuaScope.test.js +144 -0
  177. package/dist/esm/src/components/layout/page-title/__tests__/PageTitle.test.js +161 -0
  178. package/dist/esm/src/components/layout/page-title/__tests__/pageTitleStyle.test.js +91 -0
  179. package/dist/esm/src/components/navigation/context-tab/__tests__/ContextTab.test.js +613 -0
  180. package/dist/esm/src/components/navigation/context-tab/__tests__/useContextTabScroll.test.js +589 -0
  181. package/dist/esm/src/components/navigation/horizontal-tab/__tests__/HorizontalTab.test.js +209 -0
  182. package/dist/esm/src/components/navigation/pagination/__tests__/Pagination.navigation.test.js +282 -0
  183. package/dist/esm/src/components/navigation/vertical-tab/__tests__/VerticalTab.test.js +252 -0
  184. package/dist/esm/src/components/overlays/dropdown/__tests__/Dropdown.dnd.test.js +556 -0
  185. package/dist/esm/src/components/overlays/dropdown/__tests__/Dropdown.test.js +1017 -0
  186. package/dist/esm/src/components/overlays/dropdown/__tests__/dropdownTestUtils.js +15 -0
  187. package/dist/esm/src/components/overlays/dropdown/__tests__/utils.test.js +57 -1
  188. package/dist/esm/src/components/overlays/modal/__tests__/Modal.test.js +423 -0
  189. package/dist/esm/src/components/overlays/notification/__tests__/FloatingNotification.test.js +281 -0
  190. package/dist/esm/src/components/overlays/notification/__tests__/MessageNotification.test.js +12 -0
  191. package/dist/esm/src/components/overlays/postcode-search-modal/PostcodeSearchModalTip.js +1 -1
  192. package/dist/esm/src/components/overlays/postcode-search-modal/__tests__/PostcodeSearchModal.viewport.test.js +139 -0
  193. package/dist/esm/src/components/overlays/tooltip/__tests__/Tooltip.test.js +826 -0
  194. package/dist/esm/src/components/tab/__tests__/TabButton.test.js +249 -0
  195. package/dist/esm/src/generated/scoped-css.js +1 -1
  196. package/dist/esm/src/hooks/__tests__/useCallbackRef.test.js +149 -0
  197. package/dist/esm/src/hooks/__tests__/useMediaQuery.test.js +116 -0
  198. package/dist/esm/src/hooks/__tests__/usePortalState.ssr.test.js +22 -0
  199. package/dist/esm/src/hooks/dropdown/__tests__/dropdownHooks.test.js +165 -0
  200. package/dist/esm/src/types/component-meta.js +0 -4
  201. package/dist/esm/src/utils/__tests__/date-picker.test.js +107 -2
  202. package/dist/esm/src/utils/dropdown/__tests__/dropdownUtils.test.js +24 -0
  203. package/dist/esm/src/utils/dropdown/__tests__/multiSelect.test.js +46 -0
  204. package/dist/esm/src/utils/dropdown/multiSelect.js +5 -5
  205. package/dist/esm/src/utils/portal-position/__tests__/portalPosition.nullAnchor.test.js +64 -0
  206. package/dist/esm/vitest.config.js +22 -5
  207. package/dist/temp/assets/scripts/notification/const/icons.d.ts +0 -7
  208. package/dist/temp/assets/scripts/notification/const/icons.js +0 -1
  209. package/dist/temp/assets/scripts/notification/const/index.d.ts +3 -3
  210. package/dist/temp/assets/scripts/notification/const/index.js +2 -2
  211. package/dist/temp/assets/scripts/notification/const/sizes.d.ts +2 -14
  212. package/dist/temp/assets/scripts/notification/const/sizes.js +4 -4
  213. package/dist/temp/assets/scripts/notification/const/types.d.ts +3 -2
  214. package/dist/temp/assets/scripts/notification/index.d.ts +1 -1
  215. package/dist/temp/assets/scripts/notification/index.js +1 -1
  216. package/dist/temp/assets/scripts/shared/ButtonCloseX.d.ts +0 -2
  217. package/dist/temp/assets/scripts/shared/ButtonCloseX.js +6 -3
  218. package/dist/temp/assets/scripts/table/scrollbar/const.d.ts +0 -1
  219. package/dist/temp/assets/scripts/tooltip/const/classNames.d.ts +17 -0
  220. package/dist/temp/assets/scripts/tooltip/const/classNames.js +23 -0
  221. package/dist/temp/assets/scripts/tooltip/const/constants.d.ts +33 -0
  222. package/dist/temp/assets/scripts/tooltip/const/constants.js +48 -0
  223. package/dist/temp/assets/scripts/tooltip/const/icons.d.ts +4 -0
  224. package/dist/temp/assets/scripts/tooltip/const/icons.js +9 -0
  225. package/dist/temp/assets/scripts/tooltip/const/index.d.ts +5 -0
  226. package/dist/temp/assets/scripts/tooltip/const/index.js +5 -0
  227. package/dist/temp/assets/scripts/tooltip/const/templates.d.ts +16 -0
  228. package/dist/temp/assets/scripts/tooltip/const/templates.js +60 -0
  229. package/dist/temp/assets/scripts/tooltip/const/types.d.ts +17 -0
  230. package/dist/temp/assets/scripts/tooltip/const/types.js +1 -0
  231. package/dist/temp/assets/scripts/utils/sanitize.d.ts +0 -6
  232. package/dist/temp/assets/scripts/utils/sanitize.js +0 -12
  233. package/dist/temp/src/__tests__/helpers/dom.d.ts +2 -0
  234. package/dist/temp/src/__tests__/helpers/dom.js +8 -0
  235. package/dist/temp/src/__tests__/helpers/fileInput.d.ts +27 -0
  236. package/dist/temp/src/__tests__/helpers/fileInput.js +70 -0
  237. package/dist/temp/src/__tests__/helpers/fixedToday.d.ts +4 -0
  238. package/dist/temp/src/__tests__/helpers/fixedToday.js +8 -0
  239. package/dist/temp/src/__tests__/helpers/matchMedia.d.ts +13 -0
  240. package/dist/temp/src/__tests__/helpers/matchMedia.js +42 -0
  241. package/dist/temp/src/__tests__/helpers/rect.d.ts +2 -0
  242. package/dist/temp/src/__tests__/helpers/rect.js +5 -0
  243. package/dist/temp/src/components/action/button/__tests__/Button.test.d.ts +1 -0
  244. package/dist/temp/src/components/action/button/__tests__/Button.test.js +180 -0
  245. package/dist/temp/src/components/action/button-group/__tests__/ButtonGroup.test.d.ts +1 -0
  246. package/dist/temp/src/components/action/button-group/__tests__/ButtonGroup.test.js +162 -0
  247. package/dist/temp/src/components/data-display/data-grid/__tests__/DataGrid.test.d.ts +1 -0
  248. package/dist/temp/src/components/data-display/data-grid/__tests__/DataGrid.test.js +291 -0
  249. package/dist/temp/src/components/data-display/table/__tests__/Table.dnd.dragCell.test.d.ts +1 -0
  250. package/dist/temp/src/components/data-display/table/__tests__/Table.dnd.dragCell.test.js +255 -0
  251. package/dist/temp/src/components/data-display/table/__tests__/Table.dnd.test.d.ts +1 -0
  252. package/dist/temp/src/components/data-display/table/__tests__/Table.dnd.test.js +240 -0
  253. package/dist/temp/src/components/data-display/table/__tests__/Table.scroll.test.d.ts +1 -0
  254. package/dist/temp/src/components/data-display/table/__tests__/Table.scroll.test.js +145 -0
  255. package/dist/temp/src/components/data-display/table/__tests__/Table.test.d.ts +1 -0
  256. package/dist/temp/src/components/data-display/table/__tests__/Table.test.js +295 -0
  257. package/dist/temp/src/components/data-display/table/__tests__/dnd-context.test.d.ts +1 -0
  258. package/dist/temp/src/components/data-display/table/__tests__/dnd-context.test.js +42 -0
  259. package/dist/temp/src/components/data-display/table/__tests__/dnd-preview.test.d.ts +1 -0
  260. package/dist/temp/src/components/data-display/table/__tests__/dnd-preview.test.js +226 -0
  261. package/dist/temp/src/components/data-display/table/__tests__/tableDndTestUtils.d.ts +76 -0
  262. package/dist/temp/src/components/data-display/table/__tests__/tableDndTestUtils.js +153 -0
  263. package/dist/temp/src/components/data-display/table/__tests__/tableTestUtils.d.ts +11 -0
  264. package/dist/temp/src/components/data-display/table/__tests__/tableTestUtils.js +40 -0
  265. package/dist/temp/src/components/data-display/table/__tests__/useTableScrollbars.ownership.test.d.ts +1 -0
  266. package/dist/temp/src/components/data-display/table/__tests__/useTableScrollbars.ownership.test.js +269 -0
  267. package/dist/temp/src/components/data-display/table/dnd-context.d.ts +1 -1
  268. package/dist/temp/src/components/data-display/table/useTableScrollbars.d.ts +2 -2
  269. package/dist/temp/src/components/data-display/table/useTableScrollbars.js +1 -1
  270. package/dist/temp/src/components/feedback-and-status/badge/Badge.d.ts +1 -1
  271. package/dist/temp/src/components/feedback-and-status/badge/Badge.js +1 -1
  272. package/dist/temp/src/components/feedback-and-status/badge/__tests__/Badge.test.d.ts +1 -0
  273. package/dist/temp/src/components/feedback-and-status/badge/__tests__/Badge.test.js +136 -0
  274. package/dist/temp/src/components/feedback-and-status/badge-group/__tests__/BadgeGroup.test.d.ts +1 -0
  275. package/dist/temp/src/components/feedback-and-status/badge-group/__tests__/BadgeGroup.test.js +103 -0
  276. package/dist/temp/src/components/feedback-and-status/carousel-arrow/__tests__/CarouselArrow.test.d.ts +1 -0
  277. package/dist/temp/src/components/feedback-and-status/carousel-arrow/__tests__/CarouselArrow.test.js +81 -0
  278. package/dist/temp/src/components/feedback-and-status/carousel-number-group/__tests__/CarouselNumberGroup.test.d.ts +1 -0
  279. package/dist/temp/src/components/feedback-and-status/carousel-number-group/__tests__/CarouselNumberGroup.test.js +53 -0
  280. package/dist/temp/src/components/feedback-and-status/empty-state/__tests__/EmptyState.test.d.ts +1 -0
  281. package/dist/temp/src/components/feedback-and-status/empty-state/__tests__/EmptyState.test.js +86 -0
  282. package/dist/temp/src/components/feedback-and-status/progress-bar/__tests__/ProgressBar.test.d.ts +1 -0
  283. package/dist/temp/src/components/feedback-and-status/progress-bar/__tests__/ProgressBar.test.js +221 -0
  284. package/dist/temp/src/components/feedback-and-status/progress-bar/__tests__/useProgressBar.test.d.ts +1 -0
  285. package/dist/temp/src/components/feedback-and-status/progress-bar/__tests__/useProgressBar.test.js +168 -0
  286. package/dist/temp/src/components/feedback-and-status/progress-bar/__tests__/utils.test.d.ts +1 -0
  287. package/dist/temp/src/components/feedback-and-status/progress-bar/__tests__/utils.test.js +35 -0
  288. package/dist/temp/src/components/feedback-and-status/progress-circle/__tests__/ProgressCircle.test.d.ts +1 -0
  289. package/dist/temp/src/components/feedback-and-status/progress-circle/__tests__/ProgressCircle.test.js +106 -0
  290. package/dist/temp/src/components/feedback-and-status/spinner/__tests__/Spinner.test.d.ts +1 -0
  291. package/dist/temp/src/components/feedback-and-status/spinner/__tests__/Spinner.test.js +73 -0
  292. package/dist/temp/src/components/feedback-and-status/tag/__tests__/Tag.test.d.ts +1 -0
  293. package/dist/temp/src/components/feedback-and-status/tag/__tests__/Tag.test.js +392 -0
  294. package/dist/temp/src/components/forms-and-input/checkbox/__tests__/Checkbox.test.d.ts +1 -0
  295. package/dist/temp/src/components/forms-and-input/checkbox/__tests__/Checkbox.test.js +180 -0
  296. package/dist/temp/src/components/forms-and-input/combo-box/ComboBox.d.ts +1 -2
  297. package/dist/temp/src/components/forms-and-input/combo-box/ComboBox.js +1 -1
  298. package/dist/temp/src/components/forms-and-input/combo-box/__tests__/ComboBox.interaction.test.d.ts +1 -0
  299. package/dist/temp/src/components/forms-and-input/combo-box/__tests__/ComboBox.interaction.test.js +295 -0
  300. package/dist/temp/src/components/forms-and-input/combo-box/__tests__/ComboBox.register.test.d.ts +1 -0
  301. package/dist/temp/src/components/forms-and-input/combo-box/__tests__/ComboBox.register.test.js +111 -0
  302. package/dist/temp/src/components/forms-and-input/combo-box/__tests__/comboBoxTestUtils.d.ts +22 -0
  303. package/dist/temp/src/components/forms-and-input/combo-box/__tests__/comboBoxTestUtils.js +69 -0
  304. package/dist/temp/src/components/forms-and-input/date-picker/__tests__/DatePicker.input.test.d.ts +1 -0
  305. package/dist/temp/src/components/forms-and-input/date-picker/__tests__/DatePicker.input.test.js +358 -0
  306. package/dist/temp/src/components/forms-and-input/date-picker/__tests__/DatePicker.position.test.d.ts +1 -0
  307. package/dist/temp/src/components/forms-and-input/date-picker/__tests__/DatePicker.position.test.js +361 -0
  308. package/dist/temp/src/components/forms-and-input/date-picker/__tests__/utils.test.d.ts +1 -0
  309. package/dist/temp/src/components/forms-and-input/date-picker/__tests__/utils.test.js +34 -0
  310. package/dist/temp/src/components/forms-and-input/file-input/__tests__/FileInput.select.test.d.ts +1 -0
  311. package/dist/temp/src/components/forms-and-input/file-input/__tests__/FileInput.select.test.js +206 -0
  312. package/dist/temp/src/components/forms-and-input/image-file-input/__tests__/ImageFileInput.select.test.d.ts +1 -0
  313. package/dist/temp/src/components/forms-and-input/image-file-input/__tests__/ImageFileInput.select.test.js +292 -0
  314. package/dist/temp/src/components/forms-and-input/input-base/__tests__/InputBase.slots.test.d.ts +1 -0
  315. package/dist/temp/src/components/forms-and-input/input-base/__tests__/InputBase.slots.test.js +177 -0
  316. package/dist/temp/src/components/forms-and-input/number-input/__tests__/NumberInput.test.d.ts +1 -0
  317. package/dist/temp/src/components/forms-and-input/number-input/__tests__/NumberInput.test.js +434 -0
  318. package/dist/temp/src/components/forms-and-input/password-input/__tests__/PasswordInput.toggle.test.d.ts +1 -0
  319. package/dist/temp/src/components/forms-and-input/password-input/__tests__/PasswordInput.toggle.test.js +88 -0
  320. package/dist/temp/src/components/forms-and-input/radio/__tests__/Radio.test.d.ts +1 -0
  321. package/dist/temp/src/components/forms-and-input/radio/__tests__/Radio.test.js +42 -0
  322. package/dist/temp/src/components/forms-and-input/range-date-picker/__tests__/RangeDatePicker.test.js +137 -0
  323. package/dist/temp/src/components/forms-and-input/range-date-picker-with-buttons/__tests__/RangeDatePickerWithButtons.test.js +201 -1
  324. package/dist/temp/src/components/forms-and-input/select/__tests__/Select.test.d.ts +1 -0
  325. package/dist/temp/src/components/forms-and-input/select/__tests__/Select.test.js +214 -0
  326. package/dist/temp/src/components/forms-and-input/select-box/SelectBox.d.ts +1 -2
  327. package/dist/temp/src/components/forms-and-input/select-box/SelectBox.js +1 -1
  328. package/dist/temp/src/components/forms-and-input/select-box/__tests__/SelectBox.portal.test.d.ts +1 -0
  329. package/dist/temp/src/components/forms-and-input/select-box/__tests__/SelectBox.portal.test.js +312 -0
  330. package/dist/temp/src/components/forms-and-input/select-box/__tests__/SelectBox.test.d.ts +1 -0
  331. package/dist/temp/src/components/forms-and-input/select-box/__tests__/SelectBox.test.js +991 -0
  332. package/dist/temp/src/components/forms-and-input/slider/__tests__/Slider.test.d.ts +1 -0
  333. package/dist/temp/src/components/forms-and-input/slider/__tests__/Slider.test.js +294 -0
  334. package/dist/temp/src/components/forms-and-input/switch/__tests__/Switch.test.d.ts +1 -0
  335. package/dist/temp/src/components/forms-and-input/switch/__tests__/Switch.test.js +234 -0
  336. package/dist/temp/src/components/forms-and-input/textarea/__tests__/Textarea.test.d.ts +1 -0
  337. package/dist/temp/src/components/forms-and-input/textarea/__tests__/Textarea.test.js +207 -0
  338. package/dist/temp/src/components/forms-and-input/textarea/__tests__/Textarea.unmount.test.d.ts +1 -0
  339. package/dist/temp/src/components/forms-and-input/textarea/__tests__/Textarea.unmount.test.js +120 -0
  340. package/dist/temp/src/components/forms-and-input/toggle/__tests__/Toggle.test.d.ts +1 -0
  341. package/dist/temp/src/components/forms-and-input/toggle/__tests__/Toggle.test.js +125 -0
  342. package/dist/temp/src/components/image-and-icons/featured-icon/__tests__/FeaturedIcon.test.d.ts +1 -0
  343. package/dist/temp/src/components/image-and-icons/featured-icon/__tests__/FeaturedIcon.test.js +47 -0
  344. package/dist/temp/src/components/layout/block-container/__tests__/BlockContainer.test.d.ts +1 -0
  345. package/dist/temp/src/components/layout/block-container/__tests__/BlockContainer.test.js +53 -0
  346. package/dist/temp/src/components/layout/block-header/__tests__/BlockHeader.test.d.ts +1 -0
  347. package/dist/temp/src/components/layout/block-header/__tests__/BlockHeader.test.js +127 -0
  348. package/dist/temp/src/components/layout/block-header/__tests__/SubTitle.test.d.ts +1 -0
  349. package/dist/temp/src/components/layout/block-header/__tests__/SubTitle.test.js +76 -0
  350. package/dist/temp/src/components/layout/divider/__tests__/Divider.test.d.ts +1 -0
  351. package/dist/temp/src/components/layout/divider/__tests__/Divider.test.js +53 -0
  352. package/dist/temp/src/components/layout/ncua-scope/__tests__/NcuaScope.test.d.ts +1 -0
  353. package/dist/temp/src/components/layout/ncua-scope/__tests__/NcuaScope.test.js +136 -0
  354. package/dist/temp/src/components/layout/page-title/__tests__/PageTitle.test.d.ts +1 -0
  355. package/dist/temp/src/components/layout/page-title/__tests__/PageTitle.test.js +119 -0
  356. package/dist/temp/src/components/layout/page-title/__tests__/pageTitleStyle.test.d.ts +1 -0
  357. package/dist/temp/src/components/layout/page-title/__tests__/pageTitleStyle.test.js +94 -0
  358. package/dist/temp/src/components/navigation/context-tab/__tests__/ContextTab.test.d.ts +1 -0
  359. package/dist/temp/src/components/navigation/context-tab/__tests__/ContextTab.test.js +447 -0
  360. package/dist/temp/src/components/navigation/context-tab/__tests__/useContextTabScroll.test.d.ts +1 -0
  361. package/dist/temp/src/components/navigation/context-tab/__tests__/useContextTabScroll.test.js +352 -0
  362. package/dist/temp/src/components/navigation/horizontal-tab/__tests__/HorizontalTab.test.d.ts +1 -0
  363. package/dist/temp/src/components/navigation/horizontal-tab/__tests__/HorizontalTab.test.js +152 -0
  364. package/dist/temp/src/components/navigation/pagination/__tests__/Pagination.navigation.test.d.ts +1 -0
  365. package/dist/temp/src/components/navigation/pagination/__tests__/Pagination.navigation.test.js +265 -0
  366. package/dist/temp/src/components/navigation/vertical-tab/__tests__/VerticalTab.test.d.ts +1 -0
  367. package/dist/temp/src/components/navigation/vertical-tab/__tests__/VerticalTab.test.js +172 -0
  368. package/dist/temp/src/components/overlays/dropdown/__tests__/Dropdown.dnd.test.d.ts +1 -0
  369. package/dist/temp/src/components/overlays/dropdown/__tests__/Dropdown.dnd.test.js +423 -0
  370. package/dist/temp/src/components/overlays/dropdown/__tests__/Dropdown.test.d.ts +1 -0
  371. package/dist/temp/src/components/overlays/dropdown/__tests__/Dropdown.test.js +699 -0
  372. package/dist/temp/src/components/overlays/dropdown/__tests__/dropdownTestUtils.d.ts +3 -0
  373. package/dist/temp/src/components/overlays/dropdown/__tests__/dropdownTestUtils.js +17 -0
  374. package/dist/temp/src/components/overlays/dropdown/__tests__/utils.test.js +24 -1
  375. package/dist/temp/src/components/overlays/modal/__tests__/Modal.test.d.ts +1 -0
  376. package/dist/temp/src/components/overlays/modal/__tests__/Modal.test.js +307 -0
  377. package/dist/temp/src/components/overlays/notification/MessageNotificationParts.d.ts +0 -1
  378. package/dist/temp/src/components/overlays/notification/NotificationActionButtons.d.ts +0 -1
  379. package/dist/temp/src/components/overlays/notification/__tests__/FloatingNotification.test.d.ts +1 -0
  380. package/dist/temp/src/components/overlays/notification/__tests__/FloatingNotification.test.js +218 -0
  381. package/dist/temp/src/components/overlays/notification/__tests__/MessageNotification.test.js +10 -0
  382. package/dist/temp/src/components/overlays/postcode-search-modal/PostcodeSearchModalTip.d.ts +1 -3
  383. package/dist/temp/src/components/overlays/postcode-search-modal/PostcodeSearchModalTip.js +1 -1
  384. package/dist/temp/src/components/overlays/postcode-search-modal/__tests__/PostcodeSearchModal.viewport.test.d.ts +1 -0
  385. package/dist/temp/src/components/overlays/postcode-search-modal/__tests__/PostcodeSearchModal.viewport.test.js +112 -0
  386. package/dist/temp/src/components/overlays/tooltip/__tests__/Tooltip.test.d.ts +1 -0
  387. package/dist/temp/src/components/overlays/tooltip/__tests__/Tooltip.test.js +538 -0
  388. package/dist/temp/src/components/tab/__tests__/TabButton.test.d.ts +1 -0
  389. package/dist/temp/src/components/tab/__tests__/TabButton.test.js +181 -0
  390. package/dist/temp/src/constant/date-picker.d.ts +2 -1
  391. package/dist/temp/src/generated/scoped-css.js +1 -1
  392. package/dist/temp/src/hooks/__tests__/useCallbackRef.test.d.ts +1 -0
  393. package/dist/temp/src/hooks/__tests__/useCallbackRef.test.js +99 -0
  394. package/dist/temp/src/hooks/__tests__/useMediaQuery.test.d.ts +1 -0
  395. package/dist/temp/src/hooks/__tests__/useMediaQuery.test.js +95 -0
  396. package/dist/temp/src/hooks/__tests__/usePortalState.ssr.test.d.ts +1 -0
  397. package/dist/temp/src/hooks/__tests__/usePortalState.ssr.test.js +19 -0
  398. package/dist/temp/src/hooks/dropdown/__tests__/dropdownHooks.test.d.ts +1 -0
  399. package/dist/temp/src/hooks/dropdown/__tests__/dropdownHooks.test.js +147 -0
  400. package/dist/temp/src/types/component-meta.d.ts +2 -1
  401. package/dist/temp/src/types/component-meta.js +0 -4
  402. package/dist/temp/src/utils/__tests__/date-picker.test.js +58 -2
  403. package/dist/temp/src/utils/dropdown/__tests__/dropdownUtils.test.js +9 -0
  404. package/dist/temp/src/utils/dropdown/__tests__/multiSelect.test.d.ts +1 -0
  405. package/dist/temp/src/utils/dropdown/__tests__/multiSelect.test.js +41 -0
  406. package/dist/temp/src/utils/dropdown/multiSelect.d.ts +0 -20
  407. package/dist/temp/src/utils/dropdown/multiSelect.js +5 -5
  408. package/dist/temp/src/utils/portal-position/__tests__/portalPosition.nullAnchor.test.d.ts +1 -0
  409. package/dist/temp/src/utils/portal-position/__tests__/portalPosition.nullAnchor.test.js +57 -0
  410. package/dist/temp/vitest.config.js +20 -3
  411. package/dist/types/assets/scripts/notification/const/icons.d.ts +0 -7
  412. package/dist/types/assets/scripts/notification/const/index.d.ts +3 -3
  413. package/dist/types/assets/scripts/notification/const/sizes.d.ts +2 -14
  414. package/dist/types/assets/scripts/notification/const/types.d.ts +3 -2
  415. package/dist/types/assets/scripts/notification/index.d.ts +1 -1
  416. package/dist/types/assets/scripts/shared/ButtonCloseX.d.ts +0 -2
  417. package/dist/types/assets/scripts/table/scrollbar/const.d.ts +0 -1
  418. package/dist/types/assets/scripts/tooltip/const/classNames.d.ts +17 -0
  419. package/dist/types/assets/scripts/tooltip/const/constants.d.ts +33 -0
  420. package/dist/types/assets/scripts/tooltip/const/icons.d.ts +4 -0
  421. package/dist/types/assets/scripts/tooltip/const/index.d.ts +5 -0
  422. package/dist/types/assets/scripts/tooltip/const/templates.d.ts +16 -0
  423. package/dist/types/assets/scripts/tooltip/const/types.d.ts +17 -0
  424. package/dist/types/assets/scripts/utils/sanitize.d.ts +0 -6
  425. package/dist/types/src/__tests__/helpers/dom.d.ts +2 -0
  426. package/dist/types/src/__tests__/helpers/fileInput.d.ts +27 -0
  427. package/dist/types/src/__tests__/helpers/fixedToday.d.ts +4 -0
  428. package/dist/types/src/__tests__/helpers/matchMedia.d.ts +13 -0
  429. package/dist/types/src/__tests__/helpers/rect.d.ts +2 -0
  430. package/dist/types/src/components/action/button/__tests__/Button.test.d.ts +1 -0
  431. package/dist/types/src/components/action/button-group/__tests__/ButtonGroup.test.d.ts +1 -0
  432. package/dist/types/src/components/data-display/data-grid/__tests__/DataGrid.test.d.ts +1 -0
  433. package/dist/types/src/components/data-display/table/__tests__/Table.dnd.dragCell.test.d.ts +1 -0
  434. package/dist/types/src/components/data-display/table/__tests__/Table.dnd.test.d.ts +1 -0
  435. package/dist/types/src/components/data-display/table/__tests__/Table.scroll.test.d.ts +1 -0
  436. package/dist/types/src/components/data-display/table/__tests__/Table.test.d.ts +1 -0
  437. package/dist/types/src/components/data-display/table/__tests__/dnd-context.test.d.ts +1 -0
  438. package/dist/types/src/components/data-display/table/__tests__/dnd-preview.test.d.ts +1 -0
  439. package/dist/types/src/components/data-display/table/__tests__/tableDndTestUtils.d.ts +76 -0
  440. package/dist/types/src/components/data-display/table/__tests__/tableTestUtils.d.ts +11 -0
  441. package/dist/types/src/components/data-display/table/__tests__/useTableScrollbars.ownership.test.d.ts +1 -0
  442. package/dist/types/src/components/data-display/table/dnd-context.d.ts +1 -1
  443. package/dist/types/src/components/data-display/table/useTableScrollbars.d.ts +2 -2
  444. package/dist/types/src/components/feedback-and-status/badge/Badge.d.ts +1 -1
  445. package/dist/types/src/components/feedback-and-status/badge/__tests__/Badge.test.d.ts +1 -0
  446. package/dist/types/src/components/feedback-and-status/badge-group/__tests__/BadgeGroup.test.d.ts +1 -0
  447. package/dist/types/src/components/feedback-and-status/carousel-arrow/__tests__/CarouselArrow.test.d.ts +1 -0
  448. package/dist/types/src/components/feedback-and-status/carousel-number-group/__tests__/CarouselNumberGroup.test.d.ts +1 -0
  449. package/dist/types/src/components/feedback-and-status/empty-state/__tests__/EmptyState.test.d.ts +1 -0
  450. package/dist/types/src/components/feedback-and-status/progress-bar/__tests__/ProgressBar.test.d.ts +1 -0
  451. package/dist/types/src/components/feedback-and-status/progress-bar/__tests__/useProgressBar.test.d.ts +1 -0
  452. package/dist/types/src/components/feedback-and-status/progress-bar/__tests__/utils.test.d.ts +1 -0
  453. package/dist/types/src/components/feedback-and-status/progress-circle/__tests__/ProgressCircle.test.d.ts +1 -0
  454. package/dist/types/src/components/feedback-and-status/spinner/__tests__/Spinner.test.d.ts +1 -0
  455. package/dist/types/src/components/feedback-and-status/tag/__tests__/Tag.test.d.ts +1 -0
  456. package/dist/types/src/components/forms-and-input/checkbox/__tests__/Checkbox.test.d.ts +1 -0
  457. package/dist/types/src/components/forms-and-input/combo-box/ComboBox.d.ts +1 -2
  458. package/dist/types/src/components/forms-and-input/combo-box/__tests__/ComboBox.interaction.test.d.ts +1 -0
  459. package/dist/types/src/components/forms-and-input/combo-box/__tests__/ComboBox.register.test.d.ts +1 -0
  460. package/dist/types/src/components/forms-and-input/combo-box/__tests__/comboBoxTestUtils.d.ts +22 -0
  461. package/dist/types/src/components/forms-and-input/date-picker/__tests__/DatePicker.input.test.d.ts +1 -0
  462. package/dist/types/src/components/forms-and-input/date-picker/__tests__/DatePicker.position.test.d.ts +1 -0
  463. package/dist/types/src/components/forms-and-input/date-picker/__tests__/utils.test.d.ts +1 -0
  464. package/dist/types/src/components/forms-and-input/file-input/__tests__/FileInput.select.test.d.ts +1 -0
  465. package/dist/types/src/components/forms-and-input/image-file-input/__tests__/ImageFileInput.select.test.d.ts +1 -0
  466. package/dist/types/src/components/forms-and-input/input-base/__tests__/InputBase.slots.test.d.ts +1 -0
  467. package/dist/types/src/components/forms-and-input/number-input/__tests__/NumberInput.test.d.ts +1 -0
  468. package/dist/types/src/components/forms-and-input/password-input/__tests__/PasswordInput.toggle.test.d.ts +1 -0
  469. package/dist/types/src/components/forms-and-input/radio/__tests__/Radio.test.d.ts +1 -0
  470. package/dist/types/src/components/forms-and-input/select/__tests__/Select.test.d.ts +1 -0
  471. package/dist/types/src/components/forms-and-input/select-box/SelectBox.d.ts +1 -2
  472. package/dist/types/src/components/forms-and-input/select-box/__tests__/SelectBox.portal.test.d.ts +1 -0
  473. package/dist/types/src/components/forms-and-input/select-box/__tests__/SelectBox.test.d.ts +1 -0
  474. package/dist/types/src/components/forms-and-input/slider/__tests__/Slider.test.d.ts +1 -0
  475. package/dist/types/src/components/forms-and-input/switch/__tests__/Switch.test.d.ts +1 -0
  476. package/dist/types/src/components/forms-and-input/textarea/__tests__/Textarea.test.d.ts +1 -0
  477. package/dist/types/src/components/forms-and-input/textarea/__tests__/Textarea.unmount.test.d.ts +1 -0
  478. package/dist/types/src/components/forms-and-input/toggle/__tests__/Toggle.test.d.ts +1 -0
  479. package/dist/types/src/components/image-and-icons/featured-icon/__tests__/FeaturedIcon.test.d.ts +1 -0
  480. package/dist/types/src/components/layout/block-container/__tests__/BlockContainer.test.d.ts +1 -0
  481. package/dist/types/src/components/layout/block-header/__tests__/BlockHeader.test.d.ts +1 -0
  482. package/dist/types/src/components/layout/block-header/__tests__/SubTitle.test.d.ts +1 -0
  483. package/dist/types/src/components/layout/divider/__tests__/Divider.test.d.ts +1 -0
  484. package/dist/types/src/components/layout/ncua-scope/__tests__/NcuaScope.test.d.ts +1 -0
  485. package/dist/types/src/components/layout/page-title/__tests__/PageTitle.test.d.ts +1 -0
  486. package/dist/types/src/components/layout/page-title/__tests__/pageTitleStyle.test.d.ts +1 -0
  487. package/dist/types/src/components/navigation/context-tab/__tests__/ContextTab.test.d.ts +1 -0
  488. package/dist/types/src/components/navigation/context-tab/__tests__/useContextTabScroll.test.d.ts +1 -0
  489. package/dist/types/src/components/navigation/horizontal-tab/__tests__/HorizontalTab.test.d.ts +1 -0
  490. package/dist/types/src/components/navigation/pagination/__tests__/Pagination.navigation.test.d.ts +1 -0
  491. package/dist/types/src/components/navigation/vertical-tab/__tests__/VerticalTab.test.d.ts +1 -0
  492. package/dist/types/src/components/overlays/dropdown/__tests__/Dropdown.dnd.test.d.ts +1 -0
  493. package/dist/types/src/components/overlays/dropdown/__tests__/Dropdown.test.d.ts +1 -0
  494. package/dist/types/src/components/overlays/dropdown/__tests__/dropdownTestUtils.d.ts +3 -0
  495. package/dist/types/src/components/overlays/modal/__tests__/Modal.test.d.ts +1 -0
  496. package/dist/types/src/components/overlays/notification/MessageNotificationParts.d.ts +0 -1
  497. package/dist/types/src/components/overlays/notification/NotificationActionButtons.d.ts +0 -1
  498. package/dist/types/src/components/overlays/notification/__tests__/FloatingNotification.test.d.ts +1 -0
  499. package/dist/types/src/components/overlays/postcode-search-modal/PostcodeSearchModalTip.d.ts +1 -3
  500. package/dist/types/src/components/overlays/postcode-search-modal/__tests__/PostcodeSearchModal.viewport.test.d.ts +1 -0
  501. package/dist/types/src/components/overlays/tooltip/__tests__/Tooltip.test.d.ts +1 -0
  502. package/dist/types/src/components/tab/__tests__/TabButton.test.d.ts +1 -0
  503. package/dist/types/src/constant/date-picker.d.ts +2 -1
  504. package/dist/types/src/hooks/__tests__/useCallbackRef.test.d.ts +1 -0
  505. package/dist/types/src/hooks/__tests__/useMediaQuery.test.d.ts +1 -0
  506. package/dist/types/src/hooks/__tests__/usePortalState.ssr.test.d.ts +1 -0
  507. package/dist/types/src/hooks/dropdown/__tests__/dropdownHooks.test.d.ts +1 -0
  508. package/dist/types/src/types/component-meta.d.ts +2 -1
  509. package/dist/types/src/utils/dropdown/__tests__/multiSelect.test.d.ts +1 -0
  510. package/dist/types/src/utils/dropdown/multiSelect.d.ts +0 -20
  511. package/dist/types/src/utils/portal-position/__tests__/portalPosition.nullAnchor.test.d.ts +1 -0
  512. package/dist/ui-admin/assets/styles/style.css +15 -18
  513. package/package.json +3 -8
  514. package/dist/cjs/src/constant/index.js +0 -27
  515. package/dist/cjs/src/constant/size.js +0 -7
  516. package/dist/cjs/src/contexts/index.js +0 -16
  517. package/dist/esm/src/constant/index.js +0 -2
  518. package/dist/esm/src/constant/size.js +0 -1
  519. package/dist/esm/src/contexts/index.js +0 -1
  520. package/dist/temp/src/constant/index.d.ts +0 -2
  521. package/dist/temp/src/constant/index.js +0 -2
  522. package/dist/temp/src/constant/size.d.ts +0 -1
  523. package/dist/temp/src/constant/size.js +0 -1
  524. package/dist/temp/src/contexts/index.d.ts +0 -1
  525. package/dist/temp/src/contexts/index.js +0 -1
  526. package/dist/types/src/constant/index.d.ts +0 -2
  527. package/dist/types/src/constant/size.d.ts +0 -1
  528. package/dist/types/src/contexts/index.d.ts +0 -1
@@ -0,0 +1,186 @@
1
+ // @vitest-environment jsdom
2
+ import { createElement } from 'react';
3
+ import { createRoot } from 'react-dom/client';
4
+ import { act } from 'react-dom/test-utils';
5
+ import { afterEach, describe, expect, it } from 'vitest';
6
+ import { COLOR } from '../../../../../constant/color';
7
+ import { Badge } from '../Badge';
8
+ import { sideSlotRender } from '../utils';
9
+ // React 18에서 act() 사용 시 필요한 플래그 (미설정 시 console.error 경고 발생)
10
+ globalThis.IS_REACT_ACT_ENVIRONMENT = true;
11
+ const LABEL = '진행중';
12
+ /** 뱃지 아이콘 기본 크기 */
13
+ const BADGE_ICON_SIZE = 12;
14
+ /** 기본 크기(12)와 겹치지 않는 지정 크기 */
15
+ const CUSTOM_ICON_SIZE = 18;
16
+ /** new-badge 'N' 아이콘 크기 — sm 12 · md 14 */
17
+ const NEW_BADGE_ICON_SM = 12;
18
+ const NEW_BADGE_ICON_MD = 14;
19
+ /** leading · label · trailing */
20
+ const EXPECTED_SLOT_CHILDREN = 3;
21
+ /** afterEach 에서 unmount 할 루트 */
22
+ const mounted = [];
23
+ afterEach(() => {
24
+ for (const {
25
+ root,
26
+ container
27
+ } of mounted.splice(0)) {
28
+ act(() => root.unmount());
29
+ container.remove();
30
+ }
31
+ });
32
+ const mountBadge = function () {
33
+ let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
34
+ const container = document.createElement('div');
35
+ document.body.appendChild(container);
36
+ const root = createRoot(container);
37
+ mounted.push({
38
+ root,
39
+ container
40
+ });
41
+ act(() => root.render(/*#__PURE__*/createElement(Badge, {
42
+ label: LABEL,
43
+ ...props
44
+ })));
45
+ const badge = container.querySelector('.ncua-badge');
46
+ if (!badge) throw new Error('뱃지를 찾을 수 없습니다');
47
+ return badge;
48
+ };
49
+ const mustQuery = (root, selector) => {
50
+ const found = root.querySelector(selector);
51
+ if (!found) throw new Error(`요소를 찾을 수 없습니다: ${selector}`);
52
+ return found;
53
+ };
54
+ const hasClasses = (element, names) => names.map(name => element.classList.contains(name));
55
+ /** 받은 width · height · color 를 속성으로 남기는 합성 아이콘 */
56
+ const makeIcon = name => {
57
+ const Icon = _ref => {
58
+ let {
59
+ width,
60
+ height,
61
+ color
62
+ } = _ref;
63
+ return /*#__PURE__*/createElement('svg', {
64
+ 'data-icon': name,
65
+ width,
66
+ height,
67
+ color
68
+ });
69
+ };
70
+ return Icon;
71
+ };
72
+ const SyntheticIcon = makeIcon('slot');
73
+ describe('Badge — 기본 렌더와 new-badge (BDG-01)', () => {
74
+ it('BDG-01 기본값: pill-outline · neutral · xs 와 label', () => {
75
+ const badge = mountBadge();
76
+ expect(hasClasses(badge, ['ncua-badge--pill-outline', 'ncua-badge--neutral', 'ncua-badge--xs'])).toEqual([true, true, true]);
77
+ expect(mustQuery(badge, '.ncua-badge__label').textContent).toBe(LABEL);
78
+ });
79
+ it('BDG-01 type · color · size · className 을 클래스로 반영한다', () => {
80
+ const badge = mountBadge({
81
+ type: 'pill-dark-color',
82
+ color: 'error',
83
+ size: 'md',
84
+ className: 'custom-badge'
85
+ });
86
+ expect(hasClasses(badge, ['ncua-badge--pill-dark-color', 'ncua-badge--error', 'ncua-badge--md', 'custom-badge'])).toEqual([true, true, true, true]);
87
+ });
88
+ it.each([['md', 'md', 'ncua-badge--new-badge-md', NEW_BADGE_ICON_MD], ['sm', 'sm', 'ncua-badge--new-badge-sm', NEW_BADGE_ICON_SM], ['xs(→ sm)', 'xs', 'ncua-badge--new-badge-sm', NEW_BADGE_ICON_SM]])('BDG-01 new-badge size %s 는 %s 클래스와 아이콘 %s px', (_name, size, expectedClass, iconSize) => {
89
+ const badge = mountBadge({
90
+ type: 'new-badge',
91
+ size
92
+ });
93
+ expect(badge.classList.contains(expectedClass)).toBe(true);
94
+ expect(mustQuery(badge, 'svg').getAttribute('width')).toBe(String(iconSize));
95
+ });
96
+ it('BDG-01 new-badge 는 label · color · 아이콘 슬롯을 무시한다', () => {
97
+ const badge = mountBadge({
98
+ type: 'new-badge',
99
+ color: 'error',
100
+ leadingIcon: {
101
+ type: 'icon',
102
+ icon: SyntheticIcon
103
+ },
104
+ className: 'custom-badge'
105
+ });
106
+ expect(badge.querySelector('.ncua-badge__label')).toBeNull();
107
+ expect(badge.querySelector('[data-icon]')).toBeNull();
108
+ expect(hasClasses(badge, ['ncua-badge--error', 'custom-badge'])).toEqual([false, true]);
109
+ });
110
+ });
111
+ describe('Badge — 슬롯 렌더 sideSlotRender (BDG-02)', () => {
112
+ it.each([['지정 size 가 우선', {
113
+ size: CUSTOM_ICON_SIZE
114
+ }, CUSTOM_ICON_SIZE], ['생략 시 뱃지 기본 크기', {}, BADGE_ICON_SIZE]])('BDG-02 icon 슬롯 크기: %s', (_name, slotExtra, expected) => {
115
+ const badge = mountBadge({
116
+ leadingIcon: {
117
+ type: 'icon',
118
+ icon: SyntheticIcon,
119
+ ...slotExtra
120
+ }
121
+ });
122
+ const icon = mustQuery(badge, '[data-icon]');
123
+ expect([icon.getAttribute('width'), icon.getAttribute('height')]).toEqual([String(expected), String(expected)]);
124
+ });
125
+ it.each([['color 지정 시 COLOR 값', 'gray700', COLOR.gray700], ['color 생략 시 없음', undefined, null]])('BDG-02 icon 슬롯 색: %s', (_name, color, expected) => {
126
+ const badge = mountBadge({
127
+ leadingIcon: {
128
+ type: 'icon',
129
+ icon: SyntheticIcon,
130
+ color
131
+ }
132
+ });
133
+ expect(mustQuery(badge, '[data-icon]').getAttribute('color')).toBe(expected);
134
+ });
135
+ it.each([['지정 color · size', {
136
+ type: 'dot',
137
+ color: 'error',
138
+ size: 'lg'
139
+ }, ['ncua-dot--error', 'ncua-dot--lg']], ['생략 시 neutral · sm', {
140
+ type: 'dot'
141
+ }, ['ncua-dot--neutral', 'ncua-dot--sm']]])('BDG-02 dot 슬롯: %s', (_name, slot, expectedClasses) => {
142
+ // 생략은 타입 밖이라 캐스팅한다 — color · size 폴백 경로
143
+ const badge = mountBadge({
144
+ leadingIcon: slot
145
+ });
146
+ expect(hasClasses(mustQuery(badge, '.ncua-dot'), [...expectedClasses])).toEqual([true, true]);
147
+ });
148
+ it('BDG-02 custom 슬롯은 children 을 그리고, leading 은 label 앞 · trailing 은 label 뒤에 놓인다', () => {
149
+ const badge = mountBadge({
150
+ leadingIcon: {
151
+ type: 'custom',
152
+ children: /*#__PURE__*/createElement('i', {
153
+ className: 'lead'
154
+ })
155
+ },
156
+ trailingIcon: {
157
+ type: 'custom',
158
+ children: /*#__PURE__*/createElement('i', {
159
+ className: 'trail'
160
+ })
161
+ }
162
+ });
163
+ const children = Array.from(badge.children);
164
+ expect([children[0].classList.contains('lead'), children[1].classList.contains('ncua-badge__label'), children[2].classList.contains('trail'), children.length]).toEqual([true, true, true, EXPECTED_SLOT_CHILDREN]);
165
+ });
166
+ it('BDG-02 sideSlotRender 는 호출자가 준 defaultIconSize 를 기본 크기로 쓴다', () => {
167
+ // Given: 뱃지 기본(12)과 다른 기본 크기로 직접 렌더
168
+ const container = document.createElement('div');
169
+ document.body.appendChild(container);
170
+ const root = createRoot(container);
171
+ mounted.push({
172
+ root,
173
+ container
174
+ });
175
+ // When
176
+ act(() => root.render(sideSlotRender({
177
+ slot: {
178
+ type: 'icon',
179
+ icon: SyntheticIcon
180
+ },
181
+ defaultIconSize: CUSTOM_ICON_SIZE
182
+ })));
183
+ // Then
184
+ expect(mustQuery(container, '[data-icon]').getAttribute('width')).toBe(String(CUSTOM_ICON_SIZE));
185
+ });
186
+ });
@@ -0,0 +1,116 @@
1
+ // @vitest-environment jsdom
2
+ //
3
+ // BadgeGroup (src/components/feedback-and-status/badge-group/BadgeGroup.tsx) 위험 경로 — 위험 목록표 BG-xx.
4
+ // Badge·sideSlotRender 는 실구현으로 렌더한다.
5
+ import { ArrowRight } from '@ncds/ui-admin-icon';
6
+ import { createElement } from 'react';
7
+ import { createRoot } from 'react-dom/client';
8
+ import { act } from 'react-dom/test-utils';
9
+ import { afterEach, describe, expect, it, vi } from 'vitest';
10
+ import { BadgeGroup } from '../BadgeGroup';
11
+ globalThis.IS_REACT_ACT_ENVIRONMENT = true;
12
+ const GROUP_LABEL = '새 기능이 추가되었습니다';
13
+ const GROUP_HREF = 'https://example.com/notice';
14
+ const DEFAULT_GROUP_ICON_SIZE = '14';
15
+ let root = null;
16
+ let container = null;
17
+ afterEach(() => {
18
+ if (root) {
19
+ act(() => {
20
+ root?.unmount();
21
+ });
22
+ }
23
+ root = null;
24
+ container?.remove();
25
+ container = null;
26
+ vi.restoreAllMocks();
27
+ });
28
+ const render = props => {
29
+ if (!container) {
30
+ container = document.createElement('div');
31
+ document.body.appendChild(container);
32
+ root = createRoot(container);
33
+ }
34
+ act(() => {
35
+ root?.render(/*#__PURE__*/createElement(BadgeGroup, props));
36
+ });
37
+ return container;
38
+ };
39
+ const linkOf = view => view.querySelector('a.ncua-badge-group');
40
+ describe('BadgeGroup — 링크·배지·라벨·아이콘 (BG-01)', () => {
41
+ it('BG-01 <a href target="_blank"> 안에 pill-dark-color Badge · groupLabel 을 렌더하고 기본은 neutral · sm 이다', () => {
42
+ const view = render({
43
+ label: 'NEW',
44
+ groupLabel: GROUP_LABEL,
45
+ href: GROUP_HREF
46
+ });
47
+ const link = linkOf(view);
48
+ const badge = link?.querySelector('.ncua-badge');
49
+ expect(link?.getAttribute('href')).toBe(GROUP_HREF);
50
+ expect(link?.getAttribute('target')).toBe('_blank');
51
+ expect(link?.classList.contains('ncua-badge-group--neutral')).toBe(true);
52
+ expect(link?.classList.contains('ncua-badge-group--sm')).toBe(true);
53
+ expect(['ncua-badge--pill-dark-color', 'ncua-badge--neutral', 'ncua-badge--sm'].map(name => badge?.classList.contains(name))).toEqual([true, true, true]);
54
+ expect(badge?.textContent).toBe('NEW');
55
+ expect(link?.querySelector('.ncua-badge-group__label')?.textContent).toBe(GROUP_LABEL);
56
+ expect(link?.querySelector(':scope > svg')).toBeNull();
57
+ link?.focus();
58
+ expect(document.activeElement).toBe(link);
59
+ });
60
+ it('BG-01 color·size·target·groupClassName 을 링크와 Badge 에 반영한다', () => {
61
+ const view = render({
62
+ label: '오류',
63
+ groupLabel: GROUP_LABEL,
64
+ href: GROUP_HREF,
65
+ color: 'error',
66
+ size: 'xs',
67
+ target: '_self',
68
+ groupClassName: 'my-group'
69
+ });
70
+ const link = linkOf(view);
71
+ const badge = link?.querySelector('.ncua-badge');
72
+ expect(link?.getAttribute('target')).toBe('_self');
73
+ expect(link?.classList.contains('ncua-badge-group--error')).toBe(true);
74
+ expect(link?.classList.contains('ncua-badge-group--xs')).toBe(true);
75
+ expect(link?.classList.contains('my-group')).toBe(true);
76
+ expect(badge?.classList.contains('ncua-badge--error')).toBe(true);
77
+ expect(badge?.classList.contains('ncua-badge--xs')).toBe(true);
78
+ });
79
+ it('BG-01 groupIcon 이 있으면 라벨 뒤에 기본 14px 아이콘을 렌더한다', () => {
80
+ const view = render({
81
+ groupLabel: GROUP_LABEL,
82
+ href: GROUP_HREF,
83
+ groupIcon: {
84
+ type: 'icon',
85
+ icon: ArrowRight
86
+ }
87
+ });
88
+ const icon = linkOf(view)?.lastElementChild;
89
+ expect(icon?.tagName.toLowerCase()).toBe('svg');
90
+ expect(icon?.previousElementSibling?.classList.contains('ncua-badge-group__label')).toBe(true);
91
+ expect([icon?.getAttribute('width'), icon?.getAttribute('height')]).toEqual([DEFAULT_GROUP_ICON_SIZE, DEFAULT_GROUP_ICON_SIZE]);
92
+ });
93
+ });
94
+ describe('BadgeGroup — rel·href 누락 (BG-02)', () => {
95
+ it('BG-02 기본 target _blank 인데 rel 을 붙이지 않는다', () => {
96
+ // 현재 동작 고정 — 결함 후보: #597 (새 창 링크에 rel="noopener noreferrer" 미지정, 구형 브라우저 reverse tabnabbing·referrer 노출)
97
+ const view = render({
98
+ groupLabel: GROUP_LABEL,
99
+ href: GROUP_HREF
100
+ });
101
+ expect(linkOf(view)?.getAttribute('target')).toBe('_blank');
102
+ expect(linkOf(view)?.hasAttribute('rel')).toBe(false);
103
+ });
104
+ it('BG-02 href 가 없으면 href 없는 <a> 라 링크·키보드 포커스 대상이 아니다', () => {
105
+ // 현재 동작 고정 — 결함 후보: #597 (href 없는 <a> 는 tab 순서에서 빠지고 링크 역할도 없음)
106
+ const view = render({
107
+ groupLabel: GROUP_LABEL
108
+ });
109
+ const link = linkOf(view);
110
+ link?.focus();
111
+ expect(link?.hasAttribute('href')).toBe(false);
112
+ expect(document.activeElement).not.toBe(link);
113
+ });
114
+ it.todo('BG-02 target 이 _blank 면 rel="noopener noreferrer" 를 붙인다 (기대, #597)');
115
+ it.todo('BG-02 href 가 없으면 링크가 아닌 요소로 렌더하거나 href 를 필수로 한다 (기대, #597)');
116
+ });
@@ -0,0 +1,91 @@
1
+ // @vitest-environment jsdom
2
+ //
3
+ // CarouselArrow (src/components/feedback-and-status/carousel-arrow/CarouselArrow.tsx) 위험 경로 — 위험 목록표 CA-xx.
4
+ // 좌우 아이콘은 아이콘 컴포넌트가 그리는 path 로 구분한다.
5
+ import { ChevronLeft, ChevronRight } from '@ncds/ui-admin-icon';
6
+ import { createElement } from 'react';
7
+ import { createRoot } from 'react-dom/client';
8
+ import { renderToStaticMarkup } from 'react-dom/server';
9
+ import { act } from 'react-dom/test-utils';
10
+ import { afterEach, describe, expect, it, vi } from 'vitest';
11
+ import { CarouselArrow } from '../CarouselArrow';
12
+ globalThis.IS_REACT_ACT_ENVIRONMENT = true;
13
+ let root = null;
14
+ let container = null;
15
+ afterEach(() => {
16
+ if (root) {
17
+ act(() => {
18
+ root?.unmount();
19
+ });
20
+ }
21
+ root = null;
22
+ container?.remove();
23
+ container = null;
24
+ vi.restoreAllMocks();
25
+ });
26
+ const render = props => {
27
+ if (!container) {
28
+ container = document.createElement('div');
29
+ document.body.appendChild(container);
30
+ root = createRoot(container);
31
+ }
32
+ act(() => {
33
+ root?.render(/*#__PURE__*/createElement(CarouselArrow, props));
34
+ });
35
+ return container;
36
+ };
37
+ /** 아이콘 컴포넌트가 그리는 path 의 d — DOM 의 svg 와 비교해 어떤 아이콘인지 판별한다 */
38
+ const iconPathOf = Icon => {
39
+ const holder = document.createElement('div');
40
+ holder.innerHTML = renderToStaticMarkup(/*#__PURE__*/createElement(Icon));
41
+ return holder.querySelector('path')?.getAttribute('d') ?? null;
42
+ };
43
+ const buttonOf = view => view.querySelector('button.ncua-carousel-arrow');
44
+ describe('CarouselArrow — click·방향·클래스 (CA-01)', () => {
45
+ it('CA-01 click 하면 onClick 을 호출한다', () => {
46
+ const onClick = vi.fn();
47
+ const view = render({
48
+ chevron: 'right',
49
+ onClick
50
+ });
51
+ act(() => {
52
+ buttonOf(view)?.click();
53
+ });
54
+ expect(buttonOf(view)?.getAttribute('type')).toBe('button');
55
+ expect(onClick).toHaveBeenCalled();
56
+ });
57
+ it.each([['left', ChevronLeft], ['right', ChevronRight]])('CA-01 chevron %s 면 그 방향 아이콘과 방향 클래스를 쓴다', (chevron, Icon) => {
58
+ const view = render({
59
+ chevron
60
+ });
61
+ const button = buttonOf(view);
62
+ expect(button?.querySelector('svg.ncua-carousel-arrow__icon path')?.getAttribute('d')).toBe(iconPathOf(Icon));
63
+ expect(button?.classList.contains(`ncua-carousel-arrow--${chevron}`)).toBe(true);
64
+ });
65
+ it('CA-01 기본은 default · md 클래스이고 type·className 을 넘기면 반영한다', () => {
66
+ const view = render({
67
+ chevron: 'left'
68
+ });
69
+ expect(buttonOf(view)?.classList.contains('ncua-carousel-arrow--default')).toBe(true);
70
+ expect(buttonOf(view)?.classList.contains('ncua-carousel-arrow--md')).toBe(true);
71
+ render({
72
+ chevron: 'left',
73
+ type: 'line',
74
+ className: 'my-arrow'
75
+ });
76
+ expect(buttonOf(view)?.classList.contains('ncua-carousel-arrow--line')).toBe(true);
77
+ expect(buttonOf(view)?.classList.contains('my-arrow')).toBe(true);
78
+ });
79
+ });
80
+ describe('CarouselArrow — 접근 가능한 이름 (CA-02)', () => {
81
+ it('CA-02 아이콘만 있는 버튼에 aria-label·텍스트가 없어 접근 가능한 이름이 비어 있다', () => {
82
+ // 현재 동작 고정 — 결함 후보: #597 (아이콘 전용 버튼에 aria-label 이 없어 스크린리더가 용도를 읽지 못함)
83
+ const view = render({
84
+ chevron: 'left'
85
+ });
86
+ const button = buttonOf(view);
87
+ expect(button?.hasAttribute('aria-label')).toBe(false);
88
+ expect(button?.textContent).toBe('');
89
+ });
90
+ it.todo('CA-02 좌우 방향에 맞는 aria-label(예: 이전·다음)을 가진다 (기대, #597)');
91
+ });
@@ -0,0 +1,61 @@
1
+ // @vitest-environment jsdom
2
+ //
3
+ // CarouselNumberGroup (src/components/feedback-and-status/carousel-number-group/CarouselNumberGroup.tsx)
4
+ // 위험 경로 — 위험 목록표 CN-xx.
5
+ import { createElement } from 'react';
6
+ import { createRoot } from 'react-dom/client';
7
+ import { act } from 'react-dom/test-utils';
8
+ import { afterEach, describe, expect, it, vi } from 'vitest';
9
+ import { CarouselNumberGroup } from '../CarouselNumberGroup';
10
+ globalThis.IS_REACT_ACT_ENVIRONMENT = true;
11
+ const CURRENT_PAGE = 3;
12
+ const TOTAL_PAGE = 10;
13
+ let root = null;
14
+ let container = null;
15
+ afterEach(() => {
16
+ if (root) {
17
+ act(() => {
18
+ root?.unmount();
19
+ });
20
+ }
21
+ root = null;
22
+ container?.remove();
23
+ container = null;
24
+ vi.restoreAllMocks();
25
+ });
26
+ const render = props => {
27
+ if (!container) {
28
+ container = document.createElement('div');
29
+ document.body.appendChild(container);
30
+ root = createRoot(container);
31
+ }
32
+ act(() => {
33
+ root?.render(/*#__PURE__*/createElement(CarouselNumberGroup, props));
34
+ });
35
+ return container;
36
+ };
37
+ const groupOf = view => view.querySelector('.ncua-carousel-number-group');
38
+ describe('CarouselNumberGroup — 표시와 클래스 (CN-01)', () => {
39
+ it('CN-01 현재 페이지와 "/전체" 를 표시하고 기본은 framed · light · sm 이다', () => {
40
+ const view = render({
41
+ currentPage: CURRENT_PAGE,
42
+ totalPage: TOTAL_PAGE
43
+ });
44
+ const group = groupOf(view);
45
+ expect(view.querySelector('.ncua-carousel-number-group__number')?.textContent).toBe(String(CURRENT_PAGE));
46
+ expect(view.querySelector('.ncua-carousel-number-group__total')?.textContent).toBe(`/${TOTAL_PAGE}`);
47
+ expect(['framed', 'ncua-carousel-number-group--light', 'ncua-carousel-number-group--sm'].map(name => group?.classList.contains(name))).toEqual([true, true, true]);
48
+ });
49
+ it('CN-01 framed false · dark 면 framed 를 빼고 dark 클래스를 붙인다', () => {
50
+ const view = render({
51
+ currentPage: CURRENT_PAGE,
52
+ totalPage: TOTAL_PAGE,
53
+ framed: false,
54
+ color: 'dark'
55
+ });
56
+ const group = groupOf(view);
57
+ expect(group?.classList.contains('framed')).toBe(false);
58
+ expect(group?.classList.contains('ncua-carousel-number-group--dark')).toBe(true);
59
+ expect(group?.classList.contains('ncua-carousel-number-group--light')).toBe(false);
60
+ });
61
+ });
@@ -0,0 +1,123 @@
1
+ // @vitest-environment jsdom
2
+ import { createElement } from 'react';
3
+ import { createRoot } from 'react-dom/client';
4
+ import { act } from 'react-dom/test-utils';
5
+ import { afterEach, describe, expect, it, vi } from 'vitest';
6
+ import { EmptyState } from '../EmptyState';
7
+ // React 18에서 act() 사용 시 필요한 플래그 (미설정 시 console.error 경고 발생)
8
+ globalThis.IS_REACT_ACT_ENVIRONMENT = true;
9
+ const TITLE = '결과가 없습니다';
10
+ const DESCRIPTION = '조건을 바꿔 보세요';
11
+ /** afterEach 에서 unmount 할 루트 */
12
+ const mounted = [];
13
+ afterEach(() => {
14
+ for (const {
15
+ root,
16
+ container
17
+ } of mounted.splice(0)) {
18
+ act(() => root.unmount());
19
+ container.remove();
20
+ }
21
+ });
22
+ const mount = node => {
23
+ const container = document.createElement('div');
24
+ document.body.appendChild(container);
25
+ const root = createRoot(container);
26
+ mounted.push({
27
+ root,
28
+ container
29
+ });
30
+ act(() => root.render(node));
31
+ return {
32
+ container
33
+ };
34
+ };
35
+ const emptyState = function () {
36
+ let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
37
+ return /*#__PURE__*/createElement(EmptyState, {
38
+ title: TITLE,
39
+ description: DESCRIPTION,
40
+ ...props
41
+ });
42
+ };
43
+ const mustQuery = (root, selector) => {
44
+ const found = root.querySelector(selector);
45
+ if (!found) throw new Error(`요소를 찾을 수 없습니다: ${selector}`);
46
+ return found;
47
+ };
48
+ const buttons = root => Array.from(root.querySelectorAll('.ncua-empty-state__button-group button'));
49
+ describe('EmptyState — 버튼 영역 (EMS-01)', () => {
50
+ it('EMS-01 buttons 가 없으면 title · description 만 그리고 버튼 영역이 없다', () => {
51
+ const view = mount(emptyState());
52
+ expect(mustQuery(view.container, '.ncua-empty-state__title').textContent).toBe(TITLE);
53
+ expect(mustQuery(view.container, '.ncua-empty-state__description').textContent).toBe(DESCRIPTION);
54
+ expect(view.container.querySelector('.ncua-empty-state__button-group')).toBeNull();
55
+ });
56
+ it('EMS-01 빈 배열이면 버튼 영역이 없다', () => {
57
+ const view = mount(emptyState({
58
+ buttons: []
59
+ }));
60
+ expect(view.container.querySelector('.ncua-empty-state__button-group')).toBeNull();
61
+ });
62
+ it('EMS-01 단일 객체면 버튼 1개를 그리고 size 기본값 xs 를 쓴다', () => {
63
+ const view = mount(emptyState({
64
+ buttons: {
65
+ label: '등록'
66
+ }
67
+ }));
68
+ const rendered = buttons(view.container);
69
+ expect(rendered.map(button => button.textContent)).toEqual(['등록']);
70
+ expect(rendered[0].classList.contains('ncua-btn--xs')).toBe(true);
71
+ });
72
+ it('EMS-01 배열이면 순서대로 그리고 지정한 size · hierarchy · disabled 를 전달한다', () => {
73
+ const view = mount(emptyState({
74
+ buttons: [{
75
+ label: '취소',
76
+ size: 'sm',
77
+ hierarchy: 'secondary-gray'
78
+ }, {
79
+ label: '등록',
80
+ size: 'sm',
81
+ hierarchy: 'primary',
82
+ disabled: true
83
+ }]
84
+ }));
85
+ const rendered = buttons(view.container);
86
+ expect(rendered.map(button => button.textContent)).toEqual(['취소', '등록']);
87
+ expect(rendered.map(button => button.classList.contains('ncua-btn--sm'))).toEqual([true, true]);
88
+ expect(rendered.map(button => button.disabled)).toEqual([false, true]);
89
+ expect(rendered[1].classList.contains('ncua-btn--primary')).toBe(true);
90
+ });
91
+ it('EMS-01 버튼 클릭은 그 버튼의 onClick 을 부른다', () => {
92
+ const onRegister = vi.fn();
93
+ const view = mount(emptyState({
94
+ buttons: [{
95
+ label: '취소'
96
+ }, {
97
+ label: '등록',
98
+ onClick: onRegister
99
+ }]
100
+ }));
101
+ act(() => buttons(view.container)[1].click());
102
+ expect(onRegister).toHaveBeenCalled();
103
+ });
104
+ });
105
+ describe('EmptyState — 폼 안 버튼 (EMS-02)', () => {
106
+ it('EMS-02 폼 안의 EmptyState 버튼을 클릭하면 폼을 제출한다 (BTN-04 영향 사용처)', () => {
107
+ // 현재 동작 고정 — 결함 후보: 후속 이슈 (#620 VNT-12 · BTN-04 같은 뿌리 — 공용 Button 에 type 기본값 없음)
108
+ const submits = [];
109
+ const view = mount(/*#__PURE__*/createElement('form', {
110
+ onSubmit: event => {
111
+ event.preventDefault();
112
+ submits.push(event.nativeEvent);
113
+ }
114
+ }, emptyState({
115
+ buttons: {
116
+ label: '등록'
117
+ }
118
+ })));
119
+ act(() => buttons(view.container)[0].click());
120
+ expect(submits).toHaveLength(1);
121
+ });
122
+ it.todo('EMS-02 기대 동작: 폼 안의 EmptyState 버튼 클릭은 폼을 제출하지 않는다 (BTN-04 수정 시 함께 해소)');
123
+ });