@bigtablet/design-system 3.21.1 → 3.22.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 +12 -0
- package/dist/index.d.ts +31 -4
- package/dist/index.js +83 -26
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1971,6 +1971,11 @@ body:has(.bottom_nav) {
|
|
|
1971
1971
|
border-radius: 12px;
|
|
1972
1972
|
transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
|
|
1973
1973
|
}
|
|
1974
|
+
.card:focus-visible,
|
|
1975
|
+
.card:focus-visible:hover {
|
|
1976
|
+
outline: none;
|
|
1977
|
+
box-shadow: var(--bt-focus-ring);
|
|
1978
|
+
}
|
|
1974
1979
|
.card_interactive {
|
|
1975
1980
|
cursor: pointer;
|
|
1976
1981
|
}
|
|
@@ -3837,6 +3842,13 @@ body:has(.bottom_nav) {
|
|
|
3837
3842
|
background: var(--bt-color-bg-solid);
|
|
3838
3843
|
border-radius: 12px;
|
|
3839
3844
|
overflow: hidden;
|
|
3845
|
+
}
|
|
3846
|
+
.media_card:focus-visible,
|
|
3847
|
+
.media_card:focus-visible:hover {
|
|
3848
|
+
outline: none;
|
|
3849
|
+
box-shadow: var(--bt-focus-ring);
|
|
3850
|
+
}
|
|
3851
|
+
.media_card {
|
|
3840
3852
|
transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
|
|
3841
3853
|
}
|
|
3842
3854
|
.media_card_shadow_sm {
|
package/dist/index.d.ts
CHANGED
|
@@ -68,7 +68,20 @@ type PolymorphicProps<T extends React$1.ElementType, Own> = Own & {
|
|
|
68
68
|
/** `as` 에 준 요소의 ref 타입 */
|
|
69
69
|
type PolymorphicRef<T extends React$1.ElementType> = React$1.ComponentPropsWithRef<T>["ref"];
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
interface FocusTrapOptions {
|
|
72
|
+
/**
|
|
73
|
+
* 초기 포커스를 **먼저 찾을** 영역. 여기 안에 포커스 가능한 컨트롤이 있으면 그 첫 번째로
|
|
74
|
+
* 간다. 없으면 기존 순서(skip 표시가 없는 첫 요소 → 첫 요소 → 컨테이너)로 떨어진다.
|
|
75
|
+
*
|
|
76
|
+
* 오버레이의 초기 포커스 규칙이 세 갈래("본문 첫 컨트롤 → 닫기 버튼 → 패널")라 표시
|
|
77
|
+
* 속성만으로는 표현되지 않는다. 닫기 버튼에 skip 을 붙여 본문을 우선하게 만들면, 본문이
|
|
78
|
+
* 없는 확인 모달에서는 그다음 후보가 **footer 의 첫 버튼**이 된다 - 그 자리가 destructive
|
|
79
|
+
* 액션인 패턴이 흔해서 열자마자 삭제에 포커스가 놓인다. 우선 영역을 직접 지정하면 그런
|
|
80
|
+
* 우회 없이 세 갈래가 그대로 표현된다.
|
|
81
|
+
*/
|
|
82
|
+
preferWithin?: React$1.RefObject<HTMLElement | null>;
|
|
83
|
+
}
|
|
84
|
+
declare function useFocusTrap(containerRef: React$1.RefObject<HTMLElement | null>, isActive: boolean, options?: FocusTrapOptions): void;
|
|
72
85
|
|
|
73
86
|
/**
|
|
74
87
|
* 사용자가 OS 수준에서 "동작 줄이기"를 켰는지 반환한다 (WCAG 2.3.3).
|
|
@@ -1526,15 +1539,24 @@ type TableProps<T extends object> = {
|
|
|
1526
1539
|
onSortChange?: (sort: TableSort | undefined) => void;
|
|
1527
1540
|
/** 전체 선택 체크박스 aria-label */
|
|
1528
1541
|
selectAllAriaLabel?: string;
|
|
1529
|
-
/** 개별 행 선택 체크박스 aria-label (기본값: (i) => `${i+1}번째 행 선택`) */
|
|
1542
|
+
/** 개별 행 선택 체크박스 aria-label. 인자는 `rowIndexOffset` 이 더해진 **전체 순번**이다 (기본값: (i) => `${i+1}번째 행 선택`) */
|
|
1530
1543
|
selectRowAriaLabel?: (index: number) => string;
|
|
1544
|
+
/**
|
|
1545
|
+
* 이 표의 첫 행이 전체에서 몇 번째인지 (0-based, 기본 0). 서버 페이지네이션처럼 한 쪽만
|
|
1546
|
+
* 받아 그릴 때 준다.
|
|
1547
|
+
*
|
|
1548
|
+
* 없으면 쪽마다 행 번호가 1 부터 다시 시작해, 3쪽의 체크박스도 1쪽과 **글자까지 같은**
|
|
1549
|
+
* "1번째 행 선택" 으로 읽힌다 - 스크린리더 사용자는 쪽이 넘어갔는지도, 지금 누른 것이 어느
|
|
1550
|
+
* 행인지도 이름만으로는 구분할 수 없다.
|
|
1551
|
+
*/
|
|
1552
|
+
rowIndexOffset?: number;
|
|
1531
1553
|
} & TableSelectionProps<T>;
|
|
1532
1554
|
/**
|
|
1533
1555
|
* 데이터 테이블을 렌더링한다. 로딩 중에는 헤더 유지, 바디에 스켈레톤 행을 표시한다.
|
|
1534
1556
|
* @param props 테이블 속성
|
|
1535
1557
|
* @returns 테이블 컴포넌트
|
|
1536
1558
|
*/
|
|
1537
|
-
declare const Table: <T extends object>({ columns, data, keyExtractor, emptyMessage: emptyMessageProp, isLoading, skeletonRows, size, hoverable, stickyHeader, ariaLabel, className, onRowClick, rowClickHint: rowClickHintProp, sort, onSortChange, selectAllAriaLabel: selectAllAriaLabelProp, selectRowAriaLabel: selectRowAriaLabelProp, selectable, rowKey, selectedKeys, onSelectionChange, }: TableProps<T>) => React$1.JSX.Element;
|
|
1559
|
+
declare const Table: <T extends object>({ columns, data, keyExtractor, emptyMessage: emptyMessageProp, isLoading, skeletonRows, size, hoverable, stickyHeader, ariaLabel, className, onRowClick, rowClickHint: rowClickHintProp, sort, onSortChange, selectAllAriaLabel: selectAllAriaLabelProp, selectRowAriaLabel: selectRowAriaLabelProp, rowIndexOffset, selectable, rowKey, selectedKeys, onSelectionChange, }: TableProps<T>) => React$1.JSX.Element;
|
|
1538
1560
|
|
|
1539
1561
|
/**
|
|
1540
1562
|
* 목록 화면이 데이터를 받는 모양.
|
|
@@ -1577,6 +1599,11 @@ interface DataViewPagination {
|
|
|
1577
1599
|
page: number;
|
|
1578
1600
|
/** 전체 페이지 수 */
|
|
1579
1601
|
totalPages: number;
|
|
1602
|
+
/**
|
|
1603
|
+
* 한 쪽에 몇 행인지. 주면 행 선택 체크박스의 기본 라벨이 쪽마다 1 부터 다시 시작하지 않고
|
|
1604
|
+
* 전체 순번을 쓴다 - 없으면 3쪽의 체크박스도 1쪽과 같은 "1번째 행 선택" 으로 읽힌다.
|
|
1605
|
+
*/
|
|
1606
|
+
pageSize?: number;
|
|
1580
1607
|
/** 페이지 변경 콜백 */
|
|
1581
1608
|
onPageChange: (page: number) => void;
|
|
1582
1609
|
}
|
|
@@ -3547,4 +3574,4 @@ type StackProps<T extends React$1.ElementType = "div"> = PolymorphicProps<T, Sta
|
|
|
3547
3574
|
*/
|
|
3548
3575
|
declare const Stack: <T extends React$1.ElementType = "div">({ direction, gap, align, justify, wrap, as, ref, className, children, style, ...props }: StackProps<T>) => React$1.JSX.Element;
|
|
3549
3576
|
|
|
3550
|
-
export { Accordion, type AccordionItem, type AccordionProps, type AlertActionsAlign, type AlertOptions, AlertProvider, type AlertVariant, AppShell, type AppShellProps, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, Badge, type BadgeAppearance, type BadgeProps, type BadgeShape, type BadgeSize, type BadgeVariant, BottomNav, BottomNavItem, type BottomNavItemProps, type BottomNavProps, BottomNavSpacer, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonAsAnchor, type ButtonAsButton, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardFooterAlign, type CardProps, type CardVariant, Checkbox, type CheckboxProps, Chip, type ChipProps, type ChipSize, type ChipTone, type ChipType, Combobox, type ComboboxOption, type ComboboxProps, type ComboboxSize, Container, type ContainerProps, type ContainerSize, type CropImageSize, type CropOffset, type CropRect, DataView, type DataViewPagination, type DataViewProps, type DataViewQuery, type DataViewSelectionAction, type DataViewToolbar, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, DescriptionList, type DescriptionListItem, type DescriptionListLayout, type DescriptionListProps, Divider, type DividerProps, Drawer, type DrawerPlacement, type DrawerProps, Dropdown, type DropdownMultipleProps, type DropdownOption, type DropdownProps, type DropdownSingleProps, type DropdownSize, type DropdownVariant, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, type ErrorStateVariant, Field, type FieldControl, type FieldProps, FileInput, type FileInputProps, type FileInputVariant, Form, type FormActionsProps, type FormProps, Grid, type GridCols, type GridGap, type GridProps, Hero, type HeroAction, type HeroAlign, type HeroHeight, type HeroOverlay, type HeroProps, Icon, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconProps, ImageCropper, type ImageCropperHandle, type ImageCropperProps, type ImeStrategy, LinearProgress, type LinearProgressProps, ListItem, type ListItemProps, type ListboxItem, type LocaleKey, type LocaleMessages, type LocaleName, LocaleProvider, type LocaleProviderProps, type LocaleText, MediaCard, type MediaCardImage, type MediaCardImagePosition, type MediaCardProps, type MediaCardShadow, Menu, type MenuItem, type MenuProps, Modal, type ModalFooterAlign, type ModalProps, NavBar, type NavBarLayout, type NavBarLocaleConfig, type NavBarLocaleOption, type NavBarProps, type NavBarVariant, NavLink, type NavLinkProps, OtpInput, type OtpInputProps, PageHeader, type PageHeaderProps, Pagination, type PaginationProps, type PolymorphicProps, type PolymorphicRef, Popover, type PopoverPlacement, type PopoverProps, Prose, type ProseProps, type ProseSize, Radio, RadioGroup, type RadioGroupContextValue, type RadioGroupOrientation, type RadioGroupProps, type RadioGroupSize, type RadioProps, type ResolvedTheme, Section, type SectionBg, type SectionProps, type SectionSpacing, Sidebar, SidebarItem, type SidebarItemProps, type SidebarMode, type SidebarProps, SidebarSection, type SidebarSectionProps, Skeleton, type SkeletonProps, type SkeletonVariant, Spinner, type SpinnerProps, Stack, type StackAlign, type StackDirection, type StackGap, type StackJustify, type StackProps, type StackWrap, Stat, type StatDeltaTone, type StatProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Table, type TableColumn, type TableProps, type TableSize, type TableSort, type TableSortDirection, Tabs, type TabsProps, type TabsSize, type TabsVariant, TagInput, type TagInputProps, type TagInputSize, TextField, type TextFieldProps, type TextFieldSize, type TextFieldVariant, Textarea, type TextareaProps, type TextareaResize, type TextareaSize, type ThemeMode, ThemeProvider, type ThemeProviderProps, TimePicker, type TimePickerProps, Timeline, type TimelineItem, type TimelineProps, type TimelineStatus, ToastProvider, type ToastProviderProps, type ToastVariant, Toggle, type ToggleProps, Tooltip, type TooltipPlacement, type TooltipProps, TopLoading, type TopLoadingProps, type UseListboxPopupArgs, type UseListboxPopupResult, a11y, baseBorderWidth, baseColors, baseTypography, borderWidth, breakpoints, catalogs, cn, colors, elevation, en, iconSize, ko, motion, opacity, radius, skeleton, spacing, typography, useAlert, useFieldControl, useFocusTrap, useListboxPopup, useLocaleName, useLocaleText, useRadioGroupContext, useReducedMotion, useSpringHover, useSpringPresence, useTheme, useToast, zIndex };
|
|
3577
|
+
export { Accordion, type AccordionItem, type AccordionProps, type AlertActionsAlign, type AlertOptions, AlertProvider, type AlertVariant, AppShell, type AppShellProps, Avatar, type AvatarProps, type AvatarShape, type AvatarSize, Badge, type BadgeAppearance, type BadgeProps, type BadgeShape, type BadgeSize, type BadgeVariant, BottomNav, BottomNavItem, type BottomNavItemProps, type BottomNavProps, BottomNavSpacer, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonAsAnchor, type ButtonAsButton, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardFooterAlign, type CardProps, type CardVariant, Checkbox, type CheckboxProps, Chip, type ChipProps, type ChipSize, type ChipTone, type ChipType, Combobox, type ComboboxOption, type ComboboxProps, type ComboboxSize, Container, type ContainerProps, type ContainerSize, type CropImageSize, type CropOffset, type CropRect, DataView, type DataViewPagination, type DataViewProps, type DataViewQuery, type DataViewSelectionAction, type DataViewToolbar, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DateRangePickerProps, DescriptionList, type DescriptionListItem, type DescriptionListLayout, type DescriptionListProps, Divider, type DividerProps, Drawer, type DrawerPlacement, type DrawerProps, Dropdown, type DropdownMultipleProps, type DropdownOption, type DropdownProps, type DropdownSingleProps, type DropdownSize, type DropdownVariant, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, type ErrorStateVariant, Field, type FieldControl, type FieldProps, FileInput, type FileInputProps, type FileInputVariant, type FocusTrapOptions, Form, type FormActionsProps, type FormProps, Grid, type GridCols, type GridGap, type GridProps, Hero, type HeroAction, type HeroAlign, type HeroHeight, type HeroOverlay, type HeroProps, Icon, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconProps, ImageCropper, type ImageCropperHandle, type ImageCropperProps, type ImeStrategy, LinearProgress, type LinearProgressProps, ListItem, type ListItemProps, type ListboxItem, type LocaleKey, type LocaleMessages, type LocaleName, LocaleProvider, type LocaleProviderProps, type LocaleText, MediaCard, type MediaCardImage, type MediaCardImagePosition, type MediaCardProps, type MediaCardShadow, Menu, type MenuItem, type MenuProps, Modal, type ModalFooterAlign, type ModalProps, NavBar, type NavBarLayout, type NavBarLocaleConfig, type NavBarLocaleOption, type NavBarProps, type NavBarVariant, NavLink, type NavLinkProps, OtpInput, type OtpInputProps, PageHeader, type PageHeaderProps, Pagination, type PaginationProps, type PolymorphicProps, type PolymorphicRef, Popover, type PopoverPlacement, type PopoverProps, Prose, type ProseProps, type ProseSize, Radio, RadioGroup, type RadioGroupContextValue, type RadioGroupOrientation, type RadioGroupProps, type RadioGroupSize, type RadioProps, type ResolvedTheme, Section, type SectionBg, type SectionProps, type SectionSpacing, Sidebar, SidebarItem, type SidebarItemProps, type SidebarMode, type SidebarProps, SidebarSection, type SidebarSectionProps, Skeleton, type SkeletonProps, type SkeletonVariant, Spinner, type SpinnerProps, Stack, type StackAlign, type StackDirection, type StackGap, type StackJustify, type StackProps, type StackWrap, Stat, type StatDeltaTone, type StatProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Table, type TableColumn, type TableProps, type TableSize, type TableSort, type TableSortDirection, Tabs, type TabsProps, type TabsSize, type TabsVariant, TagInput, type TagInputProps, type TagInputSize, TextField, type TextFieldProps, type TextFieldSize, type TextFieldVariant, Textarea, type TextareaProps, type TextareaResize, type TextareaSize, type ThemeMode, ThemeProvider, type ThemeProviderProps, TimePicker, type TimePickerProps, Timeline, type TimelineItem, type TimelineProps, type TimelineStatus, ToastProvider, type ToastProviderProps, type ToastVariant, Toggle, type ToggleProps, Tooltip, type TooltipPlacement, type TooltipProps, TopLoading, type TopLoadingProps, type UseListboxPopupArgs, type UseListboxPopupResult, a11y, baseBorderWidth, baseColors, baseTypography, borderWidth, breakpoints, catalogs, cn, colors, elevation, en, iconSize, ko, motion, opacity, radius, skeleton, spacing, typography, useAlert, useFieldControl, useFocusTrap, useListboxPopup, useLocaleName, useLocaleText, useRadioGroupContext, useReducedMotion, useSpringHover, useSpringPresence, useTheme, useToast, zIndex };
|
package/dist/index.js
CHANGED
|
@@ -338,7 +338,7 @@ var FOCUSABLE_SELECTORS = [
|
|
|
338
338
|
"textarea:not([disabled])",
|
|
339
339
|
'[tabindex]:not([tabindex="-1"])'
|
|
340
340
|
].join(", ");
|
|
341
|
-
function useFocusTrap(containerRef, isActive) {
|
|
341
|
+
function useFocusTrap(containerRef, isActive, options) {
|
|
342
342
|
const previousActiveElement = React20.useRef(null);
|
|
343
343
|
React20.useEffect(() => {
|
|
344
344
|
if (!isActive) return;
|
|
@@ -350,7 +350,11 @@ function useFocusTrap(containerRef, isActive) {
|
|
|
350
350
|
};
|
|
351
351
|
let wasTabIndexAdded = false;
|
|
352
352
|
const focusableElements = getFocusableElements();
|
|
353
|
-
const
|
|
353
|
+
const preferredRoot = options?.preferWithin?.current;
|
|
354
|
+
const preferred = preferredRoot ? Array.from(preferredRoot.querySelectorAll(FOCUSABLE_SELECTORS)).find(
|
|
355
|
+
(el) => !el.hasAttribute(SKIP_AUTOFOCUS_ATTR)
|
|
356
|
+
) ?? null : null;
|
|
357
|
+
const initialTarget = preferred ?? Array.from(focusableElements).find((el) => !el.hasAttribute(SKIP_AUTOFOCUS_ATTR)) ?? focusableElements[0];
|
|
354
358
|
if (initialTarget) {
|
|
355
359
|
initialTarget.focus();
|
|
356
360
|
} else {
|
|
@@ -2685,11 +2689,34 @@ var Card = ({
|
|
|
2685
2689
|
{ card_bordered: bordered, card_interactive: interactive },
|
|
2686
2690
|
className
|
|
2687
2691
|
);
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2692
|
+
const resolvedRole = props.role ?? (props.onClick ? "button" : void 0);
|
|
2693
|
+
return (
|
|
2694
|
+
// biome-ignore lint/a11y/noStaticElementInteractions: onClick 이 있을 때만 role=button + tabIndex 를 붙인다 (ListItem 과 같은 규칙)
|
|
2695
|
+
/* @__PURE__ */ jsxs(
|
|
2696
|
+
"div",
|
|
2697
|
+
{
|
|
2698
|
+
ref,
|
|
2699
|
+
className: cardClassName,
|
|
2700
|
+
role: resolvedRole,
|
|
2701
|
+
tabIndex: props.onClick ? 0 : void 0,
|
|
2702
|
+
...props,
|
|
2703
|
+
onKeyDown: (e) => {
|
|
2704
|
+
props.onKeyDown?.(e);
|
|
2705
|
+
if (!props.onClick || e.defaultPrevented || e.repeat) return;
|
|
2706
|
+
const activates = e.key === "Enter" || e.key === " " && resolvedRole === "button";
|
|
2707
|
+
if (activates) {
|
|
2708
|
+
e.preventDefault();
|
|
2709
|
+
e.currentTarget.click();
|
|
2710
|
+
}
|
|
2711
|
+
},
|
|
2712
|
+
children: [
|
|
2713
|
+
heading ? /* @__PURE__ */ jsx(HeadingTag, { className: "card_title", children: heading }) : null,
|
|
2714
|
+
/* @__PURE__ */ jsx("div", { className: "card_body", children }),
|
|
2715
|
+
footer ? /* @__PURE__ */ jsx("div", { className: cn("card_footer", `card_footer_${footerAlign}`), children: footer }) : null
|
|
2716
|
+
]
|
|
2717
|
+
}
|
|
2718
|
+
)
|
|
2719
|
+
);
|
|
2693
2720
|
};
|
|
2694
2721
|
var CheckIcon = () => /* @__PURE__ */ jsx(
|
|
2695
2722
|
"svg",
|
|
@@ -3291,7 +3318,7 @@ var Checkbox = ({
|
|
|
3291
3318
|
className: "checkbox_input",
|
|
3292
3319
|
id: field?.inputId ?? props.id,
|
|
3293
3320
|
"aria-describedby": field?.describedBy ?? props["aria-describedby"],
|
|
3294
|
-
"aria-required": field
|
|
3321
|
+
"aria-required": field ? field.required || void 0 : props["aria-required"],
|
|
3295
3322
|
"aria-invalid": error || (field ? field.invalid || void 0 : props["aria-invalid"])
|
|
3296
3323
|
}
|
|
3297
3324
|
),
|
|
@@ -3318,6 +3345,7 @@ var Table = ({
|
|
|
3318
3345
|
onSortChange,
|
|
3319
3346
|
selectAllAriaLabel: selectAllAriaLabelProp,
|
|
3320
3347
|
selectRowAriaLabel: selectRowAriaLabelProp,
|
|
3348
|
+
rowIndexOffset = 0,
|
|
3321
3349
|
selectable = false,
|
|
3322
3350
|
rowKey,
|
|
3323
3351
|
selectedKeys,
|
|
@@ -3328,6 +3356,7 @@ var Table = ({
|
|
|
3328
3356
|
const emptyMessage = emptyMessageProp === void 0 ? t("table.empty") : emptyMessageProp;
|
|
3329
3357
|
const selectAllAriaLabel = selectAllAriaLabelProp ?? t("table.selectAll");
|
|
3330
3358
|
const selectRowAriaLabel = selectRowAriaLabelProp ?? ((index) => t("table.selectRow", { index: index + 1 }));
|
|
3359
|
+
const toGlobalIndex = (rowIndex) => rowIndex + rowIndexOffset;
|
|
3331
3360
|
const wrapperClassName = cn(
|
|
3332
3361
|
"table_wrapper",
|
|
3333
3362
|
`table_size_${size}`,
|
|
@@ -3496,7 +3525,7 @@ var Table = ({
|
|
|
3496
3525
|
children: /* @__PURE__ */ jsx(
|
|
3497
3526
|
Checkbox,
|
|
3498
3527
|
{
|
|
3499
|
-
"aria-label": selectRowAriaLabel(rowIndex),
|
|
3528
|
+
"aria-label": selectRowAriaLabel(toGlobalIndex(rowIndex)),
|
|
3500
3529
|
checked: isSelected,
|
|
3501
3530
|
onChange: () => handleToggleRow(rowIdentity)
|
|
3502
3531
|
}
|
|
@@ -3556,6 +3585,7 @@ var DataView = ({
|
|
|
3556
3585
|
const selectable = !!selectionActions?.length;
|
|
3557
3586
|
const rows = query.data ?? [];
|
|
3558
3587
|
const hasPagination = !!pagination;
|
|
3588
|
+
const rowIndexOffset = pagination?.pageSize !== void 0 ? Math.max(0, (pagination.page - 1) * pagination.pageSize) : 0;
|
|
3559
3589
|
const needsSelectionPrune = selectable && !hasPagination;
|
|
3560
3590
|
const visibleKeySignature = needsSelectionPrune ? JSON.stringify(rows.map(rowKey)) : "";
|
|
3561
3591
|
useEffect(() => {
|
|
@@ -3621,6 +3651,7 @@ var DataView = ({
|
|
|
3621
3651
|
columns,
|
|
3622
3652
|
data: rows,
|
|
3623
3653
|
keyExtractor: rowKey,
|
|
3654
|
+
rowIndexOffset,
|
|
3624
3655
|
isLoading: query.isLoading,
|
|
3625
3656
|
sort,
|
|
3626
3657
|
onSortChange,
|
|
@@ -3638,6 +3669,7 @@ var DataView = ({
|
|
|
3638
3669
|
columns,
|
|
3639
3670
|
data: rows,
|
|
3640
3671
|
keyExtractor: rowKey,
|
|
3672
|
+
rowIndexOffset,
|
|
3641
3673
|
isLoading: query.isLoading,
|
|
3642
3674
|
sort,
|
|
3643
3675
|
onSortChange,
|
|
@@ -3752,7 +3784,7 @@ var ListItem = ({
|
|
|
3752
3784
|
className: rootClassName,
|
|
3753
3785
|
onClick: disabled ? void 0 : onClick,
|
|
3754
3786
|
onKeyDown: (e) => {
|
|
3755
|
-
if (disabled || !onClick) return;
|
|
3787
|
+
if (disabled || !onClick || e.repeat) return;
|
|
3756
3788
|
if (e.key === "Enter" || e.key === " ") {
|
|
3757
3789
|
e.preventDefault();
|
|
3758
3790
|
e.currentTarget.click();
|
|
@@ -3803,18 +3835,41 @@ var MediaCard = ({
|
|
|
3803
3835
|
const isOverlay = imagePosition === "overlay";
|
|
3804
3836
|
const cardStyle = isOverlay && aspectRatio ? { aspectRatio } : void 0;
|
|
3805
3837
|
const wrapStyle = !isOverlay && aspectRatio ? { aspectRatio } : void 0;
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3838
|
+
const resolvedRole = props.role ?? (props.onClick ? "button" : void 0);
|
|
3839
|
+
return (
|
|
3840
|
+
// biome-ignore lint/a11y/noStaticElementInteractions: onClick 이 있을 때만 role=button + tabIndex 를 붙인다 (ListItem 과 같은 규칙)
|
|
3841
|
+
/* @__PURE__ */ jsxs(
|
|
3842
|
+
"div",
|
|
3843
|
+
{
|
|
3844
|
+
className: cardClassName,
|
|
3845
|
+
style: cardStyle,
|
|
3846
|
+
role: resolvedRole,
|
|
3847
|
+
tabIndex: props.onClick ? 0 : void 0,
|
|
3848
|
+
...props,
|
|
3849
|
+
onKeyDown: (e) => {
|
|
3850
|
+
props.onKeyDown?.(e);
|
|
3851
|
+
if (!props.onClick || e.defaultPrevented || e.repeat) return;
|
|
3852
|
+
const activates = e.key === "Enter" || e.key === " " && resolvedRole === "button";
|
|
3853
|
+
if (activates) {
|
|
3854
|
+
e.preventDefault();
|
|
3855
|
+
e.currentTarget.click();
|
|
3856
|
+
}
|
|
3857
|
+
},
|
|
3858
|
+
children: [
|
|
3859
|
+
/* @__PURE__ */ jsxs("div", { className: "media_card_image_wrap", style: wrapStyle, children: [
|
|
3860
|
+
/* @__PURE__ */ jsx("img", { className: "media_card_image", src: image.src, alt: image.alt, loading: "lazy" }),
|
|
3861
|
+
isOverlay && /* @__PURE__ */ jsx("div", { className: "media_card_overlay", "aria-hidden": "true" })
|
|
3862
|
+
] }),
|
|
3863
|
+
/* @__PURE__ */ jsxs("div", { className: "media_card_body", children: [
|
|
3864
|
+
eyebrow && /* @__PURE__ */ jsx("div", { className: "media_card_eyebrow", children: eyebrow }),
|
|
3865
|
+
heading && /* @__PURE__ */ jsx(HeadingTag, { className: "media_card_heading", children: heading }),
|
|
3866
|
+
children && /* @__PURE__ */ jsx("div", { className: "media_card_content", children }),
|
|
3867
|
+
meta && /* @__PURE__ */ jsx("div", { className: "media_card_meta", children: meta })
|
|
3868
|
+
] })
|
|
3869
|
+
]
|
|
3870
|
+
}
|
|
3871
|
+
)
|
|
3872
|
+
);
|
|
3818
3873
|
};
|
|
3819
3874
|
var Prose = ({ size = "md", className, children, ref, ...props }) => {
|
|
3820
3875
|
const rootRef = React20.useRef(null);
|
|
@@ -6247,12 +6302,13 @@ var Drawer = ({
|
|
|
6247
6302
|
const overlayDismissible = dismissible ?? closeOnOverlay;
|
|
6248
6303
|
const escapeDismissible = dismissible ?? true;
|
|
6249
6304
|
const panelRef = React20.useRef(null);
|
|
6305
|
+
const bodyRef = React20.useRef(null);
|
|
6250
6306
|
const pressedOverlayRef = React20.useRef(false);
|
|
6251
6307
|
const titleId = React20.useId();
|
|
6252
6308
|
const [shouldRender, setShouldRender] = React20.useState(open);
|
|
6253
6309
|
const reduced = useReducedMotion();
|
|
6254
6310
|
const isMounted = useIsMounted();
|
|
6255
|
-
useFocusTrap(panelRef, open && isMounted);
|
|
6311
|
+
useFocusTrap(panelRef, open && isMounted, { preferWithin: bodyRef });
|
|
6256
6312
|
useOverlayEscape(open && isMounted, () => {
|
|
6257
6313
|
if (escapeDismissible) onClose?.();
|
|
6258
6314
|
});
|
|
@@ -6323,7 +6379,7 @@ var Drawer = ({
|
|
|
6323
6379
|
content.children && // 본문이 스크롤 컨테이너라 키보드로도 스크롤할 수 있어야 한다(axe
|
|
6324
6380
|
// `scrollable-region-focusable`). 다만 초기 포커스 대상에서는 제외한다 - 안쪽에
|
|
6325
6381
|
// 첫 입력이 있는데 빈 wrapper 에 포커스가 놓이면 열자마자 어디에 있는지 알 수 없다.
|
|
6326
|
-
/* @__PURE__ */ jsx("div", { className: "drawer_body", tabIndex: 0, "data-focus-trap-skip-autofocus": "", children: content.children }),
|
|
6382
|
+
/* @__PURE__ */ jsx("div", { ref: bodyRef, className: "drawer_body", tabIndex: 0, "data-focus-trap-skip-autofocus": "", children: content.children }),
|
|
6327
6383
|
content.footer && /* @__PURE__ */ jsx("div", { className: "drawer_footer", children: content.footer })
|
|
6328
6384
|
]
|
|
6329
6385
|
}
|
|
@@ -6360,11 +6416,12 @@ var Modal = ({
|
|
|
6360
6416
|
const overlayDismissible = dismissible ?? closeOnOverlay;
|
|
6361
6417
|
const escapeDismissible = dismissible ?? true;
|
|
6362
6418
|
const panelRef = React20.useRef(null);
|
|
6419
|
+
const bodyRef = React20.useRef(null);
|
|
6363
6420
|
const pressedOverlayRef = React20.useRef(false);
|
|
6364
6421
|
const titleId = React20.useId();
|
|
6365
6422
|
const [shouldRender, setShouldRender] = React20.useState(open);
|
|
6366
6423
|
const isMounted = useIsMounted();
|
|
6367
|
-
useFocusTrap(panelRef, open && isMounted);
|
|
6424
|
+
useFocusTrap(panelRef, open && isMounted, { preferWithin: bodyRef });
|
|
6368
6425
|
useOverlayEscape(open && isMounted, () => {
|
|
6369
6426
|
if (escapeDismissible) onClose?.();
|
|
6370
6427
|
});
|
|
@@ -6442,7 +6499,7 @@ var Modal = ({
|
|
|
6442
6499
|
// 스크롤 가능한 영역은 키보드로도 스크롤할 수 있어야 한다 (WCAG 2.1.1) - 포커스
|
|
6443
6500
|
// 가능해야 화살표 키가 먹는다.
|
|
6444
6501
|
// biome-ignore lint/a11y/noNoninteractiveTabindex: scrollable region needs keyboard scroll
|
|
6445
|
-
/* @__PURE__ */ jsx("div", { className: "modal_body", tabIndex: 0, "data-focus-trap-skip-autofocus": "", children: content.children }),
|
|
6502
|
+
/* @__PURE__ */ jsx("div", { ref: bodyRef, className: "modal_body", tabIndex: 0, "data-focus-trap-skip-autofocus": "", children: content.children }),
|
|
6446
6503
|
content.footer && /* @__PURE__ */ jsx("div", { className: cn("modal_footer", `modal_footer_${footerAlign}`), children: content.footer })
|
|
6447
6504
|
]
|
|
6448
6505
|
}
|