@ncds/ui-admin 1.8.26-alpha.9 → 1.8.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/dist/cjs/src/components/feedback-and-status/badge/Badge.js +1 -1
  2. package/dist/cjs/src/components/navigation/pagination/Pagination.js +14 -14
  3. package/dist/cjs/src/components/navigation/pagination/__tests__/Pagination.test.js +0 -17
  4. package/dist/cjs/src/generated/scoped-css.js +1 -1
  5. package/dist/cjs/vitest.config.js +1 -12
  6. package/dist/esm/src/components/feedback-and-status/badge/Badge.js +1 -1
  7. package/dist/esm/src/components/navigation/pagination/Pagination.js +14 -14
  8. package/dist/esm/src/components/navigation/pagination/__tests__/Pagination.test.js +0 -17
  9. package/dist/esm/src/generated/scoped-css.js +1 -1
  10. package/dist/esm/vitest.config.js +1 -12
  11. package/dist/temp/src/components/feedback-and-status/badge/Badge.d.ts +1 -1
  12. package/dist/temp/src/components/feedback-and-status/badge/Badge.js +1 -1
  13. package/dist/temp/src/components/navigation/pagination/Pagination.js +14 -14
  14. package/dist/temp/src/components/navigation/pagination/__tests__/Pagination.test.js +0 -7
  15. package/dist/temp/src/generated/scoped-css.js +1 -1
  16. package/dist/temp/vitest.config.js +0 -11
  17. package/dist/types/src/components/feedback-and-status/badge/Badge.d.ts +1 -1
  18. package/dist/ui-admin/assets/styles/style.css +18 -15
  19. package/package.json +1 -1
  20. package/dist/cjs/src/components/layout/page-title/__tests__/pageTitleStyle.test.js +0 -94
  21. package/dist/esm/src/components/layout/page-title/__tests__/pageTitleStyle.test.js +0 -91
  22. package/dist/temp/src/components/layout/page-title/__tests__/pageTitleStyle.test.d.ts +0 -1
  23. package/dist/temp/src/components/layout/page-title/__tests__/pageTitleStyle.test.js +0 -94
  24. package/dist/types/src/components/layout/page-title/__tests__/pageTitleStyle.test.d.ts +0 -1
@@ -22,18 +22,7 @@ export default defineConfig({
22
22
  // 'lcov' 대신 'lcovonly' — 'lcov' 는 HTML 리포트까지 생성한다.
23
23
  reporter: ['text-summary', ['lcovonly', {
24
24
  projectRoot: REPO_ROOT
25
- }]],
26
- // 회귀 방지 하한선 — 실측에서 약 2%p 낮춘 값 (ui-admin-mcp 와 같은 여유폭).
27
- // 실측 기준: 2026-10-12, 25cb4d96 — stmts 54.91 / branch 44.63 / funcs 55.20 / lines 55.80
28
- // 최종 목표: 93 / 88 (lines 95 · branches 90). 테스트 보강 단계마다 실측 −2 로 인상한다.
29
- // autoUpdate: false — 값은 실측을 확인하고 사람이 직접 올린다.
30
- thresholds: {
31
- autoUpdate: false,
32
- statements: 53,
33
- branches: 43,
34
- functions: 53,
35
- lines: 54
36
- }
25
+ }]]
37
26
  }
38
27
  }
39
28
  });
@@ -16,4 +16,4 @@ type BadgeProps = {
16
16
  };
