@lucian-seo/lucian-ui 0.2.1 → 0.2.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/lib/{Input-DzJm1Kv4.js → Input-Bv2FRGIe.js} +2 -2
- package/dist/lib/{Input-DzJm1Kv4.js.map → Input-Bv2FRGIe.js.map} +1 -1
- package/dist/lib/{Pagination-AWL5k5zG.js → Popover-Cq6yhJaK.js} +193 -132
- package/dist/lib/Popover-Cq6yhJaK.js.map +1 -0
- package/dist/lib/{Switch-DyKAqvde.js → Switch-DmKcoBT0.js} +3 -3
- package/dist/lib/Switch-DmKcoBT0.js.map +1 -0
- package/dist/lib/{Tag-Z8PjnJFt.js → Tag-CnNuj4nV.js} +2 -2
- package/dist/lib/{Tag-Z8PjnJFt.js.map → Tag-CnNuj4nV.js.map} +1 -1
- package/dist/lib/{TagInput-CeA0n7ax.js → TagInput-BcSSnJY_.js} +4 -4
- package/dist/lib/{TagInput-CeA0n7ax.js.map → TagInput-BcSSnJY_.js.map} +1 -1
- package/dist/lib/{ToggleButton-r73bokux.js → ToggleButton-CcST9ch9.js} +3 -3
- package/dist/lib/{ToggleButton-r73bokux.js.map → ToggleButton-CcST9ch9.js.map} +1 -1
- package/dist/lib/{Toolbar-DDOaxG3B.js → Toolbar-Cq2wF4Yg.js} +67 -127
- package/dist/lib/Toolbar-Cq2wF4Yg.js.map +1 -0
- package/dist/lib/{Tooltip-BW1-aVDg.js → Tooltip-1flxtzgM.js} +2 -2
- package/dist/lib/{Tooltip-BW1-aVDg.js.map → Tooltip-1flxtzgM.js.map} +1 -1
- package/dist/lib/{VisuallyHidden-DcE0EFpo.js → VisuallyHidden-Bht2-rdy.js} +16 -14
- package/dist/lib/VisuallyHidden-Bht2-rdy.js.map +1 -0
- package/dist/lib/{VoiceControlBar-Bx016mmz.js → VoiceControlBar-iWzq7jiw.js} +1754 -1494
- package/dist/lib/VoiceControlBar-iWzq7jiw.js.map +1 -0
- package/dist/lib/{Waveform-EahaE6uD.js → Waveform-CtI9GetQ.js} +3 -3
- package/dist/lib/Waveform-CtI9GetQ.js.map +1 -0
- package/dist/lib/components/common/Badge/Badge.d.ts +1 -9
- package/dist/lib/components/common/Glass/Glass.d.ts +1 -3
- package/dist/lib/components/common/index.js +5 -5
- package/dist/lib/components/composed/index.js +3 -3
- package/dist/lib/components/derived/index.js +3 -3
- package/dist/lib/components/extended/DataGrid/DataGrid.clipboard.d.ts +2 -0
- package/dist/lib/components/extended/DataGrid/DataGrid.d.ts +6 -0
- package/dist/lib/components/extended/DataGrid/DataGrid.features.d.ts +2 -0
- package/dist/lib/components/extended/index.js +1 -1
- package/dist/lib/index.js +12 -12
- package/dist/lib/styles.css +1 -1
- package/dist/lib/tokens.css +29 -34
- package/docs/DATAGRID.md +106 -0
- package/package.json +1 -1
- package/dist/lib/Pagination-AWL5k5zG.js.map +0 -1
- package/dist/lib/Switch-DyKAqvde.js.map +0 -1
- package/dist/lib/Toolbar-DDOaxG3B.js.map +0 -1
- package/dist/lib/VisuallyHidden-DcE0EFpo.js.map +0 -1
- package/dist/lib/VoiceControlBar-Bx016mmz.js.map +0 -1
- package/dist/lib/Waveform-EahaE6uD.js.map +0 -1
package/dist/lib/tokens.css
CHANGED
|
@@ -125,35 +125,14 @@
|
|
|
125
125
|
--radius-xl: 16px;
|
|
126
126
|
--radius-full: 999px; /* a pill — a radius past half its box is a pill and says so */
|
|
127
127
|
--radius-circle: 50%; /* a shape, not a step; a circle cannot be approximated */
|
|
128
|
+
--radius-component-min: 4px;
|
|
129
|
+
--radius-component-max: 10px;
|
|
130
|
+
--radius-component: clamp(var(--radius-component-min), var(--radius-md), var(--radius-component-max));
|
|
128
131
|
|
|
129
|
-
/*
|
|
130
|
-
*
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
* 제각각이 됩니다. 실제로 그랬고, 나란히 놓기 전에는 아무도 못 봤습니다. 고르는 자리를
|
|
134
|
-
* 하나로 모으면 「우리 컨트롤의 모서리」가 한 줄이 됩니다.
|
|
135
|
-
*
|
|
136
|
-
* 참조 구현(Mantine)의 `theme.defaultRadius`와 같은 자리입니다. 다만 그쪽은 컴포넌트가
|
|
137
|
-
* 아무 말도 안 했을 때의 기본값이고, 이건 컨트롤이 이름으로 가리키는 값입니다 — 「기본」이
|
|
138
|
-
* 아니라 「컨트롤의 것」이라고 말해야 나중에 왜 그 값인지 찾을 수 있습니다.
|
|
139
|
-
*/
|
|
140
|
-
--radius-control: var(--radius-sm);
|
|
141
|
-
|
|
142
|
-
/*
|
|
143
|
-
* 무언가를 담는 판의 모서리.
|
|
144
|
-
*
|
|
145
|
-
* 카드·표·팝오버·메뉴가 전부 이걸 가리킵니다. 원래는 각자 `--radius-lg`(12px)를 집었고,
|
|
146
|
-
* 그건 「판은 12px」이 서른다섯 곳에 흩어져 있다는 뜻이었습니다.
|
|
147
|
-
*
|
|
148
|
-
* 값이 8px인 것은 참조 구현(Mantine)의 카드를 재서 나온 값입니다. 12px은 우리가 정한
|
|
149
|
-
* 값이었고 근거가 없었습니다.
|
|
150
|
-
*
|
|
151
|
-
* `--radius-lg`를 그대로 두는 이유: 그 단계는 Modal·Drawer·Sheet가 쓰는 `xl` 바로 아래
|
|
152
|
-
* 자리이고, 스케일 자체를 올리면 모달이 32px이 됩니다. 참조 구현의 모달은 4px입니다.
|
|
153
|
-
* 이름이 같은 단계라도 어느 컴포넌트가 어느 단계를 집는지가 다르므로, 스케일 값이 아니라
|
|
154
|
-
* 집는 자리를 바꿉니다.
|
|
155
|
-
*/
|
|
156
|
-
--radius-surface: var(--radius-md);
|
|
132
|
+
/* Compatibility aliases. Built-in components read the shared role directly so a scoped
|
|
133
|
+
* --radius-component override reaches fields, controls, surfaces and their children. */
|
|
134
|
+
--radius-control: var(--radius-component);
|
|
135
|
+
--radius-surface: var(--radius-component);
|
|
157
136
|
|
|
158
137
|
/* Border width — a hairline, an edge, an emphasis. There is no fourth reason. */
|
|
159
138
|
--border-thin: 1px;
|
|
@@ -618,8 +597,8 @@
|
|
|
618
597
|
* two-tone ring so it survives being drawn on either the accent or the surface. */
|
|
619
598
|
--focus-ring: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);
|
|
620
599
|
/* Fields follow the radius scale within these limits. */
|
|
621
|
-
--radius-field-min:
|
|
622
|
-
--radius-field-max:
|
|
600
|
+
--radius-field-min: var(--radius-component-min);
|
|
601
|
+
--radius-field-max: var(--radius-component-max);
|
|
623
602
|
--duration-field-focus: 220ms;
|
|
624
603
|
--ease-field-focus: cubic-bezier(0.16, 1, 0.3, 1);
|
|
625
604
|
--field-shadow: 0 1px 2px 0 rgb(0 0 0 / 4%);
|
|
@@ -881,11 +860,18 @@
|
|
|
881
860
|
* doubling it would change nothing, because it is already past the limit.
|
|
882
861
|
* --radius-circle a shape. An avatar at `sharp` is still round or it is not an avatar.
|
|
883
862
|
*
|
|
884
|
-
* The
|
|
885
|
-
*
|
|
886
|
-
*
|
|
887
|
-
* chip that asked for `sm` both follow and keep their relationship to each other.
|
|
863
|
+
* The primitive ramp remains available for reference. Built-in rounded components use the
|
|
864
|
+
* shared role instead: sharp 4px, default 8px, round 10px. Shapes and joined edges keep their
|
|
865
|
+
* own contracts.
|
|
888
866
|
*/
|
|
867
|
+
/* An explicit default scope also resets a sharp or round ancestor. */
|
|
868
|
+
[data-radius="soft"] {
|
|
869
|
+
--radius-sm: 4px;
|
|
870
|
+
--radius-md: 8px;
|
|
871
|
+
--radius-lg: 12px;
|
|
872
|
+
--radius-xl: 16px;
|
|
873
|
+
}
|
|
874
|
+
|
|
889
875
|
[data-radius="sharp"] {
|
|
890
876
|
--radius-sm: 2px;
|
|
891
877
|
--radius-md: 4px;
|
|
@@ -900,6 +886,15 @@
|
|
|
900
886
|
--radius-xl: 32px;
|
|
901
887
|
}
|
|
902
888
|
|
|
889
|
+
/* Re-evaluate the shared role within nested scopes; the primitive ramp stays intact. */
|
|
890
|
+
[data-radius="sharp"],
|
|
891
|
+
[data-radius="soft"],
|
|
892
|
+
[data-radius="round"] {
|
|
893
|
+
--radius-component: clamp(var(--radius-component-min), var(--radius-md), var(--radius-component-max));
|
|
894
|
+
--radius-control: var(--radius-component);
|
|
895
|
+
--radius-surface: var(--radius-component);
|
|
896
|
+
}
|
|
897
|
+
|
|
903
898
|
/*
|
|
904
899
|
* DENSITY — the space scale, and nothing else.
|
|
905
900
|
*
|
package/docs/DATAGRID.md
CHANGED
|
@@ -70,6 +70,26 @@ const columns: DataGridColumn<Order>[] = [
|
|
|
70
70
|
예제가 제공하는 서버 계약은 검색·필터·정렬·페이지입니다. 그룹·집계를 처리할 서버가 없는 이 예제에서는
|
|
71
71
|
해당 조작을 끕니다. DataGrid API는 서버 그룹·집계 상태와 사전 계산 값을 받을 수 있습니다.
|
|
72
72
|
|
|
73
|
+
## 행별 선택과 셀별 편집 제한
|
|
74
|
+
|
|
75
|
+
`isRowSelectable(row)`는 선택 가능한 행을 제한합니다. 체크박스·Space·전체/그룹 선택에 같은
|
|
76
|
+
조건을 적용합니다. `isCellEditable(row, column)`은 열의 `editable` 조건을 셀별로 더 제한합니다.
|
|
77
|
+
`onCellCommit`이 없거나 저장 중인 셀은 이 값과 관계없이 편집할 수 없습니다. 두 callback은
|
|
78
|
+
기존 controlled 모드와 전체 기능 모드에서 사용할 수 있습니다.
|
|
79
|
+
|
|
80
|
+
```tsx
|
|
81
|
+
<DataGrid rows={orders} columns={columns} rowKey={row => row.id} label="주문"
|
|
82
|
+
features="all"
|
|
83
|
+
isRowSelectable={row => row.status !== 'locked'}
|
|
84
|
+
isCellEditable={(row, column) => row.status === 'draft' && column.id === 'note'}
|
|
85
|
+
onCellCommit={saveDraft} />
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
편집 도중 조건이 바뀌면 commit 직전에 다시 확인합니다. 제한된 입력은 readonly가 되며
|
|
89
|
+
초안을 보존합니다. Escape로 닫거나 조건이 복원된 뒤 저장할 수 있습니다. 제한 callback은
|
|
90
|
+
호스트가 준 `selectedKeys`를 자동으로 지우지 않습니다. 호스트는 작업 실행 시 대상과 권한을
|
|
91
|
+
다시 확인해야 합니다. 이 UI 제한은 서버 인증·권한 검사를 대체하지 않습니다.
|
|
92
|
+
|
|
73
93
|
## 열 데이터와 표시
|
|
74
94
|
|
|
75
95
|
| 열 설정 | 의미 |
|
|
@@ -92,6 +112,75 @@ const columns: DataGridColumn<Order>[] = [
|
|
|
92
112
|
필터 후보 개수와 집계는 필터를 반영한 데이터 기준이며 현재 렌더링한 가상 행의 합계가 아닙니다.
|
|
93
113
|
기존 `footer(rows)` callback의 rows는 전달한 원본 rows입니다. 전체 결과의 집계가 필요하면 aggregation이나 서버 totals를 사용합니다.
|
|
94
114
|
|
|
115
|
+
## 선택 범위와 해제
|
|
116
|
+
|
|
117
|
+
행 선택 요약은 현재 페이지에 포함된 선택과 그 밖의 선택을 나눠 표시합니다. 가상화로 DOM에
|
|
118
|
+
렌더링된 행 수가 아니라 현재 페이지 모델을 기준으로 계산합니다. Basic 모드는 호스트가 전달한
|
|
119
|
+
현재 목록을 기준으로 표시합니다. 그룹 행은 그 그룹의 실제 대상 행을 기준으로 셉니다.
|
|
120
|
+
|
|
121
|
+
`행 선택 해제`는 행의 selectedKeys만 비웁니다. 검색·필터·정렬·페이지·열 배치·셀 범위는 유지합니다.
|
|
122
|
+
호스트가 controlled selectedKeys를 사용하면 onSelectedChange/onStateChange에서 새 값을 반영해야 합니다.
|
|
123
|
+
현재 페이지 밖에는 다른 페이지, 필터로 가려진 행, 현재 전달되지 않은 ID가 포함될 수 있습니다.
|
|
124
|
+
그 상세 원인이나 서버에서 삭제된 여부를 추정하지 않습니다. 전체 검색 결과를 선택하는 기능은 아닙니다.
|
|
125
|
+
|
|
126
|
+
## 실행 가능한 메뉴와 긴 셀 내용
|
|
127
|
+
|
|
128
|
+
선택 열 헤더는 전체 선택 Checkbox만 표시합니다. 보이는 ‘행 작업’ 라벨은 사용하지 않습니다.
|
|
129
|
+
헤더의 접근성 이름과 Checkbox의 ‘현재 페이지 전체 선택’ 이름은 유지합니다. Checkbox 전용 열은
|
|
130
|
+
56px이며 좌우 패딩은 기본4px입니다. Checkbox는 가로·세로 중앙 정렬합니다.
|
|
131
|
+
행 설정 메뉴를 함께 사용하면128px입니다.
|
|
132
|
+
|
|
133
|
+
전체 기능 모드의 메뉴는 현재 정렬·고정 상태를 글로 표시합니다. 적용된 단일 정렬, 고정 해제할
|
|
134
|
+
대상이 없는 경우, 첫/마지막 열의 이동, 기본 너비 초기화는 비활성화합니다. 평면 데이터의
|
|
135
|
+
모두 펼치기도 비활성화합니다. 공개 열 ID만 columnOrder에 지정해도 내부 행 작업 열을
|
|
136
|
+
뒤로 보내지 않습니다. 명시한 고정 열은 별도로 고정 위치를 따릅니다.
|
|
137
|
+
|
|
138
|
+
셀을 선택한 뒤 `셀 내용 보기` 또는 `Alt+Enter`로 렌더링된 전체 텍스트를 확인할 수 있습니다.
|
|
139
|
+
패널의 내용은 줄바꿈·스크롤할 수 있습니다. Escape로 닫으면 도구 버튼으로 포커스가 돌아갑니다.
|
|
140
|
+
셀의 ReactNode를 다시 실행하거나 새 동작으로 복제하지 않고 현재 표시된 textContent를 읽습니다.
|
|
141
|
+
행 작업 열과 데이터가 없을 때는 버튼이 비활성화됩니다. Basic 모드의 별도 상세 보기는 호스트가 구성합니다.
|
|
142
|
+
|
|
143
|
+
## 집계 표시와 복사
|
|
144
|
+
|
|
145
|
+
`column.formatAggregation(value)`는 그룹의 집계 셀과 client 집계 footer를 그립니다.
|
|
146
|
+
여러 집계를 지정하면 value는 sum/mean 등의 키를 가진 객체입니다. 통화·소수점·빈 값 표현은
|
|
147
|
+
이 callback에서 정합니다. 생략하면 기존 집계 이름과 숫자 구분 기호로 표시합니다.
|
|
148
|
+
일반 셀의 `cell(row)`, 서버의 `features.totals`, `footer(rows)`는 호출자가 지정한 표시를 유지합니다.
|
|
149
|
+
정렬·필터·집계 계산에는 accessor의 원시값을 사용합니다.
|
|
150
|
+
|
|
151
|
+
선택 셀의 TSV 복사는 기본적으로 원시값을 사용합니다. 화면의 ReactNode를 문자열로 추측하지 않습니다.
|
|
152
|
+
`features.formatClipboardValue(value)`를 제공하면 선택한 각 원시값을 문자열로 바꿀 수 있습니다.
|
|
153
|
+
집계 객체도 그대로 전달합니다. 탭·개행은 셀 구분을 깨지 않도록 공백으로 바꿉니다.
|
|
154
|
+
화면 formatter와 복사 formatter는 서로 독립적이며 단위를 포함할지는 호스트가 정합니다.
|
|
155
|
+
|
|
156
|
+
## 열 정렬
|
|
157
|
+
|
|
158
|
+
Basic과 전체 기능 모드는 `align`을 헤더·셀·footer에 적용합니다. `numeric: true`인 열은
|
|
159
|
+
기본 end 정렬이며, 명시한 `align: "start"`가 우선합니다. RTL에서도 start/end는 논리 방향을
|
|
160
|
+
따릅니다. 숫자 내용은 LTR로 분리해 음수 부호와 소수점 순서를 유지합니다.
|
|
161
|
+
|
|
162
|
+
## 트리 단계 표시
|
|
163
|
+
|
|
164
|
+
전체 기능 모드에서 getSubRows·grouping으로 만든 단계는 첫 번째 보이는 데이터 열에 표시합니다.
|
|
165
|
+
행 작업 열은 제외합니다. 단계마다 `--space-4`만큼 들여쓰며 기본 토큰에서는 16px입니다.
|
|
166
|
+
자식이 없는 행도 펼치기 버튼 자리를 남겨 같은 단계의 이름을 맞춥니다. 다른 데이터 열은
|
|
167
|
+
들여쓰지 않습니다. 열 순서·숨김·고정이 바뀌면 첫 데이터 열을 다시 선택합니다.
|
|
168
|
+
|
|
169
|
+
하위 행 토글과 상세 패널 토글은 접근성 이름을 구분합니다. 그룹 기준 열을 숨긴 경우에도
|
|
170
|
+
첫 데이터 열에 그룹 이름을 표시합니다. 깊은 트리는 이름 공간이 줄어드므로 충분한 열 너비를
|
|
171
|
+
제공해야 합니다. 실제 스크린리더 전체 검증과 lazy tree 서버 구현은 별도 항목입니다.
|
|
172
|
+
|
|
173
|
+
## 빈 검색 결과 복구
|
|
174
|
+
|
|
175
|
+
전체 기능 모드는 검색·필터 조건이 있는 빈 결과에 `검색·필터 해제` 버튼을 표시합니다.
|
|
176
|
+
이 버튼은 검색과 열 필터를 함께 비우고 첫 페이지로 돌아갑니다. 정렬·행 선택·열 설정·셀 범위는
|
|
177
|
+
유지합니다. onStateChange는 완성된 상태로 한 번 호출하므로 서버 모드의 호스트도 한 번에 조회할 수 있습니다.
|
|
178
|
+
controlled state는 호스트가 새 값을 반영해야 합니다.
|
|
179
|
+
|
|
180
|
+
복구 후 포커스는 검색 필드로 돌아갑니다. 검색 필드가 없으면 첫 열 필터, 열 설정 버튼 순서로
|
|
181
|
+
이동합니다. `empty`로 지정한 안내는 유지합니다. 조건 없는 빈 결과에는 해제 버튼을 표시하지 않습니다.
|
|
182
|
+
Basic 모드의 검색·필터는 호스트가 관리하므로 `empty`에 안내와 복구 동작을 함께 구성합니다.
|
|
183
|
+
|
|
95
184
|
## 키보드와 편집
|
|
96
185
|
|
|
97
186
|
| 입력 | 동작 |
|
|
@@ -114,6 +203,10 @@ const columns: DataGridColumn<Order>[] = [
|
|
|
114
203
|
그룹 선택은 실제 데이터 ID만 전달합니다. 다른 페이지의 선택은 유지합니다.
|
|
115
204
|
편집 중인 행은 가상 범위 밖에서도 DOM에 남습니다. 스크롤만으로 저장하지 않습니다.
|
|
116
205
|
저장 실패의 `cellState.draft`를 유지하면 입력 복구 버튼으로 해당 페이지·열·편집기를 다시 엽니다.
|
|
206
|
+
저장중·실패는 대상 셀에도 표시합니다. pending/error와 draft를 함께 받으면 미저장 값을 셀에
|
|
207
|
+
보여주며 저장된 원본으로 표시하지 않습니다. 빈 문자열 초안은 `빈 값`으로 구분합니다.
|
|
208
|
+
실패한 셀에서 입력 복구를 누를 수 있고, 편집 조건이 제한되면 복구 동작을 숨기되 초안과 오류는
|
|
209
|
+
유지합니다. 전체 오류 설명과 live 알림은 기존 하단 상태 목록을 사용해 같은 오류를 중복 알리지 않습니다.
|
|
117
210
|
저장과 validation은 기존 `onCellCommit`의 호출자가 처리합니다. DataGrid가 서버 저장 성공을 가정하지 않습니다.
|
|
118
211
|
|
|
119
212
|
## 가상화와 지원 범위
|
|
@@ -129,3 +222,16 @@ const columns: DataGridColumn<Order>[] = [
|
|
|
129
222
|
|
|
130
223
|
공식 범위는 [TanStack Features](https://tanstack.com/table/latest/docs/guide/features)와
|
|
131
224
|
[Virtual API](https://tanstack.com/virtual/latest/docs/api/virtualizer)를 기준으로 했습니다.
|
|
225
|
+
|
|
226
|
+
## 0.2.2 후보의 1차 안정화
|
|
227
|
+
|
|
228
|
+
- 실제 렌더링 높이와 가변 높이 cache를 유지해 Compact의 행·선택선·병합 겹침을 막습니다.
|
|
229
|
+
- 가로 가상화 중 필터 입력과 메뉴를 연 행/열을 유지합니다. 메뉴를 닫으면 버튼으로 복귀합니다.
|
|
230
|
+
- 키보드 이동 후 sticky 요소와 페이지 viewport를 함께 고려해 focus를 보이게 합니다.
|
|
231
|
+
- 그룹의 복합 집계 객체도 TSV로 복사합니다. 배열과 Date도 안전한 문자열로 변환합니다.
|
|
232
|
+
- 숫자 범위 필터는 실제 글꼴 기준 입력10ch·패딩·보더에서 최소 너비를 측정합니다. 이보다 작은 size/minSize/maxSize/controlled columnSizes는 화면에서 안전 최소값으로 제한합니다.
|
|
233
|
+
- 고정 그룹 헤더를 start/center/end로 나누어 leaf와 같은 offset으로 배치합니다.
|
|
234
|
+
|
|
235
|
+
후속 안정화에서 숫자 정렬·집계 formatter·선택 범위/해제·셀별 저장 상태와 복구·메뉴 상태를 보완했습니다.
|
|
236
|
+
좁은 화면의 모든 고정 열 조합과 실제 스크린리더·OS IME 검증은 후속 항목으로 남깁니다.
|
|
237
|
+
이번 안정화가 기업용 업무 전체 수용을 뜻하지 않습니다.
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Pagination-AWL5k5zG.js","names":[],"sources":["../../src/foundation/focus.ts","../../src/components/composed/Disclosure/Disclosure.tsx","../../src/components/composed/Field/Field.tsx","../../src/components/composed/Menu/scope.tsx","../../src/components/composed/Menu/Menu.tsx","../../src/components/composed/Pagination/Pagination.tsx"],"sourcesContent":["/*\n * 스스로를 지우는 컨트롤이 초점을 데려가지 않게 합니다.\n *\n * 닫기 버튼은 자기가 닫는 것 안에 있습니다. 눌러서 그것이 사라지면 눌린 버튼도 함께\n * 사라지고 초점은 `<body>`로 떨어집니다 — 다음 Tab이 문서 처음부터 다시 시작한다는\n * 뜻이고, 키보드로 읽던 사람은 있던 자리를 통째로 잃습니다.\n *\n * `FilterBar`와 `BulkActionBar`는 자기가 살아남으므로 사라진 뒤에 효과를 돌려 해결했지만,\n * `Callout`이나 `QuantityStepper`처럼 자기가 통째로 사라지는 것은 그 방법을 쓸 수 없습니다.\n * 그래서 아직 붙어 있는 동안 갈 곳을 찾아 두고, 한 프레임 뒤에 **정말 사라졌는지** 보고\n * 옮깁니다.\n *\n * 「정말 사라졌는지」가 핵심입니다. 호출부가 콜백을 무시해 아직 화면에 있으면 초점은\n * 눌린 버튼에 그대로 있고, 그때 초점을 옮기는 것은 무례한 짓입니다. `<body>`에 있을\n * 때만 옮깁니다 — `FilterBar`가 같은 이유로 같은 검사를 합니다.\n */\n\nconst FOCUSABLE =\n 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\n\nfunction focusables(): HTMLElement[] {\n return [...document.querySelectorAll<HTMLElement>(FOCUSABLE)].filter(\n (node) => !node.closest('[aria-hidden=\"true\"]') && node.offsetParent !== null,\n );\n}\n\n/**\n * `leaving`이 사라진 뒤 초점이 갈 자리를 지금 정해 두고, 옮기는 일을 돌려줍니다.\n *\n * 문서 순서에서 그 요소 **뒤**의 첫 초점 가능한 것, 없으면 **앞**의 마지막 것입니다.\n * 뒤를 먼저 보는 이유는 목록에서 한 줄을 지우면 읽던 자리가 다음 줄로 이어지기\n * 때문이고, 마지막 줄을 지웠을 때만 앞으로 돌아갑니다.\n *\n * 돌려받은 것을 `onDismiss`·`onRemove`를 부른 **뒤에** 호출합니다.\n */\nexport function handOffFocus(leaving: HTMLElement | null): () => void {\n if (!leaving) return () => {};\n\n const all = focusables();\n const inside = (node: HTMLElement) => leaving.contains(node);\n const after = all.find((node) => !inside(node) && leaving.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_FOLLOWING);\n const before = [...all].reverse().find((node) => !inside(node) && leaving.compareDocumentPosition(node) & Node.DOCUMENT_POSITION_PRECEDING);\n const target = after ?? before ?? null;\n\n return () => {\n if (!target) return;\n /* 한 프레임 뒤. 그 사이에 호출부가 지웠는지 아닌지가 정해집니다. */\n requestAnimationFrame(() => {\n const now = document.activeElement;\n if (now && now !== document.body) return;\n if (!target.isConnected) return;\n target.focus();\n });\n };\n}\n","import type { ReactNode } from \"react\";\nimport { ChevronDown } from \"lucide-react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { Icon } from \"../../common/Icon\";\nimport \"./Disclosure.css\";\n\nexport type DisclosureProps = {\n summary: ReactNode;\n children: ReactNode;\n /** Open to begin with. Uncontrolled — the element keeps its own state. */\n defaultOpen?: boolean;\n /** Controlled, for an accordion that allows only one open at a time. */\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n icon?: LucideIcon;\n /** The end of the summary row — a count, a badge, a status. Never a control. */\n aside?: ReactNode;\n /** No border and no ground, for a run of them inside something that already has both. */\n plain?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * A heading that opens.\n *\n * A real `<details>` and `<summary>`, which is the whole point. The element gives the\n * expanded state to assistive technology without an `aria-expanded` to keep in sync, works\n * with the keyboard on its own, and — the part that is hard to rebuild — lets the browser's\n * find-in-page open it to show a match that is inside it. A `<div>` with a click handler\n * hides that text from Ctrl+F entirely.\n */\nexport function Disclosure({\n summary,\n children,\n defaultOpen,\n open,\n onOpenChange,\n icon,\n aside,\n plain,\n className,\n ...rest\n}: DisclosureProps) {\n /*\n * Controlled means the element does not toggle itself.\n *\n * `<details>` is not an input: React cannot hold its `open` attribute, so the browser flips\n * it on click and React puts it back on the next render. Left to `onToggle`, that reset\n * fires a *second* toggle — and in a one-open-at-a-time accordion the section being closed\n * reports \"closed\" and clears the state for the one that was just opened, so everything\n * ends up shut. Intercepting the click is what makes `open` mean what it says.\n */\n const controlled = open !== undefined;\n\n return (\n <details\n {...rest}\n className={`disclosure ${className ?? \"\"}`.trim()}\n data-plain={plain ? \"\" : undefined}\n open={open ?? defaultOpen}\n /*\n * Controlled or not, what the element ends up doing is reported.\n *\n * The click is intercepted below, but that is not the only way this opens: find-in-page\n * opens a closed `<details>` to show the match, and nothing tells React. State stayed\n * closed while the DOM stayed open, and the next click — computing `!open` from the\n * stale state — asked for the state it already had, so the section could not be closed\n * again. Reporting the element's own `open` back keeps the two in step.\n */\n onToggle={(event) => {\n const now = (event.currentTarget as HTMLDetailsElement).open;\n if (controlled && now === open) return;\n onOpenChange?.(now);\n }}\n >\n <summary\n className=\"disclosure__summary\"\n onClick={\n controlled\n ? (event) => {\n event.preventDefault();\n onOpenChange?.(!open);\n }\n : undefined\n }\n >\n <Icon icon={ChevronDown} size=\"sm\" className=\"disclosure__chevron\" />\n {icon ? <Icon icon={icon} size=\"sm\" className=\"disclosure__icon\" /> : null}\n <span className=\"disclosure__label\">{summary}</span>\n {aside ? <span className=\"disclosure__aside\">{aside}</span> : null}\n </summary>\n <div className=\"disclosure__body\">{children}</div>\n </details>\n );\n}\n\nexport type AccordionProps = {\n children: ReactNode;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * A run of disclosures.\n *\n * It does not enforce \"one open at a time\", and that is deliberate: closing a section a\n * reader opened, because they opened another one, is the behaviour people complain about\n * most in an accordion. An adopter who wants it holds the state and passes `open` to each —\n * `Disclosure` takes it — and then it is their decision rather than one this component made\n * for every use of it.\n */\nexport function Accordion({ children, className, ...rest }: AccordionProps) {\n return (\n <div {...rest} className={`accordion ${className ?? \"\"}`.trim()}>\n {children}\n </div>\n );\n}\n","import { useId } from \"react\";\nimport type { ReactNode } from \"react\";\nimport { VisuallyHidden } from \"../../common/VisuallyHidden\";\nimport \"./Field.css\";\n\nexport type FieldSize = \"sm\" | \"md\" | \"lg\";\nexport type FieldLayout = \"stacked\" | \"inline\";\n\n/**\n * What a control needs in order to be part of a field.\n *\n * Handed to `children` rather than pushed onto them. The alternative — cloning the child and\n * writing these in — works until the child is wrapped in anything at all, and then it fails\n * silently: the label points at nothing and nobody notices, because the field still looks\n * right.\n */\nexport type FieldControl = {\n id: string;\n /** The visible label, said a second way — see where this is handed over below. */\n \"aria-labelledby\": string;\n /** The hint, the error, or both, in the order a reader should hear them. */\n \"aria-describedby\": string | undefined;\n \"aria-invalid\": true | undefined;\n required: boolean | undefined;\n invalid: boolean;\n};\n\ntype FieldBase = {\n label: ReactNode;\n children: (field: FieldControl) => ReactNode;\n /** How to fill it in. Said before the reader starts, not after they get it wrong. */\n hint?: ReactNode;\n /** What is wrong with it. Announced when it appears, because it appears after a submit. */\n error?: ReactNode;\n size?: FieldSize;\n layout?: FieldLayout;\n /** The label leaves the screen and stays in the accessibility tree. */\n labelHidden?: boolean;\n id?: string;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/**\n * Required or optional, never both.\n *\n * A field wearing an asterisk *and* the word \"선택\" tells the reader two opposite things at\n * once, and nothing stopped it: the two flags are answers to the same question, so the type\n * makes them exclusive.\n *\n * `optional` says \"선택\" instead of marking the required ones — the right choice when most of\n * a form is required, because marking eleven fields and leaving one unmarked makes the\n * exception the thing that is hard to find.\n */\nexport type FieldProps = FieldBase &\n ({ required?: boolean; optional?: never } | { required?: never; optional?: boolean });\n\n/**\n * A control, and everything a reader needs in order to answer it.\n *\n * The wiring is handed to `children` as a function rather than cloned onto them, because a\n * label that points at nothing looks exactly like a label that works.\n */\nexport function Field({\n label,\n children,\n hint,\n error,\n required,\n optional,\n size = \"md\",\n layout = \"stacked\",\n labelHidden,\n id,\n className,\n ...rest\n}: FieldProps) {\n const generated = useId();\n const fieldId = id ?? generated;\n const labelId = `${fieldId}-label`;\n const hintId = `${fieldId}-hint`;\n const errorId = `${fieldId}-error`;\n const invalid = Boolean(error);\n\n /*\n * The error first. `aria-describedby` is read in the order the ids are listed, not in\n * document order, and a reader who has just failed to submit needs the problem before the\n * instructions they already read once.\n */\n const describedBy = [invalid ? errorId : null, hint ? hintId : null].filter(Boolean).join(\" \");\n\n return (\n <div\n {...rest}\n className={`field ${className ?? \"\"}`.trim()}\n data-size={size}\n data-layout={layout}\n data-invalid={invalid ? \"\" : undefined}\n data-label-hidden={labelHidden ? \"\" : undefined}\n >\n <div className=\"field__head\">\n <label className=\"field__label\" id={labelId} htmlFor={fieldId}>\n {labelHidden ? <VisuallyHidden>{label}</VisuallyHidden> : label}\n {/* An asterisk is a punctuation mark to a screen reader, and some skip it entirely.\n * The word is there for them and the mark is there for everyone else; `required`\n * on the control is what actually carries the state. */}\n {required && !labelHidden ? (\n <span className=\"field__required\" aria-hidden=\"true\">*</span>\n ) : null}\n {required ? <VisuallyHidden> (필수)</VisuallyHidden> : null}\n </label>\n {optional && !labelHidden ? <span className=\"field__optional\">선택</span> : null}\n {/* Same trade as `required` above: the visible word has nowhere to sit when the label\n * is hidden, so the spoken one carries it alone. Without this the fact that a field\n * is optional simply disappeared for anyone not looking at the screen. */}\n {optional && labelHidden ? <VisuallyHidden>(선택)</VisuallyHidden> : null}\n </div>\n\n {hint ? (\n <p className=\"field__hint\" id={hintId}>\n {hint}\n </p>\n ) : null}\n\n <div className=\"field__control\">\n {children({\n id: fieldId,\n /*\n * The `<label for>` above already names the control, and this says the same thing a\n * second way. It is here for the controls that carry a name of their own — `Combobox`\n * and `DatePicker` write an `aria-label`, which outranks a `<label>` and would leave\n * the visible words and the spoken ones free to disagree. They stand down when this\n * arrives.\n */\n \"aria-labelledby\": labelId,\n \"aria-describedby\": describedBy || undefined,\n \"aria-invalid\": invalid || undefined,\n required: required || undefined,\n invalid,\n })}\n </div>\n\n {/*\n * Mounted whether or not there is an error, and empty when there is not.\n *\n * A live region that appears at the same moment as its text announces nothing in\n * several screen readers — the region has to be there first for the change to be a\n * change. This is why an error that arrives after a failed submit is heard at all.\n */}\n <p className=\"field__error\" id={errorId} aria-live=\"polite\" data-part=\"error\">\n {error}\n </p>\n </div>\n );\n}\n","import { cloneElement, forwardRef, useLayoutEffect, useState, type ReactElement, type ReactNode, type Ref } from \"react\";\n\nconst ATTRIBUTES = [\"data-theme\", \"data-brand\", \"data-density\", \"data-radius\", \"data-look\"] as const;\ntype Scope = Record<(typeof ATTRIBUTES)[number], string | undefined>;\n\n/** Preserve built-in variation scopes without copying computed paint or moving the portal. */\nexport function useMenuScopes() {\n const [trigger, setTrigger] = useState<HTMLElement | null>(null);\n const [scopes, setScopes] = useState<Scope[]>([]);\n useLayoutEffect(() => {\n if (!trigger) return;\n const ancestors: HTMLElement[] = [];\n // body and html already contain the portal. Keep empty levels so attribute changes do\n // not change the wrapper tree and remount a focused menu.\n for (let node: HTMLElement | null = trigger; node && node !== trigger.ownerDocument.body; node = node.parentElement) {\n ancestors.unshift(node);\n }\n const read = () => setScopes(ancestors.map((node) => ({\n \"data-theme\": node.getAttribute(\"data-theme\") ?? undefined,\n \"data-brand\": node.getAttribute(\"data-brand\") ?? undefined,\n \"data-density\": node.getAttribute(\"data-density\") ?? undefined,\n \"data-radius\": node.getAttribute(\"data-radius\") ?? undefined,\n \"data-look\": node.getAttribute(\"data-look\") ?? undefined,\n })));\n read();\n const observer = new MutationObserver(read);\n for (const node of ancestors) observer.observe(node, { attributes: true, attributeFilter: [...ATTRIBUTES] });\n return () => observer.disconnect();\n }, [trigger]);\n return { scopes, setTrigger };\n}\n\nexport const MenuPortalScope = forwardRef<HTMLDivElement, {\n scopes: Scope[];\n children: ReactElement<{ ref?: Ref<HTMLDivElement> }>;\n}>(function MenuPortalScope({ scopes, children }, ref) {\n return scopes.reduceRight<ReactNode>((content, scope, index) => (\n <div key={index} className=\"menu__scope\"\n data-theme={scope[\"data-theme\"]}\n data-brand={scope[\"data-brand\"]}\n data-density={scope[\"data-density\"]}\n data-radius={scope[\"data-radius\"]}\n data-look={scope[\"data-look\"]}\n >{content}</div>\n // Radix Presence must observe the animated panel, not a display:contents wrapper.\n ), cloneElement(children, { ref }));\n});\n","import type { ReactElement, ReactNode } from \"react\";\nimport * as RadixMenu from \"@radix-ui/react-dropdown-menu\";\nimport { Check, ChevronRight, Circle } from \"lucide-react\";\nimport type { LucideIcon } from \"lucide-react\";\nimport { Icon } from \"../../common/Icon\";\nimport { MenuPortalScope, useMenuScopes } from \"./scope\";\nimport \"./Menu.css\";\n\nexport type MenuSide = \"top\" | \"right\" | \"bottom\" | \"left\";\nexport type MenuAlign = \"start\" | \"center\" | \"end\";\n\nexport type MenuProps = {\n /** The control that opens it. One element, and it must be able to take focus. */\n children: ReactElement;\n /** `MenuItem`, `MenuGroup`, `MenuSeparator` and friends. */\n items: ReactNode;\n side?: MenuSide;\n align?: MenuAlign;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n /**\n * Locks the trigger.\n *\n * `Button` and `IconButton` mark themselves `aria-disabled` and stop their own `onClick`,\n * and Radix opens on `pointerdown` and `keydown` — so a disabled-looking trigger still\n * opened the menu. Passed here, Radix refuses both.\n */\n disabled?: boolean;\n /** The panel's `id`, for a trigger that points at it with `aria-controls`. */\n id?: string;\n className?: string;\n};\n\n/**\n * A list of actions, opened from a control.\n *\n * Radix rather than hand-rolled. A menu is the control with the most keyboard behaviour of\n * anything in this library: type-ahead, arrow keys that stop at either end, Home and End, submenus that\n * open on hover behind a safe triangle and on ArrowRight, ArrowLeft closing one level and\n * Escape closing all of them, focus returned to the trigger, and the whole page made inert\n * while it is up. Rebuilt by hand, one of those is always missing.\n *\n * Not a `<select>`. A menu performs actions; a select chooses a value and submits it with a\n * form. If the thing being pointed at is a value, it is `Select` or `SegmentedControl`.\n *\n * There is no `label` prop, and there was one until it turned out not to work. The menu is\n * named by its trigger — `aria-labelledby` pointing at the button, which takes precedence\n * over any `aria-label` written beside it — and that is the right name anyway: a reader who\n * opened \"보기 설정\" is in the 보기 설정 menu. What it means is that the trigger has to be\n * named well, which for an icon-only one `IconButton` already requires.\n */\nexport function Menu({\n children,\n items,\n side = \"bottom\",\n align = \"start\",\n open,\n onOpenChange,\n disabled,\n id,\n className,\n}: MenuProps) {\n const { scopes, setTrigger } = useMenuScopes();\n return (\n <RadixMenu.Root open={open} onOpenChange={onOpenChange}>\n <RadixMenu.Trigger ref={setTrigger} asChild disabled={disabled}>{children}</RadixMenu.Trigger>\n <RadixMenu.Portal>\n <MenuPortalScope scopes={scopes}>\n {/*\n * The id is spread conditionally rather than written as `id={id}`. Radix sets its own\n * content id first and ours lands after it, so passing `undefined` deleted the id the\n * trigger's `aria-controls` was already pointing at.\n */}\n <RadixMenu.Content\n {...(id ? { id } : null)}\n className={`menu ${className ?? \"\"}`.trim()}\n side={side}\n align={align}\n sideOffset={6}\n collisionPadding={12}\n >\n {items}\n </RadixMenu.Content>\n </MenuPortalScope>\n </RadixMenu.Portal>\n </RadixMenu.Root>\n );\n}\n\nexport type MenuItemProps = {\n children: ReactNode;\n icon?: LucideIcon;\n /** The keystroke that does the same thing. Announced with the item, not instead of it. */\n shortcut?: string;\n /**\n * The item that cannot be undone.\n *\n * Tone is never the only carrier — the label has to say what it deletes — but a destructive\n * item that looks like the five above it is one a reader picks by accident.\n */\n destructive?: boolean;\n disabled?: boolean;\n onSelect?: () => void;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\nexport function MenuItem({\n children,\n icon,\n shortcut,\n destructive,\n disabled,\n onSelect,\n className,\n ...rest\n}: MenuItemProps) {\n return (\n <RadixMenu.Item\n {...rest}\n className={`menu__item ${className ?? \"\"}`.trim()}\n data-destructive={destructive ? \"\" : undefined}\n disabled={disabled}\n onSelect={onSelect}\n >\n {icon ? <Icon icon={icon} size=\"sm\" className=\"menu__icon\" /> : null}\n <span className=\"menu__label\">{children}</span>\n {shortcut ? <kbd className=\"menu__shortcut\">{shortcut}</kbd> : null}\n </RadixMenu.Item>\n );\n}\n\nexport type MenuCheckboxItemProps = {\n children: ReactNode;\n checked: boolean;\n onCheckedChange: (checked: boolean) => void;\n disabled?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\n/** A setting that stays on. Announced as checked, which a plain item is not. */\nexport function MenuCheckboxItem({\n children,\n checked,\n onCheckedChange,\n disabled,\n className,\n ...rest\n}: MenuCheckboxItemProps) {\n return (\n <RadixMenu.CheckboxItem\n {...rest}\n className={`menu__item ${className ?? \"\"}`.trim()}\n checked={checked}\n onCheckedChange={onCheckedChange}\n disabled={disabled}\n >\n <span className=\"menu__mark\" aria-hidden=\"true\">\n <RadixMenu.ItemIndicator>\n <Icon icon={Check} size=\"xs\" />\n </RadixMenu.ItemIndicator>\n </span>\n <span className=\"menu__label\">{children}</span>\n </RadixMenu.CheckboxItem>\n );\n}\n\nexport type MenuRadioGroupProps = {\n children: ReactNode;\n value: string;\n onValueChange: (value: string) => void;\n};\n\nexport function MenuRadioGroup({ children, value, onValueChange }: MenuRadioGroupProps) {\n return (\n <RadixMenu.RadioGroup value={value} onValueChange={onValueChange}>\n {children}\n </RadixMenu.RadioGroup>\n );\n}\n\nexport type MenuRadioItemProps = {\n children: ReactNode;\n value: string;\n disabled?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\nexport function MenuRadioItem({ children, value, disabled, className, ...rest }: MenuRadioItemProps) {\n return (\n <RadixMenu.RadioItem\n {...rest}\n className={`menu__item ${className ?? \"\"}`.trim()}\n value={value}\n disabled={disabled}\n >\n <span className=\"menu__mark\" aria-hidden=\"true\">\n <RadixMenu.ItemIndicator>\n <Icon icon={Circle} size=\"xs\" className=\"menu__dot\" />\n </RadixMenu.ItemIndicator>\n </span>\n <span className=\"menu__label\">{children}</span>\n </RadixMenu.RadioItem>\n );\n}\n\nexport type MenuGroupProps = {\n children: ReactNode;\n /** A heading for the group. Announced when the reader enters it. */\n label?: string;\n};\n\nexport function MenuGroup({ children, label }: MenuGroupProps) {\n return (\n <RadixMenu.Group>\n {label ? <RadixMenu.Label className=\"menu__group-label\">{label}</RadixMenu.Label> : null}\n {children}\n </RadixMenu.Group>\n );\n}\n\nexport function MenuSeparator() {\n return <RadixMenu.Separator className=\"menu__separator\" />;\n}\n\nexport type MenuSubProps = {\n children: ReactNode;\n label: ReactNode;\n icon?: LucideIcon;\n disabled?: boolean;\n};\n\n/** A menu inside a menu. Opens on ArrowRight and on hover; ArrowLeft closes this level, Escape closes the lot. */\nexport function MenuSub({ children, label, icon, disabled }: MenuSubProps) {\n const { scopes, setTrigger } = useMenuScopes();\n return (\n <RadixMenu.Sub>\n <RadixMenu.SubTrigger ref={setTrigger} className=\"menu__item\" disabled={disabled}>\n {icon ? <Icon icon={icon} size=\"sm\" className=\"menu__icon\" /> : null}\n <span className=\"menu__label\">{label}</span>\n <Icon icon={ChevronRight} size=\"xs\" className=\"menu__chevron\" />\n </RadixMenu.SubTrigger>\n <RadixMenu.Portal>\n <MenuPortalScope scopes={scopes}>\n <RadixMenu.SubContent className=\"menu\" sideOffset={4} alignOffset={-4} collisionPadding={12}>\n {children}\n </RadixMenu.SubContent>\n </MenuPortalScope>\n </RadixMenu.Portal>\n </RadixMenu.Sub>\n );\n}\n","import { ChevronLeft, ChevronRight } from \"lucide-react\";\nimport { Icon } from \"../../common/Icon\";\nimport { VisuallyHidden } from \"../../common/VisuallyHidden\";\nimport { useLayoutEffect, useRef, useState } from \"react\";\nimport \"./Pagination.css\";\n\nexport type PaginationProps = {\n page: number;\n pageCount: number;\n onPageChange: (page: number) => void;\n /** What is being paged. \"주문 목록\", \"검색 결과\". Names the navigation. */\n label: string;\n /** How many page numbers to show either side of the current one. */\n siblings?: number;\n /** \"1–20 / 137\" above the numbers, for a reader who wants to know how far in they are. */\n summary?: { from: number; to: number; total: number };\n size?: \"sm\" | \"md\";\n /** Reduce visible numbers to fit the actual container, keeping both arrows together. */\n responsive?: boolean;\n className?: string;\n [key: `data-${string}`]: unknown;\n};\n\nconst range = (from: number, to: number): number[] =>\n Array.from({ length: Math.max(0, to - from + 1) }, (_, index) => from + index);\n\nconst countPages = (value: number) => Number.isFinite(value) ? Math.max(0, Math.floor(value)) : 0;\nconst currentPage = (page: number, count: number) => Math.max(1, Math.min(count || 1, Number.isFinite(page) ? Math.floor(page) : 1));\n\n/**\n * The page list, with gaps where the numbers were left out.\n *\n * Always the first and the last, always the current one and its neighbours, and an ellipsis\n * standing in for the rest. Returned as data rather than rendered here so the gaps can be\n * counted in a test.\n *\n * Always the same number of items, too — `siblings * 2 + 5`, or every page when there are\n * fewer than that. The count used to depend on where the reader was standing: four items on\n * page 1, five on page 2, seven in the middle. The list is centred in its row, so every one\n * of those changes moved the whole row sideways, and the button a reader was aiming at was\n * somewhere else by the time they reached it. Near an end the window widens instead — that\n * is where the pages the reader can use are.\n */\nexport function pageItems(page: number, pageCount: number, siblings = 1): (number | \"gap\")[] {\n pageCount = countPages(pageCount);\n page = currentPage(page, pageCount);\n siblings = Number.isFinite(siblings) ? Math.max(0, Math.min(pageCount, Math.floor(siblings))) : 1;\n const slots = siblings * 2 + 5;\n if (pageCount <= slots) return range(1, pageCount);\n\n const first = 1;\n const last = pageCount;\n /* A gap is only worth drawing when it stands for more than the one page it replaces: with\n * page 2 hidden behind an ellipsis the list is longer than the numbers it left out. */\n const gapBefore = page - siblings > first + 1;\n const gapAfter = page + siblings < last - 1;\n\n /* One `first`, one `last`, and one slot for each ellipsis actually drawn; the numbers in\n * between take whatever is left, which is what keeps the total fixed. */\n const window = slots - 2 - (gapBefore ? 1 : 0) - (gapAfter ? 1 : 0);\n\n if (!gapBefore) return [...range(first, first + window), \"gap\", last];\n if (!gapAfter) return [first, \"gap\", ...range(last - window, last)];\n return [first, \"gap\", ...range(page - siblings, page + siblings), \"gap\", last];\n}\n\n/**\n * Which page of how many.\n *\n * A `<nav>` with a name, because a page of results usually has two of these — one above the\n * table and one below — and \"navigation\" twice tells a reader nothing about either.\n *\n * Every page in the list is a button, the current one included, and `aria-current=\"page\"` is\n * what says which. Pressing the current page does nothing — there is nowhere to go — but it\n * stays a button so that pressing it is possible: as a `<span>` it left the tab order the\n * instant it was clicked, which took the focus of the reader who had just clicked it with\n * them. Their next Tab started at the top of the document, four pages from the list they\n * were walking.\n */\nexport function Pagination({\n page,\n pageCount,\n onPageChange,\n label,\n siblings = 1,\n summary,\n size = \"md\",\n responsive = true,\n className,\n ...rest\n}: PaginationProps) {\n const count = countPages(pageCount);\n const now = currentPage(page, count);\n const root = useRef<HTMLElement>(null);\n const list = useRef<HTMLUListElement>(null);\n const [capacity, setCapacity] = useState<number | null>(null);\n useLayoutEffect(() => {\n if (!responsive || !root.current || !list.current) return;\n let widest = 0;\n let stepWidth = 0;\n const measure = () => {\n const node = list.current;\n if (!node || !root.current) return;\n const style = getComputedStyle(node);\n const gap = parseFloat(style.columnGap) || 0;\n const widths = [...node.querySelectorAll<HTMLElement>(\"button, .pagination__gap\")].map(item => item.getBoundingClientRect().width);\n const nextStepWidth = node.querySelector(\".pagination__step\")?.getBoundingClientRect().width ?? 0;\n if (nextStepWidth !== stepWidth) widest = 0;\n stepWidth = nextStepWidth;\n // Collapsing the list must not shrink its estimate and expand it again.\n widest = Math.max(widest, ...widths, 1);\n const width = widest;\n setCapacity(Math.max(3, Math.floor((root.current.clientWidth + gap) / (width + gap))));\n };\n measure();\n const observer = new ResizeObserver(measure);\n observer.observe(root.current);\n for (const button of list.current.querySelectorAll(\"button\")) observer.observe(button);\n return () => observer.disconnect();\n }, [responsive, size, now, count, siblings]);\n let items = pageItems(now, count, siblings);\n if (responsive && capacity !== null && items.length + 2 > capacity) {\n items = pageItems(now, count, 0);\n if (items.length + 2 > capacity) items = count ? [now] : [];\n }\n /*\n * Nought pages is nowhere to go in either direction.\n *\n * A search that came back with no results draws no page numbers at all, and \"이전\" stayed\n * lit beside them because it only ever asked whether `page` was above 1 — a live button\n * pointing at a page that does not exist.\n */\n const nowhereBack = now <= 1 || count <= 0;\n const nowhereOn = now >= count || count <= 0;\n\n return (\n <nav\n {...rest}\n ref={root}\n className={`pagination ${className ?? \"\"}`.trim()}\n aria-label={label}\n data-size={size}\n >\n {summary ? (\n <p className=\"pagination__summary\">\n <span className=\"pagination__figures\">\n {summary.from.toLocaleString(\"ko-KR\")}–{summary.to.toLocaleString(\"ko-KR\")}\n </span>\n {\" / \"}\n <span className=\"pagination__figures\">{summary.total.toLocaleString(\"ko-KR\")}</span>\n </p>\n ) : null}\n\n <ul className=\"pagination__list\" ref={list}>\n <li>\n <button\n type=\"button\"\n className=\"pagination__step\"\n onClick={() => {\n if (nowhereBack) return;\n onPageChange(now - 1);\n }}\n /* `aria-disabled` and a refused click, the rule Button set: a control that leaves\n * the tab order takes any reader standing on it with it — and on the first page\n * that is exactly where a reader who just paged back to it is standing. */\n aria-disabled={nowhereBack || undefined}\n data-part=\"previous\"\n >\n <Icon icon={ChevronLeft} size=\"sm\" />\n <VisuallyHidden>이전 페이지</VisuallyHidden>\n </button>\n </li>\n\n {items.map((item, index) =>\n item === \"gap\" ? (\n <li key={`gap-${index}`} className=\"pagination__gap\" aria-hidden=\"true\">\n …\n </li>\n ) : (\n <li key={item}>\n {item === now ? (\n <button\n type=\"button\"\n className=\"pagination__page\"\n /* No `aria-disabled`: the page a reader is on is not a control switched\n * off, and announcing it as unavailable says the opposite of \"you are\n * here\". `aria-current` is the whole message. */\n aria-current=\"page\"\n onClick={() => undefined}\n data-part=\"current\"\n >\n <VisuallyHidden>{`${count}페이지 중 `}</VisuallyHidden>\n {item}\n </button>\n ) : (\n <button\n type=\"button\"\n className=\"pagination__page\"\n onClick={() => onPageChange(item)}\n data-part={`page-${item}`}\n >\n <VisuallyHidden>{`${item}페이지로`}</VisuallyHidden>\n <span aria-hidden=\"true\">{item}</span>\n </button>\n )}\n </li>\n ),\n )}\n\n <li>\n <button\n type=\"button\"\n className=\"pagination__step\"\n onClick={() => {\n if (nowhereOn) return;\n onPageChange(now + 1);\n }}\n aria-disabled={nowhereOn || undefined}\n data-part=\"next\"\n >\n <Icon icon={ChevronRight} size=\"sm\" />\n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