@bigtablet/design-system 4.5.0 → 4.7.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.d.ts CHANGED
@@ -2621,6 +2621,99 @@ interface DateCalendarProps extends Omit<SafeHTMLProps<React$1.HTMLAttributes<HT
2621
2621
  */
2622
2622
  declare const DateCalendar: ({ value: valueProp, defaultValue, onValueChange, month: monthProp, defaultMonth, onMonthChange, min: minProp, max: maxProp, isDateDisabled, today: todayProp, weekStartsOn, renderDay, describeDay, prevMonthLabel, nextMonthLabel, className, ...props }: DateCalendarProps) => React$1.JSX.Element;
2623
2623
 
2624
+ type DropdownSize = "sm" | "md" | "lg";
2625
+ /**
2626
+ * 컨트롤 시각 변형. TextField 의 `variant` 와 같은 어휘를 쓴다.
2627
+ * - `outline`: 테두리로 컨트롤을 구분 (기본).
2628
+ * - `filled`: 테두리 대신 채워진 배경으로 구분, 열리면 배경이 solid 로 돌아오며 테두리가 드러남.
2629
+ */
2630
+ type DropdownVariant = "outline" | "filled";
2631
+ interface DropdownOption {
2632
+ value: string;
2633
+ label: string;
2634
+ disabled?: boolean;
2635
+ /** 옵션 아래에 표시할 보조 텍스트 */
2636
+ supportingText?: string;
2637
+ /** 옵션 왼쪽 아이콘 */
2638
+ leadingIcon?: React$1.ReactNode;
2639
+ /** 옵션 오른쪽 아이콘 (미지정 시 선택 상태에 체크 아이콘 자동 표시) */
2640
+ trailingIcon?: React$1.ReactNode;
2641
+ /** 아이템 아래 구분선 표시 여부 */
2642
+ showDivider?: boolean;
2643
+ }
2644
+ /** single/multiple 공통 속성 */
2645
+ interface DropdownCommonProps {
2646
+ /** 드롭다운 요소의 id (미입력 시 자동 생성) */
2647
+ id?: string;
2648
+ /** 드롭다운 위에 표시할 플로팅 라벨 텍스트 */
2649
+ label?: string;
2650
+ /** 선택 전 표시할 플레이스홀더 */
2651
+ placeholder?: string;
2652
+ /** 표시할 옵션 목록 */
2653
+ options: DropdownOption[];
2654
+ /** 비활성화 여부 */
2655
+ disabled?: boolean;
2656
+ /**
2657
+ * 필수 입력 여부. `Field` 안에서는 `Field` 의 `required` 가 이긴다.
2658
+ * `role="group"` 은 `aria-required` 를 받지 못하므로 DatePicker·TimePicker 가 안쪽
2659
+ * Dropdown 마다 이 prop 으로 필수 여부를 내려보낸다.
2660
+ */
2661
+ required?: boolean;
2662
+ /** 드롭다운 크기 */
2663
+ size?: DropdownSize;
2664
+ /** 루트 요소에 추가할 className */
2665
+ className?: string;
2666
+ /** 컨트롤 시각 변형 */
2667
+ variant?: DropdownVariant;
2668
+ /**
2669
+ * 검색 가능 여부. 활성화 시 열린 패널 상단에 검색 입력이 표시되고, 옵션 `label` 부분 일치로 필터링됩니다.
2670
+ * (기본값: false)
2671
+ */
2672
+ searchable?: boolean;
2673
+ /** 검색 입력의 placeholder */
2674
+ searchPlaceholder?: string;
2675
+ /** 필터 결과가 0개일 때 표시할 텍스트 */
2676
+ emptyText?: string;
2677
+ /** 멀티 선택 요약 텍스트 */
2678
+ selectedSummary?: (count: number) => string;
2679
+ /**
2680
+ * 네이티브 폼 제출 참여용 name. 지정 시 선택 값이 hidden input 으로 렌더되어
2681
+ * `<form>` POST 에 포함됩니다 (multiple 은 같은 name 의 hidden input 반복).
2682
+ */
2683
+ name?: string;
2684
+ }
2685
+ /** 단일 선택 (기본) */
2686
+ interface DropdownSingleProps extends DropdownCommonProps {
2687
+ /** 다중 선택 모드 (기본값: false) */
2688
+ multiple?: false;
2689
+ /** 제어형 선택 값 */
2690
+ value?: string | null;
2691
+ /** 값 변경 콜백 (canonical). 선택된 값과 전체 옵션 객체를 전달합니다. */
2692
+ onValueChange?: (value: string | null, option?: DropdownOption | null) => void;
2693
+ /** 비제어형 초기 선택 값 */
2694
+ defaultValue?: string | null;
2695
+ }
2696
+ /** 다중 선택 */
2697
+ interface DropdownMultipleProps extends DropdownCommonProps {
2698
+ /** 다중 선택 모드 */
2699
+ multiple: true;
2700
+ /** 제어형 선택 값 목록 */
2701
+ value?: string[];
2702
+ /** 값 변경 콜백 (canonical). 선택된 값 목록과 옵션 객체 목록을 전달합니다. */
2703
+ onValueChange?: (values: string[], options: DropdownOption[]) => void;
2704
+ /** 비제어형 초기 선택 값 목록 */
2705
+ defaultValue?: string[];
2706
+ }
2707
+ type DropdownProps = DropdownSingleProps | DropdownMultipleProps;
2708
+ /**
2709
+ * 드롭다운 컴포넌트를 렌더링한다.
2710
+ * 제어형/비제어형 상태를 지원하며, 키보드/마우스 상호작용과 정적 라벨을 관리한다.
2711
+ * `searchable` 로 라벨 부분 일치 검색을, `multiple` 로 다중 선택을 opt-in 할 수 있다.
2712
+ * @param props 드롭다운 속성
2713
+ * @returns 렌더링된 드롭다운 UI
2714
+ */
2715
+ declare const Dropdown: (props: DropdownProps) => React$1.JSX.Element;
2716
+
2624
2717
  type DatePickerMode = "year-month" | "year-month-day";
