@bigtablet/design-system 3.17.3 → 3.18.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/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,9 @@ 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;
4779
4768
  background: var(--bt-color-bg-solid);
4780
4769
  border: 1px solid var(--bt-color-border-default);
4781
4770
  border-radius: 12px;
@@ -4790,12 +4779,6 @@ body:has(.bottom_nav) {
4790
4779
  background: var(--bt-color-bg-solid-dim);
4791
4780
  }
4792
4781
  }
4793
- .combobox_panel_up {
4794
- top: auto;
4795
- bottom: 100%;
4796
- margin-top: 0;
4797
- margin-bottom: 4px;
4798
- }
4799
4782
  .combobox_list {
4800
4783
  max-height: 18rem;
4801
4784
  overflow-y: auto;
@@ -5024,13 +5007,9 @@ body:has(.bottom_nav) {
5024
5007
  transform: rotate(180deg);
5025
5008
  }
5026
5009
  .dropdown_list {
5027
- position: absolute;
5010
+ position: fixed;
5028
5011
  z-index: 1000;
5029
- top: 100%;
5030
- left: 0;
5031
- width: 100%;
5032
5012
  box-sizing: border-box;
5033
- margin-top: 4px;
5034
5013
  background: var(--bt-color-bg-solid);
5035
5014
  border: 1px solid var(--bt-color-border-default);
5036
5015
  border-radius: 12px;
@@ -5048,12 +5027,6 @@ body:has(.bottom_nav) {
5048
5027
  .dropdown_list {
5049
5028
  will-change: transform, opacity;
5050
5029
  }
5051
- .dropdown_list_up {
5052
- top: auto;
5053
- bottom: 100%;
5054
- margin-top: 0;
5055
- margin-bottom: 4px;
5056
- }
5057
5030
  .dropdown_search {
5058
5031
  display: flex;
5059
5032
  align-items: center;
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,37 @@ 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
+ /** 트리거 폭(px) - 포탈에서는 `width: 100%` 가 트리거를 가리키지 않는다 */
174
+ width: number;
175
+ /**
176
+ * 뷰포트 가용 폭 상한(px). 트리거가 뷰포트보다 넓으면(좁은 화면의 넓은 폼) 배치는
177
+ * 이 값으로 좌표를 잡는데 패널 폭을 트리거 폭으로 두면 오른쪽이 잘린다.
178
+ */
179
+ maxWidth: number;
180
+ /** 최초 측정 전에는 false - 이때 숨겨 (0,0) 깜빡임을 막는다 */
181
+ ready: boolean;
182
+ };
161
183
  activeIndex: number;
162
184
  setActiveIndex: React$1.Dispatch<React$1.SetStateAction<number>>;
163
185
  /** 바깥 클릭 감지 기준. 트리거와 패널을 함께 감싸는 요소에 붙인다 */
164
186
  wrapperRef: React$1.RefObject<HTMLDivElement | null>;
187
+ /**
188
+ * 팝업 패널 전체. 배치 계산이 이 요소를 잰다 - `listRef` 는 스크롤 컨테이너라 검색바를
189
+ * 빼고 재게 되고, 그러면 flip 판정과 `top` 배치가 그만큼 어긋난다.
190
+ */
191
+ panelRef: React$1.RefObject<HTMLDivElement | null>;
165
192
  /** 트리거 요소. 닫을 때 포커스를 되돌릴 대상 */
166
193
  triggerRef: React$1.RefObject<HTMLButtonElement | null>;
167
194
  /**
@@ -526,6 +553,17 @@ interface BreadcrumbItem {
526
553
  href?: string;
527
554
  /** 클릭 콜백 (href 없이 사용 가능) */
528
555
  onClick?: (e: React$1.MouseEvent<HTMLElement>) => void;
556
+ /**
557
+ * 링크를 렌더할 요소. 라우터 `Link`(`next/link` 등)를 끼울 때 쓴다.
558
+ *
559
+ * `onClick` 에서 `preventDefault` + `router.push` 로도 되지만, 그러면 수정자 클릭
560
+ * (`cmd`/`ctrl`/`shift`)과 새 탭 열기가 죽어 소비처마다 그 검사를 다시 써야 하고
561
+ * 프리페치·이동 가드처럼 `Link` 만 아는 것들은 표현할 수 없다.
562
+ *
563
+ * 마지막 항목(현재 페이지)에는 적용되지 않는다 - 그건 링크가 아니라 `aria-current` 텍스트다.
564
+ * `href` 없이 주면 무시된다(그 항목은 `<button>` 이다).
565
+ */
566
+ as?: React$1.ElementType;
529
567
  }
530
568
  interface BreadcrumbProps extends React$1.HTMLAttributes<HTMLElement> {
531
569
  /** 경로 아이템 배열. 마지막은 현재 페이지로 간주 */
@@ -567,21 +605,6 @@ interface MenuProps {
567
605
  /** 정렬 (기본 "start") */
568
606
  align?: "start" | "end";
569
607
  }
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
608
  declare const Menu: ({ items, trigger, align }: MenuProps) => React$1.JSX.Element;
586
609
 
587
610
  type NavBarVariant = "default" | "transparent" | "accent";
@@ -654,11 +677,17 @@ interface NavBarProps extends React$1.HTMLAttributes<HTMLElement> {
654
677
  * ```
655
678
  */
656
679
  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> {
680
+ interface NavLinkCommon {
658
681
  /** 현재 활성 페이지 여부 */
659
682
  active?: boolean;
660
683
  }
661
- declare const NavLink: ({ active, className, children, ...props }: NavLinkProps) => React$1.JSX.Element;
684
+ /**
685
+ * `AnchorHTMLAttributes` 고정이던 것을 다형성으로 열었다 - 라우터 `Link`(`next/link` 등)를
686
+ * 끼우려면 `onClick` 우회로는 부족하다(수정자 클릭·프리페치·이동 가드). Button·SidebarItem 과
687
+ * 같은 `as` 계약이다. 기본값은 `"a"` 라 기존 사용처는 그대로다.
688
+ */
689
+ type NavLinkProps<T extends React$1.ElementType = "a"> = PolymorphicProps<T, NavLinkCommon>;
690
+ declare const NavLink: <T extends React$1.ElementType = "a">(props: NavLinkProps<T>) => React$1.JSX.Element;
662
691
 
663
692
  type SidebarMode = "auto" | "static";
664
693
  interface SidebarProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "onChange"> {