sellmate-design-system-react 0.8.4 → 0.9.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.
@@ -38,6 +38,10 @@ function cn(...inputs) {
38
38
  return twMerge(clsx.clsx(inputs));
39
39
  }
40
40
 
41
+ // src/lib/scrollbar.ts
42
+ var FIREFOX_SCROLLBAR_CLASS = "supports-[not_selector(::-webkit-scrollbar)]:[scrollbar-width:thin] supports-[not_selector(::-webkit-scrollbar)]:[scrollbar-color:var(--color-grey-45)_transparent]";
43
+ var SCROLLBAR_CLASS = `${FIREFOX_SCROLLBAR_CLASS} [&::-webkit-scrollbar]:h-[12px] [&::-webkit-scrollbar]:w-[12px] [&::-webkit-scrollbar]:bg-transparent [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:border-2 [&::-webkit-scrollbar-thumb]:border-solid [&::-webkit-scrollbar-thumb]:border-transparent [&::-webkit-scrollbar-thumb]:bg-[var(--color-grey-45)] [&::-webkit-scrollbar-thumb]:bg-clip-padding`;
44
+
41
45
  // src/lib/floating-anim.ts
42
46
  var FLOATING_SLIDE_ANIM = [
43
47
  "data-[state=open]:data-[side=top]:animate-floating-in-top",
@@ -3314,6 +3318,9 @@ var SGnb = react.forwardRef(function SGnb2({
3314
3318
  onFoldChange,
3315
3319
  onLauncherClick,
3316
3320
  logo,
3321
+ railFooter,
3322
+ menuFooter,
3323
+ foldedFooter,
3317
3324
  ariaLabel = "global navigation",
3318
3325
  className,
3319
3326
  style,
@@ -3467,7 +3474,7 @@ var SGnb = react.forwardRef(function SGnb2({
3467
3474
  className: "shrink-0"
3468
3475
  }
3469
3476
  ),
3470
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap flex flex-no-wrap items-center", children: [
3477
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap flex items-center", children: [
3471
3478
  depth > 1 && iconBranch ? /* @__PURE__ */ jsxRuntime.jsx(
3472
3479
  "div",
3473
3480
  {
@@ -3678,42 +3685,77 @@ var SGnb = react.forwardRef(function SGnb2({
3678
3685
  transition: `transform ${GNB_FOLD_MS}ms ease-out, ${hideAfterSlide(folded)}`
3679
3686
  },
3680
3687
  children: [
3681
- useRail && // 레일도 내비게이션 landmark nav 세워야 aria-label(레일) 스크린리더에 노출된다
3682
- // (role 없는 ul aria-label 영역명으로 읽히지 않는다). 메뉴 nav 와는 레이블로 구분된다.
3683
- /* @__PURE__ */ jsxRuntime.jsx(
3684
- "nav",
3688
+ useRail && // 레일 컬럼스크롤되는 아이템 목록(nav) 하단 고정 footer 를 한 컬럼에 담는다.
3689
+ // footer 내비게이션이 아니므로 nav(landmark) 밖에 두고, 컬럼 폭·구분선·배경은 래퍼가
3690
+ // 전체 높이에 걸쳐 책임진다(그래야 footer 자리까지 배경·오른쪽 선이 이어진다).
3691
+ /* @__PURE__ */ jsxRuntime.jsxs(
3692
+ "div",
3685
3693
  {
3686
- "aria-label": `${ariaLabel} rail`,
3687
- className: "flex shrink-0 flex-col overflow-y-auto",
3694
+ className: "flex shrink-0 flex-col overflow-hidden",
3688
3695
  style: {
3689
3696
  width: GNB_RAIL_WIDTH,
3690
- padding: GNB_RAIL.padding,
3691
3697
  borderRight: `1px solid ${C.topBorder}`,
3692
3698
  backgroundColor: C.panelBg,
3693
3699
  pointerEvents: "auto"
3694
3700
  },
3695
- children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "m-0 flex list-none flex-col p-0", style: { gap: GNB_RAIL.gap }, children: railItems.map(renderRailItem) })
3701
+ children: [
3702
+ /* @__PURE__ */ jsxRuntime.jsx(
3703
+ "nav",
3704
+ {
3705
+ "aria-label": `${ariaLabel} rail`,
3706
+ className: cn(
3707
+ "flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto",
3708
+ SCROLLBAR_CLASS
3709
+ ),
3710
+ style: { padding: GNB_RAIL.padding },
3711
+ children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "m-0 flex list-none flex-col p-0", style: { gap: GNB_RAIL.gap }, children: railItems.map(renderRailItem) })
3712
+ }
3713
+ ),
3714
+ railFooter && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: railFooter })
3715
+ ]
3696
3716
  }
3697
3717
  ),
3698
- showMenu && /* @__PURE__ */ jsxRuntime.jsx(
3699
- "nav",
3718
+ showMenu && /* @__PURE__ */ jsxRuntime.jsxs(
3719
+ "div",
3700
3720
  {
3701
- "aria-label": ariaLabel,
3702
- className: "flex shrink-0 flex-col overflow-y-auto",
3721
+ className: "flex shrink-0 flex-col overflow-hidden",
3703
3722
  style: {
3704
3723
  width: GNB_MENU_WIDTH,
3705
- paddingTop: M.bodyPaddingY,
3706
- paddingBottom: M.bodyPaddingY,
3707
3724
  backgroundColor: C.panelBg,
3708
3725
  // full 은 상단바가 전폭이라 루트가 오른쪽 선을 못 그린다 → 메뉴 오른쪽(페이지 경계)이 대신 그린다.
3709
3726
  borderRight: header === "full" ? rightBorder : void 0,
3710
3727
  pointerEvents: "auto"
3711
3728
  },
3712
- children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "m-0 flex list-none flex-col p-0", children: menuItems.map((item) => renderItem(item, 1)) })
3729
+ children: [
3730
+ /* @__PURE__ */ jsxRuntime.jsx(
3731
+ "nav",
3732
+ {
3733
+ "aria-label": ariaLabel,
3734
+ className: cn(
3735
+ "flex min-h-0 flex-1 flex-col overflow-x-hidden overflow-y-auto",
3736
+ SCROLLBAR_CLASS
3737
+ ),
3738
+ style: {
3739
+ paddingTop: M.bodyPaddingY,
3740
+ paddingBottom: M.bodyPaddingY
3741
+ },
3742
+ children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "m-0 flex list-none flex-col p-0", children: menuItems.map((item) => renderItem(item, 1)) })
3743
+ }
3744
+ ),
3745
+ menuFooter && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: menuFooter })
3746
+ ]
3713
3747
  }
3714
3748
  )
3715
3749
  ]
3716
3750
  }
3751
+ ),
3752
+ railFolded && foldedFooter && /* @__PURE__ */ jsxRuntime.jsx(
3753
+ "div",
3754
+ {
3755
+ className: "flex shrink-0 items-center justify-center mb-[24px]",
3756
+ style: { pointerEvents: "auto" },
3757
+ children: foldedFooter
3758
+ }
3717
3759
  )
3718
3760
  ]
3719
3761
  }