17
17
  declare const Badge: ({ label, type, color, className, leadingIcon, trailingIcon, size, }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
18
18
  export { Badge };
19
- export type { BadgeColor, BadgeProps, BadgeSize, BadgeType };
19
+ export type { BadgeType, BadgeColor, BadgeSize, BadgeProps };
@@ -7,7 +7,7 @@ import { sideSlotRender } from './utils';
7
7
  */
8
8
  const BADGE_ICON_SIZE = 12;
9
9
  /** new-badge 박스 안에 들어가는 'N' 아이콘 크기. 박스는 sm 16px / md 20px 이며 아이콘은 그보다 작다(패딩 포함). */
10
- const NEW_BADGE_ICON_SIZE = { sm: 12, md: 14 };
10
+ const NEW_BADGE_ICON_SIZE = { sm: 12, md: 16 };
11
11
  const Badge = ({ label, type = 'pill-outline', color = 'neutral', className, leadingIcon, trailingIcon, size = 'xs', }) => {
12
12
  // new-badge: 신규 콘텐츠 'N' 마크 전용 타입. label·color·leadingIcon·trailingIcon은 무시되고
13
13
  // 색은 --pink-600 으로 고정된다. (디자이너 명세: Icon/FeaturedIcon/Badge로 대체 불가한 전용 표시)
@@ -19,28 +19,28 @@ export const Pagination = ({ className = '', totalCount, itemCountPerPage = 10,
19
19
  };
20
20
  useEffect(() => {
21
21
  const lastGroupStart = Math.max(1, Math.floor((totalPage - 1) / pageCount) * pageCount + 1);
22
- // totalPage/pageCount 가 줄어 start 가 마지막 그룹을 넘으면 마지막 그룹에서 시작해 아래 규칙을 계속 적용한다.
22
+ // totalPage/pageCount 가 줄어 start 가 마지막 그룹을 넘으면 마지막 그룹으로 보정한다.
23
23
  // (예: 100→50 페이지로 축소 시 start 가 91 에 머물러 범위 밖 버튼을 표시하던 문제)
24
- // 바로 return 하면 새 검색으로 currentPage 가 1 이 돼도 1 이 목록에 없다 (PR #603 리뷰).
25
- const baseStart = Math.min(start, lastGroupStart);
26
- let nextStart = baseStart;
27
- if (currentPage === baseStart + pageCount) {
28
- nextStart = baseStart + pageCount;
24
+ if (start > lastGroupStart) {
25
+ setStart(lastGroupStart);
26
+ return;
29
27
  }
30
- if (currentPage > baseStart + pageCount) {
31
- nextStart = Math.floor((currentPage - 1) / pageCount) * pageCount + 1;
28
+ if (currentPage === start + pageCount) {
29
+ setStart(start + pageCount);
32
30
  }
33
- if (currentPage < baseStart) {
34
- nextStart = Math.max(1, baseStart - pageCount);
31
+ if (currentPage > start + pageCount) {
32
+ const newStart = Math.floor((currentPage - 1) / pageCount) * pageCount + 1;
33
+ setStart(newStart);
34
+ }
35
+ if (currentPage < start) {
36
+ setStart(Math.max(1, start - pageCount));
35
37
  }
36
38
  if (currentPage === 1) {
37
- nextStart = 1;
39
+ setStart(1);
38
40
  }
39
41
  if (currentPage === totalPage) {
40
- nextStart = lastGroupStart;
42
+ setStart(lastGroupStart);
41
43
  }
42
- // currentPage 가 totalPage 를 넘는 값이어도 마지막 그룹을 넘지 않는다
43
- setStart(Math.min(nextStart, lastGroupStart));
44
44
  // start 는 이 effect 가 setStart 로 갱신하는 대상이라 deps 에서 제외한다(넣으면 자기 갱신으로
45
45
  // 재실행). currentPage 외에 totalPage/pageCount 도 추적해, 이들이 줄어 start 가 범위를 벗어나면
46
46
  // 위에서 보정한다.
@@ -64,13 +64,6 @@ describe('#332 Pagination — totalPage 축소 시 start 보정', () => {
64
64
  expect(nums[0]).toBe(GROUP_START_50_PAGES);
65
65
  expect(Math.max(...nums)).toBeLessThanOrEqual(LAST_PAGE_50);
66
66
  });
67
- it('totalPage 가 줄면서 currentPage 가 1 로 돌아오면 1 이 든 첫 그룹을 보인다 (PR #603 리뷰)', () => {
68
- // 50 페이지 중 35 페이지(31~40 그룹) → 새 검색으로 25 페이지 결과의 1 페이지
69
- const el = render({ totalCount: 750, itemCountPerPage: 15, pageCount: PAGE_GROUP_SIZE, currentPage: 35 });
70
- render({ totalCount: 375, itemCountPerPage: 15, pageCount: PAGE_GROUP_SIZE, currentPage: 1 });
71
- expect(pageNums(el)[0]).toBe(1);
72
- expect(el.querySelector('.ncua-pagination__page-num.is-current')?.textContent).toBe('1');
73
- });
74
67
  });
75
68
  describe('Pagination — mo 모드 이전/다음 버튼 노출', () => {
76
69
  it('페이지가 그룹 크기 이하여도 mo 에서는 이전·다음 버튼이 노출된다', () => {