2625
2718
  type DatePickerVariant = "dropdown" | "calendar";
2626
2719
  type SelectableRange = "all" | "until-today";
@@ -2657,6 +2750,18 @@ interface DatePickerBaseProps {
2657
2750
  required?: boolean;
2658
2751
  /** 데이트 피커가 컨테이너의 전체 너비를 차지할지 여부 */
2659
2752
  fullWidth?: boolean;
2753
+ /**
2754
+ * 칸 크기 (기본값: "md"). Dropdown · TextField · Button 과 같은 높이 단계라 한 줄에 두면 맞는다
2755
+ * - sm · md 40px, lg 48px (좁은 화면은 한 단계 위).
2756
+ */
2757
+ size?: DropdownSize;
2758
+ /**
2759
+ * 값이 있을 때 지우기(×) 버튼을 둔다 - 누르면 `onValueChange("")` (#965). 조회 조건처럼
2760
+ * "값 없음 = 조건 없음" 인 칸에 쓴다. 필수 칸에는 두지 않는다. 달력형은 칸에서 Delete · Backspace 로도 지운다
2761
+ */
2762
+ clearable?: boolean;
2763
+ /** 지우기 버튼 이름 (기본값: 로케일 `datePicker.clear`) */
2764
+ clearLabel?: string;
2660
2765
  /** 연도 select의 라벨/플레이스홀더 */
2661
2766
  yearLabel?: string;
2662
2767
  /** 월 select의 라벨/플레이스홀더 */
@@ -2682,7 +2787,7 @@ type DatePickerProps = DatePickerBaseProps & {
2682
2787
  * 연/월/일 선택형 데이트 피커를 렌더링한다.
2683
2788
  * 내부적으로 DS Dropdown 3개를 조합해 드롭다운 UX 일관성을 유지한다.
2684
2789
  */
2685
- declare const DatePicker: ({ label, value, onValueChange, mode, variant, placeholder: placeholderProp, startYear, endYear: endYearProp, minDate, selectableRange, disabled, required, fullWidth, yearLabel: yearLabelProp, monthLabel: monthLabelProp, dayLabel: dayLabelProp, minDateSrFormat: minDateSrFormatProp, selectableRangeUntilTodaySrText: selectableRangeUntilTodaySrTextProp, }: DatePickerProps) => React$1.JSX.Element;
2790
+ declare const DatePicker: ({ label, value, onValueChange, mode, variant, placeholder: placeholderProp, startYear, endYear: endYearProp, minDate, selectableRange, disabled, required, fullWidth, size, clearable, clearLabel: clearLabelProp, yearLabel: yearLabelProp, monthLabel: monthLabelProp, dayLabel: dayLabelProp, minDateSrFormat: minDateSrFormatProp, selectableRangeUntilTodaySrText: selectableRangeUntilTodaySrTextProp, }: DatePickerProps) => React$1.JSX.Element;
2686
2791
 
2687
2792
  interface DateRange {
2688
2793
  /** 시작일 (`"YYYY-MM-DD"`). 아직 고르지 않았으면 undefined */
@@ -2716,6 +2821,10 @@ interface DateRangePickerProps {
2716
2821
  required?: boolean;
2717
2822
  /** 전체 너비 차지 (기본값: true) */
2718
2823
  fullWidth?: boolean;
2824
+ /**
2825
+ * 날짜마다 지우기(×) 버튼 (#965). 시작일을 지우면 종료일도 함께 비운다 - 시작 없는 종료는 고를 수 없다
2826
+ */
2827
+ clearable?: boolean;
2719
2828
  }
2720
2829
  /**
2721
2830
  * 시작일·종료일 한 쌍. `DatePicker` 둘을 묶는다.
@@ -2734,100 +2843,7 @@ interface DateRangePickerProps {
2734
2843
  * </Field>
2735
2844
  * ```
2736
2845
  */
2737
- declare const DateRangePicker: ({ value, onValueChange, startLabel: startLabelProp, endLabel: endLabelProp, startYear, endYear, minDate, selectableRange, disabled, required, fullWidth, }: DateRangePickerProps) => React$1.JSX.Element;
2738
-
2739
- type DropdownSize = "sm" | "md" | "lg";
2740
- /**
2741
- * 컨트롤 시각 변형. TextField 의 `variant` 와 같은 어휘를 쓴다.
2742
- * - `outline`: 테두리로 컨트롤을 구분 (기본).
2743
- * - `filled`: 테두리 대신 채워진 배경으로 구분, 열리면 배경이 solid 로 돌아오며 테두리가 드러남.
2744
- */
2745
- type DropdownVariant = "outline" | "filled";
2746
- interface DropdownOption {
2747
- value: string;
2748
- label: string;
2749
- disabled?: boolean;
2750
- /** 옵션 아래에 표시할 보조 텍스트 */
2751
- supportingText?: string;
2752
- /** 옵션 왼쪽 아이콘 */
2753
- leadingIcon?: React$1.ReactNode;
2754
- /** 옵션 오른쪽 아이콘 (미지정 시 선택 상태에 체크 아이콘 자동 표시) */
2755
- trailingIcon?: React$1.ReactNode;
2756
- /** 아이템 아래 구분선 표시 여부 */
2757
- showDivider?: boolean;
2758
- }
2759
- /** single/multiple 공통 속성 */
2760
- interface DropdownCommonProps {
2761
- /** 드롭다운 요소의 id (미입력 시 자동 생성) */
2762
- id?: string;
2763
- /** 드롭다운 위에 표시할 플로팅 라벨 텍스트 */
2764
- label?: string;
2765
- /** 선택 전 표시할 플레이스홀더 */
2766
- placeholder?: string;
2767
- /** 표시할 옵션 목록 */
2768
- options: DropdownOption[];
2769
- /** 비활성화 여부 */
2770
- disabled?: boolean;
2771
- /**
2772
- * 필수 입력 여부. `Field` 안에서는 `Field` 의 `required` 가 이긴다.
2773
- * `role="group"` 은 `aria-required` 를 받지 못하므로 DatePicker·TimePicker 가 안쪽
2774
- * Dropdown 마다 이 prop 으로 필수 여부를 내려보낸다.
2775
- */
2776
- required?: boolean;
2777
- /** 드롭다운 크기 */
2778
- size?: DropdownSize;
2779
- /** 루트 요소에 추가할 className */
2780
- className?: string;
2781
- /** 컨트롤 시각 변형 */
2782
- variant?: DropdownVariant;
2783
- /**
2784
- * 검색 가능 여부. 활성화 시 열린 패널 상단에 검색 입력이 표시되고, 옵션 `label` 부분 일치로 필터링됩니다.
2785
- * (기본값: false)
2786
- */
2787
- searchable?: boolean;
2788
- /** 검색 입력의 placeholder */
2789
- searchPlaceholder?: string;
2790
- /** 필터 결과가 0개일 때 표시할 텍스트 */
2791
- emptyText?: string;
2792
- /** 멀티 선택 요약 텍스트 */
2793
- selectedSummary?: (count: number) => string;
2794
- /**
2795
- * 네이티브 폼 제출 참여용 name. 지정 시 선택 값이 hidden input 으로 렌더되어
2796
- * `<form>` POST 에 포함됩니다 (multiple 은 같은 name 의 hidden input 반복).
2797
- */
2798
- name?: string;
2799
- }
2800
- /** 단일 선택 (기본) */
2801
- interface DropdownSingleProps extends DropdownCommonProps {
2802
- /** 다중 선택 모드 (기본값: false) */
2803
- multiple?: false;
2804
- /** 제어형 선택 값 */
2805
- value?: string | null;
2806
- /** 값 변경 콜백 (canonical). 선택된 값과 전체 옵션 객체를 전달합니다. */
2807
- onValueChange?: (value: string | null, option?: DropdownOption | null) => void;
2808
- /** 비제어형 초기 선택 값 */
2809
- defaultValue?: string | null;
2810
- }
2811
- /** 다중 선택 */
2812
- interface DropdownMultipleProps extends DropdownCommonProps {
2813
- /** 다중 선택 모드 */
2814
- multiple: true;
2815
- /** 제어형 선택 값 목록 */
2816
- value?: string[];
2817
- /** 값 변경 콜백 (canonical). 선택된 값 목록과 옵션 객체 목록을 전달합니다. */
2818
- onValueChange?: (values: string[], options: DropdownOption[]) => void;
2819
- /** 비제어형 초기 선택 값 목록 */
2820
- defaultValue?: string[];
2821
- }
2822
- type DropdownProps = DropdownSingleProps | DropdownMultipleProps;
2823
- /**
2824
- * 드롭다운 컴포넌트를 렌더링한다.
2825
- * 제어형/비제어형 상태를 지원하며, 키보드/마우스 상호작용과 정적 라벨을 관리한다.
2826
- * `searchable` 로 라벨 부분 일치 검색을, `multiple` 로 다중 선택을 opt-in 할 수 있다.
2827
- * @param props 드롭다운 속성
2828
- * @returns 렌더링된 드롭다운 UI
2829
- */
2830
- declare const Dropdown: (props: DropdownProps) => React$1.JSX.Element;
2846
+ declare const DateRangePicker: ({ value, onValueChange, startLabel: startLabelProp, endLabel: endLabelProp, startYear, endYear, minDate, selectableRange, disabled, required, fullWidth, clearable, }: DateRangePickerProps) => React$1.JSX.Element;
2831
2847
 
2832
2848
  /**
2833
2849
  * `Field` 가 자식 입력에게 내리는 값.
@@ -3603,11 +3619,17 @@ type ButtonProps<T extends React$1.ElementType = "button"> = PolymorphicProps<T,
3603
3619
  */
3604
3620
  declare const Button: <T extends React$1.ElementType = "button">(props: ButtonProps<T>) => React$1.JSX.Element;
3605
3621
 
3606
- interface CopyButtonProps extends Omit<SafeHTMLProps<React$1.ButtonHTMLAttributes<HTMLButtonElement>>, "children" | "onClick" | "onCopy" | "onError" | "type" | "aria-label"> {
3622
+ interface CopyButtonProps extends Omit<SafeHTMLProps<React$1.ButtonHTMLAttributes<HTMLButtonElement>>, "children" | "onClick" | "onCopy" | "onError" | "type"> {
3607
3623
  /** 복사할 텍스트. 누를 때 계산하려면 함수로 */
3608
3624
  text: string | (() => string);
3609
3625
  /** 버튼 문구 · 아이콘만일 때는 접근성 이름 (기본값: 로케일 `copyButton.copy`) */
3610
3626
  label?: string;
3627
+ /**
3628
+ * 접근성 이름을 보이는 문구와 따로 줄 때 (#966). 표처럼 복사 버튼이 여럿이면 보이는 글자는 "복사" 로
3629
+ * 두고 이름은 `"192.168.10.1 주소 복사"` 처럼 무엇을 복사하는지 담는다. 보이는 문구를 이름 안에 넣는다
3630
+ * (WCAG 2.5.3 - 음성 입력이 보이는 글자로 버튼을 찾는다). 없으면 `label`
3631
+ */
3632
+ "aria-label"?: string;
3611
3633
  /** 복사 직후 문구 (기본값: 로케일 `copyButton.copied`) */
3612
3634
  copiedLabel?: string;
3613
3635
  /** 실패 시 스크린리더에 알릴 문구 (기본값: 로케일 `copyButton.failed`) */
@@ -3636,7 +3658,7 @@ interface CopyButtonProps extends Omit<SafeHTMLProps<React$1.ButtonHTMLAttribute
3636
3658
  * <CopyButton text={apiKey} iconOnly label="API 키 복사" />
3637
3659
  * ```
3638
3660
  */
3639
- declare const CopyButton: ({ text, label: labelProp, copiedLabel: copiedLabelProp, failedLabel: failedLabelProp, iconOnly, size, variant, resetAfter, onCopy, onError, className, ...props }: CopyButtonProps) => React$1.JSX.Element;
3661
+ declare const CopyButton: ({ text, label: labelProp, copiedLabel: copiedLabelProp, failedLabel: failedLabelProp, iconOnly, size, variant, resetAfter, onCopy, onError, className, "aria-label": ariaLabel, ...props }: CopyButtonProps) => React$1.JSX.Element;
3640
3662
 
3641
3663
  type IconButtonVariant = "text" | "filled" | "tonal" | "outline";
3642
3664
  type IconButtonSize = "sm" | "md";
@@ -3875,6 +3897,7 @@ interface LocaleMessages {
3875
3897
  "combobox.loading": string;
3876
3898
  "combobox.placeholder": string;
3877
3899
  "datePicker.calendar": string;
3900
+ "datePicker.clear": string;
3878
3901
  "datePicker.day": string;
3879
3902
  "datePicker.minDateSr": string;
3880
3903
  "datePicker.month": string;
@@ -3913,6 +3936,7 @@ interface LocaleMessages {
3913
3936
  "timePicker.hour": string;
3914
3937
  "timePicker.minute": string;
3915
3938
  "timePicker.rangeSr": string;
3939
+ "appShell.skipLink": string;
3916
3940
  "bottomNav.label": string;
3917
3941
  "breadcrumb.label": string;
3918
3942
  "pagination.jumpLabel": string;
@@ -4016,6 +4040,8 @@ interface AppShellProps extends SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElem
4016
4040
  header?: React$1.ReactNode;
4017
4041
  /** 본문 여백 (기본값: true). 자체 여백을 가진 화면은 false */
4018
4042
  padded?: boolean;
4043
+ /** "본문으로 건너뛰기" 링크 문구 (기본값: 로케일 `appShell.skipLink`). 사이드바나 헤더가 있을 때만 그린다 */
4044
+ skipLinkLabel?: string;
4019
4045
  /** 루트 요소 ref (React 19 ref-as-prop) */
4020
4046
  ref?: React$1.Ref<HTMLDivElement>;
4021
4047
  }
@@ -4032,6 +4058,8 @@ interface AppShellProps extends SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElem
4032
4058
  * 긴 문자열, 폭이 고정된 블록)이 열 자체를 자기 폭까지 늘린다. 실측 - 1800px 자식을 넣으면
4033
4059
  * 열이 1024px → 1869px 로 늘어나 고정 헤더와 모든 행이 화면보다 넓어진다. 이 값이 있으면
4034
4060
  * 열은 뷰포트 폭에 머물고 넘침은 그 자식 안에 남는다.
4061
+ * - **건너뛰기 링크.** 사이드바·헤더가 있으면 첫 Tab 에 "본문으로 건너뛰기" 가 왼쪽 위에 뜨고, Enter 로
4062
+ * `<main tabindex="-1">` 에 포커스가 가 다음 Tab 이 본문 첫 컨트롤이 된다 (WCAG 2.4.1, #940).
4035
4063
  * - **하단 크롬 여백.** `Sidebar` 는 600px 아래에서 fixed BottomBar 로 변신해 문서 흐름에서
4036
4064
  * 빠지고, `BottomNav` 도 fixed 다. 본문 끝이 그 아래로 가려지지 않게 `--bt-bottom-inset`
4037
4065
  * 만큼 띄운다.
@@ -4046,7 +4074,7 @@ interface AppShellProps extends SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElem
4046
4074
  * </AppShell>
4047
4075
  * ```
4048
4076
  */
4049
- declare const AppShell: ({ sidebar, header, padded, className, children, ref, ...props }: AppShellProps) => React$1.JSX.Element;
4077
+ declare const AppShell: ({ sidebar, header, padded, skipLinkLabel, className, children, ref, ...props }: AppShellProps) => React$1.JSX.Element;
4050
4078
 
4051
4079
  type ContainerSize = "sm" | "md" | "lg" | "xl" | "full";
4052
4080
  interface ContainerOwnProps {
@@ -1,6 +1,11 @@
1
+ @use "../a11y" as a11y;
1
2
  @use "../breakpoints" as breakpoints;
2
3
  @use "../colors" as colors;
3
4
  @use "../motion" as motion;
5
+ @use "../radius" as radius;
6
+ @use "../spacing" as spacing;
7
+ @use "../typography" as typography;
8
+ @use "../z-index" as z;
4
9
  @forward "tokens";
5
10
  @use "tokens" as *;
6
11
 
@@ -91,3 +96,34 @@
91
96
  }
92
97
 
93
98
  /* Overlay list scroll cap - dropdown/menu/select 등 오버레이 옵션 리스트의 최대 높이 */
99
+
100
+ /* Skip link */
101
+
102
+ // "본문으로 건너뛰기" 링크 (#940). 평소엔 숨기고 키보드 포커스 때 화면 왼쪽 위에 띄운다.
103
+ // 숨김도 드러남도 문서 흐름 밖(absolute → fixed)이라 grid·flex 레이아웃의 첫 자식이어도 칸을 차지하지 않는다 -
104
+ // `visually_hidden_focusable` 은 드러날 때 `position: static` 으로 돌아와 레이아웃을 민다.
105
+ // React AppShell(`.app_shell_skip_link`)과 Vanilla `.bt-skip-link` 가 이 믹스인 하나를 쓴다.
106
+ @mixin skip_link {
107
+ @include a11y.visually_hidden;
108
+
109
+ &:focus-visible {
110
+ position: fixed;
111
+ top: spacing.$spacing_8;
112
+ left: spacing.$spacing_8;
113
+ z-index: z.$z_popup;
114
+ width: auto;
115
+ height: auto;
116
+ margin: 0;
117
+ padding: spacing.$spacing_8 spacing.$spacing_16;
118
+ overflow: visible;
119
+ clip: auto;
120
+ clip-path: none;
121
+ border-radius: radius.$radius_md;
122
+ background: colors.$color_bg_solid;
123
+ color: colors.$color_text_heading;
124
+ @include typography.label_medium_medium;
125
+ text-decoration: none;
126
+ outline: 2px solid transparent; // 고대비 모드용
127
+ box-shadow: a11y.$focus_ring;
128
+ }
129
+ }