@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,826 @@
|
|
|
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 {
|
|
47
|
+
root,
|
|
48
|
+
container
|
|
49
|
+
} of mounted.splice(0)) {
|
|
50
|
+
act(() => {
|
|
51
|
+
root.unmount();
|
|
52
|
+
});
|
|
53
|
+
container.remove();
|
|
54
|
+
}
|
|
55
|
+
for (const cleanup of cleanups.splice(0)) cleanup();
|
|
56
|
+
pendingFrames.clear();
|
|
57
|
+
vi.restoreAllMocks();
|
|
58
|
+
});
|
|
59
|
+
/* ========== 공통 헬퍼 ========== */
|
|
60
|
+
const mount = function () {
|
|
61
|
+
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
62
|
+
const container = document.createElement('div');
|
|
63
|
+
document.body.appendChild(container);
|
|
64
|
+
const root = createRoot(container);
|
|
65
|
+
const render = nextProps => {
|
|
66
|
+
act(() => {
|
|
67
|
+
root.render(/*#__PURE__*/createElement(Tooltip, nextProps));
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
render(props);
|
|
71
|
+
const entry = {
|
|
72
|
+
root,
|
|
73
|
+
container
|
|
74
|
+
};
|
|
75
|
+
mounted.push(entry);
|
|
76
|
+
const unmount = () => {
|
|
77
|
+
act(() => {
|
|
78
|
+
root.unmount();
|
|
79
|
+
});
|
|
80
|
+
mounted.splice(mounted.indexOf(entry), 1);
|
|
81
|
+
container.remove();
|
|
82
|
+
};
|
|
83
|
+
return {
|
|
84
|
+
container,
|
|
85
|
+
rerender: render,
|
|
86
|
+
unmount
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
/** React 가 relatedTarget 으로 enter/leave 를 합성하므로, 포인터가 오가는 바깥 요소를 둔다 */
|
|
90
|
+
const outside = () => {
|
|
91
|
+
const element = document.createElement('div');
|
|
92
|
+
document.body.appendChild(element);
|
|
93
|
+
cleanups.push(() => element.remove());
|
|
94
|
+
return element;
|
|
95
|
+
};
|
|
96
|
+
const anchorOf = container => {
|
|
97
|
+
const anchor = container.querySelector('.ncua-tooltip');
|
|
98
|
+
if (!anchor) throw new Error('툴팁 앵커를 찾지 못했습니다');
|
|
99
|
+
return anchor;
|
|
100
|
+
};
|
|
101
|
+
/** 포털 패널 — 한 테스트에 툴팁 하나만 마운트한다 */
|
|
102
|
+
const portalPanel = () => {
|
|
103
|
+
const panel = document.querySelector('.ncua-tooltip-panel');
|
|
104
|
+
if (!panel) throw new Error('툴팁 패널을 찾지 못했습니다');
|
|
105
|
+
return panel;
|
|
106
|
+
};
|
|
107
|
+
const hover = container => {
|
|
108
|
+
act(() => {
|
|
109
|
+
anchorOf(container).dispatchEvent(new MouseEvent('mouseover', {
|
|
110
|
+
bubbles: true,
|
|
111
|
+
relatedTarget: outside()
|
|
112
|
+
}));
|
|
113
|
+
});
|
|
114
|
+
};
|
|
115
|
+
const leave = function (container) {
|
|
116
|
+
let relatedTarget = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : outside();
|
|
117
|
+
act(() => {
|
|
118
|
+
anchorOf(container).dispatchEvent(new MouseEvent('mouseout', {
|
|
119
|
+
bubbles: true,
|
|
120
|
+
relatedTarget
|
|
121
|
+
}));
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
const click = element => {
|
|
125
|
+
if (!element) throw new Error('클릭할 요소를 찾지 못했습니다');
|
|
126
|
+
act(() => {
|
|
127
|
+
element.click();
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
const toRect = _ref => {
|
|
131
|
+
let {
|
|
132
|
+
left,
|
|
133
|
+
top,
|
|
134
|
+
width,
|
|
135
|
+
height
|
|
136
|
+
} = _ref;
|
|
137
|
+
return {
|
|
138
|
+
left,
|
|
139
|
+
top,
|
|
140
|
+
width,
|
|
141
|
+
height,
|
|
142
|
+
right: left + width,
|
|
143
|
+
bottom: top + height,
|
|
144
|
+
x: left,
|
|
145
|
+
y: top,
|
|
146
|
+
toJSON: () => ({})
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
const stubRect = (element, box) => {
|
|
150
|
+
element.getBoundingClientRect = () => toRect(box);
|
|
151
|
+
};
|
|
152
|
+
const ANCHOR_BOX = {
|
|
153
|
+
left: ANCHOR_LEFT,
|
|
154
|
+
top: ANCHOR_TOP,
|
|
155
|
+
width: ANCHOR_SIZE,
|
|
156
|
+
height: ANCHOR_SIZE
|
|
157
|
+
};
|
|
158
|
+
const PANEL_BOX = {
|
|
159
|
+
left: 0,
|
|
160
|
+
top: 0,
|
|
161
|
+
width: PANEL_WIDTH,
|
|
162
|
+
height: PANEL_HEIGHT
|
|
163
|
+
};
|
|
164
|
+
const stubLayout = function (container) {
|
|
165
|
+
let anchor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ANCHOR_BOX;
|
|
166
|
+
stubRect(anchorOf(container), anchor);
|
|
167
|
+
stubRect(portalPanel(), PANEL_BOX);
|
|
168
|
+
};
|
|
169
|
+
const isVisible = panel => panel.classList.contains('ncua-tooltip__bg--visible');
|
|
170
|
+
const px = value => `${value}px`;
|
|
171
|
+
const coordsOf = panel => ({
|
|
172
|
+
top: panel.style.top,
|
|
173
|
+
left: panel.style.left
|
|
174
|
+
});
|
|
175
|
+
/* ========== P0 ========== */
|
|
176
|
+
describe('RTP-01 short hover 표시 · 숨김', () => {
|
|
177
|
+
it('RTP-01 진입 시 패널을 보이고 좌표를 잡는다', () => {
|
|
178
|
+
const {
|
|
179
|
+
container
|
|
180
|
+
} = mount({
|
|
181
|
+
position: 'bottom',
|
|
182
|
+
title: '타이틀'
|
|
183
|
+
});
|
|
184
|
+
stubLayout(container);
|
|
185
|
+
hover(container);
|
|
186
|
+
const panel = portalPanel();
|
|
187
|
+
expect(isVisible(panel)).toBe(true);
|
|
188
|
+
expect(panel.style.opacity).toBe('1');
|
|
189
|
+
expect(coordsOf(panel)).toEqual({
|
|
190
|
+
top: px(ANCHOR_TOP + ANCHOR_SIZE + TOOLTIP_OFFSET_REACT),
|
|
191
|
+
left: px(ANCHOR_LEFT + half(ANCHOR_SIZE) - half(PANEL_WIDTH))
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
it('RTP-01 바깥으로 이탈하면 숨긴다', () => {
|
|
195
|
+
const {
|
|
196
|
+
container
|
|
197
|
+
} = mount({
|
|
198
|
+
position: 'bottom',
|
|
199
|
+
title: '타이틀'
|
|
200
|
+
});
|
|
201
|
+
stubLayout(container);
|
|
202
|
+
hover(container);
|
|
203
|
+
leave(container);
|
|
204
|
+
const panel = portalPanel();
|
|
205
|
+
expect(isVisible(panel)).toBe(false);
|
|
206
|
+
expect(panel.style.opacity).toBe('0');
|
|
207
|
+
});
|
|
208
|
+
it('RTP-01 아이콘에서 포털 패널로 옮기면 이탈이 아니어서 유지한다', () => {
|
|
209
|
+
const {
|
|
210
|
+
container
|
|
211
|
+
} = mount({
|
|
212
|
+
position: 'bottom',
|
|
213
|
+
title: '타이틀'
|
|
214
|
+
});
|
|
215
|
+
stubLayout(container);
|
|
216
|
+
hover(container);
|
|
217
|
+
leave(container, portalPanel());
|
|
218
|
+
expect(isVisible(portalPanel())).toBe(true);
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
describe('RTP-02 long 닫기', () => {
|
|
222
|
+
const closeButton = () => portalPanel().querySelector('.ncua-tooltip__close-button');
|
|
223
|
+
it('RTP-02 이탈해도 유지한다', () => {
|
|
224
|
+
const {
|
|
225
|
+
container
|
|
226
|
+
} = mount({
|
|
227
|
+
type: 'long',
|
|
228
|
+
position: 'bottom',
|
|
229
|
+
title: '타이틀'
|
|
230
|
+
});
|
|
231
|
+
stubLayout(container);
|
|
232
|
+
hover(container);
|
|
233
|
+
leave(container);
|
|
234
|
+
expect(isVisible(portalPanel())).toBe(true);
|
|
235
|
+
});
|
|
236
|
+
it('RTP-02 X 클릭 → 숨김 + force-hidden, 이탈 없이 재진입하면 무시, 이탈 후 재진입하면 표시', () => {
|
|
237
|
+
const {
|
|
238
|
+
container
|
|
239
|
+
} = mount({
|
|
240
|
+
type: 'long',
|
|
241
|
+
position: 'bottom',
|
|
242
|
+
title: '타이틀'
|
|
243
|
+
});
|
|
244
|
+
stubLayout(container);
|
|
245
|
+
hover(container);
|
|
246
|
+
click(closeButton());
|
|
247
|
+
const afterClose = {
|
|
248
|
+
visible: isVisible(portalPanel()),
|
|
249
|
+
forceHidden: portalPanel().classList.contains('ncua-tooltip__bg--force-hidden')
|
|
250
|
+
};
|
|
251
|
+
hover(container);
|
|
252
|
+
const visibleOnReenterWithoutLeave = isVisible(portalPanel());
|
|
253
|
+
leave(container);
|
|
254
|
+
hover(container);
|
|
255
|
+
expect(afterClose).toEqual({
|
|
256
|
+
visible: false,
|
|
257
|
+
forceHidden: true
|
|
258
|
+
});
|
|
259
|
+
expect(visibleOnReenterWithoutLeave).toBe(false);
|
|
260
|
+
expect(isVisible(portalPanel())).toBe(true);
|
|
261
|
+
expect(portalPanel().classList.contains('ncua-tooltip__bg--force-hidden')).toBe(false);
|
|
262
|
+
});
|
|
263
|
+
});
|
|
264
|
+
describe('RTP-03 forceVisible 외부 제어', () => {
|
|
265
|
+
it('RTP-03 true 면 마운트 시 표시하고 이탈해도 유지한다', () => {
|
|
266
|
+
const {
|
|
267
|
+
container
|
|
268
|
+
} = mount({
|
|
269
|
+
forceVisible: true,
|
|
270
|
+
position: 'bottom',
|
|
271
|
+
title: '타이틀'
|
|
272
|
+
});
|
|
273
|
+
const visibleOnMount = isVisible(portalPanel());
|
|
274
|
+
leave(container);
|
|
275
|
+
expect(visibleOnMount).toBe(true);
|
|
276
|
+
expect(isVisible(portalPanel())).toBe(true);
|
|
277
|
+
expect(portalPanel().style.opacity).toBe('1');
|
|
278
|
+
});
|
|
279
|
+
it('RTP-03 false 면 진입해도 표시하지 않는다', () => {
|
|
280
|
+
const {
|
|
281
|
+
container
|
|
282
|
+
} = mount({
|
|
283
|
+
forceVisible: false,
|
|
284
|
+
position: 'bottom',
|
|
285
|
+
title: '타이틀'
|
|
286
|
+
});
|
|
287
|
+
stubLayout(container);
|
|
288
|
+
hover(container);
|
|
289
|
+
expect(isVisible(portalPanel())).toBe(false);
|
|
290
|
+
expect(portalPanel().style.opacity).toBe('0');
|
|
291
|
+
});
|
|
292
|
+
});
|
|
293
|
+
/* ========== 나머지 분기 ========== */
|
|
294
|
+
const hasPanelClass = (panel, modifier) => panel.classList.contains(`ncua-tooltip__bg--${modifier}`);
|
|
295
|
+
const arrowXOf = panel => panel.style.getPropertyValue('--ncua-tooltip-arrow-x');
|
|
296
|
+
/** 앵커를 옮긴 뒤 재계산 여부를 보기 위한 이동량 */
|
|
297
|
+
const MOVE_DELTA = 50;
|
|
298
|
+
/** 위 공간이 모자라 auto 가 bottom 을 고르는 앵커 top */
|
|
299
|
+
const ANCHOR_TOP_CRAMPED = 20;
|
|
300
|
+
describe('RTP-04 위치 계산', () => {
|
|
301
|
+
const CENTER_LEFT = ANCHOR_LEFT + half(ANCHOR_SIZE) - half(PANEL_WIDTH);
|
|
302
|
+
const MIDDLE_TOP = ANCHOR_TOP + half(ANCHOR_SIZE) - half(PANEL_HEIGHT);
|
|
303
|
+
const ABOVE_TOP = ANCHOR_TOP - PANEL_HEIGHT - TOOLTIP_OFFSET_REACT;
|
|
304
|
+
const BELOW_TOP = ANCHOR_TOP + ANCHOR_SIZE + TOOLTIP_OFFSET_REACT;
|
|
305
|
+
const EDGE_LEFT = ANCHOR_LEFT - EDGE_ALIGN_OFFSET;
|
|
306
|
+
const EDGE_RIGHT = ANCHOR_LEFT + ANCHOR_SIZE - PANEL_WIDTH + EDGE_ALIGN_OFFSET;
|
|
307
|
+
const CENTER_ARROW = px(half(PANEL_WIDTH));
|
|
308
|
+
it.each([{
|
|
309
|
+
position: 'top',
|
|
310
|
+
top: ABOVE_TOP,
|
|
311
|
+
left: CENTER_LEFT,
|
|
312
|
+
arrowX: CENTER_ARROW
|
|
313
|
+
}, {
|
|
314
|
+
position: 'bottom',
|
|
315
|
+
top: BELOW_TOP,
|
|
316
|
+
left: CENTER_LEFT,
|
|
317
|
+
arrowX: CENTER_ARROW
|
|
318
|
+
}, {
|
|
319
|
+
position: 'left',
|
|
320
|
+
top: MIDDLE_TOP,
|
|
321
|
+
left: ANCHOR_LEFT - PANEL_WIDTH - TOOLTIP_OFFSET_REACT,
|
|
322
|
+
arrowX: ''
|
|
323
|
+
}, {
|
|
324
|
+
position: 'right',
|
|
325
|
+
top: MIDDLE_TOP,
|
|
326
|
+
left: ANCHOR_LEFT + ANCHOR_SIZE + TOOLTIP_OFFSET_REACT,
|
|
327
|
+
arrowX: ''
|
|
328
|
+
}, {
|
|
329
|
+
position: 'top-left',
|
|
330
|
+
top: ABOVE_TOP,
|
|
331
|
+
left: EDGE_LEFT,
|
|
332
|
+
arrowX: ''
|
|
333
|
+
}, {
|
|
334
|
+
position: 'top-right',
|
|
335
|
+
top: ABOVE_TOP,
|
|
336
|
+
left: EDGE_RIGHT,
|
|
337
|
+
arrowX: ''
|
|
338
|
+
}, {
|
|
339
|
+
position: 'bottom-left',
|
|
340
|
+
top: BELOW_TOP,
|
|
341
|
+
left: EDGE_LEFT,
|
|
342
|
+
arrowX: ''
|
|
343
|
+
}, {
|
|
344
|
+
position: 'bottom-right',
|
|
345
|
+
top: BELOW_TOP,
|
|
346
|
+
left: EDGE_RIGHT,
|
|
347
|
+
arrowX: ''
|
|
348
|
+
}])('RTP-04 $position 좌표 · 패널 클래스 · 화살표 변수', _ref2 => {
|
|
349
|
+
let {
|
|
350
|
+
position,
|
|
351
|
+
top,
|
|
352
|
+
left,
|
|
353
|
+
arrowX
|
|
354
|
+
} = _ref2;
|
|
355
|
+
const {
|
|
356
|
+
container
|
|
357
|
+
} = mount({
|
|
358
|
+
position,
|
|
359
|
+
title: '타이틀'
|
|
360
|
+
});
|
|
361
|
+
stubLayout(container);
|
|
362
|
+
hover(container);
|
|
363
|
+
const panel = portalPanel();
|
|
364
|
+
expect(coordsOf(panel)).toEqual({
|
|
365
|
+
top: px(top),
|
|
366
|
+
left: px(left)
|
|
367
|
+
});
|
|
368
|
+
expect(hasPanelClass(panel, position)).toBe(true);
|
|
369
|
+
expect(arrowXOf(panel)).toBe(arrowX);
|
|
370
|
+
});
|
|
371
|
+
it('RTP-04 auto 는 표시 전 bottom 클래스로 시작한다', () => {
|
|
372
|
+
mount({
|
|
373
|
+
title: '타이틀'
|
|
374
|
+
});
|
|
375
|
+
expect(hasPanelClass(portalPanel(), 'bottom')).toBe(true);
|
|
376
|
+
});
|
|
377
|
+
it.each([{
|
|
378
|
+
anchorTop: ANCHOR_TOP,
|
|
379
|
+
expected: 'top'
|
|
380
|
+
}, {
|
|
381
|
+
anchorTop: ANCHOR_TOP_CRAMPED,
|
|
382
|
+
expected: 'bottom'
|
|
383
|
+
}])('RTP-04 auto 는 앵커 top $anchorTop 이면 $expected 로 계산한다', _ref3 => {
|
|
384
|
+
let {
|
|
385
|
+
anchorTop,
|
|
386
|
+
expected
|
|
387
|
+
} = _ref3;
|
|
388
|
+
const {
|
|
389
|
+
container
|
|
390
|
+
} = mount({
|
|
391
|
+
title: '타이틀'
|
|
392
|
+
});
|
|
393
|
+
stubLayout(container, {
|
|
394
|
+
...ANCHOR_BOX,
|
|
395
|
+
top: anchorTop
|
|
396
|
+
});
|
|
397
|
+
hover(container);
|
|
398
|
+
expect(hasPanelClass(portalPanel(), expected)).toBe(true);
|
|
399
|
+
expect(anchorOf(container).classList.contains('ncua-tooltip--auto')).toBe(true);
|
|
400
|
+
});
|
|
401
|
+
it('RTP-04 왼쪽 · 위 경계를 넘으면 여백까지 밀고, 화살표는 패널 모서리 여백까지만 이동한다', () => {
|
|
402
|
+
const {
|
|
403
|
+
container
|
|
404
|
+
} = mount({
|
|
405
|
+
position: 'top',
|
|
406
|
+
title: '타이틀'
|
|
407
|
+
});
|
|
408
|
+
stubLayout(container, {
|
|
409
|
+
...ANCHOR_BOX,
|
|
410
|
+
left: 0,
|
|
411
|
+
top: 0
|
|
412
|
+
});
|
|
413
|
+
hover(container);
|
|
414
|
+
expect(coordsOf(portalPanel())).toEqual({
|
|
415
|
+
top: px(VIEWPORT_MARGIN),
|
|
416
|
+
left: px(VIEWPORT_MARGIN)
|
|
417
|
+
});
|
|
418
|
+
expect(arrowXOf(portalPanel())).toBe(px(ARROW_EDGE_MARGIN));
|
|
419
|
+
});
|
|
420
|
+
it('RTP-04 오른쪽 · 아래 경계를 넘으면 뷰포트 안쪽 여백까지 당긴다', () => {
|
|
421
|
+
const {
|
|
422
|
+
container
|
|
423
|
+
} = mount({
|
|
424
|
+
position: 'bottom',
|
|
425
|
+
title: '타이틀'
|
|
426
|
+
});
|
|
427
|
+
stubLayout(container, {
|
|
428
|
+
...ANCHOR_BOX,
|
|
429
|
+
left: window.innerWidth - ANCHOR_SIZE,
|
|
430
|
+
top: window.innerHeight - ANCHOR_SIZE
|
|
431
|
+
});
|
|
432
|
+
hover(container);
|
|
433
|
+
expect(coordsOf(portalPanel())).toEqual({
|
|
434
|
+
top: px(window.innerHeight - PANEL_HEIGHT - VIEWPORT_MARGIN),
|
|
435
|
+
left: px(window.innerWidth - PANEL_WIDTH - VIEWPORT_MARGIN)
|
|
436
|
+
});
|
|
437
|
+
});
|
|
438
|
+
});
|
|
439
|
+
describe('RTP-05 resize · scroll 재계산', () => {
|
|
440
|
+
const movedCoords = () => ({
|
|
441
|
+
top: px(ANCHOR_TOP + ANCHOR_SIZE + TOOLTIP_OFFSET_REACT),
|
|
442
|
+
left: px(ANCHOR_LEFT + MOVE_DELTA + half(ANCHOR_SIZE) - half(PANEL_WIDTH))
|
|
443
|
+
});
|
|
444
|
+
it.each(['resize', 'scroll'])('RTP-05 표시 중 %s 이면 좌표를 다시 계산한다', eventName => {
|
|
445
|
+
const {
|
|
446
|
+
container
|
|
447
|
+
} = mount({
|
|
448
|
+
position: 'bottom',
|
|
449
|
+
title: '타이틀'
|
|
450
|
+
});
|
|
451
|
+
stubLayout(container);
|
|
452
|
+
hover(container);
|
|
453
|
+
stubRect(anchorOf(container), {
|
|
454
|
+
...ANCHOR_BOX,
|
|
455
|
+
left: ANCHOR_LEFT + MOVE_DELTA
|
|
456
|
+
});
|
|
457
|
+
act(() => {
|
|
458
|
+
window.dispatchEvent(new Event(eventName));
|
|
459
|
+
});
|
|
460
|
+
expect(coordsOf(portalPanel())).toEqual(movedCoords());
|
|
461
|
+
});
|
|
462
|
+
it('RTP-05 숨기면 리스너를 해제해 이후 resize 에 반응하지 않는다', () => {
|
|
463
|
+
const {
|
|
464
|
+
container
|
|
465
|
+
} = mount({
|
|
466
|
+
position: 'bottom',
|
|
467
|
+
title: '타이틀'
|
|
468
|
+
});
|
|
469
|
+
stubLayout(container);
|
|
470
|
+
hover(container);
|
|
471
|
+
const shown = coordsOf(portalPanel());
|
|
472
|
+
leave(container);
|
|
473
|
+
stubRect(anchorOf(container), {
|
|
474
|
+
...ANCHOR_BOX,
|
|
475
|
+
left: ANCHOR_LEFT + MOVE_DELTA
|
|
476
|
+
});
|
|
477
|
+
act(() => {
|
|
478
|
+
window.dispatchEvent(new Event('resize'));
|
|
479
|
+
});
|
|
480
|
+
expect(coordsOf(portalPanel())).toEqual(shown);
|
|
481
|
+
});
|
|
482
|
+
});
|
|
483
|
+
describe('RTP-06 hover rAF 재계산', () => {
|
|
484
|
+
const runFrames = () => {
|
|
485
|
+
act(() => {
|
|
486
|
+
for (const [id, callback] of Array.from(pendingFrames)) {
|
|
487
|
+
pendingFrames.delete(id);
|
|
488
|
+
callback(0);
|
|
489
|
+
}
|
|
490
|
+
});
|
|
491
|
+
};
|
|
492
|
+
it('RTP-06 진입 직후 계산하고, 다음 프레임에 한 번 더 계산한다', () => {
|
|
493
|
+
const {
|
|
494
|
+
container
|
|
495
|
+
} = mount({
|
|
496
|
+
position: 'bottom',
|
|
497
|
+
title: '타이틀'
|
|
498
|
+
});
|
|
499
|
+
stubLayout(container);
|
|
500
|
+
hover(container);
|
|
501
|
+
const leftOnEnter = portalPanel().style.left;
|
|
502
|
+
stubRect(anchorOf(container), {
|
|
503
|
+
...ANCHOR_BOX,
|
|
504
|
+
left: ANCHOR_LEFT + MOVE_DELTA
|
|
505
|
+
});
|
|
506
|
+
runFrames();
|
|
507
|
+
const centeredLeft = anchorLeft => px(anchorLeft + half(ANCHOR_SIZE) - half(PANEL_WIDTH));
|
|
508
|
+
expect([leftOnEnter, portalPanel().style.left]).toEqual([centeredLeft(ANCHOR_LEFT), centeredLeft(ANCHOR_LEFT + MOVE_DELTA)]);
|
|
509
|
+
});
|
|
510
|
+
it('RTP-06 연속 진입이면 대기 중인 프레임을 취소하고 새로 등록한다', () => {
|
|
511
|
+
const {
|
|
512
|
+
container
|
|
513
|
+
} = mount({
|
|
514
|
+
position: 'bottom',
|
|
515
|
+
title: '타이틀'
|
|
516
|
+
});
|
|
517
|
+
stubLayout(container);
|
|
518
|
+
hover(container);
|
|
519
|
+
const firstFrame = nextFrameId;
|
|
520
|
+
hover(container);
|
|
521
|
+
expect(window.cancelAnimationFrame).toHaveBeenCalledWith(firstFrame);
|
|
522
|
+
expect(Array.from(pendingFrames.keys())).toEqual([nextFrameId]);
|
|
523
|
+
});
|
|
524
|
+
it('RTP-06 프레임 대기 중 unmount 하면 그 프레임을 취소한다', () => {
|
|
525
|
+
const {
|
|
526
|
+
container,
|
|
527
|
+
unmount
|
|
528
|
+
} = mount({
|
|
529
|
+
position: 'bottom',
|
|
530
|
+
title: '타이틀'
|
|
531
|
+
});
|
|
532
|
+
stubLayout(container);
|
|
533
|
+
hover(container);
|
|
534
|
+
const pendingFrame = nextFrameId;
|
|
535
|
+
unmount();
|
|
536
|
+
expect(window.cancelAnimationFrame).toHaveBeenCalledWith(pendingFrame);
|
|
537
|
+
});
|
|
538
|
+
});
|
|
539
|
+
describe('RTP-07 disablePortal', () => {
|
|
540
|
+
it('RTP-07 패널을 앵커 안에 인라인으로 두고 opacity 만 스타일로 준다, hover 해도 위치 계산이 없다', () => {
|
|
541
|
+
const {
|
|
542
|
+
container
|
|
543
|
+
} = mount({
|
|
544
|
+
disablePortal: true,
|
|
545
|
+
title: '타이틀'
|
|
546
|
+
});
|
|
547
|
+
const panel = anchorOf(container).querySelector('.ncua-tooltip__bg');
|
|
548
|
+
if (!panel) throw new Error('인라인 패널을 찾지 못했습니다');
|
|
549
|
+
// disablePortal 이면 style 에 top · left 가 아예 없어 좌표로는 계산 여부를 가릴 수 없다 — 앵커 측정 호출을 본다
|
|
550
|
+
const measureAnchor = vi.fn(() => toRect(ANCHOR_BOX));
|
|
551
|
+
anchorOf(container).getBoundingClientRect = measureAnchor;
|
|
552
|
+
hover(container);
|
|
553
|
+
expect(document.querySelector('.ncua-tooltip-panel')).toBeNull();
|
|
554
|
+
expect(isVisible(panel)).toBe(true);
|
|
555
|
+
expect([panel.style.opacity, panel.style.top, panel.style.left]).toEqual(['1', '', '']);
|
|
556
|
+
expect(measureAnchor).not.toHaveBeenCalled();
|
|
557
|
+
});
|
|
558
|
+
});
|
|
559
|
+
describe('RTP-08 포털 대상', () => {
|
|
560
|
+
it('RTP-08 #tooltip-global-layer 가 있으면 그 안에 패널을 둔다', () => {
|
|
561
|
+
const layer = document.createElement('div');
|
|
562
|
+
layer.id = 'tooltip-global-layer';
|
|
563
|
+
document.body.appendChild(layer);
|
|
564
|
+
cleanups.push(() => layer.remove());
|
|
565
|
+
mount({
|
|
566
|
+
title: '타이틀'
|
|
567
|
+
});
|
|
568
|
+
expect(portalPanel().parentElement).toBe(layer);
|
|
569
|
+
});
|
|
570
|
+
it('RTP-08 전역 레이어가 없으면 body 에 둔다', () => {
|
|
571
|
+
mount({
|
|
572
|
+
title: '타이틀'
|
|
573
|
+
});
|
|
574
|
+
expect(portalPanel().parentElement).toBe(document.body);
|
|
575
|
+
});
|
|
576
|
+
});
|
|
577
|
+
describe('RTP-09 아이콘', () => {
|
|
578
|
+
it.each([{
|
|
579
|
+
iconStyle: 'help-circle',
|
|
580
|
+
iconType: 'stroke',
|
|
581
|
+
Icon: HelpCircle
|
|
582
|
+
}, {
|
|
583
|
+
iconStyle: 'help-circle',
|
|
584
|
+
iconType: 'fill',
|
|
585
|
+
Icon: HelpCircleFill
|
|
586
|
+
}, {
|
|
587
|
+
iconStyle: 'alert-circle',
|
|
588
|
+
iconType: 'stroke',
|
|
589
|
+
Icon: AlertCircle
|
|
590
|
+
}, {
|
|
591
|
+
iconStyle: 'alert-circle',
|
|
592
|
+
iconType: 'fill',
|
|
593
|
+
Icon: AlertCircleFill
|
|
594
|
+
}])('RTP-09 $iconStyle · $iconType 아이콘을 렌더한다', _ref4 => {
|
|
595
|
+
let {
|
|
596
|
+
iconStyle,
|
|
597
|
+
iconType,
|
|
598
|
+
Icon
|
|
599
|
+
} = _ref4;
|
|
600
|
+
const {
|
|
601
|
+
container
|
|
602
|
+
} = mount({
|
|
603
|
+
iconStyle,
|
|
604
|
+
iconType,
|
|
605
|
+
iconColor: 'red'
|
|
606
|
+
});
|
|
607
|
+
const expected = renderToStaticMarkup(/*#__PURE__*/createElement(Icon, {
|
|
608
|
+
width: ICON_SIZE_SM,
|
|
609
|
+
height: ICON_SIZE_SM,
|
|
610
|
+
color: 'red'
|
|
611
|
+
}));
|
|
612
|
+
expect(anchorOf(container).querySelector('svg')?.outerHTML).toBe(expected);
|
|
613
|
+
});
|
|
614
|
+
it.each([{
|
|
615
|
+
size: 'sm',
|
|
616
|
+
iconSize: ICON_SIZE_SM
|
|
617
|
+
}, {
|
|
618
|
+
size: 'md',
|
|
619
|
+
iconSize: ICON_SIZE_MD
|
|
620
|
+
}])('RTP-09 size $size 면 아이콘 크기 $iconSize', _ref5 => {
|
|
621
|
+
let {
|
|
622
|
+
size,
|
|
623
|
+
iconSize
|
|
624
|
+
} = _ref5;
|
|
625
|
+
const {
|
|
626
|
+
container
|
|
627
|
+
} = mount({
|
|
628
|
+
size
|
|
629
|
+
});
|
|
630
|
+
expect(anchorOf(container).querySelector('svg')?.getAttribute('width')).toBe(String(iconSize));
|
|
631
|
+
});
|
|
632
|
+
});
|
|
633
|
+
describe('RTP-10 클래스 · zIndex', () => {
|
|
634
|
+
it('RTP-10 앵커에 size · type · hideArrow · stroke · auto · className modifier 를 붙인다', () => {
|
|
635
|
+
const {
|
|
636
|
+
container
|
|
637
|
+
} = mount({
|
|
638
|
+
size: 'md',
|
|
639
|
+
type: 'long',
|
|
640
|
+
hideArrow: true,
|
|
641
|
+
className: 'custom-anchor'
|
|
642
|
+
});
|
|
643
|
+
const anchor = anchorOf(container);
|
|
644
|
+
expect(Array.from(anchor.classList)).toEqual(expect.arrayContaining(['ncua-tooltip--md', 'ncua-tooltip--long', 'ncua-tooltip--hidden-arrow', 'ncua-tooltip--stroke', 'ncua-tooltip--auto', 'custom-anchor']));
|
|
645
|
+
});
|
|
646
|
+
it('RTP-10 fill · 고정 position 이면 stroke · auto modifier 가 없다', () => {
|
|
647
|
+
const {
|
|
648
|
+
container
|
|
649
|
+
} = mount({
|
|
650
|
+
iconType: 'fill',
|
|
651
|
+
position: 'top'
|
|
652
|
+
});
|
|
653
|
+
const anchor = anchorOf(container);
|
|
654
|
+
expect(anchor.classList).not.toContain('ncua-tooltip--stroke');
|
|
655
|
+
expect(anchor.classList).not.toContain('ncua-tooltip--auto');
|
|
656
|
+
});
|
|
657
|
+
it('RTP-10 패널에 tooltipType · panelClassName 을 붙이고 zIndex 가 있으면 style 로 준다', () => {
|
|
658
|
+
const zIndex = 3000;
|
|
659
|
+
mount({
|
|
660
|
+
tooltipType: 'black',
|
|
661
|
+
panelClassName: 'custom-panel',
|
|
662
|
+
zIndex
|
|
663
|
+
});
|
|
664
|
+
const panel = portalPanel();
|
|
665
|
+
expect(Array.from(panel.classList)).toEqual(expect.arrayContaining(['ncua-tooltip__bg--black', 'custom-panel']));
|
|
666
|
+
expect(panel.style.zIndex).toBe(String(zIndex));
|
|
667
|
+
});
|
|
668
|
+
it('RTP-10 zIndex 가 없으면 style 에 z-index 가 없다', () => {
|
|
669
|
+
mount({});
|
|
670
|
+
expect(portalPanel().style.zIndex).toBe('');
|
|
671
|
+
});
|
|
672
|
+
});
|
|
673
|
+
describe('RTP-11 title · content', () => {
|
|
674
|
+
it('RTP-11 title 과 ReactNode content 를 렌더한다', () => {
|
|
675
|
+
mount({
|
|
676
|
+
title: '타이틀',
|
|
677
|
+
content: /*#__PURE__*/createElement('ul', null, /*#__PURE__*/createElement('li', null, '항목'))
|
|
678
|
+
});
|
|
679
|
+
const panel = portalPanel();
|
|
680
|
+
expect(panel.querySelector('.ncua-tooltip__title')?.textContent).toBe('타이틀');
|
|
681
|
+
expect(panel.querySelector('.ncua-tooltip__content li')?.textContent).toBe('항목');
|
|
682
|
+
});
|
|
683
|
+
it('RTP-11 title · content 가 없으면 그 요소가 없다', () => {
|
|
684
|
+
mount({});
|
|
685
|
+
const panel = portalPanel();
|
|
686
|
+
expect([panel.querySelector('.ncua-tooltip__title'), panel.querySelector('.ncua-tooltip__content')]).toEqual([null, null]);
|
|
687
|
+
});
|
|
688
|
+
it('RTP-11 long 이면 닫기 버튼을 tooltipType 반대 테마로 둔다', () => {
|
|
689
|
+
mount({
|
|
690
|
+
type: 'long',
|
|
691
|
+
tooltipType: 'black'
|
|
692
|
+
});
|
|
693
|
+
const button = portalPanel().querySelector('.ncua-tooltip__close-button');
|
|
694
|
+
expect(button?.classList.contains('ncua-button-close-x--light')).toBe(true);
|
|
695
|
+
});
|
|
696
|
+
});
|
|
697
|
+
/* ========== 결함 후보 · 계약 불일치 ========== */
|
|
698
|
+
describe('RTP-12 forceVisible + long 닫기', () => {
|
|
699
|
+
it('RTP-12 forceVisible 이면 X 를 눌러도 패널이 그대로이고, 풀어도 이탈 전까지 hover 를 무시한다', () => {
|
|
700
|
+
// 현재 동작 고정 — 결함 후보: 후속 이슈 (effectiveVisible = forceVisible 이라 X 무반응 · 닫힘 콜백 없음, 남은 isManuallyClose 가 hover 를 막음)
|
|
701
|
+
const {
|
|
702
|
+
container,
|
|
703
|
+
rerender
|
|
704
|
+
} = mount({
|
|
705
|
+
type: 'long',
|
|
706
|
+
forceVisible: true,
|
|
707
|
+
position: 'bottom',
|
|
708
|
+
title: '타이틀'
|
|
709
|
+
});
|
|
710
|
+
stubLayout(container);
|
|
711
|
+
click(portalPanel().querySelector('.ncua-tooltip__close-button'));
|
|
712
|
+
const afterClose = {
|
|
713
|
+
visible: isVisible(portalPanel()),
|
|
714
|
+
opacity: portalPanel().style.opacity
|
|
715
|
+
};
|
|
716
|
+
rerender({
|
|
717
|
+
type: 'long',
|
|
718
|
+
position: 'bottom',
|
|
719
|
+
title: '타이틀'
|
|
720
|
+
});
|
|
721
|
+
hover(container);
|
|
722
|
+
expect(afterClose).toEqual({
|
|
723
|
+
visible: true,
|
|
724
|
+
opacity: '1'
|
|
725
|
+
});
|
|
726
|
+
expect(isVisible(portalPanel())).toBe(false);
|
|
727
|
+
});
|
|
728
|
+
it.todo('RTP-12 forceVisible + long 에서 X 를 누르면 닫힘을 알리는 콜백을 호출하고, forceVisible 을 풀면 hover 가 바로 동작한다');
|
|
729
|
+
});
|
|
730
|
+
describe('RTP-13 0 값 처리', () => {
|
|
731
|
+
it('RTP-13 zIndex={0} 은 무시되고 content={0} 은 텍스트 "0" 으로 렌더된다', () => {
|
|
732
|
+
// 현재 동작 고정 — 결함 후보: 후속 이슈 (zIndex && … · content && … 의 falsy 판정)
|
|
733
|
+
mount({
|
|
734
|
+
zIndex: 0,
|
|
735
|
+
content: 0
|
|
736
|
+
});
|
|
737
|
+
const panel = portalPanel();
|
|
738
|
+
expect(panel.style.zIndex).toBe('');
|
|
739
|
+
expect(panel.querySelector('.ncua-tooltip__content')).toBeNull();
|
|
740
|
+
expect(panel.textContent).toBe('0');
|
|
741
|
+
});
|
|
742
|
+
it.todo('RTP-13 zIndex={0} 은 style 에 반영하고, content={0} 은 콘텐츠 요소 안에 렌더한다');
|
|
743
|
+
});
|
|
744
|
+
describe('RTP-14 포커스 표시', () => {
|
|
745
|
+
it('RTP-14 앵커에 tabindex · role · aria-describedby 가 없고 focusin 으로 표시되지 않는다', () => {
|
|
746
|
+
// 현재 동작 고정 — 결함 후보: 후속 이슈 (계약 불일치 — 문서 "마우스를 올리거나 포커스할 때 나타납니다", TT-23 과 한 행)
|
|
747
|
+
const {
|
|
748
|
+
container
|
|
749
|
+
} = mount({
|
|
750
|
+
title: '타이틀'
|
|
751
|
+
});
|
|
752
|
+
const anchor = anchorOf(container);
|
|
753
|
+
act(() => {
|
|
754
|
+
anchor.dispatchEvent(new FocusEvent('focusin', {
|
|
755
|
+
bubbles: true
|
|
756
|
+
}));
|
|
757
|
+
});
|
|
758
|
+
expect([anchor.getAttribute('tabindex'), anchor.getAttribute('role'), anchor.getAttribute('aria-describedby')]).toEqual([null, null, null]);
|
|
759
|
+
expect(isVisible(portalPanel())).toBe(false);
|
|
760
|
+
});
|
|
761
|
+
it.todo('RTP-14 앵커가 포커스를 받을 수 있고, 포커스하면 패널을 표시하며 aria-describedby 로 연결한다');
|
|
762
|
+
});
|
|
763
|
+
describe('RTP-15 문서 기본값 표기', () => {
|
|
764
|
+
it('RTP-15 코드 기본값은 size sm · tooltipType white 다 (Props 표와 일치, 예제 제목과 불일치)', () => {
|
|
765
|
+
// 현재 동작 고정 — 결함 후보: 후속 이슈 (계약 불일치 — 문서 예제 제목 "Medium Size (기본)" · "black (기본)" 이 Props 표 · 코드와 모순)
|
|
766
|
+
const {
|
|
767
|
+
container
|
|
768
|
+
} = mount({});
|
|
769
|
+
expect(anchorOf(container).classList.contains('ncua-tooltip--sm')).toBe(true);
|
|
770
|
+
expect(hasPanelClass(portalPanel(), 'white')).toBe(true);
|
|
771
|
+
});
|
|
772
|
+
it.todo('RTP-15 문서 예제 제목의 기본값 표기를 Props 표(size sm · tooltipType white)와 맞춘다');
|
|
773
|
+
});
|
|
774
|
+
describe('RTP-16 위치 상수', () => {
|
|
775
|
+
it('RTP-16 React 앵커-패널 간격은 6px 로 vanilla(8px)와 다르다', () => {
|
|
776
|
+
// 현재 동작 고정 — 결함 후보: 후속 이슈 (주석 "HTML 구현체와 동일한 상수" 인데 TOOLTIP_OFFSET 6 vs 8)
|
|
777
|
+
const {
|
|
778
|
+
container
|
|
779
|
+
} = mount({
|
|
780
|
+
position: 'bottom',
|
|
781
|
+
title: '타이틀'
|
|
782
|
+
});
|
|
783
|
+
stubLayout(container);
|
|
784
|
+
hover(container);
|
|
785
|
+
const gap = Number.parseFloat(portalPanel().style.top) - (ANCHOR_TOP + ANCHOR_SIZE);
|
|
786
|
+
expect(gap).toBe(TOOLTIP_OFFSET_REACT);
|
|
787
|
+
expect(gap).not.toBe(VANILLA_TOOLTIP_OFFSET);
|
|
788
|
+
});
|
|
789
|
+
it.todo('RTP-16 React 와 vanilla 의 앵커-패널 간격 상수를 같은 값으로 맞춘다');
|
|
790
|
+
});
|
|
791
|
+
describe('RTP-17 타입 밖 position', () => {
|
|
792
|
+
it('RTP-17 어떤 방향에도 안 걸리는 값은 (0,0) → 경계 보정 (8,8), 클래스는 그 값이다 (캐스팅 구동, 결함 아님)', () => {
|
|
793
|
+
const position = 'diagonal';
|
|
794
|
+
const {
|
|
795
|
+
container
|
|
796
|
+
} = mount({
|
|
797
|
+
position,
|
|
798
|
+
title: '타이틀'
|
|
799
|
+
});
|
|
800
|
+
stubLayout(container);
|
|
801
|
+
hover(container);
|
|
802
|
+
expect(coordsOf(portalPanel())).toEqual({
|
|
803
|
+
top: px(VIEWPORT_MARGIN),
|
|
804
|
+
left: px(VIEWPORT_MARGIN)
|
|
805
|
+
});
|
|
806
|
+
expect(hasPanelClass(portalPanel(), 'diagonal')).toBe(true);
|
|
807
|
+
});
|
|
808
|
+
});
|
|
809
|
+
describe('RTP-18 long 닫기 버튼 이름', () => {
|
|
810
|
+
it('RTP-18 long 툴팁 닫기 버튼에는 aria-label 이 없다 (Tooltip 이 넘긴 값이 버려짐)', () => {
|
|
811
|
+
// 현재 동작 고정 — 결함 후보: 후속 이슈 (RTP-18 — ButtonCloseX 가 aria-label 을 받지 않아 Tooltip 이 넘긴 "툴팁 닫기" 가 버려짐, #597 CA-02 와 같은 유형)
|
|
812
|
+
const {
|
|
813
|
+
container
|
|
814
|
+
} = mount({
|
|
815
|
+
type: 'long',
|
|
816
|
+
position: 'bottom',
|
|
817
|
+
title: '타이틀'
|
|
818
|
+
});
|
|
819
|
+
stubLayout(container);
|
|
820
|
+
hover(container);
|
|
821
|
+
const button = portalPanel().querySelector('.ncua-tooltip__close-button');
|
|
822
|
+
if (!button) throw new Error('닫기 버튼을 찾지 못했습니다');
|
|
823
|
+
expect(button.getAttribute('aria-label')).toBeNull();
|
|
824
|
+
});
|
|
825
|
+
it.todo('RTP-18 long 툴팁 닫기 버튼에 접근 가능한 이름 "툴팁 닫기" 가 있다 (기대 동작)');
|
|
826
|
+
});
|