sh-ui-cli 0.58.0 → 0.58.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/data/changelog/versions.json +22 -0
- package/data/registry/react/components/sidebar/index.tailwind.tsx +1 -1
- package/data/registry/react/components/sidebar/index.tsx +3 -3
- package/data/registry/react/components/sidebar/styles.css +1 -1
- package/data/registry/react/components/sidebar/styles.module.css +1 -1
- package/package.json +1 -1
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$description": "sh-ui 릴리즈 노트 단일 소스. docs(React)와 showcase(Flutter)가 함께 읽는다. 새 릴리즈마다 맨 앞에 추가.",
|
|
4
4
|
"versions": [
|
|
5
|
+
{
|
|
6
|
+
"version": "0.58.2",
|
|
7
|
+
"date": "2026-05-06",
|
|
8
|
+
"title": "Sidebar — 메뉴 항목 기본 간격 gap 0 → 2px (한글/긴 라벨 가독성)",
|
|
9
|
+
"type": "patch",
|
|
10
|
+
"highlights": [
|
|
11
|
+
"**`SidebarMenu` 기본 `gap` 을 `0` → `2px` (Tailwind `gap-0.5`)** 로 변경 — 한글이나 긴 라벨에서 항목이 너무 촘촘하게 붙어 시각적으로 압축돼 보이던 문제. 디자인 시스템 디폴트 자체가 더 보편적으로 \"이상적\" 이 되도록 한 결정. shadcn/ui 의 `gap-0` 컨벤션과 살짝 갈리지만, sh-ui 의 한글 우선 + Linear 톤 정체성에 더 자연스러움.",
|
|
12
|
+
"**4가지 변종 모두 동기화** — plain CSS (`styles.css`), CSS Modules (`styles.module.css`), Tailwind variant (`index.tailwind.tsx`), apps/docs 듀얼 카피본. 영향: 사용자 화면이 항목당 ~2px 늘어남 — 시각 변화 미세하지만 patch release 노트에 명시.",
|
|
13
|
+
"**디자인 디폴트 가드 — bare 단어 절대 치환 안 함**: 이번 변경은 `SidebarMenu` 의 `gap` 만 손봤고, `SidebarContent` 의 wrapper `gap-0` 은 의도적으로 유지 (그룹 간 간격은 별도 layout 결정)."
|
|
14
|
+
],
|
|
15
|
+
"url": "https://github.com/sanghyeonKim0201/sh-ui/releases/tag/v0.58.2"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"version": "0.58.1",
|
|
19
|
+
"date": "2026-05-06",
|
|
20
|
+
"title": "fix — Sidebar focus trap 의 TS strict 위반 (firstEl/lastEl possibly undefined)",
|
|
21
|
+
"type": "patch",
|
|
22
|
+
"highlights": [
|
|
23
|
+
"**Sidebar `useFocusTrap` 의 TS strict 위반 해소** — `items.length === 0` 가드 후에도 `items[0]` / `items[items.length - 1]` 가 `possibly undefined` 로 잡혀 사용자 프로젝트 (strict tsconfig) 에서 typecheck 실패하던 문제. 가드를 `firstEl`/`lastEl` 직접 null-check 로 재구성 — 동작 동일, TS 만족. 사용자가 sh-ui Sidebar 컴포넌트를 add 후 본인 프로젝트에서 `tsc --noEmit` 돌릴 때 막히던 케이스 해소."
|
|
24
|
+
],
|
|
25
|
+
"url": "https://github.com/sanghyeonKim0201/sh-ui/releases/tag/v0.58.1"
|
|
26
|
+
},
|
|
5
27
|
{
|
|
6
28
|
"version": "0.58.0",
|
|
7
29
|
"date": "2026-05-05",
|
|
@@ -340,7 +340,7 @@ export function SidebarGroupContent({ className, ...props }: React.HTMLAttribute
|
|
|
340
340
|
}
|
|
341
341
|
|
|
342
342
|
export function SidebarMenu({ className, ...props }: React.HTMLAttributes<HTMLUListElement>) {
|
|
343
|
-
return <ul className={cn("list-none m-0 p-0 flex flex-col min-w-0 gap-0", className)} {...props} />;
|
|
343
|
+
return <ul className={cn("list-none m-0 p-0 flex flex-col min-w-0 gap-0.5", className)} {...props} />;
|
|
344
344
|
}
|
|
345
345
|
|
|
346
346
|
export function SidebarMenuItem({ className, ...props }: React.HTMLAttributes<HTMLLIElement>) {
|
|
@@ -51,12 +51,12 @@ function useFocusTrap(
|
|
|
51
51
|
}
|
|
52
52
|
if (e.key !== "Tab") return;
|
|
53
53
|
const items = focusables();
|
|
54
|
-
|
|
54
|
+
const firstEl = items[0];
|
|
55
|
+
const lastEl = items[items.length - 1];
|
|
56
|
+
if (!firstEl || !lastEl) {
|
|
55
57
|
e.preventDefault();
|
|
56
58
|
return;
|
|
57
59
|
}
|
|
58
|
-
const firstEl = items[0];
|
|
59
|
-
const lastEl = items[items.length - 1];
|
|
60
60
|
if (e.shiftKey && document.activeElement === firstEl) {
|
|
61
61
|
e.preventDefault();
|
|
62
62
|
lastEl.focus();
|