@bigtablet/design-system 3.24.0 → 3.25.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 +60 -48
- package/dist/index.js +79 -47
- package/dist/vanilla/bigtablet.min.js +1 -1
- package/package.json +5 -3
package/dist/index.d.ts
CHANGED
|
@@ -64,10 +64,22 @@ type PolymorphicProps<T extends React$1.ElementType, Own> = Own & {
|
|
|
64
64
|
as?: T;
|
|
65
65
|
/** 루트 요소 ref (React 19 ref-as-prop) */
|
|
66
66
|
ref?: PolymorphicRef<T>;
|
|
67
|
-
} & Omit<React$1.ComponentPropsWithoutRef<T>, keyof Own | "as" | "ref">;
|
|
67
|
+
} & Omit<React$1.ComponentPropsWithoutRef<T>, keyof Own | "as" | "ref" | "dangerouslySetInnerHTML">;
|
|
68
68
|
/** `as` 에 준 요소의 ref 타입 */
|
|
69
69
|
type PolymorphicRef<T extends React$1.ElementType> = React$1.ComponentPropsWithRef<T>["ref"];
|
|
70
70
|
|
|
71
|
+
/**
|
|
72
|
+
* 컴포넌트 props 에서 `dangerouslySetInnerHTML` 을 뺀다 (시큐어코딩 가이드 W-1-4-6).
|
|
73
|
+
*
|
|
74
|
+
* DS 컴포넌트는 나머지 props 를 루트 요소에 펼치므로, HTML 속성 타입을 그대로 확장하면
|
|
75
|
+
* `<Button dangerouslySetInnerHTML={{ __html: input }} />` 가 타입 검사를 통과해 그대로 DOM 에
|
|
76
|
+
* 닿는다. 마크업이 필요하면 `children` 으로 넘긴다.
|
|
77
|
+
*
|
|
78
|
+
* 새 컴포넌트는 `React.*HTMLAttributes<…>` 를 직접 확장하지 말고 이 타입으로 감싼다 -
|
|
79
|
+
* `safe-html.type-test.tsx` 가 공개 export 전체를 검사해 빠진 곳을 tsc 에러로 잡는다.
|
|
80
|
+
*/
|
|
81
|
+
type SafeHTMLProps<P> = Omit<P, "dangerouslySetInnerHTML">;
|
|
82
|
+
|
|
71
83
|
interface FocusTrapOptions {
|
|
72
84
|
/**
|
|
73
85
|
* 초기 포커스를 **먼저 찾을** 영역. 여기 안에 포커스 가능한 컨트롤이 있으면 그 첫 번째로
|
|
@@ -253,7 +265,7 @@ interface AccordionItem {
|
|
|
253
265
|
content: React$1.ReactNode;
|
|
254
266
|
disabled?: boolean;
|
|
255
267
|
}
|
|
256
|
-
interface AccordionProps extends Omit<React$1.HTMLAttributes<HTMLDivElement
|
|
268
|
+
interface AccordionProps extends Omit<SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>>, "onChange"> {
|
|
257
269
|
/** 아이템 목록 */
|
|
258
270
|
items: AccordionItem[];
|
|
259
271
|
/** 여러 개 동시에 펼침 허용 (기본 false - 한 번에 하나) */
|
|
@@ -279,7 +291,7 @@ declare const Accordion: ({ items, multiple, defaultOpenKeys, openKeys: controll
|
|
|
279
291
|
|
|
280
292
|
type AvatarSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
281
293
|
type AvatarShape = "circle" | "square";
|
|
282
|
-
interface AvatarProps extends React$1.HTMLAttributes<HTMLSpanElement
|
|
294
|
+
interface AvatarProps extends SafeHTMLProps<React$1.HTMLAttributes<HTMLSpanElement>> {
|
|
283
295
|
/** 이미지 URL */
|
|
284
296
|
src?: string;
|
|
285
297
|
/** alt 텍스트 (이미지일 때) 또는 initials 추출용 이름 */
|
|
@@ -307,7 +319,7 @@ type BadgeVariant = "accent" | "neutral" | "info" | "success" | "warning" | "err
|
|
|
307
319
|
type BadgeShape = "dot" | "count" | "label";
|
|
308
320
|
type BadgeSize = "sm" | "md" | "lg";
|
|
309
321
|
type BadgeAppearance = "solid" | "soft";
|
|
310
|
-
interface BadgeProps extends React$1.HTMLAttributes<HTMLSpanElement
|
|
322
|
+
interface BadgeProps extends SafeHTMLProps<React$1.HTMLAttributes<HTMLSpanElement>> {
|
|
311
323
|
/** 색상 variant (기본값: "accent") */
|
|
312
324
|
variant?: BadgeVariant;
|
|
313
325
|
/** 모양 (기본값: "label"). dot=점만 / count=숫자 / label=텍스트 */
|
|
@@ -352,7 +364,7 @@ interface DescriptionListItem {
|
|
|
352
364
|
full?: boolean;
|
|
353
365
|
}
|
|
354
366
|
type DescriptionListLayout = "row" | "stack";
|
|
355
|
-
interface DescriptionListProps extends React$1.HTMLAttributes<HTMLDListElement
|
|
367
|
+
interface DescriptionListProps extends SafeHTMLProps<React$1.HTMLAttributes<HTMLDListElement>> {
|
|
356
368
|
/** 이름·값 쌍 */
|
|
357
369
|
items: DescriptionListItem[];
|
|
358
370
|
/**
|
|
@@ -390,7 +402,7 @@ declare const DescriptionList: ({ items, layout, divided, className, ref, ...pro
|
|
|
390
402
|
|
|
391
403
|
/** 변화량의 색. 방향(↑↓)과 좋음/나쁨은 다르다 - "재고 부족 +2" 는 오르지만 나쁘다 */
|
|
392
404
|
type StatDeltaTone = "positive" | "negative" | "neutral";
|
|
393
|
-
interface StatProps extends React$1.HTMLAttributes<HTMLDivElement
|
|
405
|
+
interface StatProps extends SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>> {
|
|
394
406
|
/** 지표 이름 */
|
|
395
407
|
label: React$1.ReactNode;
|
|
396
408
|
/** 지표 값. 숫자는 `tabular-nums` 로 폭이 고정된다 */
|
|
@@ -427,7 +439,7 @@ interface TimelineItem {
|
|
|
427
439
|
/** 항목 아래에 붙일 임의 내용 (첨부, 액션 버튼 등) */
|
|
428
440
|
children?: React$1.ReactNode;
|
|
429
441
|
}
|
|
430
|
-
interface TimelineProps extends React$1.HTMLAttributes<HTMLOListElement
|
|
442
|
+
interface TimelineProps extends SafeHTMLProps<React$1.HTMLAttributes<HTMLOListElement>> {
|
|
431
443
|
/** 위에서 아래로 흐르는 순서대로 */
|
|
432
444
|
items: TimelineItem[];
|
|
433
445
|
/** 루트 요소 ref (React 19 ref-as-prop) */
|
|
@@ -435,7 +447,7 @@ interface TimelineProps extends React$1.HTMLAttributes<HTMLOListElement> {
|
|
|
435
447
|
}
|
|
436
448
|
declare const Timeline: ({ items, className, ref, ...props }: TimelineProps) => React$1.JSX.Element;
|
|
437
449
|
|
|
438
|
-
interface EmptyStateProps extends Omit<React$1.HTMLAttributes<HTMLDivElement
|
|
450
|
+
interface EmptyStateProps extends Omit<SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>>, "title"> {
|
|
439
451
|
/**
|
|
440
452
|
* 일러스트 영역 (아이콘/이미지 등). **장식 전용** - `aria-hidden="true"` 래퍼로 접근성 트리에서
|
|
441
453
|
* 제외된다. 포커스 가능한 요소(버튼/링크 등)를 넣으면 포커스는 가는데 보조기기엔 없는 요소가
|
|
@@ -474,7 +486,7 @@ interface EmptyStateProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "
|
|
|
474
486
|
declare const EmptyState: ({ illustration, title, description, action, size, fillHeight, className, ...props }: EmptyStateProps) => React$1.JSX.Element;
|
|
475
487
|
|
|
476
488
|
type ErrorStateVariant = "page" | "widget";
|
|
477
|
-
interface ErrorStateProps extends Omit<React$1.HTMLAttributes<HTMLDivElement
|
|
489
|
+
interface ErrorStateProps extends Omit<SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>>, "title"> {
|
|
478
490
|
/** 제목 (기본 "문제가 발생했습니다") */
|
|
479
491
|
title?: React$1.ReactNode;
|
|
480
492
|
/** 보조 설명 */
|
|
@@ -514,7 +526,7 @@ interface ErrorStateProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "
|
|
|
514
526
|
*/
|
|
515
527
|
declare const ErrorState: ({ title: titleProp, description, icon, action, variant, className, ...props }: ErrorStateProps) => React$1.JSX.Element;
|
|
516
528
|
|
|
517
|
-
interface BottomNavProps extends Omit<React$1.HTMLAttributes<HTMLElement
|
|
529
|
+
interface BottomNavProps extends Omit<SafeHTMLProps<React$1.HTMLAttributes<HTMLElement>>, "onChange"> {
|
|
518
530
|
/** 스크린 리더 레이블 (기본 "주요 메뉴") */
|
|
519
531
|
ariaLabel?: string;
|
|
520
532
|
/** 2–5 개의 `BottomNavItem` */
|
|
@@ -573,7 +585,7 @@ declare const BottomNavItem: <T extends React$1.ElementType = "button">(props: B
|
|
|
573
585
|
* 페이지 본문 끝에 두면 `BottomNav` 가 콘텐츠를 가리지 않게 빈 공간 확보.
|
|
574
586
|
* `--bt-bottom-nav-height` (+ safe-area) 만큼 height.
|
|
575
587
|
*/
|
|
576
|
-
declare const BottomNavSpacer: ({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement
|
|
588
|
+
declare const BottomNavSpacer: ({ className, ...props }: SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>>) => React$1.JSX.Element;
|
|
577
589
|
|
|
578
590
|
interface BreadcrumbItem {
|
|
579
591
|
/** 표시 텍스트 */
|
|
@@ -594,7 +606,7 @@ interface BreadcrumbItem {
|
|
|
594
606
|
*/
|
|
595
607
|
as?: React$1.ElementType;
|
|
596
608
|
}
|
|
597
|
-
interface BreadcrumbProps extends React$1.HTMLAttributes<HTMLElement
|
|
609
|
+
interface BreadcrumbProps extends SafeHTMLProps<React$1.HTMLAttributes<HTMLElement>> {
|
|
598
610
|
/** 경로 아이템 배열. 마지막은 현재 페이지로 간주 */
|
|
599
611
|
items: BreadcrumbItem[];
|
|
600
612
|
/** 구분자 (기본값: ChevronRight 아이콘) */
|
|
@@ -663,7 +675,7 @@ interface NavBarLocaleConfig {
|
|
|
663
675
|
*/
|
|
664
676
|
ariaLabel?: string;
|
|
665
677
|
}
|
|
666
|
-
interface NavBarProps extends React$1.HTMLAttributes<HTMLElement
|
|
678
|
+
interface NavBarProps extends SafeHTMLProps<React$1.HTMLAttributes<HTMLElement>> {
|
|
667
679
|
/** 왼쪽 brand/로고 영역 */
|
|
668
680
|
brand?: React$1.ReactNode;
|
|
669
681
|
/** 중앙 또는 우측의 검색 영역 (TextField 등) */
|
|
@@ -719,7 +731,7 @@ type NavLinkProps<T extends React$1.ElementType = "a"> = PolymorphicProps<T, Nav
|
|
|
719
731
|
declare const NavLink: <T extends React$1.ElementType = "a">(props: NavLinkProps<T>) => React$1.JSX.Element;
|
|
720
732
|
|
|
721
733
|
type SidebarMode = "auto" | "static";
|
|
722
|
-
interface SidebarProps extends Omit<React$1.HTMLAttributes<HTMLElement
|
|
734
|
+
interface SidebarProps extends Omit<SafeHTMLProps<React$1.HTMLAttributes<HTMLElement>>, "onChange"> {
|
|
723
735
|
/** 상단 brand 영역 (펼친 상태 로고) */
|
|
724
736
|
header?: React$1.ReactNode;
|
|
725
737
|
/** collapsed 상태 헤더 (보통 favicon). 미지정 시 collapsed 에서도 `header` 사용. */
|
|
@@ -792,7 +804,7 @@ type SidebarItemProps<T extends React$1.ElementType = "button"> = PolymorphicPro
|
|
|
792
804
|
href: string;
|
|
793
805
|
} : Record<never, never>);
|
|
794
806
|
declare const SidebarItem: <T extends React$1.ElementType = "button">(props: SidebarItemProps<T>) => React$1.JSX.Element;
|
|
795
|
-
interface SidebarSectionProps extends React$1.HTMLAttributes<HTMLDivElement
|
|
807
|
+
interface SidebarSectionProps extends SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>> {
|
|
796
808
|
/** 섹션 라벨 (collapsed 상태에선 hidden) */
|
|
797
809
|
label?: string;
|
|
798
810
|
}
|
|
@@ -810,7 +822,7 @@ interface StepperStep {
|
|
|
810
822
|
/** 이름 아래 짧은 설명. 인라인 내용만 */
|
|
811
823
|
description?: React$1.ReactNode;
|
|
812
824
|
}
|
|
813
|
-
interface StepperProps extends Omit<React$1.HTMLAttributes<HTMLOListElement
|
|
825
|
+
interface StepperProps extends Omit<SafeHTMLProps<React$1.HTMLAttributes<HTMLOListElement>>, "onClick"> {
|
|
814
826
|
/** 순서대로 */
|
|
815
827
|
steps: StepperStep[];
|
|
816
828
|
/** 현재 단계 인덱스 (0-based). 앞은 `done`, 뒤는 `pending` 이 된다 */
|
|
@@ -856,7 +868,7 @@ declare const Stepper: {
|
|
|
856
868
|
|
|
857
869
|
type TabsVariant = "line" | "fills";
|
|
858
870
|
type TabsSize = "sm" | "md";
|
|
859
|
-
interface TabsProps extends Omit<React$1.HTMLAttributes<HTMLDivElement
|
|
871
|
+
interface TabsProps extends Omit<SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>>, "onChange"> {
|
|
860
872
|
/** 제어형: 현재 활성 tab의 value */
|
|
861
873
|
value?: string;
|
|
862
874
|
/** 비제어형: 초기 활성 tab의 value */
|
|
@@ -875,17 +887,17 @@ interface TabsProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "onChan
|
|
|
875
887
|
* - 비제어형: `defaultValue`
|
|
876
888
|
*/
|
|
877
889
|
declare const Tabs: ({ value: controlledValue, defaultValue, onValueChange, variant, size, className, children, ...props }: TabsProps) => React$1.JSX.Element;
|
|
878
|
-
interface TabListProps extends React$1.HTMLAttributes<HTMLDivElement
|
|
890
|
+
interface TabListProps extends SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>> {
|
|
879
891
|
/** 스크린리더 라벨 */
|
|
880
892
|
ariaLabel?: string;
|
|
881
893
|
}
|
|
882
894
|
declare const TabList: ({ ariaLabel, className, children, ...props }: TabListProps) => React$1.JSX.Element;
|
|
883
|
-
interface TabProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement
|
|
895
|
+
interface TabProps extends Omit<SafeHTMLProps<React$1.ButtonHTMLAttributes<HTMLButtonElement>>, "value"> {
|
|
884
896
|
/** 이 tab의 value */
|
|
885
897
|
value: string;
|
|
886
898
|
}
|
|
887
899
|
declare const Tab: ({ value, className, children, onClick, onKeyDown, ...props }: TabProps) => React$1.JSX.Element;
|
|
888
|
-
interface TabPanelProps extends React$1.HTMLAttributes<HTMLDivElement
|
|
900
|
+
interface TabPanelProps extends SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>> {
|
|
889
901
|
/** 이 panel을 활성화할 tab의 value */
|
|
890
902
|
value: string;
|
|
891
903
|
/** 비활성 panel을 unmount 할지 (기본 true). false면 display: none으로 유지 */
|
|
@@ -1458,7 +1470,7 @@ declare const zIndex: {
|
|
|
1458
1470
|
|
|
1459
1471
|
type CardVariant = "default" | "accent" | "glass" | "outlined";
|
|
1460
1472
|
type CardFooterAlign = "start" | "between" | "end";
|
|
1461
|
-
interface CardProps extends React$1.HTMLAttributes<HTMLDivElement
|
|
1473
|
+
interface CardProps extends SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>> {
|
|
1462
1474
|
/** 카드 상단에 표시할 제목 */
|
|
1463
1475
|
heading?: React$1.ReactNode;
|
|
1464
1476
|
/** 제목에 사용할 시맨틱 헤딩 태그 (기본값: "h3"). 스크린리더 outline에 반영됩니다. */
|
|
@@ -1496,7 +1508,7 @@ declare const Card: ({ heading, headingAs: HeadingTag, shadow, padding, bordered
|
|
|
1496
1508
|
type ChipType = "basic" | "input" | "filter" | "static";
|
|
1497
1509
|
type ChipSize = "sm" | "md";
|
|
1498
1510
|
type ChipTone = "default" | "accent" | "info" | "success" | "warning" | "error";
|
|
1499
|
-
interface ChipProps extends Omit<React$1.HTMLAttributes<HTMLDivElement
|
|
1511
|
+
interface ChipProps extends Omit<SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>>, "onClick"> {
|
|
1500
1512
|
/** 칩 유형 (기본값: "basic"). `static`은 비인터랙티브 라벨 (구 Tag 대체) */
|
|
1501
1513
|
type?: ChipType;
|
|
1502
1514
|
/** 칩 크기 (미지정 시 기본 32px). "sm"=24px, "md"=28px */
|
|
@@ -1676,7 +1688,7 @@ interface DataViewPagination {
|
|
|
1676
1688
|
/** 페이지 변경 콜백 */
|
|
1677
1689
|
onPageChange: (page: number) => void;
|
|
1678
1690
|
}
|
|
1679
|
-
interface DataViewProps<T extends object> extends Omit<React$1.HTMLAttributes<HTMLDivElement
|
|
1691
|
+
interface DataViewProps<T extends object> extends Omit<SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>>, "children"> {
|
|
1680
1692
|
/** 데이터와 그 상태 */
|
|
1681
1693
|
query: DataViewQuery<T>;
|
|
1682
1694
|
/** 표 컬럼 정의 */
|
|
@@ -1746,7 +1758,7 @@ interface DataViewProps<T extends object> extends Omit<React$1.HTMLAttributes<HT
|
|
|
1746
1758
|
*/
|
|
1747
1759
|
declare const DataView: <T extends object>({ query, columns, rowKey, toolbar, selectionActions, pagination, empty, sort, onSortChange, onRowClick, ariaLabel, selectAllAriaLabel, selectRowAriaLabel, selectionSummary: selectionSummaryProp, clearSelectionLabel: clearSelectionLabelProp, errorTitle: errorTitleProp, retryLabel: retryLabelProp, className, ...props }: DataViewProps<T>) => React$1.JSX.Element;
|
|
1748
1760
|
|
|
1749
|
-
interface DividerProps extends React$1.HTMLAttributes<HTMLHRElement
|
|
1761
|
+
interface DividerProps extends SafeHTMLProps<React$1.HTMLAttributes<HTMLHRElement>> {
|
|
1750
1762
|
/** 구분선 두께 (기본값: "standard") */
|
|
1751
1763
|
weight?: "standard" | "heavy";
|
|
1752
1764
|
}
|
|
@@ -1769,7 +1781,7 @@ interface HeroAction {
|
|
|
1769
1781
|
type HeroHeight = "sm" | "md" | "lg" | "full";
|
|
1770
1782
|
type HeroAlign = "left" | "center" | "right";
|
|
1771
1783
|
type HeroOverlay = boolean | "dark" | "light";
|
|
1772
|
-
interface HeroProps extends Omit<React$1.HTMLAttributes<HTMLElement
|
|
1784
|
+
interface HeroProps extends Omit<SafeHTMLProps<React$1.HTMLAttributes<HTMLElement>>, "title"> {
|
|
1773
1785
|
/** 히어로 높이 (기본값: "md"). sm=320 / md=480 / lg=640 / full=100vh */
|
|
1774
1786
|
height?: HeroHeight;
|
|
1775
1787
|
/** 텍스트 정렬 (기본값: "left") */
|
|
@@ -1807,7 +1819,7 @@ interface HeroProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "title"> {
|
|
|
1807
1819
|
*/
|
|
1808
1820
|
declare const Hero: ({ height, align, backgroundImage, backgroundColor, overlay, title, subtitle, eyebrow, textColor, primaryAction, secondaryAction, children, className, style, ...props }: HeroProps) => React$1.JSX.Element;
|
|
1809
1821
|
|
|
1810
|
-
interface IconProps extends Omit<LucideProps, "ref"> {
|
|
1822
|
+
interface IconProps extends Omit<LucideProps, "ref" | "dangerouslySetInnerHTML"> {
|
|
1811
1823
|
/** lucide-react 아이콘 컴포넌트 */
|
|
1812
1824
|
icon: LucideIcon;
|
|
1813
1825
|
}
|
|
@@ -1831,7 +1843,7 @@ declare const Icon: {
|
|
|
1831
1843
|
displayName: string;
|
|
1832
1844
|
};
|
|
1833
1845
|
|
|
1834
|
-
interface ListItemProps extends Omit<React$1.HTMLAttributes<HTMLDivElement
|
|
1846
|
+
interface ListItemProps extends Omit<SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>>, "onClick"> {
|
|
1835
1847
|
/** 오버라인 (상단 작은 글씨). 문자열 또는 노드(강조/링크/아이콘) */
|
|
1836
1848
|
overline?: React$1.ReactNode;
|
|
1837
1849
|
/** 라벨 (주요 텍스트). 문자열 또는 노드(강조/링크/Badge 등) */
|
|
@@ -1867,7 +1879,7 @@ interface MediaCardImage {
|
|
|
1867
1879
|
src: string;
|
|
1868
1880
|
alt: string;
|
|
1869
1881
|
}
|
|
1870
|
-
interface MediaCardProps extends Omit<React$1.HTMLAttributes<HTMLDivElement
|
|
1882
|
+
interface MediaCardProps extends Omit<SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>>, "title"> {
|
|
1871
1883
|
/** 이미지 정보 (src + alt). alt=""는 장식 이미지로 처리됨 */
|
|
1872
1884
|
image: MediaCardImage;
|
|
1873
1885
|
/** 이미지 위치 (기본값: "top"). overlay = 이미지 위에 텍스트가 얹힘 */
|
|
@@ -1898,7 +1910,7 @@ interface MediaCardProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "t
|
|
|
1898
1910
|
declare const MediaCard: ({ image, imagePosition, aspectRatio, heading, headingAs: HeadingTag, eyebrow, shadow, bordered, clickable, meta, children, className, ...props }: MediaCardProps) => React$1.JSX.Element;
|
|
1899
1911
|
|
|
1900
1912
|
type ProseSize = "md" | "lg";
|
|
1901
|
-
interface ProseProps extends React$1.HTMLAttributes<HTMLDivElement
|
|
1913
|
+
interface ProseProps extends SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>> {
|
|
1902
1914
|
/**
|
|
1903
1915
|
* 본문 스케일 (기본값: "md").
|
|
1904
1916
|
* - `md`: 공지·FAQ·이메일 프리뷰처럼 좁은 폭에 들어가는 본문 (h1 24 / h2 20 / h3 18)
|
|
@@ -1970,7 +1982,7 @@ declare const AlertProvider: React$1.FC<{
|
|
|
1970
1982
|
children: React$1.ReactNode;
|
|
1971
1983
|
}>;
|
|
1972
1984
|
|
|
1973
|
-
interface LinearProgressProps extends React.HTMLAttributes<HTMLDivElement
|
|
1985
|
+
interface LinearProgressProps extends SafeHTMLProps<React.HTMLAttributes<HTMLDivElement>> {
|
|
1974
1986
|
/** 전체 단계 수 */
|
|
1975
1987
|
totalSteps: number;
|
|
1976
1988
|
/** 현재 단계 (0부터 totalSteps까지) */
|
|
@@ -1987,7 +1999,7 @@ interface LinearProgressProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
1987
1999
|
declare const LinearProgress: ({ totalSteps, currentStep, className, ...props }: LinearProgressProps) => React$1.JSX.Element;
|
|
1988
2000
|
|
|
1989
2001
|
type SkeletonVariant = "text" | "title" | "avatar" | "rect";
|
|
1990
|
-
interface SkeletonProps extends Omit<React$1.HTMLAttributes<HTMLDivElement
|
|
2002
|
+
interface SkeletonProps extends Omit<SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>>, "children"> {
|
|
1991
2003
|
/** 스켈레톤 모양 (기본값: "text") */
|
|
1992
2004
|
variant?: SkeletonVariant;
|
|
1993
2005
|
/** CSS width 값 (예: "100%", 200, "16rem"). variant=avatar는 width=height로 사용 */
|
|
@@ -2098,7 +2110,7 @@ interface TopLoadingProps {
|
|
|
2098
2110
|
*/
|
|
2099
2111
|
declare const TopLoading: ({ progress, color, height, isLoading, ariaLabel: ariaLabelProp, }: TopLoadingProps) => React$1.JSX.Element | null;
|
|
2100
2112
|
|
|
2101
|
-
interface CheckboxProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement
|
|
2113
|
+
interface CheckboxProps extends Omit<SafeHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>>, "size"> {
|
|
2102
2114
|
/** 체크박스 옆에 표시할 라벨 */
|
|
2103
2115
|
label?: React$1.ReactNode;
|
|
2104
2116
|
/** 중간 선택(indeterminate) 상태 여부 */
|
|
@@ -2128,7 +2140,7 @@ interface ComboboxOption {
|
|
|
2128
2140
|
disabled?: boolean;
|
|
2129
2141
|
}
|
|
2130
2142
|
type ComboboxSize = "sm" | "md" | "lg";
|
|
2131
|
-
interface ComboboxProps extends Omit<React$1.HTMLAttributes<HTMLDivElement
|
|
2143
|
+
interface ComboboxProps extends Omit<SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>>, "onChange" | "defaultValue"> {
|
|
2132
2144
|
/** 선택된 값 (제어형) */
|
|
2133
2145
|
value?: ComboboxOption | null;
|
|
2134
2146
|
/** 선택 변경 콜백 */
|
|
@@ -2439,7 +2451,7 @@ interface FieldControl {
|
|
|
2439
2451
|
* ```
|
|
2440
2452
|
*/
|
|
2441
2453
|
declare function useFieldControl(): FieldControl | undefined;
|
|
2442
|
-
interface FieldProps extends Omit<React$1.HTMLAttributes<HTMLDivElement
|
|
2454
|
+
interface FieldProps extends Omit<SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>>, "children"> {
|
|
2443
2455
|
/** 필드 이름. `Form` 의 `errors[name]` 을 찾는 키이자 입력 id 의 접두사 */
|
|
2444
2456
|
name: string;
|
|
2445
2457
|
/** 라벨 텍스트. `Field` 가 소유하므로 자식 입력에는 `label` 을 주지 않는다 */
|
|
@@ -2483,7 +2495,7 @@ interface FieldProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "child
|
|
|
2483
2495
|
declare const Field: ({ name, label, labelAction, required, help, error: errorProp, children, className, ...props }: FieldProps) => React$1.JSX.Element;
|
|
2484
2496
|
|
|
2485
2497
|
type FileInputVariant = "button" | "preview";
|
|
2486
|
-
interface FileInputProps extends React$1.InputHTMLAttributes<HTMLInputElement
|
|
2498
|
+
interface FileInputProps extends SafeHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>> {
|
|
2487
2499
|
/** 파일 선택 버튼 라벨 / preview variant 빈 상태 텍스트 */
|
|
2488
2500
|
label?: string;
|
|
2489
2501
|
/** 파일 선택 시 호출되는 콜백 */
|
|
@@ -2509,7 +2521,7 @@ interface FileInputProps extends React$1.InputHTMLAttributes<HTMLInputElement> {
|
|
|
2509
2521
|
*/
|
|
2510
2522
|
declare const FileInput: ({ label: labelProp, onFiles, supportingText, preview, variant, previewSize, className, disabled, accept, onChange, ...props }: FileInputProps) => React$1.JSX.Element;
|
|
2511
2523
|
|
|
2512
|
-
interface FormProps extends Omit<React$1.FormHTMLAttributes<HTMLFormElement
|
|
2524
|
+
interface FormProps extends Omit<SafeHTMLProps<React$1.FormHTMLAttributes<HTMLFormElement>>, "onSubmit"> {
|
|
2513
2525
|
/**
|
|
2514
2526
|
* 필드 이름 → 에러 메시지. 해당 `Field` 가 자기 이름으로 찾아 표시한다.
|
|
2515
2527
|
* 서버 검증 실패(422) 응답을 필드에 꽂는 표준 경로다.
|
|
@@ -2544,7 +2556,7 @@ declare const Form: {
|
|
|
2544
2556
|
displayName: string;
|
|
2545
2557
|
};
|
|
2546
2558
|
};
|
|
2547
|
-
interface FormActionsProps extends React$1.HTMLAttributes<HTMLDivElement
|
|
2559
|
+
interface FormActionsProps extends SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>> {
|
|
2548
2560
|
/** 버튼 정렬 (기본값: "end") */
|
|
2549
2561
|
align?: "start" | "center" | "end" | "between";
|
|
2550
2562
|
children: React$1.ReactNode;
|
|
@@ -2670,7 +2682,7 @@ declare const OtpInput: {
|
|
|
2670
2682
|
displayName: string;
|
|
2671
2683
|
};
|
|
2672
2684
|
|
|
2673
|
-
interface RadioProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement
|
|
2685
|
+
interface RadioProps extends Omit<SafeHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>>, "size"> {
|
|
2674
2686
|
/** 라디오 버튼 옆에 표시할 라벨 */
|
|
2675
2687
|
label?: React$1.ReactNode;
|
|
2676
2688
|
/** 라디오 버튼 크기 (기본값: "md"). `RadioGroup` 안에서는 그룹 size 가 기본값. */
|
|
@@ -2709,7 +2721,7 @@ interface RadioGroupContextValue {
|
|
|
2709
2721
|
* `RadioGroup` 밖에서 쓰이면 `null` 을 반환 — 이 경우 Radio 는 standalone 으로 동작.
|
|
2710
2722
|
*/
|
|
2711
2723
|
declare function useRadioGroupContext(): RadioGroupContextValue | null;
|
|
2712
|
-
interface RadioGroupProps extends Omit<React$1.HTMLAttributes<HTMLDivElement
|
|
2724
|
+
interface RadioGroupProps extends Omit<SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>>, "onChange"> {
|
|
2713
2725
|
/** 제어형: 선택된 value */
|
|
2714
2726
|
value?: string;
|
|
2715
2727
|
/** 비제어형: 초기 선택 value */
|
|
@@ -2755,7 +2767,7 @@ declare const RadioGroup: {
|
|
|
2755
2767
|
};
|
|
2756
2768
|
|
|
2757
2769
|
type TagInputSize = "sm" | "md" | "lg";
|
|
2758
|
-
interface TagInputProps extends Omit<React$1.HTMLAttributes<HTMLDivElement
|
|
2770
|
+
interface TagInputProps extends Omit<SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>>, "onChange" | "defaultValue"> {
|
|
2759
2771
|
/** 태그 목록 (제어형). 주지 않으면 내부 상태로 동작한다 */
|
|
2760
2772
|
value?: string[];
|
|
2761
2773
|
/** 비제어형 초기 태그 */
|
|
@@ -2808,7 +2820,7 @@ type TextFieldVariant = "outline" | "filled";
|
|
|
2808
2820
|
* - `immediate`: 조합 중에도 매 입력마다 즉시 호출 (실시간 검색/필터/미리보기용).
|
|
2809
2821
|
*/
|
|
2810
2822
|
type ImeStrategy = "delayed" | "immediate";
|
|
2811
|
-
interface TextFieldProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement
|
|
2823
|
+
interface TextFieldProps extends Omit<SafeHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>>, "size" | "onChange" | "value" | "defaultValue"> {
|
|
2812
2824
|
/** 입력 필드 크기 */
|
|
2813
2825
|
size?: TextFieldSize;
|
|
2814
2826
|
/** 입력 필드 시각 변형 */
|
|
@@ -2896,7 +2908,7 @@ declare const TextField: {
|
|
|
2896
2908
|
|
|
2897
2909
|
type TextareaSize = TextFieldSize;
|
|
2898
2910
|
type TextareaResize = "none" | "vertical" | "both";
|
|
2899
|
-
interface TextareaProps extends Omit<React$1.TextareaHTMLAttributes<HTMLTextAreaElement
|
|
2911
|
+
interface TextareaProps extends Omit<SafeHTMLProps<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>>, "size" | "onChange" | "value" | "defaultValue" | "rows"> {
|
|
2900
2912
|
/** 입력 필드 크기 (기본값: "md") */
|
|
2901
2913
|
size?: TextareaSize;
|
|
2902
2914
|
/** 입력 필드 위에 표시할 라벨 텍스트 */
|
|
@@ -3009,7 +3021,7 @@ interface TimePickerProps {
|
|
|
3009
3021
|
*/
|
|
3010
3022
|
declare const TimePicker: ({ label, value, onValueChange, minuteStep, minTime, maxTime, disabled, required, fullWidth, hourLabel: hourLabelProp, minuteLabel: minuteLabelProp, }: TimePickerProps) => React$1.JSX.Element;
|
|
3011
3023
|
|
|
3012
|
-
interface ToggleProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement
|
|
3024
|
+
interface ToggleProps extends Omit<SafeHTMLProps<React$1.ButtonHTMLAttributes<HTMLButtonElement>>, "onChange"> {
|
|
3013
3025
|
/** 제어형 토글 상태 */
|
|
3014
3026
|
checked?: boolean;
|
|
3015
3027
|
/** 비제어형 초기 토글 상태 */
|
|
@@ -3109,7 +3121,7 @@ declare const Button: <T extends React$1.ElementType = "button">(props: ButtonPr
|
|
|
3109
3121
|
type IconButtonVariant = "standard" | "filled" | "tonal" | "outlined";
|
|
3110
3122
|
type IconButtonSize = "sm" | "md";
|
|
3111
3123
|
/** 접근성 이름을 제외한 IconButton 공통 props */
|
|
3112
|
-
interface IconButtonBaseProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement
|
|
3124
|
+
interface IconButtonBaseProps extends Omit<SafeHTMLProps<React$1.ButtonHTMLAttributes<HTMLButtonElement>>, "aria-label" | "aria-labelledby"> {
|
|
3113
3125
|
/** 아이콘 버튼 스타일 변형 (기본값: "standard") */
|
|
3114
3126
|
variant?: IconButtonVariant;
|
|
3115
3127
|
/** 아이콘 버튼 크기 (기본값: "md") */
|
|
@@ -3190,7 +3202,7 @@ declare const Pagination: ({ page, totalPages, onPageChange, onChange, prevLabel
|
|
|
3190
3202
|
|
|
3191
3203
|
/** Drawer 가 미끄러져 들어오는 방향 (top 은 범위 외) */
|
|
3192
3204
|
type DrawerPlacement = "left" | "right" | "bottom";
|
|
3193
|
-
interface DrawerProps extends Omit<React$1.HTMLAttributes<HTMLDivElement
|
|
3205
|
+
interface DrawerProps extends Omit<SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>>, "title" | "onClick" | "onKeyDown" | "onPointerDown"> {
|
|
3194
3206
|
/** 드로어 열림 여부 */
|
|
3195
3207
|
open: boolean;
|
|
3196
3208
|
/** 드로어 닫기 콜백 */
|
|
@@ -3247,7 +3259,7 @@ declare const Drawer: {
|
|
|
3247
3259
|
};
|
|
3248
3260
|
|
|
3249
3261
|
type ModalFooterAlign = "end" | "between" | "start";
|
|
3250
|
-
interface ModalProps extends Omit<React$1.HTMLAttributes<HTMLDivElement
|
|
3262
|
+
interface ModalProps extends Omit<SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>>, "title" | "onClick" | "onKeyDown" | "onPointerDown"> {
|
|
3251
3263
|
/** 모달 열림 여부 */
|
|
3252
3264
|
open: boolean;
|
|
3253
3265
|
/** 모달 닫기 콜백 */
|
|
@@ -3461,7 +3473,7 @@ interface ThemeProviderProps {
|
|
|
3461
3473
|
*/
|
|
3462
3474
|
declare const ThemeProvider: React$1.FC<ThemeProviderProps>;
|
|
3463
3475
|
|
|
3464
|
-
interface AppShellProps extends React$1.HTMLAttributes<HTMLDivElement
|
|
3476
|
+
interface AppShellProps extends SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>> {
|
|
3465
3477
|
/** 좌측 네비게이션. 보통 `Sidebar` */
|
|
3466
3478
|
sidebar?: React$1.ReactNode;
|
|
3467
3479
|
/** 콘텐츠 열 위에 고정되는 헤더. 보통 `NavBar` */
|
|
@@ -3585,7 +3597,7 @@ type GridProps<T extends React$1.ElementType = "div"> = PolymorphicProps<T, Grid
|
|
|
3585
3597
|
*/
|
|
3586
3598
|
declare const Grid: <T extends React$1.ElementType = "div">({ cols, minColWidth, gap, rowGap, colGap, singleColOnMobile, as, ref, className, children, style, ...props }: GridProps<T>) => React$1.JSX.Element;
|
|
3587
3599
|
|
|
3588
|
-
interface PageHeaderProps extends Omit<React$1.HTMLAttributes<HTMLDivElement
|
|
3600
|
+
interface PageHeaderProps extends Omit<SafeHTMLProps<React$1.HTMLAttributes<HTMLDivElement>>, "title"> {
|
|
3589
3601
|
/** 화면 제목. `h1` 로 렌더된다 */
|
|
3590
3602
|
title: React$1.ReactNode;
|
|
3591
3603
|
/** 제목 아래 한 줄 설명 */
|
package/dist/index.js
CHANGED
|
@@ -54,7 +54,7 @@ function keyActivationProps({
|
|
|
54
54
|
}
|
|
55
55
|
var stack = [];
|
|
56
56
|
var handleKeyDown = (e) => {
|
|
57
|
-
if (e.key !== "Escape") return;
|
|
57
|
+
if (e.key !== "Escape" || e.defaultPrevented) return;
|
|
58
58
|
const top = stack[stack.length - 1];
|
|
59
59
|
if (!top) return;
|
|
60
60
|
e.stopImmediatePropagation();
|
|
@@ -186,15 +186,6 @@ function unlockBodyScroll() {
|
|
|
186
186
|
}
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
// src/utils/spring-motion.ts
|
|
190
|
-
function springEnterFrom(reduced, transform) {
|
|
191
|
-
if (reduced) return {};
|
|
192
|
-
return { from: transform === void 0 ? { opacity: 0 } : { opacity: 0, transform } };
|
|
193
|
-
}
|
|
194
|
-
var OVERLAY_PANEL_CLOSED_TRANSFORM = "scale(0.96) translateY(-4px)";
|
|
195
|
-
var OVERLAY_PANEL_OPEN_TRANSFORM = "scale(1) translateY(0px)";
|
|
196
|
-
var OVERLAY_SPRING_CONFIG = { tension: 280, friction: 28, clamp: true };
|
|
197
|
-
|
|
198
189
|
// src/utils/split-aria-props.ts
|
|
199
190
|
function splitAriaProps(props) {
|
|
200
191
|
const ariaProps = {};
|
|
@@ -204,6 +195,15 @@ function splitAriaProps(props) {
|
|
|
204
195
|
}
|
|
205
196
|
return { ariaProps, restProps };
|
|
206
197
|
}
|
|
198
|
+
|
|
199
|
+
// src/utils/spring-motion.ts
|
|
200
|
+
function springEnterFrom(reduced, transform) {
|
|
201
|
+
if (reduced) return {};
|
|
202
|
+
return { from: transform === void 0 ? { opacity: 0 } : { opacity: 0, transform } };
|
|
203
|
+
}
|
|
204
|
+
var OVERLAY_PANEL_CLOSED_TRANSFORM = "scale(0.96) translateY(-4px)";
|
|
205
|
+
var OVERLAY_PANEL_OPEN_TRANSFORM = "scale(1) translateY(0px)";
|
|
206
|
+
var OVERLAY_SPRING_CONFIG = { tension: 280, friction: 28, clamp: true };
|
|
207
207
|
var useSafeLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
208
208
|
|
|
209
209
|
// src/utils/use-anchored-position.ts
|
|
@@ -618,6 +618,7 @@ function useListboxPopup({
|
|
|
618
618
|
setActiveIndex(lastEnabled());
|
|
619
619
|
break;
|
|
620
620
|
case "Escape":
|
|
621
|
+
if (!isOpen) break;
|
|
621
622
|
event.preventDefault();
|
|
622
623
|
setIsOpen(false);
|
|
623
624
|
break;
|
|
@@ -646,6 +647,7 @@ function useListboxPopup({
|
|
|
646
647
|
commitActive();
|
|
647
648
|
break;
|
|
648
649
|
case "Escape":
|
|
650
|
+
if (!isOpen) break;
|
|
649
651
|
event.preventDefault();
|
|
650
652
|
close();
|
|
651
653
|
break;
|
|
@@ -654,7 +656,7 @@ function useListboxPopup({
|
|
|
654
656
|
break;
|
|
655
657
|
}
|
|
656
658
|
},
|
|
657
|
-
[disabled, moveActive, commitActive, close]
|
|
659
|
+
[disabled, isOpen, moveActive, commitActive, close]
|
|
658
660
|
);
|
|
659
661
|
useEffect(() => {
|
|
660
662
|
if (!isOpen) return;
|
|
@@ -781,10 +783,9 @@ var Accordion = ({
|
|
|
781
783
|
}
|
|
782
784
|
) }),
|
|
783
785
|
/* @__PURE__ */ jsx(
|
|
784
|
-
"
|
|
786
|
+
"section",
|
|
785
787
|
{
|
|
786
788
|
id: panelId,
|
|
787
|
-
role: "region",
|
|
788
789
|
"aria-labelledby": headerId,
|
|
789
790
|
"aria-hidden": !isOpen,
|
|
790
791
|
inert: !isOpen,
|
|
@@ -814,20 +815,31 @@ var Avatar = ({
|
|
|
814
815
|
const [failedSrc, setFailedSrc] = React20.useState(null);
|
|
815
816
|
const showImage = src && failedSrc !== src;
|
|
816
817
|
const initials = getInitials(name);
|
|
817
|
-
return
|
|
818
|
-
"
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
818
|
+
return (
|
|
819
|
+
// biome-ignore lint/a11y/useAriaPropsSupportedByRole: aria-label 은 role="img" 일 때만 붙는다 - 삼항을 린터가 따라가지 못한다
|
|
820
|
+
/* @__PURE__ */ jsx(
|
|
821
|
+
"span",
|
|
822
|
+
{
|
|
823
|
+
className: cn("avatar", `avatar_size_${size}`, `avatar_shape_${shape}`, className),
|
|
824
|
+
style: { background: !showImage ? bgColor : void 0, ...style },
|
|
825
|
+
role: showImage || !name ? void 0 : "img",
|
|
826
|
+
"aria-label": showImage ? void 0 : name || void 0,
|
|
827
|
+
"aria-hidden": !showImage && !name ? true : void 0,
|
|
828
|
+
...props,
|
|
829
|
+
children: showImage ? (
|
|
830
|
+
// biome-ignore lint/performance/noImgElement: DS is framework-agnostic - consumers wrap with next/image
|
|
831
|
+
/* @__PURE__ */ jsx(
|
|
832
|
+
"img",
|
|
833
|
+
{
|
|
834
|
+
src,
|
|
835
|
+
alt: name,
|
|
836
|
+
onError: () => setFailedSrc(src ?? null),
|
|
837
|
+
className: "avatar_image"
|
|
838
|
+
}
|
|
839
|
+
)
|
|
840
|
+
) : /* @__PURE__ */ jsx("span", { className: "avatar_initials", "aria-hidden": "true", children: initials })
|
|
841
|
+
}
|
|
842
|
+
)
|
|
831
843
|
);
|
|
832
844
|
};
|
|
833
845
|
var Badge = ({
|
|
@@ -1252,7 +1264,10 @@ var BottomNavItem = (props) => {
|
|
|
1252
1264
|
}
|
|
1253
1265
|
);
|
|
1254
1266
|
};
|
|
1255
|
-
var BottomNavSpacer = ({
|
|
1267
|
+
var BottomNavSpacer = ({
|
|
1268
|
+
className,
|
|
1269
|
+
...props
|
|
1270
|
+
}) => {
|
|
1256
1271
|
return /* @__PURE__ */ jsx("div", { className: cn("bottom_nav_spacer", className), "aria-hidden": "true", ...props });
|
|
1257
1272
|
};
|
|
1258
1273
|
var Breadcrumb = ({
|
|
@@ -1613,24 +1628,33 @@ var LocaleSwitcher = ({ locale }) => {
|
|
|
1613
1628
|
]
|
|
1614
1629
|
}
|
|
1615
1630
|
),
|
|
1616
|
-
open && /* @__PURE__ */ jsx(
|
|
1617
|
-
"
|
|
1631
|
+
open && /* @__PURE__ */ jsx(
|
|
1632
|
+
"ul",
|
|
1618
1633
|
{
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
role: "
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1634
|
+
id: menuId,
|
|
1635
|
+
role: "menu",
|
|
1636
|
+
className: "nav_bar_locale_menu",
|
|
1637
|
+
onKeyDown: handleMenuKeyDown,
|
|
1638
|
+
children: locale.options.map((opt, index) => /* @__PURE__ */ jsx("li", { role: "none", children: /* @__PURE__ */ jsx(
|
|
1639
|
+
"button",
|
|
1640
|
+
{
|
|
1641
|
+
ref: (el) => {
|
|
1642
|
+
itemRefs.current[index] = el;
|
|
1643
|
+
},
|
|
1644
|
+
type: "button",
|
|
1645
|
+
role: "menuitemradio",
|
|
1646
|
+
"aria-checked": opt.value === locale.current,
|
|
1647
|
+
tabIndex: -1,
|
|
1648
|
+
className: cn(
|
|
1649
|
+
"nav_bar_locale_item",
|
|
1650
|
+
opt.value === locale.current && "nav_bar_locale_item_active"
|
|
1651
|
+
),
|
|
1652
|
+
onClick: () => handleSelect(opt.value),
|
|
1653
|
+
children: opt.label
|
|
1654
|
+
}
|
|
1655
|
+
) }, opt.value))
|
|
1632
1656
|
}
|
|
1633
|
-
)
|
|
1657
|
+
)
|
|
1634
1658
|
] });
|
|
1635
1659
|
};
|
|
1636
1660
|
var NavLink = (props) => {
|
|
@@ -2228,6 +2252,7 @@ var Tooltip = ({
|
|
|
2228
2252
|
return /* @__PURE__ */ jsxs("span", { className: "tooltip_wrapper", ref: wrapperRef, children: [
|
|
2229
2253
|
trigger,
|
|
2230
2254
|
shouldRender && typeof document !== "undefined" && createPortal(
|
|
2255
|
+
// biome-ignore lint/a11y/noStaticElementInteractions: 포인터 호버로 열림을 유지할 뿐인 WCAG 1.4.13 처리 - 조작 대상이 아니다
|
|
2231
2256
|
/* @__PURE__ */ jsx(
|
|
2232
2257
|
"span",
|
|
2233
2258
|
{
|
|
@@ -4723,8 +4748,6 @@ var Dropdown = (props) => {
|
|
|
4723
4748
|
closePanel();
|
|
4724
4749
|
}
|
|
4725
4750
|
},
|
|
4726
|
-
// closePanel 은 아래 훅에서 오므로 선언 순서상 참조만 한다 (렌더마다 동일 참조).
|
|
4727
|
-
// biome-ignore lint/correctness/useExhaustiveDependencies: closePanel 은 훅 결과라 아래에서 정의된다
|
|
4728
4751
|
[multiple, toggleMultiple, selectSingle]
|
|
4729
4752
|
);
|
|
4730
4753
|
const {
|
|
@@ -6546,7 +6569,16 @@ var Drawer = ({
|
|
|
6546
6569
|
content.children && // 본문이 스크롤 컨테이너라 키보드로도 스크롤할 수 있어야 한다(axe
|
|
6547
6570
|
// `scrollable-region-focusable`). 다만 초기 포커스 대상에서는 제외한다 - 안쪽에
|
|
6548
6571
|
// 첫 입력이 있는데 빈 wrapper 에 포커스가 놓이면 열자마자 어디에 있는지 알 수 없다.
|
|
6549
|
-
/* @__PURE__ */ jsx(
|
|
6572
|
+
/* @__PURE__ */ jsx(
|
|
6573
|
+
"div",
|
|
6574
|
+
{
|
|
6575
|
+
ref: bodyRef,
|
|
6576
|
+
className: "drawer_body",
|
|
6577
|
+
tabIndex: 0,
|
|
6578
|
+
"data-focus-trap-skip-autofocus": "",
|
|
6579
|
+
children: content.children
|
|
6580
|
+
}
|
|
6581
|
+
),
|
|
6550
6582
|
content.footer && /* @__PURE__ */ jsx("div", { className: "drawer_footer", children: content.footer })
|
|
6551
6583
|
]
|
|
6552
6584
|
}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @version 1.0.0
|
|
6
6
|
* @license Bigtablet Inc. Open Source License - see LICENSE at the repo root
|
|
7
7
|
* (https://github.com/Bigtablet/.github/blob/main/BIGTABLET_LICENSE.md)
|
|
8
|
-
*/((E,A)=>{typeof exports=="object"&&typeof module<"u"?module.exports=A():typeof define=="function"&&define.amd?define(A):(E=E||self,E.Bigtablet=A());})(void 0,()=>{function E(t="bt"){return `${t}_${Math.random().toString(36).substring(2,9)}`}function A(t){return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function w(t,l,i,a){return t.addEventListener(l,i,a),()=>t.removeEventListener(l,i,a)}function L(t,l=document){return l.querySelector(t)}function _(t,l=document){return Array.from(l.querySelectorAll(t))}let R=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");function j(){let t=document.createElement("div");t.style.cssText="position:fixed;top:0;left:0;right:0;height:0;visibility:hidden;pointer-events:none",document.documentElement.appendChild(t);let l=t.getBoundingClientRect().width;return t.remove(),l<=0?0:Math.max(0,window.innerWidth-l)}let C=[];function Q(t){if(t.key!=="Escape")return;let l=C[C.length-1];l&&(t.stopImmediatePropagation(),l());}function me(){}function z(t){C.length===0&&document.addEventListener("keydown",Q),C.push(t);let l=false;return ()=>{if(l)return;l=true;let i=C.lastIndexOf(t);i!==-1&&C.splice(i,1),C.length===0&&document.removeEventListener("keydown",Q);}}function J(t,l){let i=l.dataset.btOriginalScrollbarWidthVar;i?t.style.setProperty("--bt-scrollbar-width",i):t.style.removeProperty("--bt-scrollbar-width");}function Z(){let t=document.body,l=document.documentElement,i=parseInt(t.dataset.btOpenModals||"0",10);if(i===0){let a=j();if(t.dataset.btOriginalOverflow=t.style.overflow,t.dataset.btOriginalOverflowX=t.style.overflowX,t.dataset.btOriginalOverflowY=t.style.overflowY,t.dataset.btOriginalHtmlOverflow=l.style.overflow,t.dataset.btOriginalHtmlOverflowX=l.style.overflowX,t.dataset.btOriginalHtmlOverflowY=l.style.overflowY,t.dataset.btOriginalGutter=l.style.scrollbarGutter,t.dataset.btOriginalPaddingRight=t.style.paddingRight,t.dataset.btOriginalScrollbarWidthVar=l.style.getPropertyValue("--bt-scrollbar-width"),a>0&&l.style.setProperty("--bt-scrollbar-width",`${a}px`),t.style.overflow="hidden",l.style.overflow="hidden",a>0){l.style.scrollbarGutter="auto";let f=parseFloat(window.getComputedStyle(t).paddingRight)||0;t.style.paddingRight=`${f+a}px`,j()>0&&(t.style.paddingRight=t.dataset.btOriginalPaddingRight||"",J(l,t));}l.setAttribute("data-bt-scroll-locked","");}t.dataset.btOpenModals=String(i+1);}function ee(){let t=document.body,l=document.documentElement,i=parseInt(t.dataset.btOpenModals||"1",10)-1;i<=0?(t.style.overflow=t.dataset.btOriginalOverflow||"",t.style.overflowX=t.dataset.btOriginalOverflowX||"",t.style.overflowY=t.dataset.btOriginalOverflowY||"",l.style.overflow=t.dataset.btOriginalHtmlOverflow||"",l.style.overflowX=t.dataset.btOriginalHtmlOverflowX||"",l.style.overflowY=t.dataset.btOriginalHtmlOverflowY||"",t.style.paddingRight=t.dataset.btOriginalPaddingRight||"",l.style.scrollbarGutter=t.dataset.btOriginalGutter||"",l.removeAttribute("data-bt-scroll-locked"),J(l,t),delete t.dataset.btOpenModals,delete t.dataset.btOriginalOverflow,delete t.dataset.btOriginalOverflowX,delete t.dataset.btOriginalOverflowY,delete t.dataset.btOriginalHtmlOverflow,delete t.dataset.btOriginalHtmlOverflowX,delete t.dataset.btOriginalHtmlOverflowY,delete t.dataset.btOriginalGutter,delete t.dataset.btOriginalPaddingRight,delete t.dataset.btOriginalScrollbarWidthVar):t.dataset.btOpenModals=String(i);}function te(t){return String(t).toLowerCase().replace(/\s+/g,"")}function ne(t){if(t!==void 0)return t!=="false"}let ve='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>',ye='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg>';function ie(t,l={}){let i=typeof t=="string"?L(t):t;if(!i)return null;let a={placeholder:"Select...",disabled:false,multiple:false,searchable:false,searchPlaceholder:"\uAC80\uC0C9\u2026",emptyText:"\uACB0\uACFC \uC5C6\uC74C",selectedSummary:e=>`${e}\uAC1C \uC120\uD0DD`,onValueChange:null,...l};if(l.multiple===void 0){let e=ne(i.dataset.multiple);e!==void 0&&(a.multiple=e);}if(l.searchable===void 0){let e=ne(i.dataset.searchable);e!==void 0&&(a.searchable=e);}if(l.searchPlaceholder===void 0&&i.dataset.searchPlaceholder&&(a.searchPlaceholder=i.dataset.searchPlaceholder),l.emptyText===void 0&&i.dataset.emptyText&&(a.emptyText=i.dataset.emptyText),l.placeholder===void 0&&i.dataset.placeholder)a.placeholder=i.dataset.placeholder;else if(l.placeholder===void 0){let e=i.querySelector(".bt-dropdown__placeholder")?.textContent.trim();e&&(a.placeholder=e);}let f=a.multiple===true,p=a.searchable===true,n={isOpen:false,value:null,values:[],activeIndex:-1,options:[],visible:[],committedQuery:""},v=false,y=i.id||E("dropdown"),r=i.querySelector(".bt-dropdown__control"),s=i.querySelector(".bt-dropdown__list");if(!r||!s)return console.warn("Dropdown: Missing required elements (.bt-dropdown__control, .bt-dropdown__list)"),null;let c=s.querySelector(".bt-dropdown__options");if(!c)if(p){let e=s,o=Array.from(e.classList).filter(m=>m.startsWith("bt-dropdown__list")),u=document.createElement("div");u.className=o.join(" "),e.classList.remove(...o),e.classList.add("bt-dropdown__options"),e.style.display="",e.parentNode.insertBefore(u,e),u.appendChild(e),c=e,s=u;}else c=s;(r.disabled||r.classList.contains("is-disabled"))&&(a.disabled=true),r.disabled=a.disabled,r.setAttribute("aria-disabled",a.disabled?"true":"false"),r.classList.toggle("is-disabled",a.disabled);let g=()=>_(".bt-dropdown__option",c).map(e=>({value:e.dataset.value!==void 0?e.dataset.value:e.textContent.trim(),label:e.textContent.trim(),disabled:e.classList.contains("is-disabled")})),b;if(i.dataset.options)try{let e=JSON.parse(i.dataset.options);Array.isArray(e)?b=e:console.warn("Dropdown: data-options is not a JSON array");}catch(e){console.warn("Dropdown: invalid JSON in data-options",e);}b===void 0&&(b=Array.isArray(a.options)?a.options:g()),n.options=b;let h=_(".bt-dropdown__option",c);if(h.length===0&&n.options.length>0){let e=c.tagName==="UL"||c.tagName==="OL"?"li":"div";n.options.forEach(o=>{let u=document.createElement(e);u.className="bt-dropdown__option",o.disabled&&u.classList.add("is-disabled"),u.dataset.value=o.value,u.textContent=o.label,c.appendChild(u);}),h=_(".bt-dropdown__option",c);}c.id=c.id||`${y}_listbox`,c.setAttribute("role","listbox"),f&&c.setAttribute("aria-multiselectable","true"),r.setAttribute("aria-haspopup","listbox"),r.setAttribute("aria-expanded","false"),r.setAttribute("aria-controls",c.id),p?r.removeAttribute("role"):r.setAttribute("role","combobox"),h.forEach((e,o)=>{if(e.id=e.id||`${y}_option_${o}`,e.setAttribute("role","option"),e.setAttribute("aria-selected","false"),n.options[o]?.disabled&&e.setAttribute("aria-disabled","true"),f&&!e.querySelector(".bt-dropdown__option-check")){let u=document.createElement("span");u.className="bt-dropdown__option-check",u.setAttribute("aria-hidden","true"),u.innerHTML=ye,e.insertBefore(u,e.firstChild);}});let d=null,O=null;if(p){let e=s.querySelector(".bt-dropdown__search");if(!e){e=document.createElement("div"),e.className="bt-dropdown__search";let o=document.createElement("span");o.className="bt-dropdown__search-icon",o.setAttribute("aria-hidden","true"),o.innerHTML=ve,e.appendChild(o),s.insertBefore(e,s.firstChild);}if(d=e.querySelector(".bt-dropdown__search-input"),d||(d=document.createElement("input"),d.type="text",d.className="bt-dropdown__search-input",d.autocomplete="off",e.appendChild(d)),d.placeholder=a.searchPlaceholder,d.setAttribute("aria-label",a.searchPlaceholder),d.setAttribute("role","combobox"),d.setAttribute("aria-autocomplete","list"),d.setAttribute("aria-expanded","false"),d.setAttribute("aria-controls",c.id),O=c.querySelector(".bt-dropdown__empty"),!O){let o=c.tagName==="UL"||c.tagName==="OL"?"li":"div";O=document.createElement(o),O.className="bt-dropdown__empty",c.appendChild(O);}O.textContent=a.emptyText,O.hidden=true;}let H=()=>p?d:r,x=_('input[type="hidden"]',i),M=a.name||i.dataset.name||x[0]?.name||null;if(x.length===0&&M){let e=document.createElement("input");e.type="hidden",e.name=M,i.appendChild(e),x.push(e);}function xe(){if(!M)return;let e=f?n.values.map(o=>o==null?"":String(o)):[n.value==null?"":String(n.value)];for(;x.length>e.length;)x.pop().remove();for(;x.length<e.length;){let o=document.createElement("input");o.type="hidden",o.name=M,i.appendChild(o),x.push(o);}x.forEach((o,u)=>{o.value=e[u];});}function K(e){return n.options.find(o=>String(o.value)===String(e))}function U(e){return e===void 0?false:f?n.values.some(o=>String(o)===String(e)):n.value!=null&&String(n.value)===String(e)}function Ae(){return n.values.map(K).filter(Boolean)}function X(){let e=r.querySelector(".bt-dropdown__value, .bt-dropdown__placeholder");if(e){let o=a.placeholder,u=false;if(f)u=n.values.length>0,u&&(o=a.selectedSummary(n.values.length));else {let m=K(n.value);u=!!m,m&&(o=m.label);}e.textContent=o,e.classList.toggle("bt-dropdown__value",u),e.classList.toggle("bt-dropdown__placeholder",!u);}h.forEach((o,u)=>{let m=U(n.options[u]?.value);o.classList.toggle("is-selected",m),o.setAttribute("aria-selected",m?"true":"false");}),xe();}function T(e){f?(n.values=e==null?[]:Array.isArray(e)?e.slice():[e],X(),a.onValueChange&&a.onValueChange(n.values.slice(),Ae())):(n.value=Array.isArray(e)?e[0]??null:e,X(),a.onValueChange&&a.onValueChange(n.value,K(n.value)??null));}function Ee(e){let o=U(e.value)?n.values.filter(u=>String(u)!==String(e.value)):[...n.values,e.value];T(o);}function $(){let e=null,o=null;h.forEach((m,I)=>{let N=I===n.activeIndex;m.classList.toggle("is-active",N),N&&(e=m.id,o=m);}),o?.scrollIntoView?.({block:"nearest"});let u=H();u&&(e?u.setAttribute("aria-activedescendant",e):u.removeAttribute("aria-activedescendant"));}function se(){return n.visible.find(e=>!n.options[e]?.disabled)??-1}function q(){let e=p?te(n.committedQuery):"";n.visible=[],h.forEach((o,u)=>{let m=n.options[u]?.label??o.textContent,I=e===""||te(m).includes(e);o.hidden=!I,I&&n.visible.push(u);}),O&&(O.hidden=n.visible.length>0),n.isOpen?n.visible.includes(n.activeIndex)||(n.activeIndex=se()):n.activeIndex=-1,$();}let D=null,B=null;function re(){D||(D={parent:s.parentNode,next:s.nextSibling},document.body.appendChild(s));let e=r.getBoundingClientRect(),o=4,u=8,m=window.innerWidth-u*2;s.style.minWidth=`${Math.min(e.width,m)}px`,s.style.maxWidth=`${m}px`;let I=s.offsetWidth,N=window.innerHeight-u*2;s.style.maxHeight="";let be=s.offsetHeight,G=Math.min(be,N);be>N&&(s.style.maxHeight=`${N}px`);let ge=window.innerHeight-e.bottom-o-u,Ie=e.top-o-u,he=G>ge&&Ie>ge;s.classList.toggle("bt-dropdown__list--up",he),s.style.left=`${de(e.left,I,window.innerWidth,u)}px`;let Ne=he?e.top-o-G:e.bottom+o;s.style.top=`${de(Ne,G,window.innerHeight,u)}px`;}function de(e,o,u,m){return Math.max(m,Math.min(e,u-m-o))}function Ce(){if(B)return;let e=0,o=()=>{e||(e=requestAnimationFrame(()=>{e=0,n.isOpen&&re();}));};window.addEventListener("scroll",o,true),window.addEventListener("resize",o),B=()=>{e&&cancelAnimationFrame(e),window.removeEventListener("scroll",o,true),window.removeEventListener("resize",o),B=null;};}function ce(){B?.(),D&&(D.parent?.insertBefore(s,D.next),D=null,s.style.left="",s.style.top="",s.style.minWidth="",s.style.maxWidth="",s.style.maxHeight="");}function k(){if(a.disabled||r.disabled)return;n.isOpen=true,r.classList.add("is-open"),r.setAttribute("aria-expanded","true"),s.style.display="block",d&&d.setAttribute("aria-expanded","true"),re(),Ce(),n.activeIndex=n.options.findIndex(o=>U(o.value)&&!o.disabled),q(),d&&d.focus();let e=r.querySelector(".bt-dropdown__icon");e&&e.classList.add("is-open");}function P(){n.isOpen=false,r.classList.remove("is-open"),r.setAttribute("aria-expanded","false"),r.removeAttribute("aria-activedescendant"),s.style.display="none",ce(),d&&(d.value="",d.setAttribute("aria-expanded","false"),d.removeAttribute("aria-activedescendant")),n.committedQuery="",v=false,n.activeIndex=-1,q();let e=r.querySelector(".bt-dropdown__icon");e&&e.classList.remove("is-open");}function Y(){let e=n.isOpen;P(),e&&p&&r.focus();}function ue(){n.isOpen?P():k();}function V(e){let o=n.visible.filter(m=>!n.options[m]?.disabled);if(o.length===0)return;let u=o.indexOf(n.activeIndex);n.activeIndex=u===-1?e===1?o[0]:o[o.length-1]:o[(u+e+o.length)%o.length],$();}function fe(e){let o=n.options[e];!o||o.disabled||(f?Ee(o):(T(o.value),Y()));}function pe(){n.visible.includes(n.activeIndex)&&fe(n.activeIndex);}function ke(e){e.preventDefault(),ue();}function Se(e){if(!a.disabled)switch(e.key){case " ":case "Enter":e.preventDefault(),n.isOpen?pe():k();break;case "ArrowDown":e.preventDefault(),n.isOpen?V(1):k();break;case "ArrowUp":e.preventDefault(),n.isOpen?V(-1):k();break;case "Home":e.preventDefault(),k(),n.activeIndex=se(),$();break;case "End":e.preventDefault(),k();for(let o=n.visible.length-1;o>=0;o--)if(!n.options[n.visible[o]]?.disabled){n.activeIndex=n.visible[o],$();break}break;case "Escape":e.preventDefault(),P();break;case "Tab":P();break}}function Le(e){if(!(e.isComposing||e.keyCode===229))switch(e.key){case "ArrowDown":e.preventDefault(),V(1);break;case "ArrowUp":e.preventDefault(),V(-1);break;case "Enter":e.preventDefault(),pe();break;case "Escape":e.preventDefault(),Y();break;case "Tab":Y();break}}function Te(e){!i.contains(e.target)&&!s.contains(e.target)&&P();}function De(e){return o=>{o.preventDefault(),fe(e);}}function Pe(e){return ()=>{n.options[e]?.disabled||(n.activeIndex=e,$());}}let S=[w(r,"click",ke),w(r,"keydown",Se),w(document,"mousedown",Te)];h.forEach((e,o)=>{S.push(w(e,"click",De(o))),S.push(w(e,"mouseenter",Pe(o)));}),d&&(S.push(w(d,"compositionstart",()=>{v=true;})),S.push(w(d,"compositionend",e=>{v=false,n.committedQuery=e.target.value,q();})),S.push(w(d,"input",e=>{v||(n.committedQuery=e.target.value,q());})),S.push(w(d,"keydown",Le)));let F=x.map(e=>e.value).filter(e=>e!=="");if(s.style.display="none",q(),X(),f){let e=Array.isArray(a.defaultValue)?a.defaultValue:a.defaultValue!=null?[a.defaultValue]:F;e.length>0&&T(e);}else a.defaultValue!=null?T(a.defaultValue):F[0]&&T(F[0]);return {getValue:()=>f?n.values.slice():n.value,setValue:T,open:k,close:P,toggle:ue,setDisabled:e=>{a.disabled=e,r.disabled=e,r.setAttribute("aria-disabled",e?"true":"false"),r.classList.toggle("is-disabled",e);},destroy:()=>{ce(),S.forEach(e=>{e();});}}}function ae(t,l={}){let i=typeof t=="string"?L(t):t;if(!i)return null;let a={closeOnOverlay:true,closeOnEscape:true,onOpen:null,onClose:null,...l},f={isOpen:false},p=i.querySelector(".bt-modal__panel"),n=null,v=false,y=null;if(p&&(p.setAttribute("role","dialog"),p.setAttribute("aria-modal","true"),!p.hasAttribute("aria-label")&&!p.hasAttribute("aria-labelledby"))){let d=p.querySelector(".bt-modal__header");d?(d.id=d.id||E("modal_title"),p.setAttribute("aria-labelledby",d.id)):p.setAttribute("aria-label","Dialog");}function r(){if(!f.isOpen){if(f.isOpen=true,i.classList.add("is-open"),Z(),y=z(a.closeOnEscape?c:me),n=document.activeElement,p){let d=p.querySelector(R);d?d.focus():(p.hasAttribute("tabindex")||(p.setAttribute("tabindex","-1"),v=true),p.focus());}a.onOpen&&a.onOpen();}}function s(){f.isOpen=false,i.classList.remove("is-open"),y&&(y(),y=null),ee(),v&&p&&(p.removeAttribute("tabindex"),v=false),n&&typeof n.focus=="function"&&n.focus(),n=null;}function c(){f.isOpen&&(s(),a.onClose&&a.onClose());}function g(d){a.closeOnOverlay&&d.target===i&&c();}function b(d){if(f.isOpen&&d.key==="Tab"&&p){let O=_(R,p);if(O.length===0){d.preventDefault();return}let H=O[0],x=O[O.length-1];d.shiftKey&&document.activeElement===H?(d.preventDefault(),x.focus()):!d.shiftKey&&document.activeElement===x&&(d.preventDefault(),H.focus());}}let h=[w(i,"click",g),w(document,"keydown",b)];return _("[data-modal-close]",i).forEach(d=>{h.push(w(d,"click",c));}),{isOpen:()=>f.isOpen,open:r,close:c,toggle:()=>f.isOpen?c():r(),destroy:()=>{h.forEach(d=>{d();}),f.isOpen&&s();}}}let we="bt-button--filled",_e="bt-button--outline";function Oe(t={}){let l={title:"",message:"",variant:"info",confirmText:"\uD655\uC778",cancelText:"\uCDE8\uC18C",showCancel:false,destructive:false,actionsAlign:"right",closeOnOverlay:true,onConfirm:null,onCancel:null,...t},i=document.createElement("div");i.className=`bt-alert__overlay bt-alert--${l.variant} is-open`,i.innerHTML=`
|
|
8
|
+
*/((E,A)=>{typeof exports=="object"&&typeof module<"u"?module.exports=A():typeof define=="function"&&define.amd?define(A):(E=E||self,E.Bigtablet=A());})(void 0,()=>{function E(t="bt"){return `${t}_${Math.random().toString(36).substring(2,9)}`}function A(t){return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function w(t,l,i,a){return t.addEventListener(l,i,a),()=>t.removeEventListener(l,i,a)}function L(t,l=document){return l.querySelector(t)}function _(t,l=document){return Array.from(l.querySelectorAll(t))}let R=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])'].join(", ");function j(){let t=document.createElement("div");t.style.cssText="position:fixed;top:0;left:0;right:0;height:0;visibility:hidden;pointer-events:none",document.documentElement.appendChild(t);let l=t.getBoundingClientRect().width;return t.remove(),l<=0?0:Math.max(0,window.innerWidth-l)}let C=[];function Q(t){if(t.key!=="Escape"||t.defaultPrevented)return;let l=C[C.length-1];l&&(t.stopImmediatePropagation(),l());}function me(){}function z(t){C.length===0&&document.addEventListener("keydown",Q),C.push(t);let l=false;return ()=>{if(l)return;l=true;let i=C.lastIndexOf(t);i!==-1&&C.splice(i,1),C.length===0&&document.removeEventListener("keydown",Q);}}function J(t,l){let i=l.dataset.btOriginalScrollbarWidthVar;i?t.style.setProperty("--bt-scrollbar-width",i):t.style.removeProperty("--bt-scrollbar-width");}function Z(){let t=document.body,l=document.documentElement,i=parseInt(t.dataset.btOpenModals||"0",10);if(i===0){let a=j();if(t.dataset.btOriginalOverflow=t.style.overflow,t.dataset.btOriginalOverflowX=t.style.overflowX,t.dataset.btOriginalOverflowY=t.style.overflowY,t.dataset.btOriginalHtmlOverflow=l.style.overflow,t.dataset.btOriginalHtmlOverflowX=l.style.overflowX,t.dataset.btOriginalHtmlOverflowY=l.style.overflowY,t.dataset.btOriginalGutter=l.style.scrollbarGutter,t.dataset.btOriginalPaddingRight=t.style.paddingRight,t.dataset.btOriginalScrollbarWidthVar=l.style.getPropertyValue("--bt-scrollbar-width"),a>0&&l.style.setProperty("--bt-scrollbar-width",`${a}px`),t.style.overflow="hidden",l.style.overflow="hidden",a>0){l.style.scrollbarGutter="auto";let f=parseFloat(window.getComputedStyle(t).paddingRight)||0;t.style.paddingRight=`${f+a}px`,j()>0&&(t.style.paddingRight=t.dataset.btOriginalPaddingRight||"",J(l,t));}l.setAttribute("data-bt-scroll-locked","");}t.dataset.btOpenModals=String(i+1);}function ee(){let t=document.body,l=document.documentElement,i=parseInt(t.dataset.btOpenModals||"1",10)-1;i<=0?(t.style.overflow=t.dataset.btOriginalOverflow||"",t.style.overflowX=t.dataset.btOriginalOverflowX||"",t.style.overflowY=t.dataset.btOriginalOverflowY||"",l.style.overflow=t.dataset.btOriginalHtmlOverflow||"",l.style.overflowX=t.dataset.btOriginalHtmlOverflowX||"",l.style.overflowY=t.dataset.btOriginalHtmlOverflowY||"",t.style.paddingRight=t.dataset.btOriginalPaddingRight||"",l.style.scrollbarGutter=t.dataset.btOriginalGutter||"",l.removeAttribute("data-bt-scroll-locked"),J(l,t),delete t.dataset.btOpenModals,delete t.dataset.btOriginalOverflow,delete t.dataset.btOriginalOverflowX,delete t.dataset.btOriginalOverflowY,delete t.dataset.btOriginalHtmlOverflow,delete t.dataset.btOriginalHtmlOverflowX,delete t.dataset.btOriginalHtmlOverflowY,delete t.dataset.btOriginalGutter,delete t.dataset.btOriginalPaddingRight,delete t.dataset.btOriginalScrollbarWidthVar):t.dataset.btOpenModals=String(i);}function te(t){return String(t).toLowerCase().replace(/\s+/g,"")}function ne(t){if(t!==void 0)return t!=="false"}let ve='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>',ye='<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg>';function ie(t,l={}){let i=typeof t=="string"?L(t):t;if(!i)return null;let a={placeholder:"Select...",disabled:false,multiple:false,searchable:false,searchPlaceholder:"\uAC80\uC0C9\u2026",emptyText:"\uACB0\uACFC \uC5C6\uC74C",selectedSummary:e=>`${e}\uAC1C \uC120\uD0DD`,onValueChange:null,...l};if(l.multiple===void 0){let e=ne(i.dataset.multiple);e!==void 0&&(a.multiple=e);}if(l.searchable===void 0){let e=ne(i.dataset.searchable);e!==void 0&&(a.searchable=e);}if(l.searchPlaceholder===void 0&&i.dataset.searchPlaceholder&&(a.searchPlaceholder=i.dataset.searchPlaceholder),l.emptyText===void 0&&i.dataset.emptyText&&(a.emptyText=i.dataset.emptyText),l.placeholder===void 0&&i.dataset.placeholder)a.placeholder=i.dataset.placeholder;else if(l.placeholder===void 0){let e=i.querySelector(".bt-dropdown__placeholder")?.textContent.trim();e&&(a.placeholder=e);}let f=a.multiple===true,p=a.searchable===true,n={isOpen:false,value:null,values:[],activeIndex:-1,options:[],visible:[],committedQuery:""},v=false,y=i.id||E("dropdown"),r=i.querySelector(".bt-dropdown__control"),s=i.querySelector(".bt-dropdown__list");if(!r||!s)return console.warn("Dropdown: Missing required elements (.bt-dropdown__control, .bt-dropdown__list)"),null;let c=s.querySelector(".bt-dropdown__options");if(!c)if(p){let e=s,o=Array.from(e.classList).filter(m=>m.startsWith("bt-dropdown__list")),u=document.createElement("div");u.className=o.join(" "),e.classList.remove(...o),e.classList.add("bt-dropdown__options"),e.style.display="",e.parentNode.insertBefore(u,e),u.appendChild(e),c=e,s=u;}else c=s;(r.disabled||r.classList.contains("is-disabled"))&&(a.disabled=true),r.disabled=a.disabled,r.setAttribute("aria-disabled",a.disabled?"true":"false"),r.classList.toggle("is-disabled",a.disabled);let g=()=>_(".bt-dropdown__option",c).map(e=>({value:e.dataset.value!==void 0?e.dataset.value:e.textContent.trim(),label:e.textContent.trim(),disabled:e.classList.contains("is-disabled")})),b;if(i.dataset.options)try{let e=JSON.parse(i.dataset.options);Array.isArray(e)?b=e:console.warn("Dropdown: data-options is not a JSON array");}catch(e){console.warn("Dropdown: invalid JSON in data-options",e);}b===void 0&&(b=Array.isArray(a.options)?a.options:g()),n.options=b;let h=_(".bt-dropdown__option",c);if(h.length===0&&n.options.length>0){let e=c.tagName==="UL"||c.tagName==="OL"?"li":"div";n.options.forEach(o=>{let u=document.createElement(e);u.className="bt-dropdown__option",o.disabled&&u.classList.add("is-disabled"),u.dataset.value=o.value,u.textContent=o.label,c.appendChild(u);}),h=_(".bt-dropdown__option",c);}c.id=c.id||`${y}_listbox`,c.setAttribute("role","listbox"),f&&c.setAttribute("aria-multiselectable","true"),r.setAttribute("aria-haspopup","listbox"),r.setAttribute("aria-expanded","false"),r.setAttribute("aria-controls",c.id),p?r.removeAttribute("role"):r.setAttribute("role","combobox"),h.forEach((e,o)=>{if(e.id=e.id||`${y}_option_${o}`,e.setAttribute("role","option"),e.setAttribute("aria-selected","false"),n.options[o]?.disabled&&e.setAttribute("aria-disabled","true"),f&&!e.querySelector(".bt-dropdown__option-check")){let u=document.createElement("span");u.className="bt-dropdown__option-check",u.setAttribute("aria-hidden","true"),u.innerHTML=ye,e.insertBefore(u,e.firstChild);}});let d=null,O=null;if(p){let e=s.querySelector(".bt-dropdown__search");if(!e){e=document.createElement("div"),e.className="bt-dropdown__search";let o=document.createElement("span");o.className="bt-dropdown__search-icon",o.setAttribute("aria-hidden","true"),o.innerHTML=ve,e.appendChild(o),s.insertBefore(e,s.firstChild);}if(d=e.querySelector(".bt-dropdown__search-input"),d||(d=document.createElement("input"),d.type="text",d.className="bt-dropdown__search-input",d.autocomplete="off",e.appendChild(d)),d.placeholder=a.searchPlaceholder,d.setAttribute("aria-label",a.searchPlaceholder),d.setAttribute("role","combobox"),d.setAttribute("aria-autocomplete","list"),d.setAttribute("aria-expanded","false"),d.setAttribute("aria-controls",c.id),O=c.querySelector(".bt-dropdown__empty"),!O){let o=c.tagName==="UL"||c.tagName==="OL"?"li":"div";O=document.createElement(o),O.className="bt-dropdown__empty",c.appendChild(O);}O.textContent=a.emptyText,O.hidden=true;}let H=()=>p?d:r,x=_('input[type="hidden"]',i),M=a.name||i.dataset.name||x[0]?.name||null;if(x.length===0&&M){let e=document.createElement("input");e.type="hidden",e.name=M,i.appendChild(e),x.push(e);}function xe(){if(!M)return;let e=f?n.values.map(o=>o==null?"":String(o)):[n.value==null?"":String(n.value)];for(;x.length>e.length;)x.pop().remove();for(;x.length<e.length;){let o=document.createElement("input");o.type="hidden",o.name=M,i.appendChild(o),x.push(o);}x.forEach((o,u)=>{o.value=e[u];});}function K(e){return n.options.find(o=>String(o.value)===String(e))}function U(e){return e===void 0?false:f?n.values.some(o=>String(o)===String(e)):n.value!=null&&String(n.value)===String(e)}function Ae(){return n.values.map(K).filter(Boolean)}function X(){let e=r.querySelector(".bt-dropdown__value, .bt-dropdown__placeholder");if(e){let o=a.placeholder,u=false;if(f)u=n.values.length>0,u&&(o=a.selectedSummary(n.values.length));else {let m=K(n.value);u=!!m,m&&(o=m.label);}e.textContent=o,e.classList.toggle("bt-dropdown__value",u),e.classList.toggle("bt-dropdown__placeholder",!u);}h.forEach((o,u)=>{let m=U(n.options[u]?.value);o.classList.toggle("is-selected",m),o.setAttribute("aria-selected",m?"true":"false");}),xe();}function P(e){f?(n.values=e==null?[]:Array.isArray(e)?e.slice():[e],X(),a.onValueChange&&a.onValueChange(n.values.slice(),Ae())):(n.value=Array.isArray(e)?e[0]??null:e,X(),a.onValueChange&&a.onValueChange(n.value,K(n.value)??null));}function Ee(e){let o=U(e.value)?n.values.filter(u=>String(u)!==String(e.value)):[...n.values,e.value];P(o);}function $(){let e=null,o=null;h.forEach((m,I)=>{let N=I===n.activeIndex;m.classList.toggle("is-active",N),N&&(e=m.id,o=m);}),o?.scrollIntoView?.({block:"nearest"});let u=H();u&&(e?u.setAttribute("aria-activedescendant",e):u.removeAttribute("aria-activedescendant"));}function se(){return n.visible.find(e=>!n.options[e]?.disabled)??-1}function q(){let e=p?te(n.committedQuery):"";n.visible=[],h.forEach((o,u)=>{let m=n.options[u]?.label??o.textContent,I=e===""||te(m).includes(e);o.hidden=!I,I&&n.visible.push(u);}),O&&(O.hidden=n.visible.length>0),n.isOpen?n.visible.includes(n.activeIndex)||(n.activeIndex=se()):n.activeIndex=-1,$();}let T=null,B=null;function re(){T||(T={parent:s.parentNode,next:s.nextSibling},document.body.appendChild(s));let e=r.getBoundingClientRect(),o=4,u=8,m=window.innerWidth-u*2;s.style.minWidth=`${Math.min(e.width,m)}px`,s.style.maxWidth=`${m}px`;let I=s.offsetWidth,N=window.innerHeight-u*2;s.style.maxHeight="";let be=s.offsetHeight,G=Math.min(be,N);be>N&&(s.style.maxHeight=`${N}px`);let ge=window.innerHeight-e.bottom-o-u,Ie=e.top-o-u,he=G>ge&&Ie>ge;s.classList.toggle("bt-dropdown__list--up",he),s.style.left=`${de(e.left,I,window.innerWidth,u)}px`;let Ne=he?e.top-o-G:e.bottom+o;s.style.top=`${de(Ne,G,window.innerHeight,u)}px`;}function de(e,o,u,m){return Math.max(m,Math.min(e,u-m-o))}function Ce(){if(B)return;let e=0,o=()=>{e||(e=requestAnimationFrame(()=>{e=0,n.isOpen&&re();}));};window.addEventListener("scroll",o,true),window.addEventListener("resize",o),B=()=>{e&&cancelAnimationFrame(e),window.removeEventListener("scroll",o,true),window.removeEventListener("resize",o),B=null;};}function ce(){B?.(),T&&(T.parent?.insertBefore(s,T.next),T=null,s.style.left="",s.style.top="",s.style.minWidth="",s.style.maxWidth="",s.style.maxHeight="");}function k(){if(a.disabled||r.disabled)return;n.isOpen=true,r.classList.add("is-open"),r.setAttribute("aria-expanded","true"),s.style.display="block",d&&d.setAttribute("aria-expanded","true"),re(),Ce(),n.activeIndex=n.options.findIndex(o=>U(o.value)&&!o.disabled),q(),d&&d.focus();let e=r.querySelector(".bt-dropdown__icon");e&&e.classList.add("is-open");}function D(){n.isOpen=false,r.classList.remove("is-open"),r.setAttribute("aria-expanded","false"),r.removeAttribute("aria-activedescendant"),s.style.display="none",ce(),d&&(d.value="",d.setAttribute("aria-expanded","false"),d.removeAttribute("aria-activedescendant")),n.committedQuery="",v=false,n.activeIndex=-1,q();let e=r.querySelector(".bt-dropdown__icon");e&&e.classList.remove("is-open");}function Y(){let e=n.isOpen;D(),e&&p&&r.focus();}function ue(){n.isOpen?D():k();}function V(e){let o=n.visible.filter(m=>!n.options[m]?.disabled);if(o.length===0)return;let u=o.indexOf(n.activeIndex);n.activeIndex=u===-1?e===1?o[0]:o[o.length-1]:o[(u+e+o.length)%o.length],$();}function fe(e){let o=n.options[e];!o||o.disabled||(f?Ee(o):(P(o.value),Y()));}function pe(){n.visible.includes(n.activeIndex)&&fe(n.activeIndex);}function ke(e){e.preventDefault(),ue();}function Se(e){if(!a.disabled)switch(e.key){case " ":case "Enter":e.preventDefault(),n.isOpen?pe():k();break;case "ArrowDown":e.preventDefault(),n.isOpen?V(1):k();break;case "ArrowUp":e.preventDefault(),n.isOpen?V(-1):k();break;case "Home":e.preventDefault(),k(),n.activeIndex=se(),$();break;case "End":e.preventDefault(),k();for(let o=n.visible.length-1;o>=0;o--)if(!n.options[n.visible[o]]?.disabled){n.activeIndex=n.visible[o],$();break}break;case "Escape":if(!n.isOpen)break;e.preventDefault(),D();break;case "Tab":D();break}}function Le(e){if(!(e.isComposing||e.keyCode===229))switch(e.key){case "ArrowDown":e.preventDefault(),V(1);break;case "ArrowUp":e.preventDefault(),V(-1);break;case "Enter":e.preventDefault(),pe();break;case "Escape":e.preventDefault(),Y();break;case "Tab":Y();break}}function Pe(e){!i.contains(e.target)&&!s.contains(e.target)&&D();}function Te(e){return o=>{o.preventDefault(),fe(e);}}function De(e){return ()=>{n.options[e]?.disabled||(n.activeIndex=e,$());}}let S=[w(r,"click",ke),w(r,"keydown",Se),w(document,"mousedown",Pe)];h.forEach((e,o)=>{S.push(w(e,"click",Te(o))),S.push(w(e,"mouseenter",De(o)));}),d&&(S.push(w(d,"compositionstart",()=>{v=true;})),S.push(w(d,"compositionend",e=>{v=false,n.committedQuery=e.target.value,q();})),S.push(w(d,"input",e=>{v||(n.committedQuery=e.target.value,q());})),S.push(w(d,"keydown",Le)));let F=x.map(e=>e.value).filter(e=>e!=="");if(s.style.display="none",q(),X(),f){let e=Array.isArray(a.defaultValue)?a.defaultValue:a.defaultValue!=null?[a.defaultValue]:F;e.length>0&&P(e);}else a.defaultValue!=null?P(a.defaultValue):F[0]&&P(F[0]);return {getValue:()=>f?n.values.slice():n.value,setValue:P,open:k,close:D,toggle:ue,setDisabled:e=>{a.disabled=e,r.disabled=e,r.setAttribute("aria-disabled",e?"true":"false"),r.classList.toggle("is-disabled",e);},destroy:()=>{ce(),S.forEach(e=>{e();});}}}function ae(t,l={}){let i=typeof t=="string"?L(t):t;if(!i)return null;let a={closeOnOverlay:true,closeOnEscape:true,onOpen:null,onClose:null,...l},f={isOpen:false},p=i.querySelector(".bt-modal__panel"),n=null,v=false,y=null;if(p&&(p.setAttribute("role","dialog"),p.setAttribute("aria-modal","true"),!p.hasAttribute("aria-label")&&!p.hasAttribute("aria-labelledby"))){let d=p.querySelector(".bt-modal__header");d?(d.id=d.id||E("modal_title"),p.setAttribute("aria-labelledby",d.id)):p.setAttribute("aria-label","Dialog");}function r(){if(!f.isOpen){if(f.isOpen=true,i.classList.add("is-open"),Z(),y=z(a.closeOnEscape?c:me),n=document.activeElement,p){let d=p.querySelector(R);d?d.focus():(p.hasAttribute("tabindex")||(p.setAttribute("tabindex","-1"),v=true),p.focus());}a.onOpen&&a.onOpen();}}function s(){f.isOpen=false,i.classList.remove("is-open"),y&&(y(),y=null),ee(),v&&p&&(p.removeAttribute("tabindex"),v=false),n&&typeof n.focus=="function"&&n.focus(),n=null;}function c(){f.isOpen&&(s(),a.onClose&&a.onClose());}function g(d){a.closeOnOverlay&&d.target===i&&c();}function b(d){if(f.isOpen&&d.key==="Tab"&&p){let O=_(R,p);if(O.length===0){d.preventDefault();return}let H=O[0],x=O[O.length-1];d.shiftKey&&document.activeElement===H?(d.preventDefault(),x.focus()):!d.shiftKey&&document.activeElement===x&&(d.preventDefault(),H.focus());}}let h=[w(i,"click",g),w(document,"keydown",b)];return _("[data-modal-close]",i).forEach(d=>{h.push(w(d,"click",c));}),{isOpen:()=>f.isOpen,open:r,close:c,toggle:()=>f.isOpen?c():r(),destroy:()=>{h.forEach(d=>{d();}),f.isOpen&&s();}}}let we="bt-button--filled",_e="bt-button--outline";function Oe(t={}){let l={title:"",message:"",variant:"info",confirmText:"\uD655\uC778",cancelText:"\uCDE8\uC18C",showCancel:false,destructive:false,actionsAlign:"right",closeOnOverlay:true,onConfirm:null,onCancel:null,...t},i=document.createElement("div");i.className=`bt-alert__overlay bt-alert--${l.variant} is-open`,i.innerHTML=`
|
|
9
9
|
<div class="bt-alert__modal">
|
|
10
10
|
${l.title?`<div class="bt-alert__title">${A(l.title)}</div>`:""}
|
|
11
11
|
<div class="bt-alert__message">${A(l.message)}</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigtablet/design-system",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.25.0",
|
|
4
4
|
"description": "Bigtablet Design System UI Components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
],
|
|
70
70
|
"author": "sangmin",
|
|
71
71
|
"license": "SEE LICENSE IN LICENSE",
|
|
72
|
-
"packageManager": "pnpm@10.
|
|
72
|
+
"packageManager": "pnpm@10.34.6",
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"lucide-react": ">=0.552.0",
|
|
75
75
|
"next": ">=15",
|
|
@@ -130,7 +130,9 @@
|
|
|
130
130
|
},
|
|
131
131
|
{
|
|
132
132
|
"path": "dist/vanilla/bigtablet.min.js",
|
|
133
|
-
"disablePlugins": [
|
|
133
|
+
"disablePlugins": [
|
|
134
|
+
"@size-limit/esbuild"
|
|
135
|
+
],
|
|
134
136
|
"limit": "8 kB",
|
|
135
137
|
"message": "Raised 7 kB -> 8 kB on 2026-09-10: baseline was 6.83 kB, leaving 0.17 kB (2.4%) under the old 7 kB limit. Re-measured 2026-09-18 without esbuild: 6.54 kB raw brotli, leaving 1.46 kB. esbuild is disabled for this entry: the file is a pre-minified UMD script loaded via <script>, and bundling it as ESM (package.json type=module) only produced a commonjs-variable-in-esm warning - the raw file size is the number consumers actually download. Re-measure before raising again."
|
|
136
138
|
},
|