sh-ui-cli 0.112.0 → 0.114.0
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 +25 -0
- package/data/registry/react/components/form/field.test.tsx +106 -1
- package/data/registry/react/components/form/field.tsx +179 -23
- package/data/registry/react/components/form/use-sh-ui-form.ts +14 -0
- package/data/registry/react/components/form-rhf/README.md +138 -8
- package/data/registry/react/components/form-rhf/index.tsx +75 -0
- package/data/registry/react/components/form-rhf/rhf.test.tsx +53 -1
- package/data/registry/react/components/label/index.tailwind.tsx +5 -1
- package/data/registry/react/components/label/styles.css +9 -5
- package/data/registry/react/components/label/styles.module.css +7 -5
- package/data/registry/react/components/separator/index.module.tsx +47 -15
- package/data/registry/react/components/separator/index.tailwind.tsx +52 -10
- package/data/registry/react/components/separator/index.tsx +51 -13
- package/data/registry/react/components/separator/styles.css +21 -0
- package/data/registry/react/components/separator/styles.module.css +20 -0
- package/data/registry/react/components/sidebar/index.module.tsx +57 -0
- package/data/registry/react/components/sidebar/index.tailwind.tsx +68 -1
- package/data/registry/react/components/sidebar/index.tsx +57 -0
- package/data/registry/react/components/sidebar/styles.css +77 -0
- package/data/registry/react/components/sidebar/styles.module.css +77 -0
- package/data/registry/react/tokens-used.json +5 -3
- package/data/summaries/react.json +1 -1
- package/package.json +1 -1
|
@@ -433,6 +433,15 @@
|
|
|
433
433
|
margin: 0;
|
|
434
434
|
}
|
|
435
435
|
|
|
436
|
+
/* trailing 슬롯(badge/action)이 있으면 내부 button/anchor 에 우측 패딩을 확보해
|
|
437
|
+
* 라벨이 trailing 요소 밑으로 들어가지 않게 한다. */
|
|
438
|
+
.sh-ui-sidebar__menu-item:has(.sh-ui-sidebar__menu-badge) > a,
|
|
439
|
+
.sh-ui-sidebar__menu-item:has(.sh-ui-sidebar__menu-badge) > button,
|
|
440
|
+
.sh-ui-sidebar__menu-item:has(.sh-ui-sidebar__menu-action) > a,
|
|
441
|
+
.sh-ui-sidebar__menu-item:has(.sh-ui-sidebar__menu-action) > button {
|
|
442
|
+
padding-inline-end: 2rem;
|
|
443
|
+
}
|
|
444
|
+
|
|
436
445
|
.sh-ui-sidebar__menu-button {
|
|
437
446
|
display: flex;
|
|
438
447
|
width: 100%;
|
|
@@ -499,6 +508,73 @@
|
|
|
499
508
|
font-size: 0.9375rem;
|
|
500
509
|
}
|
|
501
510
|
|
|
511
|
+
/* ───────────── Menu trailing slots (badge / action) ───────────── */
|
|
512
|
+
.sh-ui-sidebar__menu-badge {
|
|
513
|
+
position: absolute;
|
|
514
|
+
right: var(--space-2);
|
|
515
|
+
top: 50%;
|
|
516
|
+
transform: translateY(-50%);
|
|
517
|
+
display: flex;
|
|
518
|
+
align-items: center;
|
|
519
|
+
justify-content: center;
|
|
520
|
+
height: 1.25rem;
|
|
521
|
+
min-width: 1.25rem;
|
|
522
|
+
padding: 0 0.25rem;
|
|
523
|
+
font-size: var(--text-xs);
|
|
524
|
+
font-weight: var(--weight-medium);
|
|
525
|
+
font-variant-numeric: tabular-nums;
|
|
526
|
+
color: var(--sidebar-fg);
|
|
527
|
+
pointer-events: none;
|
|
528
|
+
user-select: none;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.sh-ui-sidebar__menu-action {
|
|
532
|
+
position: absolute;
|
|
533
|
+
right: var(--space-1);
|
|
534
|
+
top: 50%;
|
|
535
|
+
transform: translateY(-50%);
|
|
536
|
+
display: flex;
|
|
537
|
+
align-items: center;
|
|
538
|
+
justify-content: center;
|
|
539
|
+
width: 1.5rem;
|
|
540
|
+
height: 1.5rem;
|
|
541
|
+
border: none;
|
|
542
|
+
border-radius: calc(var(--radius) - 2px);
|
|
543
|
+
background: transparent;
|
|
544
|
+
color: var(--foreground-muted);
|
|
545
|
+
cursor: pointer;
|
|
546
|
+
transition: background-color var(--duration-fast), color var(--duration-fast), opacity var(--duration-fast);
|
|
547
|
+
}
|
|
548
|
+
.sh-ui-sidebar__menu-action > svg {
|
|
549
|
+
width: 1rem;
|
|
550
|
+
height: 1rem;
|
|
551
|
+
flex-shrink: 0;
|
|
552
|
+
}
|
|
553
|
+
.sh-ui-sidebar__menu-action:hover {
|
|
554
|
+
background: var(--sidebar-accent);
|
|
555
|
+
color: var(--sidebar-accent-fg);
|
|
556
|
+
}
|
|
557
|
+
.sh-ui-sidebar__menu-action:focus-visible {
|
|
558
|
+
outline: var(--border-width-strong) solid var(--ring);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
/* showOnHover — 행 hover/포커스 시에만 노출. 부모 menu-item hover/focus-within 셀렉터. */
|
|
562
|
+
.sh-ui-sidebar__menu-action--hover {
|
|
563
|
+
opacity: 0;
|
|
564
|
+
}
|
|
565
|
+
.sh-ui-sidebar__menu-item:hover .sh-ui-sidebar__menu-action--hover,
|
|
566
|
+
.sh-ui-sidebar__menu-item:focus-within .sh-ui-sidebar__menu-action--hover,
|
|
567
|
+
.sh-ui-sidebar__menu-action--hover:focus-visible,
|
|
568
|
+
.sh-ui-sidebar__menu-action--hover[data-active] {
|
|
569
|
+
opacity: 1;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
/* collapsed=icon 모드에서는 trailing 슬롯 숨김 (라벨도 숨겨지므로) */
|
|
573
|
+
.sh-ui-sidebar[data-state="collapsed"][data-collapsible="icon"] .sh-ui-sidebar__menu-badge,
|
|
574
|
+
.sh-ui-sidebar[data-state="collapsed"][data-collapsible="icon"] .sh-ui-sidebar__menu-action {
|
|
575
|
+
display: none;
|
|
576
|
+
}
|
|
577
|
+
|
|
502
578
|
/* ───────────── Sub menu ───────────── */
|
|
503
579
|
.sh-ui-sidebar__menu-sub {
|
|
504
580
|
list-style: none;
|
|
@@ -607,6 +683,7 @@
|
|
|
607
683
|
.sh-ui-sidebar__trigger,
|
|
608
684
|
.sh-ui-sidebar__menu-button,
|
|
609
685
|
.sh-ui-sidebar__menu-sub-button,
|
|
686
|
+
.sh-ui-sidebar__menu-action,
|
|
610
687
|
.sh-ui-sidebar__panel-close,
|
|
611
688
|
.sh-ui-sidebar__chevron,
|
|
612
689
|
.sh-ui-sidebar__collapsible-content {
|
|
@@ -412,6 +412,15 @@
|
|
|
412
412
|
margin: 0;
|
|
413
413
|
}
|
|
414
414
|
|
|
415
|
+
/* trailing 슬롯(badge/action)이 있으면 내부 button/anchor 에 우측 패딩을 확보해
|
|
416
|
+
* 라벨이 trailing 요소 밑으로 들어가지 않게 한다. */
|
|
417
|
+
.sidebar__menu-item:has(.sidebar__menu-badge) > a,
|
|
418
|
+
.sidebar__menu-item:has(.sidebar__menu-badge) > button,
|
|
419
|
+
.sidebar__menu-item:has(.sidebar__menu-action) > a,
|
|
420
|
+
.sidebar__menu-item:has(.sidebar__menu-action) > button {
|
|
421
|
+
padding-inline-end: 2rem;
|
|
422
|
+
}
|
|
423
|
+
|
|
415
424
|
.sidebar__menu-button {
|
|
416
425
|
display: flex;
|
|
417
426
|
width: 100%;
|
|
@@ -478,6 +487,73 @@
|
|
|
478
487
|
font-size: 0.9375rem;
|
|
479
488
|
}
|
|
480
489
|
|
|
490
|
+
/* ───────────── Menu trailing slots (badge / action) ───────────── */
|
|
491
|
+
.sidebar__menu-badge {
|
|
492
|
+
position: absolute;
|
|
493
|
+
right: var(--space-2);
|
|
494
|
+
top: 50%;
|
|
495
|
+
transform: translateY(-50%);
|
|
496
|
+
display: flex;
|
|
497
|
+
align-items: center;
|
|
498
|
+
justify-content: center;
|
|
499
|
+
height: 1.25rem;
|
|
500
|
+
min-width: 1.25rem;
|
|
501
|
+
padding: 0 0.25rem;
|
|
502
|
+
font-size: var(--text-xs);
|
|
503
|
+
font-weight: var(--weight-medium);
|
|
504
|
+
font-variant-numeric: tabular-nums;
|
|
505
|
+
color: var(--sidebar-fg);
|
|
506
|
+
pointer-events: none;
|
|
507
|
+
user-select: none;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
.sidebar__menu-action {
|
|
511
|
+
position: absolute;
|
|
512
|
+
right: var(--space-1);
|
|
513
|
+
top: 50%;
|
|
514
|
+
transform: translateY(-50%);
|
|
515
|
+
display: flex;
|
|
516
|
+
align-items: center;
|
|
517
|
+
justify-content: center;
|
|
518
|
+
width: 1.5rem;
|
|
519
|
+
height: 1.5rem;
|
|
520
|
+
border: none;
|
|
521
|
+
border-radius: calc(var(--radius) - 2px);
|
|
522
|
+
background: transparent;
|
|
523
|
+
color: var(--foreground-muted);
|
|
524
|
+
cursor: pointer;
|
|
525
|
+
transition: background-color var(--duration-fast), color var(--duration-fast), opacity var(--duration-fast);
|
|
526
|
+
}
|
|
527
|
+
.sidebar__menu-action > svg {
|
|
528
|
+
width: 1rem;
|
|
529
|
+
height: 1rem;
|
|
530
|
+
flex-shrink: 0;
|
|
531
|
+
}
|
|
532
|
+
.sidebar__menu-action:hover {
|
|
533
|
+
background: var(--sidebar-accent);
|
|
534
|
+
color: var(--sidebar-accent-fg);
|
|
535
|
+
}
|
|
536
|
+
.sidebar__menu-action:focus-visible {
|
|
537
|
+
outline: var(--border-width-strong) solid var(--ring);
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
/* showOnHover — 행 hover/포커스 시에만 노출. 부모 menu-item hover/focus-within 셀렉터. */
|
|
541
|
+
.sidebar__menu-action--hover {
|
|
542
|
+
opacity: 0;
|
|
543
|
+
}
|
|
544
|
+
.sidebar__menu-item:hover .sidebar__menu-action--hover,
|
|
545
|
+
.sidebar__menu-item:focus-within .sidebar__menu-action--hover,
|
|
546
|
+
.sidebar__menu-action--hover:focus-visible,
|
|
547
|
+
.sidebar__menu-action--hover[data-active] {
|
|
548
|
+
opacity: 1;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
/* collapsed=icon 모드에서는 trailing 슬롯 숨김 (라벨도 숨겨지므로) */
|
|
552
|
+
.sidebar[data-state="collapsed"][data-collapsible="icon"] .sidebar__menu-badge,
|
|
553
|
+
.sidebar[data-state="collapsed"][data-collapsible="icon"] .sidebar__menu-action {
|
|
554
|
+
display: none;
|
|
555
|
+
}
|
|
556
|
+
|
|
481
557
|
/* ───────────── Sub menu ───────────── */
|
|
482
558
|
.sidebar__menu-sub {
|
|
483
559
|
list-style: none;
|
|
@@ -575,6 +651,7 @@
|
|
|
575
651
|
.sidebar__trigger,
|
|
576
652
|
.sidebar__menu-button,
|
|
577
653
|
.sidebar__menu-sub-button,
|
|
654
|
+
.sidebar__menu-action,
|
|
578
655
|
.sidebar__panel-close,
|
|
579
656
|
.sidebar__chevron {
|
|
580
657
|
transition: none;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$description": "컴포넌트별 토큰 의존성 (var(--*) 추출). build-registry-tokens.mjs 가 자동 생성.",
|
|
3
|
-
"$generated": "2026-05-
|
|
3
|
+
"$generated": "2026-05-26T05:20:38.023Z",
|
|
4
4
|
"components": {
|
|
5
5
|
"button": {
|
|
6
6
|
"plain": [
|
|
@@ -1486,11 +1486,13 @@
|
|
|
1486
1486
|
},
|
|
1487
1487
|
"separator": {
|
|
1488
1488
|
"plain": [
|
|
1489
|
-
"--border"
|
|
1489
|
+
"--border",
|
|
1490
|
+
"--foreground-subtle"
|
|
1490
1491
|
],
|
|
1491
1492
|
"tailwind": [],
|
|
1492
1493
|
"css-modules": [
|
|
1493
|
-
"--border"
|
|
1494
|
+
"--border",
|
|
1495
|
+
"--foreground-subtle"
|
|
1494
1496
|
],
|
|
1495
1497
|
"vanilla-extract": []
|
|
1496
1498
|
},
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"badge": "상태 뱃지 — variant, size.",
|
|
36
36
|
"progress": "선형 진행률 — value 0~100, indeterminate.",
|
|
37
37
|
"spinner": "로딩 스피너 — size.",
|
|
38
|
-
"separator": "구분선 — orientation(horizontal
|
|
38
|
+
"separator": "구분선 — 두 변종 한 컴포넌트: children 없으면 가로/세로 1px 선(orientation), children 있으면 가운데 라벨 \"── label ──\"(align=start/center/end, horizontal 강제). decorative={false} 시 role=separator.",
|
|
39
39
|
"skeleton": "스켈레톤 로딩 플레이스홀더.",
|
|
40
40
|
"code-panel": "Shiki 기반 코드 하이라이트 패널 — 복사 버튼 포함.",
|
|
41
41
|
"code-tabs": "여러 코드 뷰(예: React/Flutter, 강조/전체)를 탭으로 전환 — Tabs + CodePanel 합성, 각 탭 내용은 CodePanelProps 그대로.",
|