@ncds/ui-admin 1.8.28-alpha.0 → 1.8.28-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/assets/scripts/notification/const/icons.js +1 -2
- package/dist/cjs/assets/scripts/notification/const/index.js +0 -30
- package/dist/cjs/assets/scripts/notification/const/sizes.js +5 -5
- package/dist/cjs/assets/scripts/notification/index.js +0 -7
- package/dist/cjs/assets/scripts/shared/ButtonCloseX.js +5 -4
- package/dist/cjs/assets/scripts/tooltip/const/classNames.js +29 -0
- package/dist/cjs/assets/scripts/tooltip/const/constants.js +58 -0
- package/dist/cjs/assets/scripts/tooltip/const/icons.js +15 -0
- package/dist/cjs/assets/scripts/tooltip/const/index.js +117 -0
- package/dist/cjs/assets/scripts/tooltip/const/templates.js +67 -0
- package/dist/cjs/assets/scripts/tooltip/const/types.js +5 -0
- package/dist/cjs/assets/scripts/utils/sanitize.js +0 -13
- package/dist/cjs/src/__tests__/helpers/dom.js +14 -0
- package/dist/cjs/src/__tests__/helpers/fileInput.js +92 -0
- package/dist/cjs/src/__tests__/helpers/fixedToday.js +17 -0
- package/dist/cjs/src/__tests__/helpers/matchMedia.js +50 -0
- package/dist/cjs/src/__tests__/helpers/rect.js +25 -0
- package/dist/cjs/src/components/action/button/__tests__/Button.test.js +260 -0
- package/dist/cjs/src/components/action/button-group/__tests__/ButtonGroup.test.js +267 -0
- package/dist/cjs/src/components/data-display/data-grid/__tests__/DataGrid.test.js +350 -0
- package/dist/cjs/src/components/data-display/table/__tests__/Table.dnd.dragCell.test.js +320 -0
- package/dist/cjs/src/components/data-display/table/__tests__/Table.dnd.test.js +313 -0
- package/dist/cjs/src/components/data-display/table/__tests__/Table.scroll.test.js +194 -0
- package/dist/cjs/src/components/data-display/table/__tests__/Table.test.js +382 -0
- package/dist/cjs/src/components/data-display/table/__tests__/dnd-context.test.js +61 -0
- package/dist/cjs/src/components/data-display/table/__tests__/dnd-preview.test.js +230 -0
- package/dist/cjs/src/components/data-display/table/__tests__/tableDndTestUtils.js +266 -0
- package/dist/cjs/src/components/data-display/table/__tests__/tableTestUtils.js +48 -0
- package/dist/cjs/src/components/data-display/table/__tests__/useTableScrollbars.ownership.test.js +362 -0
- package/dist/cjs/src/components/data-display/table/useTableScrollbars.js +0 -24
- package/dist/cjs/src/components/feedback-and-status/badge/__tests__/Badge.test.js +189 -0
- package/dist/cjs/src/components/feedback-and-status/badge-group/__tests__/BadgeGroup.test.js +119 -0
- package/dist/cjs/src/components/feedback-and-status/carousel-arrow/__tests__/CarouselArrow.test.js +94 -0
- package/dist/cjs/src/components/feedback-and-status/carousel-number-group/__tests__/CarouselNumberGroup.test.js +64 -0
- package/dist/cjs/src/components/feedback-and-status/empty-state/__tests__/EmptyState.test.js +126 -0
- package/dist/cjs/src/components/feedback-and-status/progress-bar/__tests__/ProgressBar.test.js +277 -0
- package/dist/cjs/src/components/feedback-and-status/progress-bar/__tests__/useProgressBar.test.js +249 -0
- package/dist/cjs/src/components/feedback-and-status/progress-bar/__tests__/utils.test.js +22 -0
- package/dist/cjs/src/components/feedback-and-status/progress-circle/__tests__/ProgressCircle.test.js +102 -0
- package/dist/cjs/src/components/feedback-and-status/spinner/__tests__/Spinner.test.js +76 -0
- package/dist/cjs/src/components/feedback-and-status/tag/__tests__/Tag.test.js +604 -0
- package/dist/cjs/src/components/forms-and-input/checkbox/__tests__/Checkbox.test.js +213 -0
- package/dist/cjs/src/components/forms-and-input/combo-box/ComboBox.js +2 -2
- package/dist/cjs/src/components/forms-and-input/combo-box/__tests__/ComboBox.interaction.test.js +442 -0
- package/dist/cjs/src/components/forms-and-input/combo-box/__tests__/ComboBox.register.test.js +153 -0
- package/dist/cjs/src/components/forms-and-input/combo-box/__tests__/comboBoxTestUtils.js +92 -0
- package/dist/cjs/src/components/forms-and-input/date-picker/__tests__/DatePicker.input.test.js +546 -0
- package/dist/cjs/src/components/forms-and-input/date-picker/__tests__/DatePicker.position.test.js +550 -0
- package/dist/cjs/src/components/forms-and-input/date-picker/__tests__/utils.test.js +34 -0
- package/dist/cjs/src/components/forms-and-input/file-input/__tests__/FileInput.select.test.js +266 -0
- package/dist/cjs/src/components/forms-and-input/image-file-input/__tests__/ImageFileInput.select.test.js +416 -0
- package/dist/cjs/src/components/forms-and-input/input-base/__tests__/InputBase.slots.test.js +236 -0
- package/dist/cjs/src/components/forms-and-input/number-input/__tests__/NumberInput.test.js +570 -0
- package/dist/cjs/src/components/forms-and-input/password-input/__tests__/PasswordInput.toggle.test.js +113 -0
- package/dist/cjs/src/components/forms-and-input/radio/__tests__/Radio.test.js +57 -0
- package/dist/cjs/src/components/forms-and-input/range-date-picker/__tests__/RangeDatePicker.test.js +275 -0
- package/dist/cjs/src/components/forms-and-input/range-date-picker-with-buttons/__tests__/RangeDatePickerWithButtons.test.js +235 -2
- package/dist/cjs/src/components/forms-and-input/select/__tests__/Select.test.js +275 -0
- package/dist/cjs/src/components/forms-and-input/select-box/SelectBox.js +2 -2
- package/dist/cjs/src/components/forms-and-input/select-box/__tests__/SelectBox.portal.test.js +371 -0
- package/dist/cjs/src/components/forms-and-input/select-box/__tests__/SelectBox.test.js +1335 -0
- package/dist/cjs/src/components/forms-and-input/slider/__tests__/Slider.test.js +390 -0
- package/dist/cjs/src/components/forms-and-input/switch/__tests__/Switch.test.js +317 -0
- package/dist/cjs/src/components/forms-and-input/textarea/__tests__/Textarea.test.js +255 -0
- package/dist/cjs/src/components/forms-and-input/textarea/__tests__/Textarea.unmount.test.js +158 -0
- package/dist/cjs/src/components/forms-and-input/toggle/__tests__/Toggle.test.js +138 -0
- package/dist/cjs/src/components/image-and-icons/featured-icon/__tests__/FeaturedIcon.test.js +67 -0
- package/dist/cjs/src/components/layout/block-container/__tests__/BlockContainer.test.js +59 -0
- package/dist/cjs/src/components/layout/block-header/__tests__/BlockHeader.test.js +169 -0
- package/dist/cjs/src/components/layout/block-header/__tests__/SubTitle.test.js +77 -0
- package/dist/cjs/src/components/layout/divider/__tests__/Divider.test.js +65 -0
- package/dist/cjs/src/components/layout/ncua-scope/__tests__/NcuaScope.test.js +146 -0
- package/dist/cjs/src/components/layout/page-title/__tests__/PageTitle.test.js +164 -0
- package/dist/cjs/src/components/navigation/context-tab/__tests__/ContextTab.test.js +616 -0
- package/dist/cjs/src/components/navigation/context-tab/__tests__/useContextTabScroll.test.js +592 -0
- package/dist/cjs/src/components/navigation/horizontal-tab/__tests__/HorizontalTab.test.js +211 -0
- package/dist/cjs/src/components/navigation/pagination/__tests__/Pagination.navigation.test.js +285 -0
- package/dist/cjs/src/components/navigation/vertical-tab/__tests__/VerticalTab.test.js +255 -0
- package/dist/cjs/src/components/overlays/dropdown/__tests__/Dropdown.dnd.test.js +558 -0
- package/dist/cjs/src/components/overlays/dropdown/__tests__/Dropdown.test.js +1020 -0
- package/dist/cjs/src/components/overlays/dropdown/__tests__/dropdownTestUtils.js +24 -0
- package/dist/cjs/src/components/overlays/dropdown/__tests__/utils.test.js +56 -0
- package/dist/cjs/src/components/overlays/modal/__tests__/Modal.test.js +426 -0
- package/dist/cjs/src/components/overlays/notification/__tests__/FloatingNotification.test.js +284 -0
- package/dist/cjs/src/components/overlays/notification/__tests__/MessageNotification.test.js +12 -0
- package/dist/cjs/src/components/overlays/postcode-search-modal/PostcodeSearchModalTip.js +2 -2
- package/dist/cjs/src/components/overlays/postcode-search-modal/__tests__/PostcodeSearchModal.viewport.test.js +141 -0
- package/dist/cjs/src/components/overlays/tooltip/__tests__/Tooltip.test.js +829 -0
- package/dist/cjs/src/components/tab/__tests__/TabButton.test.js +252 -0
- package/dist/cjs/src/hooks/__tests__/useCallbackRef.test.js +152 -0
- package/dist/cjs/src/hooks/__tests__/useMediaQuery.test.js +119 -0
- package/dist/cjs/src/hooks/__tests__/usePortalState.ssr.test.js +25 -0
- package/dist/cjs/src/hooks/dropdown/__tests__/dropdownHooks.test.js +168 -0
- package/dist/cjs/src/types/component-meta.js +0 -4
- package/dist/cjs/src/utils/__tests__/date-picker.test.js +105 -0
- package/dist/cjs/src/utils/dropdown/__tests__/dropdownUtils.test.js +24 -0
- package/dist/cjs/src/utils/dropdown/__tests__/multiSelect.test.js +49 -0
- package/dist/cjs/src/utils/dropdown/multiSelect.js +1 -6
- package/dist/cjs/src/utils/portal-position/__tests__/portalPosition.nullAnchor.test.js +67 -0
- package/dist/cjs/vitest.config.js +16 -10
- package/dist/esm/assets/scripts/notification/const/icons.js +0 -1
- package/dist/esm/assets/scripts/notification/const/index.js +2 -2
- package/dist/esm/assets/scripts/notification/const/sizes.js +4 -4
- package/dist/esm/assets/scripts/notification/index.js +1 -1
- package/dist/esm/assets/scripts/shared/ButtonCloseX.js +6 -3
- package/dist/esm/assets/scripts/tooltip/const/classNames.js +23 -0
- package/dist/esm/assets/scripts/tooltip/const/constants.js +52 -0
- package/dist/esm/assets/scripts/tooltip/const/icons.js +9 -0
- package/dist/esm/assets/scripts/tooltip/const/index.js +5 -0
- package/dist/esm/assets/scripts/tooltip/const/templates.js +60 -0
- package/dist/esm/assets/scripts/tooltip/const/types.js +1 -0
- package/dist/esm/assets/scripts/utils/sanitize.js +0 -12
- package/dist/esm/src/__tests__/helpers/dom.js +8 -0
- package/dist/esm/src/__tests__/helpers/fileInput.js +78 -0
- package/dist/esm/src/__tests__/helpers/fixedToday.js +10 -0
- package/dist/esm/src/__tests__/helpers/matchMedia.js +44 -0
- package/dist/esm/src/__tests__/helpers/rect.js +18 -0
- package/dist/esm/src/components/action/button/__tests__/Button.test.js +257 -0
- package/dist/esm/src/components/action/button-group/__tests__/ButtonGroup.test.js +264 -0
- package/dist/esm/src/components/data-display/data-grid/__tests__/DataGrid.test.js +347 -0
- package/dist/esm/src/components/data-display/table/__tests__/Table.dnd.dragCell.test.js +317 -0
- package/dist/esm/src/components/data-display/table/__tests__/Table.dnd.test.js +310 -0
- package/dist/esm/src/components/data-display/table/__tests__/Table.scroll.test.js +191 -0
- package/dist/esm/src/components/data-display/table/__tests__/Table.test.js +379 -0
- package/dist/esm/src/components/data-display/table/__tests__/dnd-context.test.js +58 -0
- package/dist/esm/src/components/data-display/table/__tests__/dnd-preview.test.js +227 -0
- package/dist/esm/src/components/data-display/table/__tests__/tableDndTestUtils.js +240 -0
- package/dist/esm/src/components/data-display/table/__tests__/tableTestUtils.js +40 -0
- package/dist/esm/src/components/data-display/table/__tests__/useTableScrollbars.ownership.test.js +359 -0
- package/dist/esm/src/components/data-display/table/useTableScrollbars.js +1 -1
- package/dist/esm/src/components/feedback-and-status/badge/__tests__/Badge.test.js +186 -0
- package/dist/esm/src/components/feedback-and-status/badge-group/__tests__/BadgeGroup.test.js +116 -0
- package/dist/esm/src/components/feedback-and-status/carousel-arrow/__tests__/CarouselArrow.test.js +91 -0
- package/dist/esm/src/components/feedback-and-status/carousel-number-group/__tests__/CarouselNumberGroup.test.js +61 -0
- package/dist/esm/src/components/feedback-and-status/empty-state/__tests__/EmptyState.test.js +123 -0
- package/dist/esm/src/components/feedback-and-status/progress-bar/__tests__/ProgressBar.test.js +274 -0
- package/dist/esm/src/components/feedback-and-status/progress-bar/__tests__/useProgressBar.test.js +246 -0
- package/dist/esm/src/components/feedback-and-status/progress-bar/__tests__/utils.test.js +19 -0
- package/dist/esm/src/components/feedback-and-status/progress-circle/__tests__/ProgressCircle.test.js +99 -0
- package/dist/esm/src/components/feedback-and-status/spinner/__tests__/Spinner.test.js +73 -0
- package/dist/esm/src/components/feedback-and-status/tag/__tests__/Tag.test.js +601 -0
- package/dist/esm/src/components/forms-and-input/checkbox/__tests__/Checkbox.test.js +210 -0
- package/dist/esm/src/components/forms-and-input/combo-box/ComboBox.js +1 -1
- package/dist/esm/src/components/forms-and-input/combo-box/__tests__/ComboBox.interaction.test.js +439 -0
- package/dist/esm/src/components/forms-and-input/combo-box/__tests__/ComboBox.register.test.js +151 -0
- package/dist/esm/src/components/forms-and-input/combo-box/__tests__/comboBoxTestUtils.js +77 -0
- package/dist/esm/src/components/forms-and-input/date-picker/__tests__/DatePicker.input.test.js +544 -0
- package/dist/esm/src/components/forms-and-input/date-picker/__tests__/DatePicker.position.test.js +546 -0
- package/dist/esm/src/components/forms-and-input/date-picker/__tests__/utils.test.js +31 -0
- package/dist/esm/src/components/forms-and-input/file-input/__tests__/FileInput.select.test.js +263 -0
- package/dist/esm/src/components/forms-and-input/image-file-input/__tests__/ImageFileInput.select.test.js +413 -0
- package/dist/esm/src/components/forms-and-input/input-base/__tests__/InputBase.slots.test.js +233 -0
- package/dist/esm/src/components/forms-and-input/number-input/__tests__/NumberInput.test.js +567 -0
- package/dist/esm/src/components/forms-and-input/password-input/__tests__/PasswordInput.toggle.test.js +110 -0
- package/dist/esm/src/components/forms-and-input/radio/__tests__/Radio.test.js +54 -0
- package/dist/esm/src/components/forms-and-input/range-date-picker/__tests__/RangeDatePicker.test.js +275 -0
- package/dist/esm/src/components/forms-and-input/range-date-picker-with-buttons/__tests__/RangeDatePickerWithButtons.test.js +235 -1
- package/dist/esm/src/components/forms-and-input/select/__tests__/Select.test.js +272 -0
- package/dist/esm/src/components/forms-and-input/select-box/SelectBox.js +1 -1
- package/dist/esm/src/components/forms-and-input/select-box/__tests__/SelectBox.portal.test.js +368 -0
- package/dist/esm/src/components/forms-and-input/select-box/__tests__/SelectBox.test.js +1332 -0
- package/dist/esm/src/components/forms-and-input/slider/__tests__/Slider.test.js +387 -0
- package/dist/esm/src/components/forms-and-input/switch/__tests__/Switch.test.js +314 -0
- package/dist/esm/src/components/forms-and-input/textarea/__tests__/Textarea.test.js +252 -0
- package/dist/esm/src/components/forms-and-input/textarea/__tests__/Textarea.unmount.test.js +155 -0
- package/dist/esm/src/components/forms-and-input/toggle/__tests__/Toggle.test.js +135 -0
- package/dist/esm/src/components/image-and-icons/featured-icon/__tests__/FeaturedIcon.test.js +64 -0
- package/dist/esm/src/components/layout/block-container/__tests__/BlockContainer.test.js +56 -0
- package/dist/esm/src/components/layout/block-header/__tests__/BlockHeader.test.js +166 -0
- package/dist/esm/src/components/layout/block-header/__tests__/SubTitle.test.js +74 -0
- package/dist/esm/src/components/layout/divider/__tests__/Divider.test.js +62 -0
- package/dist/esm/src/components/layout/ncua-scope/__tests__/NcuaScope.test.js +144 -0
- package/dist/esm/src/components/layout/page-title/__tests__/PageTitle.test.js +161 -0
- package/dist/esm/src/components/navigation/context-tab/__tests__/ContextTab.test.js +613 -0
- package/dist/esm/src/components/navigation/context-tab/__tests__/useContextTabScroll.test.js +589 -0
- package/dist/esm/src/components/navigation/horizontal-tab/__tests__/HorizontalTab.test.js +209 -0
- package/dist/esm/src/components/navigation/pagination/__tests__/Pagination.navigation.test.js +282 -0
- package/dist/esm/src/components/navigation/vertical-tab/__tests__/VerticalTab.test.js +252 -0
- package/dist/esm/src/components/overlays/dropdown/__tests__/Dropdown.dnd.test.js +556 -0
- package/dist/esm/src/components/overlays/dropdown/__tests__/Dropdown.test.js +1017 -0
- package/dist/esm/src/components/overlays/dropdown/__tests__/dropdownTestUtils.js +15 -0
- package/dist/esm/src/components/overlays/dropdown/__tests__/utils.test.js +57 -1
- package/dist/esm/src/components/overlays/modal/__tests__/Modal.test.js +423 -0
- package/dist/esm/src/components/overlays/notification/__tests__/FloatingNotification.test.js +281 -0
- package/dist/esm/src/components/overlays/notification/__tests__/MessageNotification.test.js +12 -0
- package/dist/esm/src/components/overlays/postcode-search-modal/PostcodeSearchModalTip.js +1 -1
- package/dist/esm/src/components/overlays/postcode-search-modal/__tests__/PostcodeSearchModal.viewport.test.js +139 -0
- package/dist/esm/src/components/overlays/tooltip/__tests__/Tooltip.test.js +826 -0
- package/dist/esm/src/components/tab/__tests__/TabButton.test.js +249 -0
- package/dist/esm/src/hooks/__tests__/useCallbackRef.test.js +149 -0
- package/dist/esm/src/hooks/__tests__/useMediaQuery.test.js +116 -0
- package/dist/esm/src/hooks/__tests__/usePortalState.ssr.test.js +22 -0
- package/dist/esm/src/hooks/dropdown/__tests__/dropdownHooks.test.js +165 -0
- package/dist/esm/src/types/component-meta.js +0 -4
- package/dist/esm/src/utils/__tests__/date-picker.test.js +107 -2
- package/dist/esm/src/utils/dropdown/__tests__/dropdownUtils.test.js +24 -0
- package/dist/esm/src/utils/dropdown/__tests__/multiSelect.test.js +46 -0
- package/dist/esm/src/utils/dropdown/multiSelect.js +5 -5
- package/dist/esm/src/utils/portal-position/__tests__/portalPosition.nullAnchor.test.js +64 -0
- package/dist/esm/vitest.config.js +16 -10
- package/dist/temp/assets/scripts/notification/const/icons.d.ts +0 -7
- package/dist/temp/assets/scripts/notification/const/icons.js +0 -1
- package/dist/temp/assets/scripts/notification/const/index.d.ts +3 -3
- package/dist/temp/assets/scripts/notification/const/index.js +2 -2
- package/dist/temp/assets/scripts/notification/const/sizes.d.ts +2 -14
- package/dist/temp/assets/scripts/notification/const/sizes.js +4 -4
- package/dist/temp/assets/scripts/notification/const/types.d.ts +3 -2
- package/dist/temp/assets/scripts/notification/index.d.ts +1 -1
- package/dist/temp/assets/scripts/notification/index.js +1 -1
- package/dist/temp/assets/scripts/shared/ButtonCloseX.d.ts +0 -2
- package/dist/temp/assets/scripts/shared/ButtonCloseX.js +6 -3
- package/dist/temp/assets/scripts/table/scrollbar/const.d.ts +0 -1
- package/dist/temp/assets/scripts/tooltip/const/classNames.d.ts +17 -0
- package/dist/temp/assets/scripts/tooltip/const/classNames.js +23 -0
- package/dist/temp/assets/scripts/tooltip/const/constants.d.ts +33 -0
- package/dist/temp/assets/scripts/tooltip/const/constants.js +48 -0
- package/dist/temp/assets/scripts/tooltip/const/icons.d.ts +4 -0
- package/dist/temp/assets/scripts/tooltip/const/icons.js +9 -0
- package/dist/temp/assets/scripts/tooltip/const/index.d.ts +5 -0
- package/dist/temp/assets/scripts/tooltip/const/index.js +5 -0
- package/dist/temp/assets/scripts/tooltip/const/templates.d.ts +16 -0
- package/dist/temp/assets/scripts/tooltip/const/templates.js +60 -0
- package/dist/temp/assets/scripts/tooltip/const/types.d.ts +17 -0
- package/dist/temp/assets/scripts/tooltip/const/types.js +1 -0
- package/dist/temp/assets/scripts/utils/sanitize.d.ts +0 -6
- package/dist/temp/assets/scripts/utils/sanitize.js +0 -12
- package/dist/temp/src/__tests__/helpers/dom.d.ts +2 -0
- package/dist/temp/src/__tests__/helpers/dom.js +8 -0
- package/dist/temp/src/__tests__/helpers/fileInput.d.ts +27 -0
- package/dist/temp/src/__tests__/helpers/fileInput.js +70 -0
- package/dist/temp/src/__tests__/helpers/fixedToday.d.ts +4 -0
- package/dist/temp/src/__tests__/helpers/fixedToday.js +8 -0
- package/dist/temp/src/__tests__/helpers/matchMedia.d.ts +13 -0
- package/dist/temp/src/__tests__/helpers/matchMedia.js +42 -0
- package/dist/temp/src/__tests__/helpers/rect.d.ts +2 -0
- package/dist/temp/src/__tests__/helpers/rect.js +5 -0
- package/dist/temp/src/components/action/button/__tests__/Button.test.d.ts +1 -0
- package/dist/temp/src/components/action/button/__tests__/Button.test.js +180 -0
- package/dist/temp/src/components/action/button-group/__tests__/ButtonGroup.test.d.ts +1 -0
- package/dist/temp/src/components/action/button-group/__tests__/ButtonGroup.test.js +162 -0
- package/dist/temp/src/components/data-display/data-grid/__tests__/DataGrid.test.d.ts +1 -0
- package/dist/temp/src/components/data-display/data-grid/__tests__/DataGrid.test.js +291 -0
- package/dist/temp/src/components/data-display/table/__tests__/Table.dnd.dragCell.test.d.ts +1 -0
- package/dist/temp/src/components/data-display/table/__tests__/Table.dnd.dragCell.test.js +255 -0
- package/dist/temp/src/components/data-display/table/__tests__/Table.dnd.test.d.ts +1 -0
- package/dist/temp/src/components/data-display/table/__tests__/Table.dnd.test.js +240 -0
- package/dist/temp/src/components/data-display/table/__tests__/Table.scroll.test.d.ts +1 -0
- package/dist/temp/src/components/data-display/table/__tests__/Table.scroll.test.js +145 -0
- package/dist/temp/src/components/data-display/table/__tests__/Table.test.d.ts +1 -0
- package/dist/temp/src/components/data-display/table/__tests__/Table.test.js +295 -0
- package/dist/temp/src/components/data-display/table/__tests__/dnd-context.test.d.ts +1 -0
- package/dist/temp/src/components/data-display/table/__tests__/dnd-context.test.js +42 -0
- package/dist/temp/src/components/data-display/table/__tests__/dnd-preview.test.d.ts +1 -0
- package/dist/temp/src/components/data-display/table/__tests__/dnd-preview.test.js +226 -0
- package/dist/temp/src/components/data-display/table/__tests__/tableDndTestUtils.d.ts +76 -0
- package/dist/temp/src/components/data-display/table/__tests__/tableDndTestUtils.js +153 -0
- package/dist/temp/src/components/data-display/table/__tests__/tableTestUtils.d.ts +11 -0
- package/dist/temp/src/components/data-display/table/__tests__/tableTestUtils.js +40 -0
- package/dist/temp/src/components/data-display/table/__tests__/useTableScrollbars.ownership.test.d.ts +1 -0
- package/dist/temp/src/components/data-display/table/__tests__/useTableScrollbars.ownership.test.js +269 -0
- package/dist/temp/src/components/data-display/table/dnd-context.d.ts +1 -1
- package/dist/temp/src/components/data-display/table/useTableScrollbars.d.ts +2 -2
- package/dist/temp/src/components/data-display/table/useTableScrollbars.js +1 -1
- package/dist/temp/src/components/feedback-and-status/badge/__tests__/Badge.test.d.ts +1 -0
- package/dist/temp/src/components/feedback-and-status/badge/__tests__/Badge.test.js +136 -0
- package/dist/temp/src/components/feedback-and-status/badge-group/__tests__/BadgeGroup.test.d.ts +1 -0
- package/dist/temp/src/components/feedback-and-status/badge-group/__tests__/BadgeGroup.test.js +103 -0
- package/dist/temp/src/components/feedback-and-status/carousel-arrow/__tests__/CarouselArrow.test.d.ts +1 -0
- package/dist/temp/src/components/feedback-and-status/carousel-arrow/__tests__/CarouselArrow.test.js +81 -0
- package/dist/temp/src/components/feedback-and-status/carousel-number-group/__tests__/CarouselNumberGroup.test.d.ts +1 -0
- package/dist/temp/src/components/feedback-and-status/carousel-number-group/__tests__/CarouselNumberGroup.test.js +53 -0
- package/dist/temp/src/components/feedback-and-status/empty-state/__tests__/EmptyState.test.d.ts +1 -0
- package/dist/temp/src/components/feedback-and-status/empty-state/__tests__/EmptyState.test.js +86 -0
- package/dist/temp/src/components/feedback-and-status/progress-bar/__tests__/ProgressBar.test.d.ts +1 -0
- package/dist/temp/src/components/feedback-and-status/progress-bar/__tests__/ProgressBar.test.js +221 -0
- package/dist/temp/src/components/feedback-and-status/progress-bar/__tests__/useProgressBar.test.d.ts +1 -0
- package/dist/temp/src/components/feedback-and-status/progress-bar/__tests__/useProgressBar.test.js +168 -0
- package/dist/temp/src/components/feedback-and-status/progress-bar/__tests__/utils.test.d.ts +1 -0
- package/dist/temp/src/components/feedback-and-status/progress-bar/__tests__/utils.test.js +35 -0
- package/dist/temp/src/components/feedback-and-status/progress-circle/__tests__/ProgressCircle.test.d.ts +1 -0
- package/dist/temp/src/components/feedback-and-status/progress-circle/__tests__/ProgressCircle.test.js +106 -0
- package/dist/temp/src/components/feedback-and-status/spinner/__tests__/Spinner.test.d.ts +1 -0
- package/dist/temp/src/components/feedback-and-status/spinner/__tests__/Spinner.test.js +73 -0
- package/dist/temp/src/components/feedback-and-status/tag/__tests__/Tag.test.d.ts +1 -0
- package/dist/temp/src/components/feedback-and-status/tag/__tests__/Tag.test.js +392 -0
- package/dist/temp/src/components/forms-and-input/checkbox/__tests__/Checkbox.test.d.ts +1 -0
- package/dist/temp/src/components/forms-and-input/checkbox/__tests__/Checkbox.test.js +180 -0
- package/dist/temp/src/components/forms-and-input/combo-box/ComboBox.d.ts +1 -2
- package/dist/temp/src/components/forms-and-input/combo-box/ComboBox.js +1 -1
- package/dist/temp/src/components/forms-and-input/combo-box/__tests__/ComboBox.interaction.test.d.ts +1 -0
- package/dist/temp/src/components/forms-and-input/combo-box/__tests__/ComboBox.interaction.test.js +295 -0
- package/dist/temp/src/components/forms-and-input/combo-box/__tests__/ComboBox.register.test.d.ts +1 -0
- package/dist/temp/src/components/forms-and-input/combo-box/__tests__/ComboBox.register.test.js +111 -0
- package/dist/temp/src/components/forms-and-input/combo-box/__tests__/comboBoxTestUtils.d.ts +22 -0
- package/dist/temp/src/components/forms-and-input/combo-box/__tests__/comboBoxTestUtils.js +69 -0
- package/dist/temp/src/components/forms-and-input/date-picker/__tests__/DatePicker.input.test.d.ts +1 -0
- package/dist/temp/src/components/forms-and-input/date-picker/__tests__/DatePicker.input.test.js +358 -0
- package/dist/temp/src/components/forms-and-input/date-picker/__tests__/DatePicker.position.test.d.ts +1 -0
- package/dist/temp/src/components/forms-and-input/date-picker/__tests__/DatePicker.position.test.js +361 -0
- package/dist/temp/src/components/forms-and-input/date-picker/__tests__/utils.test.d.ts +1 -0
- package/dist/temp/src/components/forms-and-input/date-picker/__tests__/utils.test.js +34 -0
- package/dist/temp/src/components/forms-and-input/file-input/__tests__/FileInput.select.test.d.ts +1 -0
- package/dist/temp/src/components/forms-and-input/file-input/__tests__/FileInput.select.test.js +206 -0
- package/dist/temp/src/components/forms-and-input/image-file-input/__tests__/ImageFileInput.select.test.d.ts +1 -0
- package/dist/temp/src/components/forms-and-input/image-file-input/__tests__/ImageFileInput.select.test.js +292 -0
- package/dist/temp/src/components/forms-and-input/input-base/__tests__/InputBase.slots.test.d.ts +1 -0
- package/dist/temp/src/components/forms-and-input/input-base/__tests__/InputBase.slots.test.js +177 -0
- package/dist/temp/src/components/forms-and-input/number-input/__tests__/NumberInput.test.d.ts +1 -0
- package/dist/temp/src/components/forms-and-input/number-input/__tests__/NumberInput.test.js +434 -0
- package/dist/temp/src/components/forms-and-input/password-input/__tests__/PasswordInput.toggle.test.d.ts +1 -0
- package/dist/temp/src/components/forms-and-input/password-input/__tests__/PasswordInput.toggle.test.js +88 -0
- package/dist/temp/src/components/forms-and-input/radio/__tests__/Radio.test.d.ts +1 -0
- package/dist/temp/src/components/forms-and-input/radio/__tests__/Radio.test.js +42 -0
- package/dist/temp/src/components/forms-and-input/range-date-picker/__tests__/RangeDatePicker.test.js +137 -0
- package/dist/temp/src/components/forms-and-input/range-date-picker-with-buttons/__tests__/RangeDatePickerWithButtons.test.js +201 -1
- package/dist/temp/src/components/forms-and-input/select/__tests__/Select.test.d.ts +1 -0
- package/dist/temp/src/components/forms-and-input/select/__tests__/Select.test.js +214 -0
- package/dist/temp/src/components/forms-and-input/select-box/SelectBox.d.ts +1 -2
- package/dist/temp/src/components/forms-and-input/select-box/SelectBox.js +1 -1
- package/dist/temp/src/components/forms-and-input/select-box/__tests__/SelectBox.portal.test.d.ts +1 -0
- package/dist/temp/src/components/forms-and-input/select-box/__tests__/SelectBox.portal.test.js +312 -0
- package/dist/temp/src/components/forms-and-input/select-box/__tests__/SelectBox.test.d.ts +1 -0
- package/dist/temp/src/components/forms-and-input/select-box/__tests__/SelectBox.test.js +991 -0
- package/dist/temp/src/components/forms-and-input/slider/__tests__/Slider.test.d.ts +1 -0
- package/dist/temp/src/components/forms-and-input/slider/__tests__/Slider.test.js +294 -0
- package/dist/temp/src/components/forms-and-input/switch/__tests__/Switch.test.d.ts +1 -0
- package/dist/temp/src/components/forms-and-input/switch/__tests__/Switch.test.js +234 -0
- package/dist/temp/src/components/forms-and-input/textarea/__tests__/Textarea.test.d.ts +1 -0
- package/dist/temp/src/components/forms-and-input/textarea/__tests__/Textarea.test.js +207 -0
- package/dist/temp/src/components/forms-and-input/textarea/__tests__/Textarea.unmount.test.d.ts +1 -0
- package/dist/temp/src/components/forms-and-input/textarea/__tests__/Textarea.unmount.test.js +120 -0
- package/dist/temp/src/components/forms-and-input/toggle/__tests__/Toggle.test.d.ts +1 -0
- package/dist/temp/src/components/forms-and-input/toggle/__tests__/Toggle.test.js +125 -0
- package/dist/temp/src/components/image-and-icons/featured-icon/__tests__/FeaturedIcon.test.d.ts +1 -0
- package/dist/temp/src/components/image-and-icons/featured-icon/__tests__/FeaturedIcon.test.js +47 -0
- package/dist/temp/src/components/layout/block-container/__tests__/BlockContainer.test.d.ts +1 -0
- package/dist/temp/src/components/layout/block-container/__tests__/BlockContainer.test.js +53 -0
- package/dist/temp/src/components/layout/block-header/__tests__/BlockHeader.test.d.ts +1 -0
- package/dist/temp/src/components/layout/block-header/__tests__/BlockHeader.test.js +127 -0
- package/dist/temp/src/components/layout/block-header/__tests__/SubTitle.test.d.ts +1 -0
- package/dist/temp/src/components/layout/block-header/__tests__/SubTitle.test.js +76 -0
- package/dist/temp/src/components/layout/divider/__tests__/Divider.test.d.ts +1 -0
- package/dist/temp/src/components/layout/divider/__tests__/Divider.test.js +53 -0
- package/dist/temp/src/components/layout/ncua-scope/__tests__/NcuaScope.test.d.ts +1 -0
- package/dist/temp/src/components/layout/ncua-scope/__tests__/NcuaScope.test.js +136 -0
- package/dist/temp/src/components/layout/page-title/__tests__/PageTitle.test.d.ts +1 -0
- package/dist/temp/src/components/layout/page-title/__tests__/PageTitle.test.js +119 -0
- package/dist/temp/src/components/navigation/context-tab/__tests__/ContextTab.test.d.ts +1 -0
- package/dist/temp/src/components/navigation/context-tab/__tests__/ContextTab.test.js +447 -0
- package/dist/temp/src/components/navigation/context-tab/__tests__/useContextTabScroll.test.d.ts +1 -0
- package/dist/temp/src/components/navigation/context-tab/__tests__/useContextTabScroll.test.js +352 -0
- package/dist/temp/src/components/navigation/horizontal-tab/__tests__/HorizontalTab.test.d.ts +1 -0
- package/dist/temp/src/components/navigation/horizontal-tab/__tests__/HorizontalTab.test.js +152 -0
- package/dist/temp/src/components/navigation/pagination/__tests__/Pagination.navigation.test.d.ts +1 -0
- package/dist/temp/src/components/navigation/pagination/__tests__/Pagination.navigation.test.js +265 -0
- package/dist/temp/src/components/navigation/vertical-tab/__tests__/VerticalTab.test.d.ts +1 -0
- package/dist/temp/src/components/navigation/vertical-tab/__tests__/VerticalTab.test.js +172 -0
- package/dist/temp/src/components/overlays/dropdown/__tests__/Dropdown.dnd.test.d.ts +1 -0
- package/dist/temp/src/components/overlays/dropdown/__tests__/Dropdown.dnd.test.js +423 -0
- package/dist/temp/src/components/overlays/dropdown/__tests__/Dropdown.test.d.ts +1 -0
- package/dist/temp/src/components/overlays/dropdown/__tests__/Dropdown.test.js +699 -0
- package/dist/temp/src/components/overlays/dropdown/__tests__/dropdownTestUtils.d.ts +3 -0
- package/dist/temp/src/components/overlays/dropdown/__tests__/dropdownTestUtils.js +17 -0
- package/dist/temp/src/components/overlays/dropdown/__tests__/utils.test.js +24 -1
- package/dist/temp/src/components/overlays/modal/__tests__/Modal.test.d.ts +1 -0
- package/dist/temp/src/components/overlays/modal/__tests__/Modal.test.js +307 -0
- package/dist/temp/src/components/overlays/notification/MessageNotificationParts.d.ts +0 -1
- package/dist/temp/src/components/overlays/notification/NotificationActionButtons.d.ts +0 -1
- package/dist/temp/src/components/overlays/notification/__tests__/FloatingNotification.test.d.ts +1 -0
- package/dist/temp/src/components/overlays/notification/__tests__/FloatingNotification.test.js +218 -0
- package/dist/temp/src/components/overlays/notification/__tests__/MessageNotification.test.js +10 -0
- package/dist/temp/src/components/overlays/postcode-search-modal/PostcodeSearchModalTip.d.ts +1 -3
- package/dist/temp/src/components/overlays/postcode-search-modal/PostcodeSearchModalTip.js +1 -1
- package/dist/temp/src/components/overlays/postcode-search-modal/__tests__/PostcodeSearchModal.viewport.test.d.ts +1 -0
- package/dist/temp/src/components/overlays/postcode-search-modal/__tests__/PostcodeSearchModal.viewport.test.js +112 -0
- package/dist/temp/src/components/overlays/tooltip/__tests__/Tooltip.test.d.ts +1 -0
- package/dist/temp/src/components/overlays/tooltip/__tests__/Tooltip.test.js +538 -0
- package/dist/temp/src/components/tab/__tests__/TabButton.test.d.ts +1 -0
- package/dist/temp/src/components/tab/__tests__/TabButton.test.js +181 -0
- package/dist/temp/src/constant/date-picker.d.ts +2 -1
- package/dist/temp/src/hooks/__tests__/useCallbackRef.test.d.ts +1 -0
- package/dist/temp/src/hooks/__tests__/useCallbackRef.test.js +99 -0
- package/dist/temp/src/hooks/__tests__/useMediaQuery.test.d.ts +1 -0
- package/dist/temp/src/hooks/__tests__/useMediaQuery.test.js +95 -0
- package/dist/temp/src/hooks/__tests__/usePortalState.ssr.test.d.ts +1 -0
- package/dist/temp/src/hooks/__tests__/usePortalState.ssr.test.js +19 -0
- package/dist/temp/src/hooks/dropdown/__tests__/dropdownHooks.test.d.ts +1 -0
- package/dist/temp/src/hooks/dropdown/__tests__/dropdownHooks.test.js +147 -0
- package/dist/temp/src/types/component-meta.d.ts +2 -1
- package/dist/temp/src/types/component-meta.js +0 -4
- package/dist/temp/src/utils/__tests__/date-picker.test.js +58 -2
- package/dist/temp/src/utils/dropdown/__tests__/dropdownUtils.test.js +9 -0
- package/dist/temp/src/utils/dropdown/__tests__/multiSelect.test.d.ts +1 -0
- package/dist/temp/src/utils/dropdown/__tests__/multiSelect.test.js +41 -0
- package/dist/temp/src/utils/dropdown/multiSelect.d.ts +0 -20
- package/dist/temp/src/utils/dropdown/multiSelect.js +5 -5
- package/dist/temp/src/utils/portal-position/__tests__/portalPosition.nullAnchor.test.d.ts +1 -0
- package/dist/temp/src/utils/portal-position/__tests__/portalPosition.nullAnchor.test.js +57 -0
- package/dist/temp/vitest.config.js +15 -9
- package/dist/types/assets/scripts/notification/const/icons.d.ts +0 -7
- package/dist/types/assets/scripts/notification/const/index.d.ts +3 -3
- package/dist/types/assets/scripts/notification/const/sizes.d.ts +2 -14
- package/dist/types/assets/scripts/notification/const/types.d.ts +3 -2
- package/dist/types/assets/scripts/notification/index.d.ts +1 -1
- package/dist/types/assets/scripts/shared/ButtonCloseX.d.ts +0 -2
- package/dist/types/assets/scripts/table/scrollbar/const.d.ts +0 -1
- package/dist/types/assets/scripts/tooltip/const/classNames.d.ts +17 -0
- package/dist/types/assets/scripts/tooltip/const/constants.d.ts +33 -0
- package/dist/types/assets/scripts/tooltip/const/icons.d.ts +4 -0
- package/dist/types/assets/scripts/tooltip/const/index.d.ts +5 -0
- package/dist/types/assets/scripts/tooltip/const/templates.d.ts +16 -0
- package/dist/types/assets/scripts/tooltip/const/types.d.ts +17 -0
- package/dist/types/assets/scripts/utils/sanitize.d.ts +0 -6
- package/dist/types/src/__tests__/helpers/dom.d.ts +2 -0
- package/dist/types/src/__tests__/helpers/fileInput.d.ts +27 -0
- package/dist/types/src/__tests__/helpers/fixedToday.d.ts +4 -0
- package/dist/types/src/__tests__/helpers/matchMedia.d.ts +13 -0
- package/dist/types/src/__tests__/helpers/rect.d.ts +2 -0
- package/dist/types/src/components/action/button/__tests__/Button.test.d.ts +1 -0
- package/dist/types/src/components/action/button-group/__tests__/ButtonGroup.test.d.ts +1 -0
- package/dist/types/src/components/data-display/data-grid/__tests__/DataGrid.test.d.ts +1 -0
- package/dist/types/src/components/data-display/table/__tests__/Table.dnd.dragCell.test.d.ts +1 -0
- package/dist/types/src/components/data-display/table/__tests__/Table.dnd.test.d.ts +1 -0
- package/dist/types/src/components/data-display/table/__tests__/Table.scroll.test.d.ts +1 -0
- package/dist/types/src/components/data-display/table/__tests__/Table.test.d.ts +1 -0
- package/dist/types/src/components/data-display/table/__tests__/dnd-context.test.d.ts +1 -0
- package/dist/types/src/components/data-display/table/__tests__/dnd-preview.test.d.ts +1 -0
- package/dist/types/src/components/data-display/table/__tests__/tableDndTestUtils.d.ts +76 -0
- package/dist/types/src/components/data-display/table/__tests__/tableTestUtils.d.ts +11 -0
- package/dist/types/src/components/data-display/table/__tests__/useTableScrollbars.ownership.test.d.ts +1 -0
- package/dist/types/src/components/data-display/table/dnd-context.d.ts +1 -1
- package/dist/types/src/components/data-display/table/useTableScrollbars.d.ts +2 -2
- package/dist/types/src/components/feedback-and-status/badge/__tests__/Badge.test.d.ts +1 -0
- package/dist/types/src/components/feedback-and-status/badge-group/__tests__/BadgeGroup.test.d.ts +1 -0
- package/dist/types/src/components/feedback-and-status/carousel-arrow/__tests__/CarouselArrow.test.d.ts +1 -0
- package/dist/types/src/components/feedback-and-status/carousel-number-group/__tests__/CarouselNumberGroup.test.d.ts +1 -0
- package/dist/types/src/components/feedback-and-status/empty-state/__tests__/EmptyState.test.d.ts +1 -0
- package/dist/types/src/components/feedback-and-status/progress-bar/__tests__/ProgressBar.test.d.ts +1 -0
- package/dist/types/src/components/feedback-and-status/progress-bar/__tests__/useProgressBar.test.d.ts +1 -0
- package/dist/types/src/components/feedback-and-status/progress-bar/__tests__/utils.test.d.ts +1 -0
- package/dist/types/src/components/feedback-and-status/progress-circle/__tests__/ProgressCircle.test.d.ts +1 -0
- package/dist/types/src/components/feedback-and-status/spinner/__tests__/Spinner.test.d.ts +1 -0
- package/dist/types/src/components/feedback-and-status/tag/__tests__/Tag.test.d.ts +1 -0
- package/dist/types/src/components/forms-and-input/checkbox/__tests__/Checkbox.test.d.ts +1 -0
- package/dist/types/src/components/forms-and-input/combo-box/ComboBox.d.ts +1 -2
- package/dist/types/src/components/forms-and-input/combo-box/__tests__/ComboBox.interaction.test.d.ts +1 -0
- package/dist/types/src/components/forms-and-input/combo-box/__tests__/ComboBox.register.test.d.ts +1 -0
- package/dist/types/src/components/forms-and-input/combo-box/__tests__/comboBoxTestUtils.d.ts +22 -0
- package/dist/types/src/components/forms-and-input/date-picker/__tests__/DatePicker.input.test.d.ts +1 -0
- package/dist/types/src/components/forms-and-input/date-picker/__tests__/DatePicker.position.test.d.ts +1 -0
- package/dist/types/src/components/forms-and-input/date-picker/__tests__/utils.test.d.ts +1 -0
- package/dist/types/src/components/forms-and-input/file-input/__tests__/FileInput.select.test.d.ts +1 -0
- package/dist/types/src/components/forms-and-input/image-file-input/__tests__/ImageFileInput.select.test.d.ts +1 -0
- package/dist/types/src/components/forms-and-input/input-base/__tests__/InputBase.slots.test.d.ts +1 -0
- package/dist/types/src/components/forms-and-input/number-input/__tests__/NumberInput.test.d.ts +1 -0
- package/dist/types/src/components/forms-and-input/password-input/__tests__/PasswordInput.toggle.test.d.ts +1 -0
- package/dist/types/src/components/forms-and-input/radio/__tests__/Radio.test.d.ts +1 -0
- package/dist/types/src/components/forms-and-input/select/__tests__/Select.test.d.ts +1 -0
- package/dist/types/src/components/forms-and-input/select-box/SelectBox.d.ts +1 -2
- package/dist/types/src/components/forms-and-input/select-box/__tests__/SelectBox.portal.test.d.ts +1 -0
- package/dist/types/src/components/forms-and-input/select-box/__tests__/SelectBox.test.d.ts +1 -0
- package/dist/types/src/components/forms-and-input/slider/__tests__/Slider.test.d.ts +1 -0
- package/dist/types/src/components/forms-and-input/switch/__tests__/Switch.test.d.ts +1 -0
- package/dist/types/src/components/forms-and-input/textarea/__tests__/Textarea.test.d.ts +1 -0
- package/dist/types/src/components/forms-and-input/textarea/__tests__/Textarea.unmount.test.d.ts +1 -0
- package/dist/types/src/components/forms-and-input/toggle/__tests__/Toggle.test.d.ts +1 -0
- package/dist/types/src/components/image-and-icons/featured-icon/__tests__/FeaturedIcon.test.d.ts +1 -0
- package/dist/types/src/components/layout/block-container/__tests__/BlockContainer.test.d.ts +1 -0
- package/dist/types/src/components/layout/block-header/__tests__/BlockHeader.test.d.ts +1 -0
- package/dist/types/src/components/layout/block-header/__tests__/SubTitle.test.d.ts +1 -0
- package/dist/types/src/components/layout/divider/__tests__/Divider.test.d.ts +1 -0
- package/dist/types/src/components/layout/ncua-scope/__tests__/NcuaScope.test.d.ts +1 -0
- package/dist/types/src/components/layout/page-title/__tests__/PageTitle.test.d.ts +1 -0
- package/dist/types/src/components/navigation/context-tab/__tests__/ContextTab.test.d.ts +1 -0
- package/dist/types/src/components/navigation/context-tab/__tests__/useContextTabScroll.test.d.ts +1 -0
- package/dist/types/src/components/navigation/horizontal-tab/__tests__/HorizontalTab.test.d.ts +1 -0
- package/dist/types/src/components/navigation/pagination/__tests__/Pagination.navigation.test.d.ts +1 -0
- package/dist/types/src/components/navigation/vertical-tab/__tests__/VerticalTab.test.d.ts +1 -0
- package/dist/types/src/components/overlays/dropdown/__tests__/Dropdown.dnd.test.d.ts +1 -0
- package/dist/types/src/components/overlays/dropdown/__tests__/Dropdown.test.d.ts +1 -0
- package/dist/types/src/components/overlays/dropdown/__tests__/dropdownTestUtils.d.ts +3 -0
- package/dist/types/src/components/overlays/modal/__tests__/Modal.test.d.ts +1 -0
- package/dist/types/src/components/overlays/notification/MessageNotificationParts.d.ts +0 -1
- package/dist/types/src/components/overlays/notification/NotificationActionButtons.d.ts +0 -1
- package/dist/types/src/components/overlays/notification/__tests__/FloatingNotification.test.d.ts +1 -0
- package/dist/types/src/components/overlays/postcode-search-modal/PostcodeSearchModalTip.d.ts +1 -3
- package/dist/types/src/components/overlays/postcode-search-modal/__tests__/PostcodeSearchModal.viewport.test.d.ts +1 -0
- package/dist/types/src/components/overlays/tooltip/__tests__/Tooltip.test.d.ts +1 -0
- package/dist/types/src/components/tab/__tests__/TabButton.test.d.ts +1 -0
- package/dist/types/src/constant/date-picker.d.ts +2 -1
- package/dist/types/src/hooks/__tests__/useCallbackRef.test.d.ts +1 -0
- package/dist/types/src/hooks/__tests__/useMediaQuery.test.d.ts +1 -0
- package/dist/types/src/hooks/__tests__/usePortalState.ssr.test.d.ts +1 -0
- package/dist/types/src/hooks/dropdown/__tests__/dropdownHooks.test.d.ts +1 -0
- package/dist/types/src/types/component-meta.d.ts +2 -1
- package/dist/types/src/utils/dropdown/__tests__/multiSelect.test.d.ts +1 -0
- package/dist/types/src/utils/dropdown/multiSelect.d.ts +0 -20
- package/dist/types/src/utils/portal-position/__tests__/portalPosition.nullAnchor.test.d.ts +1 -0
- package/package.json +3 -8
- package/dist/cjs/src/constant/index.js +0 -27
- package/dist/cjs/src/constant/size.js +0 -7
- package/dist/cjs/src/contexts/index.js +0 -16
- package/dist/esm/src/constant/index.js +0 -2
- package/dist/esm/src/constant/size.js +0 -1
- package/dist/esm/src/contexts/index.js +0 -1
- package/dist/temp/src/constant/index.d.ts +0 -2
- package/dist/temp/src/constant/index.js +0 -2
- package/dist/temp/src/constant/size.d.ts +0 -1
- package/dist/temp/src/constant/size.js +0 -1
- package/dist/temp/src/contexts/index.d.ts +0 -1
- package/dist/temp/src/contexts/index.js +0 -1
- package/dist/types/src/constant/index.d.ts +0 -2
- package/dist/types/src/constant/size.d.ts +0 -1
- package/dist/types/src/contexts/index.d.ts +0 -1
|
@@ -0,0 +1,112 @@
|
|
|
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 { PostcodeSearchModal } from '../PostcodeSearchModal';
|
|
7
|
+
// React 18에서 act() 사용 시 필요한 플래그 (미설정 시 console.error 경고 발생)
|
|
8
|
+
globalThis.IS_REACT_ACT_ENVIRONMENT = true;
|
|
9
|
+
/**
|
|
10
|
+
* Modal.Content 를 스크롤 컨테이너 클래스가 없는 div 로 바꿀 수 있게 한다.
|
|
11
|
+
* 실제 사용처는 항상 Modal.Content 안이라 "스크롤 컨테이너를 못 찾는" 분기에는 이 대역으로만 닿는다.
|
|
12
|
+
* plain 이 false 면 실구현을 그대로 쓴다.
|
|
13
|
+
*/
|
|
14
|
+
const contentMode = vi.hoisted(() => ({ plain: false }));
|
|
15
|
+
vi.mock('../../modal', async (importOriginal) => {
|
|
16
|
+
const actual = await importOriginal();
|
|
17
|
+
const react = await import('react');
|
|
18
|
+
const Content = (props) => contentMode.plain
|
|
19
|
+
? react.createElement('div', { className: 'plain-content' }, props.children)
|
|
20
|
+
: react.createElement(actual.Modal.Content, props);
|
|
21
|
+
const Modal = Object.assign((props) => react.createElement(actual.Modal, props), actual.Modal, {
|
|
22
|
+
Content,
|
|
23
|
+
});
|
|
24
|
+
return { ...actual, Modal };
|
|
25
|
+
});
|
|
26
|
+
const RESULT_COUNT = 3;
|
|
27
|
+
const ZIP_CODE_BASE = 10000;
|
|
28
|
+
/** 본문을 아래로 내린 상태를 흉내 낼 scrollTop 값 */
|
|
29
|
+
const SCROLLED_OFFSET = 120;
|
|
30
|
+
const SEARCH_QUERY = '판교로';
|
|
31
|
+
const makeResults = (count) => Array.from({ length: count }, (_, i) => ({
|
|
32
|
+
zipCode: String(ZIP_CODE_BASE + i),
|
|
33
|
+
roadAddress: `도로명 주소 ${i}`,
|
|
34
|
+
jibunAddress: `지번 주소 ${i}`,
|
|
35
|
+
}));
|
|
36
|
+
const baseProps = (overrides = {}) => ({
|
|
37
|
+
open: true,
|
|
38
|
+
onClose: vi.fn(),
|
|
39
|
+
searchQuery: '',
|
|
40
|
+
onSearchQueryChange: vi.fn(),
|
|
41
|
+
onSearch: vi.fn(),
|
|
42
|
+
results: [],
|
|
43
|
+
totalCount: 0,
|
|
44
|
+
currentPage: 1,
|
|
45
|
+
onPageChange: vi.fn(),
|
|
46
|
+
onSelect: vi.fn(),
|
|
47
|
+
...overrides,
|
|
48
|
+
});
|
|
49
|
+
const mounted = [];
|
|
50
|
+
afterEach(() => {
|
|
51
|
+
for (const { root, container } of mounted.splice(0)) {
|
|
52
|
+
act(() => root.unmount());
|
|
53
|
+
container.remove();
|
|
54
|
+
}
|
|
55
|
+
contentMode.plain = false;
|
|
56
|
+
vi.unstubAllGlobals();
|
|
57
|
+
});
|
|
58
|
+
/** Modal 은 document.body 포털이라 조회 기준은 body 다 */
|
|
59
|
+
const mount = (node) => {
|
|
60
|
+
const container = document.createElement('div');
|
|
61
|
+
document.body.appendChild(container);
|
|
62
|
+
const root = createRoot(container);
|
|
63
|
+
mounted.push({ root, container });
|
|
64
|
+
act(() => root.render(node));
|
|
65
|
+
return document.body;
|
|
66
|
+
};
|
|
67
|
+
const mustQuery = (root, selector) => {
|
|
68
|
+
const found = root.querySelector(selector);
|
|
69
|
+
if (!found)
|
|
70
|
+
throw new Error(`요소를 찾을 수 없습니다: ${selector}`);
|
|
71
|
+
return found;
|
|
72
|
+
};
|
|
73
|
+
/** jsdom 은 레이아웃이 없어 scrollTop 이 항상 0 이므로, 값을 덮어쓰고 scroll 이벤트를 쏜다 */
|
|
74
|
+
const scroll = (scroller) => {
|
|
75
|
+
Object.defineProperty(scroller, 'scrollTop', { value: SCROLLED_OFFSET, configurable: true });
|
|
76
|
+
act(() => {
|
|
77
|
+
scroller.dispatchEvent(new Event('scroll'));
|
|
78
|
+
});
|
|
79
|
+
};
|
|
80
|
+
const isFixed = (body) => mustQuery(body, '.ncua-postcode-search-modal__search-area').classList.contains('is-fixed');
|
|
81
|
+
describe('PostcodeSearchModal — 뷰포트 판정 · 스크롤 컨테이너 · 검색어 지우기 (RSD-03)', () => {
|
|
82
|
+
it('RSD-03 matchMedia 가 없는 환경에서도 렌더하고 PC 판정(pc 페이지네이션)을 유지한다', () => {
|
|
83
|
+
// Given: matchMedia 를 제거한 환경 (SSR · 구형 브라우저)
|
|
84
|
+
vi.stubGlobal('matchMedia', undefined);
|
|
85
|
+
expect(typeof window.matchMedia).toBe('undefined');
|
|
86
|
+
// When: 결과가 있는 모달을 렌더한다
|
|
87
|
+
const body = mount(createElement(PostcodeSearchModal, baseProps({ results: makeResults(RESULT_COUNT), totalCount: RESULT_COUNT })));
|
|
88
|
+
// Then: 결과 목록이 있고 페이지네이션은 pc 다
|
|
89
|
+
expect(body.querySelectorAll('.ncua-postcode-search-modal__item').length).toBe(RESULT_COUNT);
|
|
90
|
+
expect(mustQuery(body, '.ncua-pagination').classList.contains('ncua-pagination--pc')).toBe(true);
|
|
91
|
+
});
|
|
92
|
+
it('RSD-03 스크롤 컨테이너(.ncua-modal__content) 밖에 렌더되면 경계선 감시를 걸지 않아 스크롤해도 is-fixed 가 없다', () => {
|
|
93
|
+
// Given: 스크롤 컨테이너 클래스가 없는 본문 대역 안에 결과와 함께 렌더
|
|
94
|
+
contentMode.plain = true;
|
|
95
|
+
const body = mount(createElement(PostcodeSearchModal, baseProps({ results: makeResults(RESULT_COUNT), totalCount: RESULT_COUNT })));
|
|
96
|
+
// When: 대역 본문을 스크롤한다
|
|
97
|
+
scroll(mustQuery(body, '.plain-content'));
|
|
98
|
+
// Then: is-fixed 가 붙지 않는다 (실제 Modal.Content 안에서 붙는 대조는 PostcodeSearchModal.test.ts
|
|
99
|
+
// '결과를 스크롤하면 is-fixed 가 붙고, 맨 위로 돌아오면 다시 사라진다')
|
|
100
|
+
expect(body.querySelector('.ncua-modal__content')).toBeNull();
|
|
101
|
+
expect(isFixed(body)).toBe(false);
|
|
102
|
+
});
|
|
103
|
+
it('RSD-03 검색어 지우기 버튼을 클릭하면 onSearchQueryChange 를 빈 문자열로 부른다', () => {
|
|
104
|
+
// Given: 검색어가 있는 모달
|
|
105
|
+
const onSearchQueryChange = vi.fn();
|
|
106
|
+
const body = mount(createElement(PostcodeSearchModal, baseProps({ searchQuery: SEARCH_QUERY, onSearchQueryChange })));
|
|
107
|
+
// When: 지우기 버튼을 클릭한다
|
|
108
|
+
act(() => mustQuery(body, '.ncua-input__clear').click());
|
|
109
|
+
// Then: 빈 문자열로 알린다
|
|
110
|
+
expect(onSearchQueryChange).toHaveBeenCalledWith('');
|
|
111
|
+
});
|
|
112
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,538 @@
|
|
|
1
|
+
// @vitest-environment jsdom
|
|
2
|
+
//
|
|
3
|
+
// React Tooltip — 위험 목록표 RTP-xx (PR-7e).
|
|
4
|
+
// 화살표 오프셋 순수 함수는 utils.test.ts 가 덮는다. 하위 구현(ButtonCloseX · 아이콘 · calculateArrowOffsetX)은 실구현을 쓴다.
|
|
5
|
+
// 보안 모델: React Tooltip 은 title · content 를 ReactNode 로 렌더해 HTML 문자열 삽입 경로가 없다 —
|
|
6
|
+
// vanilla Tooltip(sanitizeHtml 후 innerHTML)과 달리 sanitize 단언 대상이 아니다.
|
|
7
|
+
import { AlertCircle, AlertCircleFill, HelpCircle, HelpCircleFill } from '@ncds/ui-admin-icon';
|
|
8
|
+
import { createElement } from 'react';
|
|
9
|
+
import { createRoot } from 'react-dom/client';
|
|
10
|
+
import { renderToStaticMarkup } from 'react-dom/server';
|
|
11
|
+
import { act } from 'react-dom/test-utils';
|
|
12
|
+
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
13
|
+
import { TOOLTIP_OFFSET as VANILLA_TOOLTIP_OFFSET } from '../../../../../assets/scripts/tooltip/const';
|
|
14
|
+
import { Tooltip } from '../Tooltip';
|
|
15
|
+
import { ARROW_EDGE_MARGIN } from '../utils';
|
|
16
|
+
globalThis.IS_REACT_ACT_ENVIRONMENT = true;
|
|
17
|
+
/** 앵커 · 패널 크기 — 좌표 기대값은 이 값으로 계산한다 */
|
|
18
|
+
const ANCHOR_LEFT = 400;
|
|
19
|
+
const ANCHOR_TOP = 300;
|
|
20
|
+
const ANCHOR_SIZE = 16;
|
|
21
|
+
const PANEL_WIDTH = 200;
|
|
22
|
+
const PANEL_HEIGHT = 60;
|
|
23
|
+
/** 소스 Tooltip.tsx 의 위치 상수 (export 되지 않아 값을 옮겨 적는다) */
|
|
24
|
+
const TOOLTIP_OFFSET_REACT = 6;
|
|
25
|
+
const EDGE_ALIGN_OFFSET = 12;
|
|
26
|
+
const VIEWPORT_MARGIN = 8;
|
|
27
|
+
const ICON_SIZE_SM = 14;
|
|
28
|
+
const ICON_SIZE_MD = 16;
|
|
29
|
+
const half = (value) => value / 2;
|
|
30
|
+
const mounted = [];
|
|
31
|
+
const cleanups = [];
|
|
32
|
+
/** rAF 콜백은 보관만 한다 — 실제 rAF(약 16ms)가 act 밖에서 상태를 바꾸지 않도록 */
|
|
33
|
+
const pendingFrames = new Map();
|
|
34
|
+
let nextFrameId = 0;
|
|
35
|
+
beforeEach(() => {
|
|
36
|
+
vi.spyOn(window, 'requestAnimationFrame').mockImplementation((callback) => {
|
|
37
|
+
nextFrameId += 1;
|
|
38
|
+
pendingFrames.set(nextFrameId, callback);
|
|
39
|
+
return nextFrameId;
|
|
40
|
+
});
|
|
41
|
+
vi.spyOn(window, 'cancelAnimationFrame').mockImplementation((id) => {
|
|
42
|
+
pendingFrames.delete(id);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
afterEach(() => {
|
|
46
|
+
for (const { root, container } of mounted.splice(0)) {
|
|
47
|
+
act(() => {
|
|
48
|
+
root.unmount();
|
|
49
|
+
});
|
|
50
|
+
container.remove();
|
|
51
|
+
}
|
|
52
|
+
for (const cleanup of cleanups.splice(0))
|
|
53
|
+
cleanup();
|
|
54
|
+
pendingFrames.clear();
|
|
55
|
+
vi.restoreAllMocks();
|
|
56
|
+
});
|
|
57
|
+
/* ========== 공통 헬퍼 ========== */
|
|
58
|
+
const mount = (props = {}) => {
|
|
59
|
+
const container = document.createElement('div');
|
|
60
|
+
document.body.appendChild(container);
|
|
61
|
+
const root = createRoot(container);
|
|
62
|
+
const render = (nextProps) => {
|
|
63
|
+
act(() => {
|
|
64
|
+
root.render(createElement(Tooltip, nextProps));
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
render(props);
|
|
68
|
+
const entry = { root, container };
|
|
69
|
+
mounted.push(entry);
|
|
70
|
+
const unmount = () => {
|
|
71
|
+
act(() => {
|
|
72
|
+
root.unmount();
|
|
73
|
+
});
|
|
74
|
+
mounted.splice(mounted.indexOf(entry), 1);
|
|
75
|
+
container.remove();
|
|
76
|
+
};
|
|
77
|
+
return { container, rerender: render, unmount };
|
|
78
|
+
};
|
|
79
|
+
/** React 가 relatedTarget 으로 enter/leave 를 합성하므로, 포인터가 오가는 바깥 요소를 둔다 */
|
|
80
|
+
const outside = () => {
|
|
81
|
+
const element = document.createElement('div');
|
|
82
|
+
document.body.appendChild(element);
|
|
83
|
+
cleanups.push(() => element.remove());
|
|
84
|
+
return element;
|
|
85
|
+
};
|
|
86
|
+
const anchorOf = (container) => {
|
|
87
|
+
const anchor = container.querySelector('.ncua-tooltip');
|
|
88
|
+
if (!anchor)
|
|
89
|
+
throw new Error('툴팁 앵커를 찾지 못했습니다');
|
|
90
|
+
return anchor;
|
|
91
|
+
};
|
|
92
|
+
/** 포털 패널 — 한 테스트에 툴팁 하나만 마운트한다 */
|
|
93
|
+
const portalPanel = () => {
|
|
94
|
+
const panel = document.querySelector('.ncua-tooltip-panel');
|
|
95
|
+
if (!panel)
|
|
96
|
+
throw new Error('툴팁 패널을 찾지 못했습니다');
|
|
97
|
+
return panel;
|
|
98
|
+
};
|
|
99
|
+
const hover = (container) => {
|
|
100
|
+
act(() => {
|
|
101
|
+
anchorOf(container).dispatchEvent(new MouseEvent('mouseover', { bubbles: true, relatedTarget: outside() }));
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
const leave = (container, relatedTarget = outside()) => {
|
|
105
|
+
act(() => {
|
|
106
|
+
anchorOf(container).dispatchEvent(new MouseEvent('mouseout', { bubbles: true, relatedTarget }));
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
const click = (element) => {
|
|
110
|
+
if (!element)
|
|
111
|
+
throw new Error('클릭할 요소를 찾지 못했습니다');
|
|
112
|
+
act(() => {
|
|
113
|
+
element.click();
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
const toRect = ({ left, top, width, height }) => ({
|
|
117
|
+
left,
|
|
118
|
+
top,
|
|
119
|
+
width,
|
|
120
|
+
height,
|
|
121
|
+
right: left + width,
|
|
122
|
+
bottom: top + height,
|
|
123
|
+
x: left,
|
|
124
|
+
y: top,
|
|
125
|
+
toJSON: () => ({}),
|
|
126
|
+
});
|
|
127
|
+
const stubRect = (element, box) => {
|
|
128
|
+
element.getBoundingClientRect = () => toRect(box);
|
|
129
|
+
};
|
|
130
|
+
const ANCHOR_BOX = { left: ANCHOR_LEFT, top: ANCHOR_TOP, width: ANCHOR_SIZE, height: ANCHOR_SIZE };
|
|
131
|
+
const PANEL_BOX = { left: 0, top: 0, width: PANEL_WIDTH, height: PANEL_HEIGHT };
|
|
132
|
+
const stubLayout = (container, anchor = ANCHOR_BOX) => {
|
|
133
|
+
stubRect(anchorOf(container), anchor);
|
|
134
|
+
stubRect(portalPanel(), PANEL_BOX);
|
|
135
|
+
};
|
|
136
|
+
const isVisible = (panel) => panel.classList.contains('ncua-tooltip__bg--visible');
|
|
137
|
+
const px = (value) => `${value}px`;
|
|
138
|
+
const coordsOf = (panel) => ({ top: panel.style.top, left: panel.style.left });
|
|
139
|
+
/* ========== P0 ========== */
|
|
140
|
+
describe('RTP-01 short hover 표시 · 숨김', () => {
|
|
141
|
+
it('RTP-01 진입 시 패널을 보이고 좌표를 잡는다', () => {
|
|
142
|
+
const { container } = mount({ position: 'bottom', title: '타이틀' });
|
|
143
|
+
stubLayout(container);
|
|
144
|
+
hover(container);
|
|
145
|
+
const panel = portalPanel();
|
|
146
|
+
expect(isVisible(panel)).toBe(true);
|
|
147
|
+
expect(panel.style.opacity).toBe('1');
|
|
148
|
+
expect(coordsOf(panel)).toEqual({
|
|
149
|
+
top: px(ANCHOR_TOP + ANCHOR_SIZE + TOOLTIP_OFFSET_REACT),
|
|
150
|
+
left: px(ANCHOR_LEFT + half(ANCHOR_SIZE) - half(PANEL_WIDTH)),
|
|
151
|
+
});
|
|
152
|
+
});
|
|
153
|
+
it('RTP-01 바깥으로 이탈하면 숨긴다', () => {
|
|
154
|
+
const { container } = mount({ position: 'bottom', title: '타이틀' });
|
|
155
|
+
stubLayout(container);
|
|
156
|
+
hover(container);
|
|
157
|
+
leave(container);
|
|
158
|
+
const panel = portalPanel();
|
|
159
|
+
expect(isVisible(panel)).toBe(false);
|
|
160
|
+
expect(panel.style.opacity).toBe('0');
|
|
161
|
+
});
|
|
162
|
+
it('RTP-01 아이콘에서 포털 패널로 옮기면 이탈이 아니어서 유지한다', () => {
|
|
163
|
+
const { container } = mount({ position: 'bottom', title: '타이틀' });
|
|
164
|
+
stubLayout(container);
|
|
165
|
+
hover(container);
|
|
166
|
+
leave(container, portalPanel());
|
|
167
|
+
expect(isVisible(portalPanel())).toBe(true);
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
describe('RTP-02 long 닫기', () => {
|
|
171
|
+
const closeButton = () => portalPanel().querySelector('.ncua-tooltip__close-button');
|
|
172
|
+
it('RTP-02 이탈해도 유지한다', () => {
|
|
173
|
+
const { container } = mount({ type: 'long', position: 'bottom', title: '타이틀' });
|
|
174
|
+
stubLayout(container);
|
|
175
|
+
hover(container);
|
|
176
|
+
leave(container);
|
|
177
|
+
expect(isVisible(portalPanel())).toBe(true);
|
|
178
|
+
});
|
|
179
|
+
it('RTP-02 X 클릭 → 숨김 + force-hidden, 이탈 없이 재진입하면 무시, 이탈 후 재진입하면 표시', () => {
|
|
180
|
+
const { container } = mount({ type: 'long', position: 'bottom', title: '타이틀' });
|
|
181
|
+
stubLayout(container);
|
|
182
|
+
hover(container);
|
|
183
|
+
click(closeButton());
|
|
184
|
+
const afterClose = {
|
|
185
|
+
visible: isVisible(portalPanel()),
|
|
186
|
+
forceHidden: portalPanel().classList.contains('ncua-tooltip__bg--force-hidden'),
|
|
187
|
+
};
|
|
188
|
+
hover(container);
|
|
189
|
+
const visibleOnReenterWithoutLeave = isVisible(portalPanel());
|
|
190
|
+
leave(container);
|
|
191
|
+
hover(container);
|
|
192
|
+
expect(afterClose).toEqual({ visible: false, forceHidden: true });
|
|
193
|
+
expect(visibleOnReenterWithoutLeave).toBe(false);
|
|
194
|
+
expect(isVisible(portalPanel())).toBe(true);
|
|
195
|
+
expect(portalPanel().classList.contains('ncua-tooltip__bg--force-hidden')).toBe(false);
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
describe('RTP-03 forceVisible 외부 제어', () => {
|
|
199
|
+
it('RTP-03 true 면 마운트 시 표시하고 이탈해도 유지한다', () => {
|
|
200
|
+
const { container } = mount({ forceVisible: true, position: 'bottom', title: '타이틀' });
|
|
201
|
+
const visibleOnMount = isVisible(portalPanel());
|
|
202
|
+
leave(container);
|
|
203
|
+
expect(visibleOnMount).toBe(true);
|
|
204
|
+
expect(isVisible(portalPanel())).toBe(true);
|
|
205
|
+
expect(portalPanel().style.opacity).toBe('1');
|
|
206
|
+
});
|
|
207
|
+
it('RTP-03 false 면 진입해도 표시하지 않는다', () => {
|
|
208
|
+
const { container } = mount({ forceVisible: false, position: 'bottom', title: '타이틀' });
|
|
209
|
+
stubLayout(container);
|
|
210
|
+
hover(container);
|
|
211
|
+
expect(isVisible(portalPanel())).toBe(false);
|
|
212
|
+
expect(portalPanel().style.opacity).toBe('0');
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
/* ========== 나머지 분기 ========== */
|
|
216
|
+
const hasPanelClass = (panel, modifier) => panel.classList.contains(`ncua-tooltip__bg--${modifier}`);
|
|
217
|
+
const arrowXOf = (panel) => panel.style.getPropertyValue('--ncua-tooltip-arrow-x');
|
|
218
|
+
/** 앵커를 옮긴 뒤 재계산 여부를 보기 위한 이동량 */
|
|
219
|
+
const MOVE_DELTA = 50;
|
|
220
|
+
/** 위 공간이 모자라 auto 가 bottom 을 고르는 앵커 top */
|
|
221
|
+
const ANCHOR_TOP_CRAMPED = 20;
|
|
222
|
+
describe('RTP-04 위치 계산', () => {
|
|
223
|
+
const CENTER_LEFT = ANCHOR_LEFT + half(ANCHOR_SIZE) - half(PANEL_WIDTH);
|
|
224
|
+
const MIDDLE_TOP = ANCHOR_TOP + half(ANCHOR_SIZE) - half(PANEL_HEIGHT);
|
|
225
|
+
const ABOVE_TOP = ANCHOR_TOP - PANEL_HEIGHT - TOOLTIP_OFFSET_REACT;
|
|
226
|
+
const BELOW_TOP = ANCHOR_TOP + ANCHOR_SIZE + TOOLTIP_OFFSET_REACT;
|
|
227
|
+
const EDGE_LEFT = ANCHOR_LEFT - EDGE_ALIGN_OFFSET;
|
|
228
|
+
const EDGE_RIGHT = ANCHOR_LEFT + ANCHOR_SIZE - PANEL_WIDTH + EDGE_ALIGN_OFFSET;
|
|
229
|
+
const CENTER_ARROW = px(half(PANEL_WIDTH));
|
|
230
|
+
it.each([
|
|
231
|
+
{ position: 'top', top: ABOVE_TOP, left: CENTER_LEFT, arrowX: CENTER_ARROW },
|
|
232
|
+
{ position: 'bottom', top: BELOW_TOP, left: CENTER_LEFT, arrowX: CENTER_ARROW },
|
|
233
|
+
{ position: 'left', top: MIDDLE_TOP, left: ANCHOR_LEFT - PANEL_WIDTH - TOOLTIP_OFFSET_REACT, arrowX: '' },
|
|
234
|
+
{ position: 'right', top: MIDDLE_TOP, left: ANCHOR_LEFT + ANCHOR_SIZE + TOOLTIP_OFFSET_REACT, arrowX: '' },
|
|
235
|
+
{ position: 'top-left', top: ABOVE_TOP, left: EDGE_LEFT, arrowX: '' },
|
|
236
|
+
{ position: 'top-right', top: ABOVE_TOP, left: EDGE_RIGHT, arrowX: '' },
|
|
237
|
+
{ position: 'bottom-left', top: BELOW_TOP, left: EDGE_LEFT, arrowX: '' },
|
|
238
|
+
{ position: 'bottom-right', top: BELOW_TOP, left: EDGE_RIGHT, arrowX: '' },
|
|
239
|
+
])('RTP-04 $position 좌표 · 패널 클래스 · 화살표 변수', ({ position, top, left, arrowX }) => {
|
|
240
|
+
const { container } = mount({ position, title: '타이틀' });
|
|
241
|
+
stubLayout(container);
|
|
242
|
+
hover(container);
|
|
243
|
+
const panel = portalPanel();
|
|
244
|
+
expect(coordsOf(panel)).toEqual({ top: px(top), left: px(left) });
|
|
245
|
+
expect(hasPanelClass(panel, position)).toBe(true);
|
|
246
|
+
expect(arrowXOf(panel)).toBe(arrowX);
|
|
247
|
+
});
|
|
248
|
+
it('RTP-04 auto 는 표시 전 bottom 클래스로 시작한다', () => {
|
|
249
|
+
mount({ title: '타이틀' });
|
|
250
|
+
expect(hasPanelClass(portalPanel(), 'bottom')).toBe(true);
|
|
251
|
+
});
|
|
252
|
+
it.each([
|
|
253
|
+
{ anchorTop: ANCHOR_TOP, expected: 'top' },
|
|
254
|
+
{ anchorTop: ANCHOR_TOP_CRAMPED, expected: 'bottom' },
|
|
255
|
+
])('RTP-04 auto 는 앵커 top $anchorTop 이면 $expected 로 계산한다', ({ anchorTop, expected }) => {
|
|
256
|
+
const { container } = mount({ title: '타이틀' });
|
|
257
|
+
stubLayout(container, { ...ANCHOR_BOX, top: anchorTop });
|
|
258
|
+
hover(container);
|
|
259
|
+
expect(hasPanelClass(portalPanel(), expected)).toBe(true);
|
|
260
|
+
expect(anchorOf(container).classList.contains('ncua-tooltip--auto')).toBe(true);
|
|
261
|
+
});
|
|
262
|
+
it('RTP-04 왼쪽 · 위 경계를 넘으면 여백까지 밀고, 화살표는 패널 모서리 여백까지만 이동한다', () => {
|
|
263
|
+
const { container } = mount({ position: 'top', title: '타이틀' });
|
|
264
|
+
stubLayout(container, { ...ANCHOR_BOX, left: 0, top: 0 });
|
|
265
|
+
hover(container);
|
|
266
|
+
expect(coordsOf(portalPanel())).toEqual({ top: px(VIEWPORT_MARGIN), left: px(VIEWPORT_MARGIN) });
|
|
267
|
+
expect(arrowXOf(portalPanel())).toBe(px(ARROW_EDGE_MARGIN));
|
|
268
|
+
});
|
|
269
|
+
it('RTP-04 오른쪽 · 아래 경계를 넘으면 뷰포트 안쪽 여백까지 당긴다', () => {
|
|
270
|
+
const { container } = mount({ position: 'bottom', title: '타이틀' });
|
|
271
|
+
stubLayout(container, {
|
|
272
|
+
...ANCHOR_BOX,
|
|
273
|
+
left: window.innerWidth - ANCHOR_SIZE,
|
|
274
|
+
top: window.innerHeight - ANCHOR_SIZE,
|
|
275
|
+
});
|
|
276
|
+
hover(container);
|
|
277
|
+
expect(coordsOf(portalPanel())).toEqual({
|
|
278
|
+
top: px(window.innerHeight - PANEL_HEIGHT - VIEWPORT_MARGIN),
|
|
279
|
+
left: px(window.innerWidth - PANEL_WIDTH - VIEWPORT_MARGIN),
|
|
280
|
+
});
|
|
281
|
+
});
|
|
282
|
+
});
|
|
283
|
+
describe('RTP-05 resize · scroll 재계산', () => {
|
|
284
|
+
const movedCoords = () => ({
|
|
285
|
+
top: px(ANCHOR_TOP + ANCHOR_SIZE + TOOLTIP_OFFSET_REACT),
|
|
286
|
+
left: px(ANCHOR_LEFT + MOVE_DELTA + half(ANCHOR_SIZE) - half(PANEL_WIDTH)),
|
|
287
|
+
});
|
|
288
|
+
it.each(['resize', 'scroll'])('RTP-05 표시 중 %s 이면 좌표를 다시 계산한다', (eventName) => {
|
|
289
|
+
const { container } = mount({ position: 'bottom', title: '타이틀' });
|
|
290
|
+
stubLayout(container);
|
|
291
|
+
hover(container);
|
|
292
|
+
stubRect(anchorOf(container), { ...ANCHOR_BOX, left: ANCHOR_LEFT + MOVE_DELTA });
|
|
293
|
+
act(() => {
|
|
294
|
+
window.dispatchEvent(new Event(eventName));
|
|
295
|
+
});
|
|
296
|
+
expect(coordsOf(portalPanel())).toEqual(movedCoords());
|
|
297
|
+
});
|
|
298
|
+
it('RTP-05 숨기면 리스너를 해제해 이후 resize 에 반응하지 않는다', () => {
|
|
299
|
+
const { container } = mount({ position: 'bottom', title: '타이틀' });
|
|
300
|
+
stubLayout(container);
|
|
301
|
+
hover(container);
|
|
302
|
+
const shown = coordsOf(portalPanel());
|
|
303
|
+
leave(container);
|
|
304
|
+
stubRect(anchorOf(container), { ...ANCHOR_BOX, left: ANCHOR_LEFT + MOVE_DELTA });
|
|
305
|
+
act(() => {
|
|
306
|
+
window.dispatchEvent(new Event('resize'));
|
|
307
|
+
});
|
|
308
|
+
expect(coordsOf(portalPanel())).toEqual(shown);
|
|
309
|
+
});
|
|
310
|
+
});
|
|
311
|
+
describe('RTP-06 hover rAF 재계산', () => {
|
|
312
|
+
const runFrames = () => {
|
|
313
|
+
act(() => {
|
|
314
|
+
for (const [id, callback] of Array.from(pendingFrames)) {
|
|
315
|
+
pendingFrames.delete(id);
|
|
316
|
+
callback(0);
|
|
317
|
+
}
|
|
318
|
+
});
|
|
319
|
+
};
|
|
320
|
+
it('RTP-06 진입 직후 계산하고, 다음 프레임에 한 번 더 계산한다', () => {
|
|
321
|
+
const { container } = mount({ position: 'bottom', title: '타이틀' });
|
|
322
|
+
stubLayout(container);
|
|
323
|
+
hover(container);
|
|
324
|
+
const leftOnEnter = portalPanel().style.left;
|
|
325
|
+
stubRect(anchorOf(container), { ...ANCHOR_BOX, left: ANCHOR_LEFT + MOVE_DELTA });
|
|
326
|
+
runFrames();
|
|
327
|
+
const centeredLeft = (anchorLeft) => px(anchorLeft + half(ANCHOR_SIZE) - half(PANEL_WIDTH));
|
|
328
|
+
expect([leftOnEnter, portalPanel().style.left]).toEqual([
|
|
329
|
+
centeredLeft(ANCHOR_LEFT),
|
|
330
|
+
centeredLeft(ANCHOR_LEFT + MOVE_DELTA),
|
|
331
|
+
]);
|
|
332
|
+
});
|
|
333
|
+
it('RTP-06 연속 진입이면 대기 중인 프레임을 취소하고 새로 등록한다', () => {
|
|
334
|
+
const { container } = mount({ position: 'bottom', title: '타이틀' });
|
|
335
|
+
stubLayout(container);
|
|
336
|
+
hover(container);
|
|
337
|
+
const firstFrame = nextFrameId;
|
|
338
|
+
hover(container);
|
|
339
|
+
expect(window.cancelAnimationFrame).toHaveBeenCalledWith(firstFrame);
|
|
340
|
+
expect(Array.from(pendingFrames.keys())).toEqual([nextFrameId]);
|
|
341
|
+
});
|
|
342
|
+
it('RTP-06 프레임 대기 중 unmount 하면 그 프레임을 취소한다', () => {
|
|
343
|
+
const { container, unmount } = mount({ position: 'bottom', title: '타이틀' });
|
|
344
|
+
stubLayout(container);
|
|
345
|
+
hover(container);
|
|
346
|
+
const pendingFrame = nextFrameId;
|
|
347
|
+
unmount();
|
|
348
|
+
expect(window.cancelAnimationFrame).toHaveBeenCalledWith(pendingFrame);
|
|
349
|
+
});
|
|
350
|
+
});
|
|
351
|
+
describe('RTP-07 disablePortal', () => {
|
|
352
|
+
it('RTP-07 패널을 앵커 안에 인라인으로 두고 opacity 만 스타일로 준다, hover 해도 위치 계산이 없다', () => {
|
|
353
|
+
const { container } = mount({ disablePortal: true, title: '타이틀' });
|
|
354
|
+
const panel = anchorOf(container).querySelector('.ncua-tooltip__bg');
|
|
355
|
+
if (!panel)
|
|
356
|
+
throw new Error('인라인 패널을 찾지 못했습니다');
|
|
357
|
+
// disablePortal 이면 style 에 top · left 가 아예 없어 좌표로는 계산 여부를 가릴 수 없다 — 앵커 측정 호출을 본다
|
|
358
|
+
const measureAnchor = vi.fn(() => toRect(ANCHOR_BOX));
|
|
359
|
+
anchorOf(container).getBoundingClientRect = measureAnchor;
|
|
360
|
+
hover(container);
|
|
361
|
+
expect(document.querySelector('.ncua-tooltip-panel')).toBeNull();
|
|
362
|
+
expect(isVisible(panel)).toBe(true);
|
|
363
|
+
expect([panel.style.opacity, panel.style.top, panel.style.left]).toEqual(['1', '', '']);
|
|
364
|
+
expect(measureAnchor).not.toHaveBeenCalled();
|
|
365
|
+
});
|
|
366
|
+
});
|
|
367
|
+
describe('RTP-08 포털 대상', () => {
|
|
368
|
+
it('RTP-08 #tooltip-global-layer 가 있으면 그 안에 패널을 둔다', () => {
|
|
369
|
+
const layer = document.createElement('div');
|
|
370
|
+
layer.id = 'tooltip-global-layer';
|
|
371
|
+
document.body.appendChild(layer);
|
|
372
|
+
cleanups.push(() => layer.remove());
|
|
373
|
+
mount({ title: '타이틀' });
|
|
374
|
+
expect(portalPanel().parentElement).toBe(layer);
|
|
375
|
+
});
|
|
376
|
+
it('RTP-08 전역 레이어가 없으면 body 에 둔다', () => {
|
|
377
|
+
mount({ title: '타이틀' });
|
|
378
|
+
expect(portalPanel().parentElement).toBe(document.body);
|
|
379
|
+
});
|
|
380
|
+
});
|
|
381
|
+
describe('RTP-09 아이콘', () => {
|
|
382
|
+
it.each([
|
|
383
|
+
{ iconStyle: 'help-circle', iconType: 'stroke', Icon: HelpCircle },
|
|
384
|
+
{ iconStyle: 'help-circle', iconType: 'fill', Icon: HelpCircleFill },
|
|
385
|
+
{ iconStyle: 'alert-circle', iconType: 'stroke', Icon: AlertCircle },
|
|
386
|
+
{ iconStyle: 'alert-circle', iconType: 'fill', Icon: AlertCircleFill },
|
|
387
|
+
])('RTP-09 $iconStyle · $iconType 아이콘을 렌더한다', ({ iconStyle, iconType, Icon }) => {
|
|
388
|
+
const { container } = mount({ iconStyle, iconType, iconColor: 'red' });
|
|
389
|
+
const expected = renderToStaticMarkup(createElement(Icon, { width: ICON_SIZE_SM, height: ICON_SIZE_SM, color: 'red' }));
|
|
390
|
+
expect(anchorOf(container).querySelector('svg')?.outerHTML).toBe(expected);
|
|
391
|
+
});
|
|
392
|
+
it.each([
|
|
393
|
+
{ size: 'sm', iconSize: ICON_SIZE_SM },
|
|
394
|
+
{ size: 'md', iconSize: ICON_SIZE_MD },
|
|
395
|
+
])('RTP-09 size $size 면 아이콘 크기 $iconSize', ({ size, iconSize }) => {
|
|
396
|
+
const { container } = mount({ size });
|
|
397
|
+
expect(anchorOf(container).querySelector('svg')?.getAttribute('width')).toBe(String(iconSize));
|
|
398
|
+
});
|
|
399
|
+
});
|
|
400
|
+
describe('RTP-10 클래스 · zIndex', () => {
|
|
401
|
+
it('RTP-10 앵커에 size · type · hideArrow · stroke · auto · className modifier 를 붙인다', () => {
|
|
402
|
+
const { container } = mount({ size: 'md', type: 'long', hideArrow: true, className: 'custom-anchor' });
|
|
403
|
+
const anchor = anchorOf(container);
|
|
404
|
+
expect(Array.from(anchor.classList)).toEqual(expect.arrayContaining([
|
|
405
|
+
'ncua-tooltip--md',
|
|
406
|
+
'ncua-tooltip--long',
|
|
407
|
+
'ncua-tooltip--hidden-arrow',
|
|
408
|
+
'ncua-tooltip--stroke',
|
|
409
|
+
'ncua-tooltip--auto',
|
|
410
|
+
'custom-anchor',
|
|
411
|
+
]));
|
|
412
|
+
});
|
|
413
|
+
it('RTP-10 fill · 고정 position 이면 stroke · auto modifier 가 없다', () => {
|
|
414
|
+
const { container } = mount({ iconType: 'fill', position: 'top' });
|
|
415
|
+
const anchor = anchorOf(container);
|
|
416
|
+
expect(anchor.classList).not.toContain('ncua-tooltip--stroke');
|
|
417
|
+
expect(anchor.classList).not.toContain('ncua-tooltip--auto');
|
|
418
|
+
});
|
|
419
|
+
it('RTP-10 패널에 tooltipType · panelClassName 을 붙이고 zIndex 가 있으면 style 로 준다', () => {
|
|
420
|
+
const zIndex = 3000;
|
|
421
|
+
mount({ tooltipType: 'black', panelClassName: 'custom-panel', zIndex });
|
|
422
|
+
const panel = portalPanel();
|
|
423
|
+
expect(Array.from(panel.classList)).toEqual(expect.arrayContaining(['ncua-tooltip__bg--black', 'custom-panel']));
|
|
424
|
+
expect(panel.style.zIndex).toBe(String(zIndex));
|
|
425
|
+
});
|
|
426
|
+
it('RTP-10 zIndex 가 없으면 style 에 z-index 가 없다', () => {
|
|
427
|
+
mount({});
|
|
428
|
+
expect(portalPanel().style.zIndex).toBe('');
|
|
429
|
+
});
|
|
430
|
+
});
|
|
431
|
+
describe('RTP-11 title · content', () => {
|
|
432
|
+
it('RTP-11 title 과 ReactNode content 를 렌더한다', () => {
|
|
433
|
+
mount({ title: '타이틀', content: createElement('ul', null, createElement('li', null, '항목')) });
|
|
434
|
+
const panel = portalPanel();
|
|
435
|
+
expect(panel.querySelector('.ncua-tooltip__title')?.textContent).toBe('타이틀');
|
|
436
|
+
expect(panel.querySelector('.ncua-tooltip__content li')?.textContent).toBe('항목');
|
|
437
|
+
});
|
|
438
|
+
it('RTP-11 title · content 가 없으면 그 요소가 없다', () => {
|
|
439
|
+
mount({});
|
|
440
|
+
const panel = portalPanel();
|
|
441
|
+
expect([panel.querySelector('.ncua-tooltip__title'), panel.querySelector('.ncua-tooltip__content')]).toEqual([
|
|
442
|
+
null,
|
|
443
|
+
null,
|
|
444
|
+
]);
|
|
445
|
+
});
|
|
446
|
+
it('RTP-11 long 이면 닫기 버튼을 tooltipType 반대 테마로 둔다', () => {
|
|
447
|
+
mount({ type: 'long', tooltipType: 'black' });
|
|
448
|
+
const button = portalPanel().querySelector('.ncua-tooltip__close-button');
|
|
449
|
+
expect(button?.classList.contains('ncua-button-close-x--light')).toBe(true);
|
|
450
|
+
});
|
|
451
|
+
});
|
|
452
|
+
/* ========== 결함 후보 · 계약 불일치 ========== */
|
|
453
|
+
describe('RTP-12 forceVisible + long 닫기', () => {
|
|
454
|
+
it('RTP-12 forceVisible 이면 X 를 눌러도 패널이 그대로이고, 풀어도 이탈 전까지 hover 를 무시한다', () => {
|
|
455
|
+
// 현재 동작 고정 — 결함 후보: 후속 이슈 (effectiveVisible = forceVisible 이라 X 무반응 · 닫힘 콜백 없음, 남은 isManuallyClose 가 hover 를 막음)
|
|
456
|
+
const { container, rerender } = mount({ type: 'long', forceVisible: true, position: 'bottom', title: '타이틀' });
|
|
457
|
+
stubLayout(container);
|
|
458
|
+
click(portalPanel().querySelector('.ncua-tooltip__close-button'));
|
|
459
|
+
const afterClose = { visible: isVisible(portalPanel()), opacity: portalPanel().style.opacity };
|
|
460
|
+
rerender({ type: 'long', position: 'bottom', title: '타이틀' });
|
|
461
|
+
hover(container);
|
|
462
|
+
expect(afterClose).toEqual({ visible: true, opacity: '1' });
|
|
463
|
+
expect(isVisible(portalPanel())).toBe(false);
|
|
464
|
+
});
|
|
465
|
+
it.todo('RTP-12 forceVisible + long 에서 X 를 누르면 닫힘을 알리는 콜백을 호출하고, forceVisible 을 풀면 hover 가 바로 동작한다');
|
|
466
|
+
});
|
|
467
|
+
describe('RTP-13 0 값 처리', () => {
|
|
468
|
+
it('RTP-13 zIndex={0} 은 무시되고 content={0} 은 텍스트 "0" 으로 렌더된다', () => {
|
|
469
|
+
// 현재 동작 고정 — 결함 후보: 후속 이슈 (zIndex && … · content && … 의 falsy 판정)
|
|
470
|
+
mount({ zIndex: 0, content: 0 });
|
|
471
|
+
const panel = portalPanel();
|
|
472
|
+
expect(panel.style.zIndex).toBe('');
|
|
473
|
+
expect(panel.querySelector('.ncua-tooltip__content')).toBeNull();
|
|
474
|
+
expect(panel.textContent).toBe('0');
|
|
475
|
+
});
|
|
476
|
+
it.todo('RTP-13 zIndex={0} 은 style 에 반영하고, content={0} 은 콘텐츠 요소 안에 렌더한다');
|
|
477
|
+
});
|
|
478
|
+
describe('RTP-14 포커스 표시', () => {
|
|
479
|
+
it('RTP-14 앵커에 tabindex · role · aria-describedby 가 없고 focusin 으로 표시되지 않는다', () => {
|
|
480
|
+
// 현재 동작 고정 — 결함 후보: 후속 이슈 (계약 불일치 — 문서 "마우스를 올리거나 포커스할 때 나타납니다", TT-23 과 한 행)
|
|
481
|
+
const { container } = mount({ title: '타이틀' });
|
|
482
|
+
const anchor = anchorOf(container);
|
|
483
|
+
act(() => {
|
|
484
|
+
anchor.dispatchEvent(new FocusEvent('focusin', { bubbles: true }));
|
|
485
|
+
});
|
|
486
|
+
expect([
|
|
487
|
+
anchor.getAttribute('tabindex'),
|
|
488
|
+
anchor.getAttribute('role'),
|
|
489
|
+
anchor.getAttribute('aria-describedby'),
|
|
490
|
+
]).toEqual([null, null, null]);
|
|
491
|
+
expect(isVisible(portalPanel())).toBe(false);
|
|
492
|
+
});
|
|
493
|
+
it.todo('RTP-14 앵커가 포커스를 받을 수 있고, 포커스하면 패널을 표시하며 aria-describedby 로 연결한다');
|
|
494
|
+
});
|
|
495
|
+
describe('RTP-15 문서 기본값 표기', () => {
|
|
496
|
+
it('RTP-15 코드 기본값은 size sm · tooltipType white 다 (Props 표와 일치, 예제 제목과 불일치)', () => {
|
|
497
|
+
// 현재 동작 고정 — 결함 후보: 후속 이슈 (계약 불일치 — 문서 예제 제목 "Medium Size (기본)" · "black (기본)" 이 Props 표 · 코드와 모순)
|
|
498
|
+
const { container } = mount({});
|
|
499
|
+
expect(anchorOf(container).classList.contains('ncua-tooltip--sm')).toBe(true);
|
|
500
|
+
expect(hasPanelClass(portalPanel(), 'white')).toBe(true);
|
|
501
|
+
});
|
|
502
|
+
it.todo('RTP-15 문서 예제 제목의 기본값 표기를 Props 표(size sm · tooltipType white)와 맞춘다');
|
|
503
|
+
});
|
|
504
|
+
describe('RTP-16 위치 상수', () => {
|
|
505
|
+
it('RTP-16 React 앵커-패널 간격은 6px 로 vanilla(8px)와 다르다', () => {
|
|
506
|
+
// 현재 동작 고정 — 결함 후보: 후속 이슈 (주석 "HTML 구현체와 동일한 상수" 인데 TOOLTIP_OFFSET 6 vs 8)
|
|
507
|
+
const { container } = mount({ position: 'bottom', title: '타이틀' });
|
|
508
|
+
stubLayout(container);
|
|
509
|
+
hover(container);
|
|
510
|
+
const gap = Number.parseFloat(portalPanel().style.top) - (ANCHOR_TOP + ANCHOR_SIZE);
|
|
511
|
+
expect(gap).toBe(TOOLTIP_OFFSET_REACT);
|
|
512
|
+
expect(gap).not.toBe(VANILLA_TOOLTIP_OFFSET);
|
|
513
|
+
});
|
|
514
|
+
it.todo('RTP-16 React 와 vanilla 의 앵커-패널 간격 상수를 같은 값으로 맞춘다');
|
|
515
|
+
});
|
|
516
|
+
describe('RTP-17 타입 밖 position', () => {
|
|
517
|
+
it('RTP-17 어떤 방향에도 안 걸리는 값은 (0,0) → 경계 보정 (8,8), 클래스는 그 값이다 (캐스팅 구동, 결함 아님)', () => {
|
|
518
|
+
const position = 'diagonal';
|
|
519
|
+
const { container } = mount({ position, title: '타이틀' });
|
|
520
|
+
stubLayout(container);
|
|
521
|
+
hover(container);
|
|
522
|
+
expect(coordsOf(portalPanel())).toEqual({ top: px(VIEWPORT_MARGIN), left: px(VIEWPORT_MARGIN) });
|
|
523
|
+
expect(hasPanelClass(portalPanel(), 'diagonal')).toBe(true);
|
|
524
|
+
});
|
|
525
|
+
});
|
|
526
|
+
describe('RTP-18 long 닫기 버튼 이름', () => {
|
|
527
|
+
it('RTP-18 long 툴팁 닫기 버튼에는 aria-label 이 없다 (Tooltip 이 넘긴 값이 버려짐)', () => {
|
|
528
|
+
// 현재 동작 고정 — 결함 후보: 후속 이슈 (RTP-18 — ButtonCloseX 가 aria-label 을 받지 않아 Tooltip 이 넘긴 "툴팁 닫기" 가 버려짐, #597 CA-02 와 같은 유형)
|
|
529
|
+
const { container } = mount({ type: 'long', position: 'bottom', title: '타이틀' });
|
|
530
|
+
stubLayout(container);
|
|
531
|
+
hover(container);
|
|
532
|
+
const button = portalPanel().querySelector('.ncua-tooltip__close-button');
|
|
533
|
+
if (!button)
|
|
534
|
+
throw new Error('닫기 버튼을 찾지 못했습니다');
|
|
535
|
+
expect(button.getAttribute('aria-label')).toBeNull();
|
|
536
|
+
});
|
|
537
|
+
it.todo('RTP-18 long 툴팁 닫기 버튼에 접근 가능한 이름 "툴팁 닫기" 가 있다 (기대 동작)');
|
|
538
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|