@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.
@@ -19,6 +19,8 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
19
19
  const PAGE_SIZE = 15;
20
20
  /** 페이지 번호 그룹 크기 — 초과 시 Pagination 이 점프 버튼을 노출한다 */
21
21
  const PAGER_WINDOW = 10;
22
+ /** 검색 조합 안내 문구를 띄우는 기준 — 결과가 이 수를 넘을 때만 노출한다 */
23
+ const SEARCH_HINT_MIN_TOTAL_COUNT = 30;
22
24
  /** 반응형 전환 기준 — assets/styles/base/_variable.scss 의 $breakpoint 와 동일 */
23
25
  const MOBILE_BREAKPOINT = 768;
24
26
  /** 본문 스크롤 컨테이너. Modal.Content 가 overflow-y:auto 를 갖는다. */
@@ -124,6 +126,8 @@ const PostcodeSearchModal = _ref2 => {
124
126
  }, [open]);
125
127
  const hasError = Boolean(errorCode);
126
128
  const hasResults = !hasError && results.length > 0;
129
+ // 결과가 적으면 굳이 검색 조합을 안내하지 않는다.
130
+ const showSearchHint = hasResults && totalCount > SEARCH_HINT_MIN_TOTAL_COUNT;
127
131
  // 검색을 실행한 검색어와 현재 입력값이 같을 때만 "결과 없음"으로 본다.
128
132
  // 입력 중에는 두 값이 달라지고, 응답을 기다리는 동안에는 loading 이 막는다.
129
133
  const showEmptyState = !hasError && !loading && results.length === 0 && searchQuery !== '' && searchQuery === searchedQuery;
@@ -179,7 +183,7 @@ const PostcodeSearchModal = _ref2 => {
179
183
  hierarchy: "secondary",
180
184
  onClick: handleSearch
181
185
  })]
182
- }), hasResults && (0, _jsxRuntime.jsxs)("div", {
186
+ }), showSearchHint && (0, _jsxRuntime.jsxs)("div", {
183
187
  children: [(0, _jsxRuntime.jsx)("p", {
184
188
  className: "ncua-postcode-search-modal__result-title",
185
189
  children: "\uC544\uB798 \uC870\uD569\uC73C\uB85C \uAC80\uC0C9 \uC2DC \uC8FC\uC18C\uB97C \uB354 \uC27D\uAC8C \uCC3E\uC744 \uC218 \uC788\uC5B4\uC694."
@@ -55,8 +55,10 @@ const Tip = _ref => {
55
55
  return (0, _jsxRuntime.jsxs)("li", {
56
56
  className: "ncua-postcode-search-modal__tip-item",
57
57
  children: [(0, _jsxRuntime.jsx)("span", {
58
+ className: "ncua-postcode-search-modal__tip-combination",
58
59
  children: combination
59
60
  }), (0, _jsxRuntime.jsx)("span", {
61
+ className: "ncua-postcode-search-modal__tip-example",
60
62
  children: `${TIP_EXAMPLE_PREFIX} ${example}`
61
63
  })]
62
64
  }, combination);