@ncds/ui-admin 1.8.21-alpha.13 → 1.8.21-alpha.14
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/src/components/overlays/postcode-search-modal/PostcodeSearchModal.js +5 -1
- package/dist/cjs/src/components/overlays/postcode-search-modal/PostcodeSearchModalTip.js +2 -0
- package/dist/cjs/src/generated/scoped-css.js +1 -1
- package/dist/esm/src/components/overlays/postcode-search-modal/PostcodeSearchModal.js +5 -1
- package/dist/esm/src/components/overlays/postcode-search-modal/PostcodeSearchModalTip.js +2 -0
- package/dist/esm/src/generated/scoped-css.js +1 -1
- package/dist/temp/src/components/overlays/postcode-search-modal/PostcodeSearchModal.js +5 -1
- package/dist/temp/src/components/overlays/postcode-search-modal/PostcodeSearchModalTip.js +1 -1
- package/dist/temp/src/generated/scoped-css.js +1 -1
- package/dist/ui-admin/assets/styles/style.css +10 -1
- package/dist/ui-admin/assets/styles/style.scoped.css +10 -1
- package/package.json +1 -1
|
@@ -12,6 +12,8 @@ import { Tip } from './PostcodeSearchModalTip';
|
|
|
12
12
|
const PAGE_SIZE = 15;
|
|
13
13
|
/** 페이지 번호 그룹 크기 — 초과 시 Pagination 이 점프 버튼을 노출한다 */
|
|
14
14
|
const PAGER_WINDOW = 10;
|
|
15
|
+
/** 검색 조합 안내 문구를 띄우는 기준 — 결과가 이 수를 넘을 때만 노출한다 */
|
|
16
|
+
const SEARCH_HINT_MIN_TOTAL_COUNT = 30;
|
|
15
17
|
/** 반응형 전환 기준 — assets/styles/base/_variable.scss 의 $breakpoint 와 동일 */
|
|
16
18
|
const MOBILE_BREAKPOINT = 768;
|
|
17
19
|
/** 본문 스크롤 컨테이너. Modal.Content 가 overflow-y:auto 를 갖는다. */
|
|
@@ -117,6 +119,8 @@ const PostcodeSearchModal = _ref2 => {
|
|
|
117
119
|
}, [open]);
|
|
118
120
|
const hasError = Boolean(errorCode);
|
|
119
121
|
const hasResults = !hasError && results.length > 0;
|
|
122
|
+
// 결과가 적으면 굳이 검색 조합을 안내하지 않는다.
|
|
123
|
+
const showSearchHint = hasResults && totalCount > SEARCH_HINT_MIN_TOTAL_COUNT;
|
|
120
124
|
// 검색을 실행한 검색어와 현재 입력값이 같을 때만 "결과 없음"으로 본다.
|
|
121
125
|
// 입력 중에는 두 값이 달라지고, 응답을 기다리는 동안에는 loading 이 막는다.
|
|
122
126
|
const showEmptyState = !hasError && !loading && results.length === 0 && searchQuery !== '' && searchQuery === searchedQuery;
|
|
@@ -172,7 +176,7 @@ const PostcodeSearchModal = _ref2 => {
|
|
|
172
176
|
hierarchy: "secondary",
|
|
173
177
|
onClick: handleSearch
|
|
174
178
|
})]
|
|
175
|
-
}),
|
|
179
|
+
}), showSearchHint && _jsxs("div", {
|
|
176
180
|
children: [_jsx("p", {
|
|
177
181
|
className: "ncua-postcode-search-modal__result-title",
|
|
178
182
|
children: "\uC544\uB798 \uC870\uD569\uC73C\uB85C \uAC80\uC0C9 \uC2DC \uC8FC\uC18C\uB97C \uB354 \uC27D\uAC8C \uCC3E\uC744 \uC218 \uC788\uC5B4\uC694."
|
|
@@ -48,8 +48,10 @@ const Tip = _ref => {
|
|
|
48
48
|
return _jsxs("li", {
|
|
49
49
|
className: "ncua-postcode-search-modal__tip-item",
|
|
50
50
|
children: [_jsx("span", {
|
|
51
|
+
className: "ncua-postcode-search-modal__tip-combination",
|
|
51
52
|
children: combination
|
|
52
53
|
}), _jsx("span", {
|
|
54
|
+
className: "ncua-postcode-search-modal__tip-example",
|
|
53
55
|
children: `${TIP_EXAMPLE_PREFIX} ${example}`
|
|
54
56
|
})]
|
|
55
57
|
}, combination);
|