@bigtablet/design-system 3.17.3 → 3.18.1

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/index.css CHANGED
@@ -1060,8 +1060,7 @@ body:has(.bottom_nav) {
1060
1060
  display: inline-flex;
1061
1061
  }
1062
1062
  .menu {
1063
- position: absolute;
1064
- top: calc(100% + 4px);
1063
+ position: fixed;
1065
1064
  z-index: 1000;
1066
1065
  min-width: 180px;
1067
1066
  background: var(--bt-color-bg-solid);
@@ -1079,12 +1078,6 @@ body:has(.bottom_nav) {
1079
1078
  background: var(--bt-color-bg-solid-dim);
1080
1079
  }
1081
1080
  }
1082
- .menu_align_start {
1083
- left: 0;
1084
- }
1085
- .menu_align_end {
1086
- right: 0;
1087
- }
1088
1081
  .menu_item {
1089
1082
  display: flex;
1090
1083
  align-items: center;
@@ -2868,7 +2861,7 @@ body:has(.bottom_nav) {
2868
2861
  background: color-mix(in srgb, var(--bt-color-status-error) 76%, #121212);
2869
2862
  }
2870
2863
  .button_danger.button_variant_outline {
2871
- color: var(--bt-color-status-error);
2864
+ color: var(--bt-color-status-error-on-surface);
2872
2865
  border-color: var(--bt-color-status-error);
2873
2866
  }
2874
2867
  .button_danger.button_variant_outline:hover:not(:disabled) {
@@ -2879,13 +2872,13 @@ body:has(.bottom_nav) {
2879
2872
  }
2880
2873
  .button_danger.button_variant_tonal {
2881
2874
  background: color-mix(in srgb, var(--bt-color-status-error) 12%, transparent);
2882
- color: var(--bt-color-status-error);
2875
+ color: var(--bt-color-status-error-on-surface);
2883
2876
  }
2884
2877
  .button_danger.button_variant_tonal:hover:not(:disabled) {
2885
2878
  background: color-mix(in srgb, var(--bt-color-status-error) 18%, transparent);
2886
2879
  }
2887
2880
  .button_danger.button_variant_text {
2888
- color: var(--bt-color-status-error);
2881
+ color: var(--bt-color-status-error-on-surface);
2889
2882
  }
2890
2883
  .button_danger.button_variant_text:hover:not(:disabled) {
2891
2884
  background: color-mix(in srgb, var(--bt-color-status-error) 8%, transparent);
@@ -4769,13 +4762,10 @@ body:has(.bottom_nav) {
4769
4762
  padding: 12px 16px;
4770
4763
  }
4771
4764
  .combobox_panel {
4772
- position: absolute;
4765
+ position: fixed;
4773
4766
  z-index: 1000;
4774
- top: 100%;
4775
- left: 0;
4776
- width: 100%;
4777
4767
  box-sizing: border-box;
4778
- margin-top: 4px;
4768
+ width: max-content;
4779
4769
  background: var(--bt-color-bg-solid);
4780
4770
  border: 1px solid var(--bt-color-border-default);
4781
4771
  border-radius: 12px;
@@ -4790,12 +4780,6 @@ body:has(.bottom_nav) {
4790
4780
  background: var(--bt-color-bg-solid-dim);
4791
4781
  }
4792
4782
  }
4793
- .combobox_panel_up {
4794
- top: auto;
4795
- bottom: 100%;
4796
- margin-top: 0;
4797
- margin-bottom: 4px;
4798
- }
4799
4783
  .combobox_list {
4800
4784
  max-height: 18rem;
4801
4785
  overflow-y: auto;
@@ -5024,13 +5008,10 @@ body:has(.bottom_nav) {
5024
5008
  transform: rotate(180deg);
5025
5009
  }
5026
5010
  .dropdown_list {
5027
- position: absolute;
5011
+ position: fixed;
5028
5012
  z-index: 1000;
5029
- top: 100%;
5030
- left: 0;
5031
- width: 100%;
5032
5013
  box-sizing: border-box;
5033
- margin-top: 4px;
5014
+ width: max-content;
5034
5015
  background: var(--bt-color-bg-solid);
5035
5016
  border: 1px solid var(--bt-color-border-default);
5036
5017
  border-radius: 12px;
@@ -5048,13 +5029,8 @@ body:has(.bottom_nav) {
5048
5029
  .dropdown_list {
5049
5030
  will-change: transform, opacity;
5050
5031
  }
5051
- .dropdown_list_up {
5052
- top: auto;
5053
- bottom: 100%;
5054
- margin-top: 0;
5055
- margin-bottom: 4px;
5056
- }
5057
5032
  .dropdown_search {
5033
+ contain: inline-size;
5058
5034
  display: flex;
5059
5035
  align-items: center;
5060
5036
  gap: 8px;
package/dist/index.d.ts CHANGED
@@ -121,13 +121,15 @@ declare function useSpringHover({ scale, lift, }?: {
121
121
  * return <animated.div style={style}>...</animated.div>;
122
122
  * ```
123
123
  */
124
- declare function useSpringPresence({ visible, from, onExitComplete, }: {
124
+ declare function useSpringPresence({ visible, from, onExitComplete, onProgress, }: {
125
125
  /** 보이는 상태인지 - false면 사라짐 모션 */
126
126
  visible: boolean;
127
127
  /** 진입 시 시작 transform (기본: 아래에서 살짝 올라옴) */
128
128
  from?: string;
129
129
  /** exit 모션 완료 시 호출 - 부모에서 unmount 트리거용 */
130
130
  onExitComplete?: () => void;
131
+ /** 프레임마다 현재 opacity(0~1). 오버레이가 잠금에 딤 진행도를 보고할 때 쓴다(#583). */
132
+ onProgress?: (progress: number) => void;
131
133
  }): {
132
134
  opacity: _react_spring_web.SpringValue<number>;
133
135
  transform: _react_spring_web.SpringValue<string>;
@@ -156,12 +158,41 @@ interface UseListboxPopupArgs<T extends ListboxItem> {
156
158
  interface UseListboxPopupResult {
157
159
  isOpen: boolean;
158
160
  setIsOpen: React$1.Dispatch<React$1.SetStateAction<boolean>>;
159
- /** 위로 열릴지 - 아래 공간이 모자랄 때만 true */
161
+ /** 위로 열릴지 - 배치가 `top` 으로 flip 됐을 때 true */
160
162
  dropUp: boolean;
163
+ /**
164
+ * 팝업을 **포탈로** 띄울 때 쓰는 fixed 좌표·폭. 목록을 트리거 옆에 `position: absolute` 로
165
+ * 두면 `overflow: hidden` 인 조상(카드·표 래퍼)이 잘라낸다 - `z-index` 로는 넘지 못한다.
166
+ * 실측(#586) - `overflow: hidden` 카드 안에서 170px 목록 중 46px 만 보였다.
167
+ */
168
+ position: {
169
+ /** fixed left(px) */
170
+ x: number;
171
+ /** fixed top(px) */
172
+ y: number;
173
+ /**
174
+ * 트리거 폭(px) - 포탈에서는 `width: 100%` 가 트리거를 가리키지 않는다.
175
+ * 소비처는 이 값을 `width` 가 아니라 `min-width` 로 준다(#596): 못박으면 좁은
176
+ * 트리거에서 목록이 자기 옵션 라벨을 잘라낸다.
177
+ */
178
+ width: number;
179
+ /**
180
+ * 뷰포트 가용 폭 상한(px). 트리거가 뷰포트보다 넓으면(좁은 화면의 넓은 폼) 배치는
181
+ * 이 값으로 좌표를 잡는데 패널 폭을 트리거 폭으로 두면 오른쪽이 잘린다.
182
+ */
183
+ maxWidth: number;
184
+ /** 최초 측정 전에는 false - 이때 숨겨 (0,0) 깜빡임을 막는다 */
185
+ ready: boolean;
186
+ };
161
187
  activeIndex: number;
162
188
  setActiveIndex: React$1.Dispatch<React$1.SetStateAction<number>>;
163
189
  /** 바깥 클릭 감지 기준. 트리거와 패널을 함께 감싸는 요소에 붙인다 */
164
190
  wrapperRef: React$1.RefObject<HTMLDivElement | null>;
191
+ /**
192
+ * 팝업 패널 전체. 배치 계산이 이 요소를 잰다 - `listRef` 는 스크롤 컨테이너라 검색바를
193
+ * 빼고 재게 되고, 그러면 flip 판정과 `top` 배치가 그만큼 어긋난다.
194
+ */
195
+ panelRef: React$1.RefObject<HTMLDivElement | null>;
165
196
  /** 트리거 요소. 닫을 때 포커스를 되돌릴 대상 */
166
197
  triggerRef: React$1.RefObject<HTMLButtonElement | null>;
167
198
  /**
@@ -526,6 +557,17 @@ interface BreadcrumbItem {
526
557
  href?: string;
527
558
  /** 클릭 콜백 (href 없이 사용 가능) */
528
559
  onClick?: (e: React$1.MouseEvent<HTMLElement>) => void;
560
+ /**
561
+ * 링크를 렌더할 요소. 라우터 `Link`(`next/link` 등)를 끼울 때 쓴다.
562
+ *
563
+ * `onClick` 에서 `preventDefault` + `router.push` 로도 되지만, 그러면 수정자 클릭
564
+ * (`cmd`/`ctrl`/`shift`)과 새 탭 열기가 죽어 소비처마다 그 검사를 다시 써야 하고
565
+ * 프리페치·이동 가드처럼 `Link` 만 아는 것들은 표현할 수 없다.
566
+ *
567
+ * 마지막 항목(현재 페이지)에는 적용되지 않는다 - 그건 링크가 아니라 `aria-current` 텍스트다.
568
+ * `href` 없이 주면 무시된다(그 항목은 `<button>` 이다).
569
+ */
570
+ as?: React$1.ElementType;
529
571
  }
530
572
  interface BreadcrumbProps extends React$1.HTMLAttributes<HTMLElement> {
531
573
  /** 경로 아이템 배열. 마지막은 현재 페이지로 간주 */
@@ -567,21 +609,6 @@ interface MenuProps {
567
609
  /** 정렬 (기본 "start") */
568
610
  align?: "start" | "end";
569
611
  }
570
- /**
571
- * 컨텍스트 메뉴. trigger 클릭 시 아래에 메뉴 표시. 외부 클릭/Esc로 닫힘.
572
- * Form Dropdown과 다름 - 액션 메뉴 (Edit/Delete 등).
573
- *
574
- * @example
575
- * ```tsx
576
- * <Menu
577
- * trigger={<IconButton icon={<MoreIcon />} aria-label="더보기" />}
578
- * items={[
579
- * { key: "edit", label: "편집", onSelect: handleEdit },
580
- * { key: "del", label: "삭제", onSelect: handleDel, destructive: true },
581
- * ]}
582
- * />
583
- * ```
584
- */
585
612
  declare const Menu: ({ items, trigger, align }: MenuProps) => React$1.JSX.Element;
586
613
 
587
614
  type NavBarVariant = "default" | "transparent" | "accent";
@@ -654,11 +681,17 @@ interface NavBarProps extends React$1.HTMLAttributes<HTMLElement> {
654
681
  * ```
655
682
  */
656
683
  declare const NavBar: ({ brand, searchSlot, actions, locale, profile, divider, variant, layout, sticky, className, children, ...props }: NavBarProps) => React$1.JSX.Element;
657
- interface NavLinkProps extends React$1.AnchorHTMLAttributes<HTMLAnchorElement> {
684
+ interface NavLinkCommon {
658
685
  /** 현재 활성 페이지 여부 */
659
686
  active?: boolean;
660
687
  }
661
- declare const NavLink: ({ active, className, children, ...props }: NavLinkProps) => React$1.JSX.Element;
688
+ /**
689
+ * `AnchorHTMLAttributes` 고정이던 것을 다형성으로 열었다 - 라우터 `Link`(`next/link` 등)를
690
+ * 끼우려면 `onClick` 우회로는 부족하다(수정자 클릭·프리페치·이동 가드). Button·SidebarItem 과
691
+ * 같은 `as` 계약이다. 기본값은 `"a"` 라 기존 사용처는 그대로다.
692
+ */
693
+ type NavLinkProps<T extends React$1.ElementType = "a"> = PolymorphicProps<T, NavLinkCommon>;
694
+ declare const NavLink: <T extends React$1.ElementType = "a">(props: NavLinkProps<T>) => React$1.JSX.Element;
662
695
 
663
696
  type SidebarMode = "auto" | "static";
664
697
  interface SidebarProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "onChange"> {