@yamada-ui/react 2.3.0-next-20260412065941 → 2.3.0-next-20260412094821
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/cjs/components/segmented-control/segmented-control.cjs +3 -3
- package/dist/cjs/components/segmented-control/segmented-control.cjs.map +1 -1
- package/dist/cjs/components/table/table.cjs +13 -4
- package/dist/cjs/components/table/table.cjs.map +1 -1
- package/dist/esm/components/segmented-control/segmented-control.js +3 -3
- package/dist/esm/components/segmented-control/segmented-control.js.map +1 -1
- package/dist/esm/components/table/table.js +13 -4
- package/dist/esm/components/table/table.js.map +1 -1
- package/dist/types/components/accordion/accordion.d.ts +2 -4
- package/dist/types/components/accordion/use-accordion.d.ts +11 -11
- package/dist/types/components/action-bar/action-bar.d.ts +2 -3
- package/dist/types/components/airy/airy.d.ts +2 -3
- package/dist/types/components/alert/alert.d.ts +2 -5
- package/dist/types/components/alpha-slider/alpha-slider.d.ts +2 -3
- package/dist/types/components/aspect-ratio/aspect-ratio.d.ts +2 -2
- package/dist/types/components/autocomplete/autocomplete.d.ts +2 -4
- package/dist/types/components/autocomplete/autocomplete.style.d.ts +1 -1
- package/dist/types/components/autocomplete/use-autocomplete.d.ts +5 -7
- package/dist/types/components/avatar/avatar.d.ts +5 -5
- package/dist/types/components/avatar/use-avatar-group.d.ts +2 -2
- package/dist/types/components/badge/badge.d.ts +2 -2
- package/dist/types/components/bleed/bleed.d.ts +2 -2
- package/dist/types/components/blockquote/blockquote.d.ts +2 -2
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +2 -2
- package/dist/types/components/breadcrumb/use-breadcrumb.d.ts +2 -2
- package/dist/types/components/button/button-group.d.ts +0 -1
- package/dist/types/components/button/button.d.ts +2 -3
- package/dist/types/components/button/icon-button.d.ts +2 -2
- package/dist/types/components/calendar/calendar.d.ts +2 -3
- package/dist/types/components/calendar/calendar.style.d.ts +2 -2
- package/dist/types/components/calendar/use-calendar.d.ts +8 -9
- package/dist/types/components/card/card.d.ts +2 -2
- package/dist/types/components/carousel/carousel.d.ts +2 -3
- package/dist/types/components/carousel/carousel.style.d.ts +2 -2
- package/dist/types/components/carousel/use-carousel.d.ts +3 -3
- package/dist/types/components/center/center.d.ts +2 -2
- package/dist/types/components/chart/chart.d.ts +5 -5
- package/dist/types/components/chart/composed-chart.d.ts +2 -2
- package/dist/types/components/chart/donut-chart.d.ts +2 -2
- package/dist/types/components/chart/line-chart.d.ts +2 -2
- package/dist/types/components/chart/pie-chart.d.ts +2 -2
- package/dist/types/components/chart/radar-chart.d.ts +2 -2
- package/dist/types/components/chart/use-chart.d.ts +2 -2
- package/dist/types/components/checkbox/checkbox-group.d.ts +0 -2
- package/dist/types/components/checkbox/checkbox.d.ts +4 -5
- package/dist/types/components/checkbox/use-checkbox-group.d.ts +2 -3
- package/dist/types/components/checkbox/use-checkbox.d.ts +0 -1
- package/dist/types/components/checkbox-card/checkbox-card-group.d.ts +0 -3
- package/dist/types/components/checkbox-card/checkbox-card.d.ts +5 -7
- package/dist/types/components/checkbox-card/checkbox-card.style.d.ts +1 -1
- package/dist/types/components/circle-progress/circle-progress.d.ts +2 -3
- package/dist/types/components/close-button/close-button.d.ts +2 -3
- package/dist/types/components/code/code.d.ts +2 -2
- package/dist/types/components/collapse/collapse.d.ts +2 -3
- package/dist/types/components/color-picker/color-picker.d.ts +2 -6
- package/dist/types/components/color-picker/color-picker.style.d.ts +1 -1
- package/dist/types/components/color-picker/use-color-picker.d.ts +2 -5
- package/dist/types/components/color-selector/color-selector.d.ts +2 -6
- package/dist/types/components/color-selector/use-color-selector.d.ts +3 -5
- package/dist/types/components/color-swatch/color-swatch.d.ts +2 -2
- package/dist/types/components/container/container.d.ts +2 -2
- package/dist/types/components/data-list/data-list.d.ts +2 -2
- package/dist/types/components/date-picker/date-picker.d.ts +2 -5
- package/dist/types/components/date-picker/use-date-picker.d.ts +4 -7
- package/dist/types/components/drawer/drawer.d.ts +2 -5
- package/dist/types/components/drawer/use-drawer.d.ts +0 -2
- package/dist/types/components/dropzone/dropzone.d.ts +4 -7
- package/dist/types/components/dropzone/use-dropzone.d.ts +0 -1
- package/dist/types/components/editable/editable.d.ts +4 -5
- package/dist/types/components/editable/editable.style.d.ts +1 -1
- package/dist/types/components/editable/use-editable.d.ts +2 -3
- package/dist/types/components/em/em.d.ts +2 -2
- package/dist/types/components/empty-state/empty-state.d.ts +2 -2
- package/dist/types/components/empty-state/empty-state.style.d.ts +2 -2
- package/dist/types/components/fade/fade.d.ts +2 -3
- package/dist/types/components/fade-scale/fade-scale.d.ts +0 -1
- package/dist/types/components/field/field.d.ts +3 -3
- package/dist/types/components/field/field.style.d.ts +2 -2
- package/dist/types/components/field/use-field-props.d.ts +4 -4
- package/dist/types/components/fieldset/fieldset.d.ts +3 -4
- package/dist/types/components/fieldset/fieldset.style.d.ts +1 -1
- package/dist/types/components/file-button/file-button.d.ts +2 -4
- package/dist/types/components/file-button/use-file-button.d.ts +18 -20
- package/dist/types/components/file-input/file-input.d.ts +2 -4
- package/dist/types/components/file-input/use-file-input.d.ts +17 -18
- package/dist/types/components/flex/flex.d.ts +2 -2
- package/dist/types/components/flip/flip.d.ts +4 -5
- package/dist/types/components/float/float.d.ts +2 -2
- package/dist/types/components/form/form.d.ts +3 -4
- package/dist/types/components/format/format-byte.d.ts +4 -4
- package/dist/types/components/format/format-date-time.d.ts +4 -4
- package/dist/types/components/format/format-number.d.ts +2 -2
- package/dist/types/components/format/use-format-byte.d.ts +0 -1
- package/dist/types/components/format/use-format-date-time.d.ts +0 -1
- package/dist/types/components/format/use-format-number.d.ts +0 -1
- package/dist/types/components/grid/grid-item.d.ts +2 -2
- package/dist/types/components/grid/grid.d.ts +2 -2
- package/dist/types/components/group/group.d.ts +2 -3
- package/dist/types/components/group/use-group.d.ts +2 -2
- package/dist/types/components/heading/heading.d.ts +2 -2
- package/dist/types/components/highlight/highlight.d.ts +0 -2
- package/dist/types/components/hue-slider/hue-slider.d.ts +3 -4
- package/dist/types/components/icon/icon.d.ts +5 -5
- package/dist/types/components/image/image.d.ts +2 -2
- package/dist/types/components/indicator/indicator.d.ts +4 -5
- package/dist/types/components/infinite-scroll-area/infinite-scroll-area.d.ts +2 -2
- package/dist/types/components/input/input-addon.d.ts +2 -2
- package/dist/types/components/input/input-element.d.ts +2 -2
- package/dist/types/components/input/input-group.d.ts +0 -2
- package/dist/types/components/input/input.d.ts +2 -3
- package/dist/types/components/kbd/kbd.d.ts +2 -2
- package/dist/types/components/link/link.d.ts +2 -2
- package/dist/types/components/link-box/link-box.d.ts +2 -2
- package/dist/types/components/list/list.d.ts +2 -2
- package/dist/types/components/loading/loading-provider.d.ts +2 -2
- package/dist/types/components/loading/loading.d.ts +3 -4
- package/dist/types/components/loading/use-loading-component.d.ts +0 -1
- package/dist/types/components/mark/mark.d.ts +2 -2
- package/dist/types/components/menu/menu.d.ts +2 -3
- package/dist/types/components/menu/use-menu.d.ts +11 -11
- package/dist/types/components/modal/modal.d.ts +2 -6
- package/dist/types/components/native-accordion/native-accordion.d.ts +2 -2
- package/dist/types/components/native-accordion/use-native-accordion.d.ts +2 -2
- package/dist/types/components/native-popover/native-popover.d.ts +2 -2
- package/dist/types/components/native-select/native-select.d.ts +2 -4
- package/dist/types/components/native-select/use-native-select.d.ts +0 -1
- package/dist/types/components/native-table/native-table.d.ts +4 -4
- package/dist/types/components/notice/notice.style.d.ts +1 -1
- package/dist/types/components/notice/use-notice.d.ts +0 -3
- package/dist/types/components/number-input/number-input.d.ts +2 -3
- package/dist/types/components/number-input/number-input.style.d.ts +1 -1
- package/dist/types/components/number-input/use-number-input.d.ts +0 -1
- package/dist/types/components/pagination/pagination.d.ts +2 -3
- package/dist/types/components/pagination/use-pagination.d.ts +2 -2
- package/dist/types/components/password-input/password-input.d.ts +2 -3
- package/dist/types/components/password-input/strength-meter.d.ts +2 -2
- package/dist/types/components/password-input/use-password-input.d.ts +2 -3
- package/dist/types/components/picture/picture.d.ts +0 -1
- package/dist/types/components/pin-input/pin-input.d.ts +2 -4
- package/dist/types/components/pin-input/use-pin-input.d.ts +7 -8
- package/dist/types/components/popover/popover.d.ts +2 -3
- package/dist/types/components/progress/progress.d.ts +4 -4
- package/dist/types/components/progress/use-progress.d.ts +706 -706
- package/dist/types/components/qr-code/qr-code.d.ts +2 -2
- package/dist/types/components/radio/radio-group.d.ts +0 -2
- package/dist/types/components/radio/radio.d.ts +4 -5
- package/dist/types/components/radio/use-radio-group.d.ts +2 -3
- package/dist/types/components/radio/use-radio.d.ts +0 -1
- package/dist/types/components/radio-card/radio-card-group.d.ts +0 -3
- package/dist/types/components/radio-card/radio-card.d.ts +5 -7
- package/dist/types/components/radio-card/radio-card.style.d.ts +1 -1
- package/dist/types/components/rating/use-rating.d.ts +7 -8
- package/dist/types/components/reorder/reorder.d.ts +2 -3
- package/dist/types/components/reorder/reorder.style.d.ts +1 -1
- package/dist/types/components/reorder/use-reorder.d.ts +3 -3
- package/dist/types/components/resizable/resizable.d.ts +2 -2
- package/dist/types/components/resizable/resizable.style.d.ts +2 -2
- package/dist/types/components/resizable/use-resizable.d.ts +2 -2
- package/dist/types/components/ripple/ripple.d.ts +2 -3
- package/dist/types/components/ripple/use-ripple.d.ts +2 -2
- package/dist/types/components/rotate/rotate.d.ts +2 -3
- package/dist/types/components/saturation-slider/saturation-slider.d.ts +2 -2
- package/dist/types/components/saturation-slider/use-saturation-slider.d.ts +2 -3
- package/dist/types/components/scroll-area/scroll-area.d.ts +2 -2
- package/dist/types/components/segmented-control/segmented-control.d.ts +2 -3
- package/dist/types/components/segmented-control/use-segmented-control.d.ts +9 -10
- package/dist/types/components/select/select.d.ts +2 -4
- package/dist/types/components/select/select.style.d.ts +1 -1
- package/dist/types/components/select/use-select.d.ts +4 -6
- package/dist/types/components/separator/separator.d.ts +2 -2
- package/dist/types/components/sidebar/sidebar.d.ts +2 -7
- package/dist/types/components/sidebar/use-sidebar.d.ts +9 -9
- package/dist/types/components/simple-grid/simple-grid.d.ts +2 -3
- package/dist/types/components/skeleton/skeleton.d.ts +2 -2
- package/dist/types/components/slide/slide.d.ts +2 -3
- package/dist/types/components/slide-fade/slide-fade.d.ts +2 -3
- package/dist/types/components/slider/slider.d.ts +2 -2
- package/dist/types/components/slider/use-slider.d.ts +2 -3
- package/dist/types/components/snacks/snacks.d.ts +0 -2
- package/dist/types/components/snacks/use-snacks.d.ts +0 -1
- package/dist/types/components/stack/h-stack.d.ts +2 -2
- package/dist/types/components/stack/stack.d.ts +2 -2
- package/dist/types/components/stack/v-stack.d.ts +2 -2
- package/dist/types/components/stack/z-stack.d.ts +2 -2
- package/dist/types/components/stat/stat.d.ts +2 -2
- package/dist/types/components/stat/stat.style.d.ts +2 -2
- package/dist/types/components/status/status.d.ts +2 -2
- package/dist/types/components/steps/steps.d.ts +2 -2
- package/dist/types/components/steps/steps.style.d.ts +1 -1
- package/dist/types/components/steps/use-steps.d.ts +10 -10
- package/dist/types/components/switch/switch.d.ts +2 -2
- package/dist/types/components/switch/use-switch.d.ts +0 -1
- package/dist/types/components/table/table.d.ts +3 -5
- package/dist/types/components/tabs/tabs.d.ts +2 -2
- package/dist/types/components/tabs/use-tabs.d.ts +16 -16
- package/dist/types/components/tag/tag.d.ts +2 -2
- package/dist/types/components/tag/tag.style.d.ts +1 -1
- package/dist/types/components/text/text.d.ts +2 -2
- package/dist/types/components/textarea/textarea.d.ts +2 -4
- package/dist/types/components/textarea/use-autosize.d.ts +2 -2
- package/dist/types/components/timeline/timeline.d.ts +5 -5
- package/dist/types/components/timeline/timeline.style.d.ts +1 -1
- package/dist/types/components/tip/tip.d.ts +0 -3
- package/dist/types/components/toggle/toggle-group.d.ts +1 -1
- package/dist/types/components/toggle/toggle.d.ts +5 -7
- package/dist/types/components/toggle/use-toggle-group.d.ts +2 -2
- package/dist/types/components/toggle/use-toggle.d.ts +2 -3
- package/dist/types/components/tooltip/tooltip.d.ts +2 -4
- package/dist/types/components/tree/tree.d.ts +2 -6
- package/dist/types/components/tree/use-tree.d.ts +183 -184
- package/dist/types/components/visually-hidden/visually-hidden.d.ts +2 -2
- package/dist/types/components/wrap/wrap.d.ts +2 -3
- package/dist/types/core/components/create-component.d.ts +11 -9
- package/dist/types/core/components/index.types.d.ts +1 -0
- package/dist/types/core/components/use-component-style.d.ts +2 -0
- package/dist/types/core/components/utils.d.ts +1 -0
- package/dist/types/core/constant.d.ts +1 -0
- package/dist/types/core/css/calc.d.ts +1 -0
- package/dist/types/core/css/config.d.ts +1 -0
- package/dist/types/core/css/css.d.ts +1 -0
- package/dist/types/core/css/index.types.d.ts +1 -0
- package/dist/types/core/css/styles.d.ts +1 -0
- package/dist/types/core/css/token.d.ts +1 -0
- package/dist/types/core/css/use-css.d.ts +1 -0
- package/dist/types/core/css/utils.d.ts +2 -0
- package/dist/types/core/generated-theme-tokens.types.d.ts +1 -0
- package/dist/types/core/index.d.ts +2 -0
- package/dist/types/core/system/color-mode-provider.d.ts +2 -2
- package/dist/types/core/system/config.d.ts +1 -0
- package/dist/types/core/system/create-system.d.ts +1 -0
- package/dist/types/core/system/factory.d.ts +1 -0
- package/dist/types/core/system/index.types.d.ts +1 -0
- package/dist/types/core/system/storage-script.d.ts +3 -3
- package/dist/types/core/system/styled.d.ts +3 -2
- package/dist/types/core/system/system-provider.d.ts +2 -2
- package/dist/types/core/system/use-system-color-mode.d.ts +1 -1
- package/dist/types/core/system/var.d.ts +2 -0
- package/dist/types/hooks/use-async-callback/index.d.ts +0 -1
- package/dist/types/hooks/use-breakpoint/use-breakpoint-state.d.ts +2 -2
- package/dist/types/hooks/use-clickable/index.d.ts +9 -9
- package/dist/types/hooks/use-clipboard/index.d.ts +2 -2
- package/dist/types/hooks/use-combobox/index.d.ts +12 -13
- package/dist/types/hooks/use-counter/index.d.ts +2 -2
- package/dist/types/hooks/use-descendants/index.d.ts +2 -2
- package/dist/types/hooks/use-field-sizing/index.d.ts +2 -2
- package/dist/types/hooks/use-hover/index.d.ts +2 -2
- package/dist/types/hooks/use-popper/index.d.ts +2 -2
- package/dist/types/hooks/use-resize-observer/index.d.ts +3 -3
- package/dist/types/index.d.ts +0 -106
- package/dist/types/providers/i18n-provider/i18n-provider.d.ts +3 -3
- package/dist/types/providers/ui-provider/ui-provider.d.ts +4 -5
- package/dist/types/utils/children.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.js","names":["header","table","cellMap","el","NativeTable.Root","NativeTable.Thead","NativeTable.Tr","NativeTable.Th","NativeTable.Tbody","NativeTable.Td","NativeTable.Tfoot","SortingIcon: FC<SortingIconProps>","ResizableTrigger: FC<ResizableTriggerProps>","TruncatedText: FC<TruncatedTextProps>"],"sources":["../../../../src/components/table/table.tsx"],"sourcesContent":["\"use client\"\n\nimport type {\n AccessorFn,\n Cell,\n CellContext,\n ColumnDef,\n ColumnDefTemplate,\n ColumnFiltersColumnDef,\n ColumnFiltersState,\n ColumnMeta,\n ColumnPinningColumnDef,\n ColumnSizingColumnDef,\n GlobalFilterColumnDef,\n GroupingColumnDef,\n Header,\n HeaderContext,\n HeaderGroup,\n OnChangeFn,\n SortingState as OriginalSortingState,\n PaginationState,\n Table as ReactTable,\n Row,\n RowData,\n RowSelectionState,\n SortDirection,\n SortingColumnDef,\n TableOptions,\n VisibilityColumnDef,\n} from \"@tanstack/react-table\"\nimport type { FC, FocusEvent, KeyboardEvent, ReactElement } from \"react\"\nimport type { CSSProps, GenericsComponent, HTMLStyledProps } from \"../../core\"\nimport type { ReactNodeOrFunction, TransformProps } from \"../../utils\"\nimport type { CheckboxProps } from \"../checkbox\"\nimport {\n createColumnHelper,\n flexRender,\n getCoreRowModel,\n getFilteredRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n useReactTable,\n} from \"@tanstack/react-table\"\nimport { useMemo, useRef } from \"react\"\nimport { createComponent, focusRingStyle, mergeProps, styled } from \"../../core\"\nimport { useControllableState } from \"../../hooks/use-controllable-state\"\nimport { useI18n } from \"../../providers/i18n-provider\"\nimport {\n ariaAttr,\n dataAttr,\n isFunction,\n runIfFn,\n runKeyAction,\n useUpdateEffect,\n} from \"../../utils\"\nimport { Checkbox } from \"../checkbox\"\nimport { ChevronsUpDownIcon, ChevronUpIcon } from \"../icon\"\nimport { NativeTable } from \"../native-table\"\n\ndeclare module \"@tanstack/react-table\" {\n interface ColumnDefExtensions<TData extends RowData, TValue = unknown>\n extends\n VisibilityColumnDef,\n ColumnPinningColumnDef,\n ColumnFiltersColumnDef<TData>,\n GlobalFilterColumnDef,\n SortingColumnDef<TData>,\n GroupingColumnDef<TData, TValue>,\n ColumnSizingColumnDef {}\n\n interface ColumnDefBase<TData extends RowData, TValue = unknown>\n extends\n ColumnDefExtensions<TData, TValue>,\n Pick<CSSProps, \"lineClamp\" | \"truncated\">,\n Pick<NativeTable.TdProps, \"numeric\"> {\n cell?: ColumnDefTemplate<CellContext<TData, TValue>>\n footer?: ColumnDefTemplate<HeaderContext<TData, TValue>>\n getUniqueValues?: AccessorFn<TData, unknown[]>\n meta?: ColumnMeta<TData, TValue>\n cellProps?: NativeTable.TdProps\n footerProps?: NativeTable.ThProps\n headerProps?: NativeTable.ThProps\n }\n}\n\nexport { createColumnHelper }\nexport type {\n ColumnDef,\n ColumnFiltersState,\n PaginationState,\n RowSelectionState,\n SortDirection,\n}\n\nfunction getMergeHeaderGroups(\n headerGroups: HeaderGroup<any>[],\n): HeaderGroup<any>[] {\n if (headerGroups.length <= 1) return headerGroups\n\n const columnsIds = new Set()\n\n return headerGroups.map((headerGroup, depth, { length: fullDepth }) => {\n return {\n ...headerGroup,\n headers: headerGroup.headers\n .filter((header) => !columnsIds.has(header.column.id))\n .map((header) => {\n columnsIds.add(header.column.id)\n\n return header.isPlaceholder\n ? { ...header, isPlaceholder: false, rowSpan: fullDepth - depth }\n : { ...header, rowSpan: 1 }\n }),\n }\n })\n}\n\nfunction getMergeFooterGroups(\n headerGroups: HeaderGroup<any>[],\n): HeaderGroup<any>[] {\n if (headerGroups.length <= 1) return headerGroups\n\n return headerGroups.map((headerGroup, depth) => {\n const nextHeaderGroups = headerGroups.slice(depth + 1)\n\n return {\n ...headerGroup,\n headers: headerGroup.headers\n .filter((header) => !header.isPlaceholder)\n .map((header) => {\n if (nextHeaderGroups.length === 0) return header\n\n const rowSpan = nextHeaderGroups.reduce((acc, nextHeaderGroup) => {\n const hasNextHeader = nextHeaderGroup.headers.some(\n (nextHeader) => nextHeader.column.id === header.column.id,\n )\n\n return acc + (hasNextHeader ? 1 : 0)\n }, 1)\n\n return { ...header, rowSpan }\n }),\n }\n })\n}\n\nexport interface ColumnSort<Y extends RowData> {\n desc: boolean\n id: keyof Y\n}\nexport type SortingState<Y extends RowData> = ColumnSort<Y>[]\n\ninterface ComponentContext extends Pick<\n TableProps<any>,\n | \"columnResizeMode\"\n | \"resizableTriggerProps\"\n | \"sortingIcon\"\n | \"sortingIconProps\"\n> {\n table: ReactTable<any>\n}\n\ninterface OmittedTableOptions<Y extends RowData> extends Omit<\n TableOptions<Y>,\n | \"getCoreRowModel\"\n | \"onColumnFiltersChange\"\n | \"onPaginationChange\"\n | \"onSortingChange\"\n> {}\n\ninterface PickedNativeTableProps extends Pick<\n NativeTable.RootProps,\n | \"className\"\n | \"highlightOnHover\"\n | \"highlightOnSelected\"\n | \"layout\"\n | \"scrollAreaProps\"\n | \"size\"\n | \"stickyFooter\"\n | \"stickyHeader\"\n | \"striped\"\n | \"variant\"\n | \"withBorder\"\n | \"withColumnBorders\"\n | \"withScrollArea\"\n> {}\n\nexport interface TableProps<Y extends RowData>\n extends\n OmittedTableOptions<Y>,\n PickedNativeTableProps,\n Pick<CSSProps, \"colorScheme\" | \"lineClamp\" | \"truncated\"> {\n /**\n * The column filters state of the table.\n */\n columnFilters?: ColumnFiltersState\n /**\n * The default column filters state of the table.\n */\n defaultColumnFilters?: ColumnFiltersState\n /**\n * The default pagination state of the table.\n */\n defaultPagination?: PaginationState\n /**\n * The default row selection state of the table.\n */\n defaultRowSelection?: RowSelectionState\n /**\n * The default sorting state of the table.\n */\n defaultSorting?: SortingState<Y>\n /**\n * If `true`, the table width will be automatically resized to the content.\n *\n * @default false\n */\n enableAutoResizeTableWidth?: boolean\n /**\n * If `true`, the keyboard navigation will be enabled.\n *\n * @default true\n */\n enableKeyboardNavigation?: boolean\n /**\n * If `true`, the pagination will be enabled.\n *\n * @default false\n */\n enablePagination?: boolean\n /**\n * The footer of the table.\n */\n footer?: ReactNodeOrFunction<ReactTable<Y>>\n /**\n * The header of the table.\n */\n header?: ReactNodeOrFunction<ReactTable<Y>>\n /**\n * The initial focusable cell of the table.\n *\n * @default {rowIndex: 0, colIndex: 0}\n */\n initialFocusableCell?: { colIndex: number; rowIndex: number }\n /**\n * The pagination state of the table.\n */\n pagination?: PaginationState\n /**\n * The row selection state of the table.\n */\n rowSelection?: RowSelectionState\n /**\n * If `true`, the row will be selected when the row is clicked.\n *\n * @default false\n */\n selectOnClickRow?: boolean\n /**\n * The sorting state of the table.\n */\n sorting?: SortingState<Y>\n /**\n * The sorting icon of the table.\n */\n sortingIcon?: ReactNodeOrFunction<false | SortDirection>\n /**\n * If `true`, the table will have a checkbox column.\n *\n * @default true\n */\n withCheckbox?: boolean\n /**\n * If `true`, the table will have a checkbox in the footer.\n *\n * @default false\n */\n withFooterCheckbox?: boolean\n /**\n * If `true`, the table will have footer groups.\n *\n * @default false\n */\n withFooterGroups?: boolean\n /**\n * The props for the table cell.\n */\n cellProps?: TransformProps<NativeTable.TdProps, Cell<Y, unknown>>\n /**\n * The props for the checkbox.\n */\n checkboxProps?: CheckboxProps\n /**\n * The props for the table footer group.\n */\n footerGroupProps?: TransformProps<NativeTable.TrProps, HeaderGroup<Y>>\n /**\n * The props for the table footer.\n */\n footerProps?: TransformProps<NativeTable.ThProps, Header<Y, unknown>>\n /**\n * The props for the table header checkbox.\n */\n headerCheckboxProps?: TransformProps<CheckboxProps, Header<Y, unknown>>\n /**\n * The props for the table header group.\n */\n headerGroupProps?: TransformProps<NativeTable.TrProps, HeaderGroup<Y>>\n /**\n * The props for the table header.\n */\n headerProps?: TransformProps<NativeTable.ThProps, Header<Y, unknown>>\n /**\n * The props for the resizable trigger.\n */\n resizableTriggerProps?: TransformProps<\n Omit<ResizableTriggerProps, \"resizing\">,\n Header<Y, unknown>\n >\n /**\n * The props for the table row checkbox.\n */\n rowCheckboxProps?: TransformProps<CheckboxProps, Row<Y>>\n /**\n * The props for the table row.\n */\n rowProps?: TransformProps<NativeTable.TrProps, Row<Y>>\n /**\n * The props for the sorting icon.\n */\n sortingIconProps?: TransformProps<\n Omit<SortingIconProps, \"sorted\">,\n Header<Y, unknown>\n >\n /**\n * The props for the table.\n */\n tableProps?: NativeTable.RootProps\n /**\n * The props for the table tbody.\n */\n tbodyProps?: NativeTable.TbodyProps\n /**\n * The props for the table tfoot.\n */\n tfootProps?: NativeTable.TfootProps\n /**\n * The props for the table thead.\n */\n theadProps?: NativeTable.TheadProps\n /**\n * The callback invoked when the column filters state changes.\n */\n onColumnFiltersChange?: (columnFilters: ColumnFiltersState) => void\n /**\n * The callback invoked when the pagination state changes.\n */\n onPaginationChange?: (pagination: PaginationState) => void\n /**\n * The callback invoked when the row is clicked.\n */\n onRowClick?: (row: Row<Y>) => void\n /**\n * The callback invoked when the row is double clicked.\n */\n onRowDoubleClick?: (row: Row<Y>) => void\n /**\n * The callback invoked when the sorting state changes.\n */\n onSortingChange?: (sorting: SortingState<Y>) => void\n}\n\nconst {\n ComponentContext,\n PropsContext: TablePropsContext,\n useComponentContext,\n usePropsContext: useTablePropsContext,\n withContext,\n} = createComponent<TableProps<any>, any, ComponentContext>(\"table\")\n\nexport { TablePropsContext, useTablePropsContext }\n\n/**\n * `Table` is a table component equipped with column sorting, row selection, and click event features.\n *\n * @see https://yamada-ui.com/docs/components/table\n */\nexport const Table = withContext(\n <Y extends RowData>({\n className,\n colorScheme,\n size,\n variant,\n columnFilters: columnFiltersProp,\n columnResizeMode = \"onChange\",\n columns: columnsProp,\n data,\n defaultColumnFilters,\n defaultPagination = { pageIndex: 0, pageSize: 20 },\n defaultRowSelection = {},\n defaultSorting,\n enableAutoResizeTableWidth = false,\n enableColumnResizing = false,\n enableKeyboardNavigation = true,\n enablePagination = false,\n enableRowSelection = false,\n footer,\n header,\n highlightOnHover = !!enableRowSelection,\n highlightOnSelected = !!enableRowSelection,\n initialFocusableCell = { colIndex: 0, rowIndex: 0 },\n layout,\n lineClamp,\n manualPagination,\n pagination: paginationProp,\n rowCount: totalRowCount,\n rowSelection: rowSelectionProp,\n selectOnClickRow = false,\n sortDescFirst = false,\n sorting: sortingProp,\n sortingIcon,\n state,\n stickyFooter,\n stickyHeader,\n striped,\n truncated,\n withBorder,\n withCheckbox = true,\n withColumnBorders,\n withFooterCheckbox = false,\n withFooterGroups = false,\n withScrollArea,\n cellProps,\n checkboxProps,\n footerGroupProps,\n footerProps,\n headerCheckboxProps,\n headerGroupProps,\n headerProps,\n resizableTriggerProps,\n rowCheckboxProps,\n rowProps,\n scrollAreaProps,\n sortingIconProps,\n tableProps,\n tbodyProps,\n tfootProps,\n theadProps,\n onColumnFiltersChange: onColumnFiltersChangeProp,\n onPaginationChange: onPaginationChangeProp,\n onRowClick,\n onRowDoubleClick,\n onRowSelectionChange: onRowSelectionChangeProp,\n onSortingChange: onSortingChangeProp,\n ...rest\n }: TableProps<Y>) => {\n const { t } = useI18n(\"table\")\n const initialFocus = useRef<boolean>(false)\n const ref = useRef<HTMLTableElement>(null)\n const focusedCell = useRef<null | { colIndex: number; rowIndex: number }>(\n null,\n )\n const [rowSelection, onRowSelectionChange] = useControllableState({\n defaultValue: defaultRowSelection,\n value: rowSelectionProp,\n onChange: onRowSelectionChangeProp,\n })\n const [sorting, onSortingChange] = useControllableState({\n defaultValue: defaultSorting,\n value: sortingProp,\n onChange: onSortingChangeProp,\n })\n const [pagination, onPaginationChange] = useControllableState({\n defaultValue: defaultPagination,\n value: paginationProp,\n onChange: onPaginationChangeProp,\n })\n const [columnFilters, onColumnFiltersChange] = useControllableState({\n defaultValue: defaultColumnFilters,\n value: columnFiltersProp,\n onChange: onColumnFiltersChangeProp,\n })\n const columns = useMemo(() => {\n if (!enableRowSelection || !withCheckbox) return columnsProp\n\n const clonedColumns = [...columnsProp]\n\n const header = ({ header, table }: HeaderContext<Y, any>) => {\n return (\n <Checkbox\n {...mergeProps(\n {\n checked: table.getIsAllRowsSelected(),\n indeterminate: table.getIsSomeRowsSelected(),\n indicatorProps: { outline: \"none\" },\n inputProps: {\n \"aria-label\": t(\"Select all rows\"),\n \"data-focusable\": \"\",\n tabIndex: -1,\n },\n onChange: table.getToggleAllRowsSelectedHandler(),\n },\n checkboxProps ?? {},\n runIfFn(headerCheckboxProps, header) ?? {},\n )()}\n />\n )\n }\n\n const cell = ({ row }: CellContext<Y, any>) => {\n return (\n <Checkbox\n {...mergeProps(\n {\n checked: row.getIsSelected(),\n disabled: !row.getCanSelect(),\n indeterminate: row.getIsSomeSelected(),\n indicatorProps: { outline: \"none\" },\n inputProps: {\n \"aria-label\": t(\"Select row\"),\n \"data-focusable\": \"\",\n tabIndex: -1,\n },\n onChange: row.getToggleSelectedHandler(),\n },\n checkboxProps ?? {},\n runIfFn(rowCheckboxProps, row) ?? {},\n )()}\n />\n )\n }\n\n clonedColumns.unshift({\n id: \"select\",\n cell,\n header,\n ...(withFooterCheckbox\n ? { footer: header }\n : { footerProps: { \"aria-hidden\": \"true\" } }),\n cellProps: { verticalAlign: \"middle\" },\n headerProps: { w: \"calc({spaces.4} + {space-x} * 2)\" },\n })\n\n return clonedColumns\n }, [\n checkboxProps,\n columnsProp,\n enableRowSelection,\n headerCheckboxProps,\n rowCheckboxProps,\n t,\n withCheckbox,\n withFooterCheckbox,\n ])\n const table = useReactTable<Y>({\n columnResizeMode,\n columns,\n data,\n enableColumnResizing,\n enableRowSelection,\n getCoreRowModel: getCoreRowModel(),\n getFilteredRowModel: getFilteredRowModel(),\n getSortedRowModel: getSortedRowModel(),\n manualPagination,\n rowCount: totalRowCount,\n sortDescFirst,\n state: {\n columnFilters,\n pagination: enablePagination ? pagination : undefined,\n rowSelection,\n sorting: sorting as OriginalSortingState,\n ...state,\n },\n onColumnFiltersChange,\n onPaginationChange,\n onRowSelectionChange,\n onSortingChange: onSortingChange as OnChangeFn<OriginalSortingState>,\n ...(enablePagination\n ? { getPaginationRowModel: getPaginationRowModel() }\n : {}),\n ...rest,\n })\n const headerGroups = table.getHeaderGroups()\n const mergedHeaderGroups = getMergeHeaderGroups(headerGroups)\n const rows = table.getRowModel().rows\n const footerGroups = table.getFooterGroups()\n const mergedFooterGroups = getMergeFooterGroups(\n withFooterGroups ? footerGroups : [],\n )\n const headerGroupCount = headerGroups.length\n const rowCount = rows.length\n const colCount = table.getAllLeafColumns().length\n const maxColIndex = colCount - 1\n const pageIndex = enablePagination\n ? table.getState().pagination.pageIndex\n : 0\n const cellMap = useMemo(() => {\n const cellMap = new Map<string, string>()\n\n if (!enableKeyboardNavigation) return cellMap\n\n const insertCellMap = (\n id: string,\n colSpan: number,\n rowSpan: number,\n colIndex: number,\n rowIndex: number,\n ) => {\n for (let i = 0; i < colSpan; i++) {\n cellMap.set(`${colIndex + i}-${rowIndex}`, `${colIndex}-${rowIndex}`)\n }\n\n for (let i = 1; i < rowSpan; i++) {\n cellMap.set(`${colIndex}-${rowIndex + i}`, `${colIndex}-${rowIndex}`)\n }\n }\n\n const insertCellMapByHeaderGroup = (\n headerGroup: HeaderGroup<Y>,\n rowIndex: number,\n ) => {\n let placeholderCount = 0\n\n headerGroup.headers.forEach((header) => {\n const colSpan = header.colSpan || 1\n const rowSpan = header.rowSpan || 1\n const colIndex = header.index + placeholderCount\n\n placeholderCount += colSpan - 1\n\n insertCellMap(header.id, colSpan, rowSpan, colIndex, rowIndex)\n })\n }\n\n mergedHeaderGroups.forEach((headerGroup, rowIndex) => {\n insertCellMapByHeaderGroup(headerGroup, rowIndex)\n })\n\n rows.forEach((row, rowIndex) => {\n rowIndex += headerGroupCount\n\n row.getVisibleCells().forEach((cell) => {\n const colIndex = cell.column.getIndex()\n\n insertCellMap(cell.id, 1, 1, colIndex, rowIndex)\n })\n })\n\n mergedFooterGroups.forEach((footerGroup, rowIndex) => {\n rowIndex += headerGroupCount + rowCount\n\n insertCellMapByHeaderGroup(footerGroup, rowIndex)\n })\n\n return cellMap\n }, [\n enableKeyboardNavigation,\n headerGroupCount,\n mergedFooterGroups,\n mergedHeaderGroups,\n rows,\n rowCount,\n ])\n const context = useMemo(\n () => ({\n columnResizeMode,\n sortingIcon,\n table,\n resizableTriggerProps,\n sortingIconProps,\n }),\n [\n columnResizeMode,\n sortingIcon,\n sortingIconProps,\n resizableTriggerProps,\n table,\n ],\n )\n const getCell = (\n evOrEl:\n | Element\n | FocusEvent<HTMLTableElement>\n | KeyboardEvent<HTMLTableElement>\n | null\n | undefined,\n ) => {\n if (!evOrEl) return\n\n const el =\n evOrEl instanceof HTMLElement\n ? evOrEl.closest(\"th, td\")\n : \"target\" in evOrEl && evOrEl.target instanceof HTMLElement\n ? evOrEl.target.closest(\"th, td\")\n : null\n\n if (!(el instanceof HTMLTableCellElement)) return\n\n const { colindex, rowindex } = el.dataset\n const { colSpan, rowSpan } = el\n\n if (!colindex || !rowindex) return\n\n const colIndex = parseInt(colindex)\n const rowIndex = parseInt(rowindex)\n\n return { colIndex, colSpan, el, rowIndex, rowSpan }\n }\n const getShouldFocusCell = (colIndex: number, rowIndex: number) => {\n const [trulyColIndex, trulyRowIndex] =\n cellMap.get(`${colIndex}-${rowIndex}`)?.split(\"-\") ?? []\n\n if (!trulyColIndex || !trulyRowIndex) return\n\n const targetEl = ref.current?.querySelector(\n `[data-colindex=\"${trulyColIndex}\"][data-rowindex=\"${trulyRowIndex}\"]`,\n )\n\n if (!targetEl || !(targetEl instanceof HTMLTableCellElement)) return\n\n return targetEl\n }\n const removeTabIndex = (el: Element | null | undefined) => {\n if (!el || !(el instanceof HTMLElement)) return\n\n el.tabIndex = -1\n el.querySelectorAll(\"[data-focusable]\").forEach((el) => {\n if (el instanceof HTMLElement) el.tabIndex = -1\n })\n }\n const onCellFocus = (\n el: HTMLTableCellElement | null | undefined,\n colIndex: number,\n rowIndex: number,\n ) => {\n const targetEl = getShouldFocusCell(colIndex, rowIndex)\n\n if (!targetEl) return\n\n focusedCell.current = { colIndex, rowIndex }\n\n removeTabIndex(el)\n\n const shouldFocusEl =\n targetEl.querySelector(\"[data-focusable]\") ?? targetEl\n\n if (shouldFocusEl instanceof HTMLElement) {\n shouldFocusEl.tabIndex = 0\n shouldFocusEl.focus()\n }\n }\n const onFocus = (ev: FocusEvent<HTMLTableElement>) => {\n if (initialFocus.current) return\n\n initialFocus.current = true\n\n const cell = getCell(ev)\n\n if (!cell) return\n\n onCellFocus(cell.el, cell.colIndex, cell.rowIndex)\n }\n const onKeyDown = (ev: KeyboardEvent<HTMLTableElement>) => {\n if (!enableKeyboardNavigation) return\n\n const cell = getCell(ev)\n\n if (!cell) return\n\n runKeyAction(ev, {\n ArrowDown: () =>\n onCellFocus(cell.el, cell.colIndex, cell.rowIndex + cell.rowSpan),\n ArrowLeft: () => onCellFocus(cell.el, cell.colIndex - 1, cell.rowIndex),\n ArrowRight: () =>\n onCellFocus(cell.el, cell.colIndex + cell.colSpan, cell.rowIndex),\n ArrowUp: () => onCellFocus(cell.el, cell.colIndex, cell.rowIndex - 1),\n End: () => onCellFocus(cell.el, maxColIndex, cell.rowIndex),\n Home: () => onCellFocus(cell.el, 0, cell.rowIndex),\n ...(enablePagination\n ? {\n PageDown: () => {\n if (!table.getCanNextPage()) return\n\n table.setPageIndex(pageIndex + 1)\n },\n PageUp: () => {\n if (!table.getCanPreviousPage()) return\n\n table.setPageIndex(pageIndex - 1)\n },\n }\n : {}),\n })\n }\n const getTabIndex = (colIndex: number, rowIndex: number) => {\n if (!enableKeyboardNavigation) return undefined\n\n return colIndex === initialFocusableCell.colIndex &&\n rowIndex === initialFocusableCell.rowIndex\n ? 0\n : undefined\n }\n\n useUpdateEffect(() => {\n if (!enableKeyboardNavigation) return\n\n const { colIndex, rowIndex } = focusedCell.current ?? initialFocusableCell\n const targetEl = getShouldFocusCell(colIndex, rowIndex)\n\n if (targetEl) targetEl.tabIndex = 0\n }, [pageIndex, enableKeyboardNavigation])\n\n return (\n <ComponentContext value={context}>\n {header ? runIfFn(header, table) : null}\n\n <NativeTable.Root\n {...mergeProps(\n {\n ref,\n className,\n style:\n enableColumnResizing && enableAutoResizeTableWidth\n ? { width: table.getCenterTotalSize() }\n : {},\n colorScheme,\n size,\n variant,\n \"aria-colcount\": colCount,\n \"aria-multiselectable\": enableRowSelection ? \"true\" : undefined,\n \"aria-rowcount\": totalRowCount || data.length,\n highlightOnHover,\n highlightOnSelected,\n layout,\n role: \"grid\",\n stickyFooter,\n stickyHeader,\n striped,\n withBorder,\n withColumnBorders,\n withScrollArea,\n scrollAreaProps,\n onFocus,\n onKeyDown,\n },\n tableProps ?? {},\n )()}\n >\n <NativeTable.Thead role=\"rowgroup\" {...theadProps}>\n {mergedHeaderGroups.map((headerGroup, rowIndex) => {\n let placeholderCount = 0\n\n return (\n <NativeTable.Tr\n key={headerGroup.id}\n aria-rowindex={rowIndex + 1}\n role=\"row\"\n {...runIfFn(headerGroupProps, headerGroup)}\n >\n {headerGroup.headers.map((header) => {\n const { columnDef } = header.column\n const colIndex = header.index + placeholderCount\n const tabIndex = getTabIndex(colIndex, rowIndex)\n const canSort = header.column.getCanSort()\n const sorted = header.column.getIsSorted()\n const canResize = header.column.getCanResize()\n const resizing = header.column.getIsResizing()\n const children = header.isPlaceholder\n ? null\n : flexRender(\n header.column.columnDef.header,\n header.getContext(),\n )\n\n placeholderCount += (header.colSpan || 1) - 1\n\n return (\n <NativeTable.Th\n key={header.id}\n aria-colindex={colIndex + 1}\n aria-rowindex={rowIndex + 1}\n aria-sort={\n sorted\n ? sorted === \"asc\"\n ? \"ascending\"\n : \"descending\"\n : \"none\"\n }\n data-colindex={colIndex}\n data-rowindex={rowIndex}\n colSpan={header.colSpan || undefined}\n numeric={columnDef.numeric}\n pe={\n canSort\n ? \"calc((1rem * {lineHeights.moderate}) + {space-x})\"\n : undefined\n }\n position=\"relative\"\n role=\"columnheader\"\n rowSpan={header.rowSpan || undefined}\n tabIndex={tabIndex}\n {...mergeProps(\n {\n css: {\n \"&:has([data-focusable]:focus-visible)\":\n focusRingStyle.outline,\n },\n style: enableColumnResizing\n ? { width: header.getSize() }\n : {},\n },\n runIfFn(headerProps, header) ?? {},\n columnDef.headerProps ?? {},\n )()}\n >\n <TruncatedText\n lineClamp={columnDef.lineClamp ?? lineClamp}\n truncated={columnDef.truncated ?? truncated}\n >\n {children}\n </TruncatedText>\n\n {canSort ? (\n <SortingIcon\n sorted={sorted}\n onClick={header.column.getToggleSortingHandler()}\n />\n ) : null}\n\n {canResize ? (\n <ResizableTrigger\n resizing={resizing}\n onDoubleClick={header.column.resetSize}\n onMouseDown={header.getResizeHandler()}\n onTouchStart={header.getResizeHandler()}\n />\n ) : null}\n </NativeTable.Th>\n )\n })}\n </NativeTable.Tr>\n )\n })}\n </NativeTable.Thead>\n\n <NativeTable.Tbody role=\"rowgroup\" {...tbodyProps}>\n {rows.map((row, rowIndex) => {\n rowIndex += headerGroupCount\n\n const selected = !!rowSelection[row.id]\n const disabled =\n isFunction(enableRowSelection) && !enableRowSelection(row)\n\n return (\n <NativeTable.Tr\n id={row.id}\n key={row.id}\n aria-disabled={ariaAttr(disabled)}\n aria-rowindex={rowIndex + 1}\n aria-selected={ariaAttr(selected)}\n data-disabled={dataAttr(disabled)}\n data-selected={dataAttr(selected)}\n role=\"row\"\n {...mergeProps(\n {\n onClick:\n !disabled && selectOnClickRow\n ? () => row.toggleSelected(!selected)\n : undefined,\n },\n {\n onClick: !disabled ? () => onRowClick?.(row) : undefined,\n onDoubleClick: !disabled\n ? () => onRowDoubleClick?.(row)\n : undefined,\n },\n runIfFn(rowProps, row) ?? {},\n )()}\n >\n {row.getVisibleCells().map((cell) => {\n const { columnDef } = cell.column\n const colIndex = cell.column.getIndex()\n const tabIndex = getTabIndex(colIndex, rowIndex)\n const children = flexRender(\n cell.column.columnDef.cell,\n cell.getContext(),\n )\n\n return (\n <NativeTable.Td\n key={cell.id}\n aria-colindex={colIndex + 1}\n aria-rowindex={rowIndex + 1}\n data-colindex={colIndex}\n data-rowindex={rowIndex}\n numeric={columnDef.numeric}\n role=\"gridcell\"\n tabIndex={tabIndex}\n {...mergeProps(\n {\n css: {\n \"&:has([data-focusable]:focus-visible)\":\n focusRingStyle.outline,\n },\n },\n runIfFn(cellProps, cell) ?? {},\n columnDef.cellProps ?? {},\n )()}\n >\n <TruncatedText\n lineClamp={columnDef.lineClamp ?? lineClamp}\n truncated={columnDef.truncated ?? truncated}\n >\n {children}\n </TruncatedText>\n </NativeTable.Td>\n )\n })}\n </NativeTable.Tr>\n )\n })}\n </NativeTable.Tbody>\n\n {withFooterGroups ? (\n <NativeTable.Tfoot role=\"rowgroup\" {...tfootProps}>\n {mergedFooterGroups.map((footerGroup, rowIndex) => {\n rowIndex += headerGroupCount + rowCount\n\n let placeholderCount = 0\n\n return (\n <NativeTable.Tr\n key={footerGroup.id}\n aria-rowindex={rowIndex + 1}\n role=\"row\"\n {...runIfFn(footerGroupProps, footerGroup)}\n >\n {footerGroup.headers.map((header) => {\n const { columnDef } = header.column\n const colIndex = header.index + placeholderCount\n const tabIndex = getTabIndex(colIndex, rowIndex)\n const children = header.isPlaceholder\n ? null\n : flexRender(\n header.column.columnDef.footer,\n header.getContext(),\n )\n\n placeholderCount += (header.colSpan || 1) - 1\n\n return (\n <NativeTable.Td\n key={header.id}\n aria-colindex={colIndex + 1}\n aria-rowindex={rowIndex + 1}\n data-colindex={colIndex}\n data-rowindex={rowIndex}\n colSpan={header.colSpan || undefined}\n numeric={columnDef.numeric}\n role=\"gridcell\"\n rowSpan={header.rowSpan || undefined}\n tabIndex={tabIndex}\n {...mergeProps(\n {\n css: {\n \"&:has([data-focusable]:focus-visible)\":\n focusRingStyle.outline,\n },\n },\n runIfFn(footerProps, header) ?? {},\n columnDef.footerProps ?? {},\n )()}\n >\n <TruncatedText\n lineClamp={columnDef.lineClamp ?? lineClamp}\n truncated={columnDef.truncated ?? truncated}\n >\n {children}\n </TruncatedText>\n </NativeTable.Td>\n )\n })}\n </NativeTable.Tr>\n )\n })}\n </NativeTable.Tfoot>\n ) : null}\n </NativeTable.Root>\n\n {footer ? runIfFn(footer, table) : null}\n </ComponentContext>\n )\n },\n)() as GenericsComponent<{\n <Y extends RowData>(props: TableProps<Y>): ReactElement\n}>\n\ninterface SortingIconProps extends HTMLStyledProps<\"button\"> {\n sorted: false | SortDirection\n}\n\nconst SortingIcon: FC<SortingIconProps> = ({ sorted, ...rest }) => {\n const { t } = useI18n(\"table\")\n const { sortingIcon, sortingIconProps = {} } = useComponentContext()\n const Icon = sorted ? ChevronUpIcon : ChevronsUpDownIcon\n\n return (\n <styled.button\n type=\"button\"\n layerStyle=\"ghost\"\n colorScheme=\"mono\"\n aria-label={t(\n sorted\n ? sorted === \"desc\"\n ? \"Sort descending\"\n : \"Sort ascending\"\n : \"Clear sorting\",\n )}\n data-focusable\n aspectRatio=\"1\"\n cursor=\"pointer\"\n display=\"center\"\n focusVisibleRing=\"none\"\n h=\"calc(1em * {lineHeights.moderate})\"\n position=\"absolute\"\n right=\"{space-x}\"\n rounded=\"l1\"\n tabIndex={-1}\n top=\"50%\"\n transform=\"translateY(-50%)\"\n transitionDuration=\"moderate\"\n transitionProperty=\"common\"\n _hover={{ layerStyle: \"ghost.hover\" }}\n {...mergeProps(rest, sortingIconProps)()}\n >\n {runIfFn(sortingIcon, sorted) ?? (\n <Icon transform={`rotate(${sorted === \"desc\" ? 180 : 0}deg)`} />\n )}\n </styled.button>\n )\n}\n\ninterface ResizableTriggerProps extends HTMLStyledProps {\n resizing: boolean\n}\n\nconst ResizableTrigger: FC<ResizableTriggerProps> = ({ resizing, ...rest }) => {\n const {\n columnResizeMode,\n table,\n resizableTriggerProps = {},\n } = useComponentContext()\n const offset = table.getState().columnSizingInfo.deltaOffset\n\n return (\n <styled.div\n data-active={dataAttr(resizing)}\n bg=\"colorScheme.solid\"\n cursor=\"col-resize\"\n insetY=\"0\"\n opacity={{ base: \"0\", _hover: \"1\", _active: \"1\" }}\n position=\"absolute\"\n right=\"0\"\n touchAction=\"none\"\n transform={`translateX(${columnResizeMode === \"onEnd\" && resizing && offset ? `${offset}px` : \"50%\"})`}\n userSelect=\"none\"\n w=\"1\"\n {...mergeProps(rest, resizableTriggerProps)()}\n />\n )\n}\n\ninterface TruncatedTextProps extends HTMLStyledProps<\"span\"> {}\n\nconst TruncatedText: FC<TruncatedTextProps> = ({\n children,\n lineClamp,\n truncated,\n ...rest\n}) => {\n if (lineClamp || truncated) {\n return (\n <styled.span\n lineClamp={lineClamp}\n truncated={truncated}\n wordBreak=\"break-all\"\n {...rest}\n >\n {children}\n </styled.span>\n )\n } else {\n return children\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA8FA,SAAS,qBACP,cACoB;AACpB,KAAI,aAAa,UAAU,EAAG,QAAO;CAErC,MAAM,6BAAa,IAAI,KAAK;AAE5B,QAAO,aAAa,KAAK,aAAa,OAAO,EAAE,QAAQ,gBAAgB;AACrE,SAAO;GACL,GAAG;GACH,SAAS,YAAY,QAClB,QAAQ,WAAW,CAAC,WAAW,IAAI,OAAO,OAAO,GAAG,CAAC,CACrD,KAAK,WAAW;AACf,eAAW,IAAI,OAAO,OAAO,GAAG;AAEhC,WAAO,OAAO,gBACV;KAAE,GAAG;KAAQ,eAAe;KAAO,SAAS,YAAY;KAAO,GAC/D;KAAE,GAAG;KAAQ,SAAS;KAAG;KAC7B;GACL;GACD;;AAGJ,SAAS,qBACP,cACoB;AACpB,KAAI,aAAa,UAAU,EAAG,QAAO;AAErC,QAAO,aAAa,KAAK,aAAa,UAAU;EAC9C,MAAM,mBAAmB,aAAa,MAAM,QAAQ,EAAE;AAEtD,SAAO;GACL,GAAG;GACH,SAAS,YAAY,QAClB,QAAQ,WAAW,CAAC,OAAO,cAAc,CACzC,KAAK,WAAW;AACf,QAAI,iBAAiB,WAAW,EA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E,MAAM,EACJ,kBACA,OACA,wBAAwB,EAAE,KACxB,qBAAqB;CACzB,MAAM,SAAS,MAAM,UAAU,CAAC,iBAAiB;AAEjD,QACE,oBAAC,OAAO;EACN,2CAAsB,SAAS;EAC/B,IAAG;EACH,QAAO;EACP,QAAO;EACP,SAAS;GAAE,MAAM;GAAK,QAAQ;GAAK,SAAS;GAAK;EACjD,UAAS;EACT,OAAM;EACN,aAAY;EACZ,WAAW,cAAc,qBAAqB,WAAW,YAAY,SAAS,GAAG,OAAO,MAAM,MAAM;EACpG,YAAW;EACX,GAAE;EACF,GAAI,WAAW,MAAM,sBAAsB,EAAE;GAC7C;;AAMN,MAAMC,iBAAyC,EAC7C,UACA,WACA,WACA,GAAG,WACC;AACJ,KAAI,aAAa,UACf,QACE,oBAAC,OAAO;EACK;EACA;EACX,WAAU;EACV,GAAI;EAEH;GACW;KAGhB,QAAO"}
|
|
1
|
+
{"version":3,"file":"table.js","names":["header","table","cellMap","el","NativeTable.Root","NativeTable.Thead","NativeTable.Tr","NativeTable.Th","NativeTable.Tbody","NativeTable.Td","NativeTable.Tfoot","SortingIcon: FC<SortingIconProps>","ResizableTrigger: FC<ResizableTriggerProps>","TruncatedText: FC<TruncatedTextProps>"],"sources":["../../../../src/components/table/table.tsx"],"sourcesContent":["\"use client\"\n\nimport type {\n AccessorFn,\n Cell,\n CellContext,\n ColumnDef,\n ColumnDefTemplate,\n ColumnFiltersColumnDef,\n ColumnFiltersState,\n ColumnMeta,\n ColumnPinningColumnDef,\n ColumnSizingColumnDef,\n GlobalFilterColumnDef,\n GroupingColumnDef,\n Header,\n HeaderContext,\n HeaderGroup,\n OnChangeFn,\n SortingState as OriginalSortingState,\n PaginationState,\n Table as ReactTable,\n Row,\n RowData,\n RowSelectionState,\n SortDirection,\n SortingColumnDef,\n TableOptions,\n VisibilityColumnDef,\n} from \"@tanstack/react-table\"\nimport type { FC, FocusEvent, KeyboardEvent, ReactElement } from \"react\"\nimport type { CSSProps, GenericsComponent, HTMLStyledProps } from \"../../core\"\nimport type { ReactNodeOrFunction, TransformProps } from \"../../utils\"\nimport type { CheckboxProps } from \"../checkbox\"\nimport {\n createColumnHelper,\n flexRender,\n getCoreRowModel,\n getFilteredRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n useReactTable,\n} from \"@tanstack/react-table\"\nimport { useMemo, useRef } from \"react\"\nimport { createComponent, focusRingStyle, mergeProps, styled } from \"../../core\"\nimport { useControllableState } from \"../../hooks/use-controllable-state\"\nimport { useI18n } from \"../../providers/i18n-provider\"\nimport {\n ariaAttr,\n dataAttr,\n isFunction,\n runIfFn,\n runKeyAction,\n useUpdateEffect,\n} from \"../../utils\"\nimport { Checkbox } from \"../checkbox\"\nimport { ChevronsUpDownIcon, ChevronUpIcon } from \"../icon\"\nimport { NativeTable } from \"../native-table\"\n\ndeclare module \"@tanstack/react-table\" {\n interface ColumnDefExtensions<TData extends RowData, TValue = unknown>\n extends\n VisibilityColumnDef,\n ColumnPinningColumnDef,\n ColumnFiltersColumnDef<TData>,\n GlobalFilterColumnDef,\n SortingColumnDef<TData>,\n GroupingColumnDef<TData, TValue>,\n ColumnSizingColumnDef {}\n\n interface ColumnDefBase<TData extends RowData, TValue = unknown>\n extends\n ColumnDefExtensions<TData, TValue>,\n Pick<CSSProps, \"lineClamp\" | \"truncated\">,\n Pick<NativeTable.TdProps, \"numeric\"> {\n cell?: ColumnDefTemplate<CellContext<TData, TValue>>\n footer?: ColumnDefTemplate<HeaderContext<TData, TValue>>\n getUniqueValues?: AccessorFn<TData, unknown[]>\n meta?: ColumnMeta<TData, TValue>\n cellProps?: NativeTable.TdProps\n footerProps?: NativeTable.ThProps\n headerProps?: NativeTable.ThProps\n }\n}\n\nexport { createColumnHelper }\nexport type {\n ColumnDef,\n ColumnFiltersState,\n PaginationState,\n RowSelectionState,\n SortDirection,\n}\n\nfunction getMergeHeaderGroups(\n headerGroups: HeaderGroup<any>[],\n): HeaderGroup<any>[] {\n if (headerGroups.length <= 1) return headerGroups\n\n const columnsIds = new Set()\n\n return headerGroups.map((headerGroup, depth, { length: fullDepth }) => {\n return {\n ...headerGroup,\n headers: headerGroup.headers\n .filter((header) => !columnsIds.has(header.column.id))\n .map((header) => {\n columnsIds.add(header.column.id)\n\n return header.isPlaceholder\n ? { ...header, isPlaceholder: false, rowSpan: fullDepth - depth }\n : { ...header, rowSpan: 1 }\n }),\n }\n })\n}\n\nfunction getMergeFooterGroups(\n headerGroups: HeaderGroup<any>[],\n): HeaderGroup<any>[] {\n if (headerGroups.length <= 1) return headerGroups\n\n return headerGroups.map((headerGroup, depth) => {\n const nextHeaderGroups = headerGroups.slice(depth + 1)\n\n return {\n ...headerGroup,\n headers: headerGroup.headers\n .filter((header) => !header.isPlaceholder)\n .map((header) => {\n if (nextHeaderGroups.length === 0) return header\n\n const rowSpan = nextHeaderGroups.reduce((acc, nextHeaderGroup) => {\n const hasNextHeader = nextHeaderGroup.headers.some(\n (nextHeader) => nextHeader.column.id === header.column.id,\n )\n\n return acc + (hasNextHeader ? 1 : 0)\n }, 1)\n\n return { ...header, rowSpan }\n }),\n }\n })\n}\n\nexport interface ColumnSort<Y extends RowData> {\n desc: boolean\n id: keyof Y\n}\nexport type SortingState<Y extends RowData> = ColumnSort<Y>[]\n\ninterface ComponentContext extends Pick<\n TableProps<any>,\n | \"columnResizeMode\"\n | \"resizableTriggerProps\"\n | \"sortingIcon\"\n | \"sortingIconProps\"\n> {\n table: ReactTable<any>\n}\n\ninterface OmittedTableOptions<Y extends RowData> extends Omit<\n TableOptions<Y>,\n | \"getCoreRowModel\"\n | \"onColumnFiltersChange\"\n | \"onPaginationChange\"\n | \"onSortingChange\"\n> {}\n\ninterface PickedNativeTableProps extends Pick<\n NativeTable.RootProps,\n | \"className\"\n | \"highlightOnHover\"\n | \"highlightOnSelected\"\n | \"layout\"\n | \"scrollAreaProps\"\n | \"size\"\n | \"stickyFooter\"\n | \"stickyHeader\"\n | \"striped\"\n | \"suppressHydrationWarning\"\n | \"variant\"\n | \"withBorder\"\n | \"withColumnBorders\"\n | \"withScrollArea\"\n> {}\n\nexport interface TableProps<Y extends RowData>\n extends\n OmittedTableOptions<Y>,\n PickedNativeTableProps,\n Pick<CSSProps, \"colorScheme\" | \"lineClamp\" | \"truncated\"> {\n /**\n * The column filters state of the table.\n */\n columnFilters?: ColumnFiltersState\n /**\n * The default column filters state of the table.\n */\n defaultColumnFilters?: ColumnFiltersState\n /**\n * The default pagination state of the table.\n */\n defaultPagination?: PaginationState\n /**\n * The default row selection state of the table.\n */\n defaultRowSelection?: RowSelectionState\n /**\n * The default sorting state of the table.\n */\n defaultSorting?: SortingState<Y>\n /**\n * If `true`, the table width will be automatically resized to the content.\n *\n * @default false\n */\n enableAutoResizeTableWidth?: boolean\n /**\n * If `true`, the keyboard navigation will be enabled.\n *\n * @default true\n */\n enableKeyboardNavigation?: boolean\n /**\n * If `true`, the pagination will be enabled.\n *\n * @default false\n */\n enablePagination?: boolean\n /**\n * The footer of the table.\n */\n footer?: ReactNodeOrFunction<ReactTable<Y>>\n /**\n * The header of the table.\n */\n header?: ReactNodeOrFunction<ReactTable<Y>>\n /**\n * The initial focusable cell of the table.\n *\n * @default {rowIndex: 0, colIndex: 0}\n */\n initialFocusableCell?: { colIndex: number; rowIndex: number }\n /**\n * The pagination state of the table.\n */\n pagination?: PaginationState\n /**\n * The row selection state of the table.\n */\n rowSelection?: RowSelectionState\n /**\n * If `true`, the row will be selected when the row is clicked.\n *\n * @default false\n */\n selectOnClickRow?: boolean\n /**\n * The sorting state of the table.\n */\n sorting?: SortingState<Y>\n /**\n * The sorting icon of the table.\n */\n sortingIcon?: ReactNodeOrFunction<false | SortDirection>\n /**\n * If `true`, the table will have a checkbox column.\n *\n * @default true\n */\n withCheckbox?: boolean\n /**\n * If `true`, the table will have a checkbox in the footer.\n *\n * @default false\n */\n withFooterCheckbox?: boolean\n /**\n * If `true`, the table will have footer groups.\n *\n * @default false\n */\n withFooterGroups?: boolean\n /**\n * The props for the table cell.\n */\n cellProps?: TransformProps<NativeTable.TdProps, Cell<Y, unknown>>\n /**\n * The props for the checkbox.\n */\n checkboxProps?: CheckboxProps\n /**\n * The props for the table footer group.\n */\n footerGroupProps?: TransformProps<NativeTable.TrProps, HeaderGroup<Y>>\n /**\n * The props for the table footer.\n */\n footerProps?: TransformProps<NativeTable.ThProps, Header<Y, unknown>>\n /**\n * The props for the table header checkbox.\n */\n headerCheckboxProps?: TransformProps<CheckboxProps, Header<Y, unknown>>\n /**\n * The props for the table header group.\n */\n headerGroupProps?: TransformProps<NativeTable.TrProps, HeaderGroup<Y>>\n /**\n * The props for the table header.\n */\n headerProps?: TransformProps<NativeTable.ThProps, Header<Y, unknown>>\n /**\n * The props for the resizable trigger.\n */\n resizableTriggerProps?: TransformProps<\n Omit<ResizableTriggerProps, \"resizing\">,\n Header<Y, unknown>\n >\n /**\n * The props for the table row checkbox.\n */\n rowCheckboxProps?: TransformProps<CheckboxProps, Row<Y>>\n /**\n * The props for the table row.\n */\n rowProps?: TransformProps<NativeTable.TrProps, Row<Y>>\n /**\n * The props for the sorting icon.\n */\n sortingIconProps?: TransformProps<\n Omit<SortingIconProps, \"sorted\">,\n Header<Y, unknown>\n >\n /**\n * The props for the table.\n */\n tableProps?: NativeTable.RootProps\n /**\n * The props for the table tbody.\n */\n tbodyProps?: NativeTable.TbodyProps\n /**\n * The props for the table tfoot.\n */\n tfootProps?: NativeTable.TfootProps\n /**\n * The props for the table thead.\n */\n theadProps?: NativeTable.TheadProps\n /**\n * The callback invoked when the column filters state changes.\n */\n onColumnFiltersChange?: (columnFilters: ColumnFiltersState) => void\n /**\n * The callback invoked when the pagination state changes.\n */\n onPaginationChange?: (pagination: PaginationState) => void\n /**\n * The callback invoked when the row is clicked.\n */\n onRowClick?: (row: Row<Y>) => void\n /**\n * The callback invoked when the row is double clicked.\n */\n onRowDoubleClick?: (row: Row<Y>) => void\n /**\n * The callback invoked when the sorting state changes.\n */\n onSortingChange?: (sorting: SortingState<Y>) => void\n}\n\nconst {\n ComponentContext,\n PropsContext: TablePropsContext,\n useComponentContext,\n usePropsContext: useTablePropsContext,\n withContext,\n} = createComponent<TableProps<any>, any, ComponentContext>(\"table\")\n\nexport { TablePropsContext, useTablePropsContext }\n\n/**\n * `Table` is a table component equipped with column sorting, row selection, and click event features.\n *\n * @see https://yamada-ui.com/docs/components/table\n */\nexport const Table = withContext(\n <Y extends RowData>({\n className,\n colorScheme,\n size,\n variant,\n columnFilters: columnFiltersProp,\n columnResizeMode = \"onChange\",\n columns: columnsProp,\n data,\n defaultColumnFilters,\n defaultPagination = { pageIndex: 0, pageSize: 20 },\n defaultRowSelection = {},\n defaultSorting,\n enableAutoResizeTableWidth = false,\n enableColumnResizing = false,\n enableKeyboardNavigation = true,\n enablePagination = false,\n enableRowSelection = false,\n footer,\n header,\n highlightOnHover = !!enableRowSelection,\n highlightOnSelected = !!enableRowSelection,\n initialFocusableCell = { colIndex: 0, rowIndex: 0 },\n layout,\n lineClamp,\n manualPagination,\n pagination: paginationProp,\n rowCount: totalRowCount,\n rowSelection: rowSelectionProp,\n selectOnClickRow = false,\n sortDescFirst = false,\n sorting: sortingProp,\n sortingIcon,\n state,\n stickyFooter,\n stickyHeader,\n striped,\n suppressHydrationWarning,\n truncated,\n withBorder,\n withCheckbox = true,\n withColumnBorders,\n withFooterCheckbox = false,\n withFooterGroups = false,\n withScrollArea,\n cellProps,\n checkboxProps,\n footerGroupProps,\n footerProps,\n headerCheckboxProps,\n headerGroupProps,\n headerProps,\n resizableTriggerProps,\n rowCheckboxProps,\n rowProps,\n scrollAreaProps,\n sortingIconProps,\n tableProps,\n tbodyProps,\n tfootProps,\n theadProps,\n onColumnFiltersChange: onColumnFiltersChangeProp,\n onPaginationChange: onPaginationChangeProp,\n onRowClick,\n onRowDoubleClick,\n onRowSelectionChange: onRowSelectionChangeProp,\n onSortingChange: onSortingChangeProp,\n ...rest\n }: TableProps<Y>) => {\n const { t } = useI18n(\"table\")\n const initialFocus = useRef<boolean>(false)\n const ref = useRef<HTMLTableElement>(null)\n const focusedCell = useRef<null | { colIndex: number; rowIndex: number }>(\n null,\n )\n const [rowSelection, onRowSelectionChange] = useControllableState({\n defaultValue: defaultRowSelection,\n value: rowSelectionProp,\n onChange: onRowSelectionChangeProp,\n })\n const [sorting, onSortingChange] = useControllableState({\n defaultValue: defaultSorting,\n value: sortingProp,\n onChange: onSortingChangeProp,\n })\n const [pagination, onPaginationChange] = useControllableState({\n defaultValue: defaultPagination,\n value: paginationProp,\n onChange: onPaginationChangeProp,\n })\n const [columnFilters, onColumnFiltersChange] = useControllableState({\n defaultValue: defaultColumnFilters,\n value: columnFiltersProp,\n onChange: onColumnFiltersChangeProp,\n })\n const columns = useMemo(() => {\n if (!enableRowSelection || !withCheckbox) return columnsProp\n\n const clonedColumns = [...columnsProp]\n\n const header = ({ header, table }: HeaderContext<Y, any>) => {\n return (\n <Checkbox\n {...mergeProps(\n {\n checked: table.getIsAllRowsSelected(),\n indeterminate: table.getIsSomeRowsSelected(),\n indicatorProps: { outline: \"none\" },\n inputProps: {\n \"aria-label\": t(\"Select all rows\"),\n \"data-focusable\": \"\",\n tabIndex: -1,\n },\n onChange: table.getToggleAllRowsSelectedHandler(),\n },\n checkboxProps ?? {},\n runIfFn(headerCheckboxProps, header) ?? {},\n )()}\n />\n )\n }\n\n const cell = ({ row }: CellContext<Y, any>) => {\n return (\n <Checkbox\n {...mergeProps(\n {\n checked: row.getIsSelected(),\n disabled: !row.getCanSelect(),\n indeterminate: row.getIsSomeSelected(),\n indicatorProps: { outline: \"none\" },\n inputProps: {\n \"aria-label\": t(\"Select row\"),\n \"data-focusable\": \"\",\n tabIndex: -1,\n },\n onChange: row.getToggleSelectedHandler(),\n },\n checkboxProps ?? {},\n runIfFn(rowCheckboxProps, row) ?? {},\n )()}\n />\n )\n }\n\n clonedColumns.unshift({\n id: \"select\",\n cell,\n header,\n ...(withFooterCheckbox\n ? { footer: header }\n : { footerProps: { \"aria-hidden\": \"true\" } }),\n cellProps: { verticalAlign: \"middle\" },\n headerProps: { w: \"calc({spaces.4} + {space-x} * 2)\" },\n })\n\n return clonedColumns\n }, [\n checkboxProps,\n columnsProp,\n enableRowSelection,\n headerCheckboxProps,\n rowCheckboxProps,\n t,\n withCheckbox,\n withFooterCheckbox,\n ])\n const table = useReactTable<Y>({\n columnResizeMode,\n columns,\n data,\n enableColumnResizing,\n enableRowSelection,\n getCoreRowModel: getCoreRowModel(),\n getFilteredRowModel: getFilteredRowModel(),\n getSortedRowModel: getSortedRowModel(),\n manualPagination,\n rowCount: totalRowCount,\n sortDescFirst,\n state: {\n columnFilters,\n pagination: enablePagination ? pagination : undefined,\n rowSelection,\n sorting: sorting as OriginalSortingState,\n ...state,\n },\n onColumnFiltersChange,\n onPaginationChange,\n onRowSelectionChange,\n onSortingChange: onSortingChange as OnChangeFn<OriginalSortingState>,\n ...(enablePagination\n ? { getPaginationRowModel: getPaginationRowModel() }\n : {}),\n ...rest,\n })\n const headerGroups = table.getHeaderGroups()\n const mergedHeaderGroups = getMergeHeaderGroups(headerGroups)\n const rows = table.getRowModel().rows\n const footerGroups = table.getFooterGroups()\n const mergedFooterGroups = getMergeFooterGroups(\n withFooterGroups ? footerGroups : [],\n )\n const headerGroupCount = headerGroups.length\n const rowCount = rows.length\n const colCount = table.getAllLeafColumns().length\n const maxColIndex = colCount - 1\n const pageIndex = enablePagination\n ? table.getState().pagination.pageIndex\n : 0\n const cellMap = useMemo(() => {\n const cellMap = new Map<string, string>()\n\n if (!enableKeyboardNavigation) return cellMap\n\n const insertCellMap = (\n id: string,\n colSpan: number,\n rowSpan: number,\n colIndex: number,\n rowIndex: number,\n ) => {\n for (let i = 0; i < colSpan; i++) {\n cellMap.set(`${colIndex + i}-${rowIndex}`, `${colIndex}-${rowIndex}`)\n }\n\n for (let i = 1; i < rowSpan; i++) {\n cellMap.set(`${colIndex}-${rowIndex + i}`, `${colIndex}-${rowIndex}`)\n }\n }\n\n const insertCellMapByHeaderGroup = (\n headerGroup: HeaderGroup<Y>,\n rowIndex: number,\n ) => {\n let placeholderCount = 0\n\n headerGroup.headers.forEach((header) => {\n const colSpan = header.colSpan || 1\n const rowSpan = header.rowSpan || 1\n const colIndex = header.index + placeholderCount\n\n placeholderCount += colSpan - 1\n\n insertCellMap(header.id, colSpan, rowSpan, colIndex, rowIndex)\n })\n }\n\n mergedHeaderGroups.forEach((headerGroup, rowIndex) => {\n insertCellMapByHeaderGroup(headerGroup, rowIndex)\n })\n\n rows.forEach((row, rowIndex) => {\n rowIndex += headerGroupCount\n\n row.getVisibleCells().forEach((cell) => {\n const colIndex = cell.column.getIndex()\n\n insertCellMap(cell.id, 1, 1, colIndex, rowIndex)\n })\n })\n\n mergedFooterGroups.forEach((footerGroup, rowIndex) => {\n rowIndex += headerGroupCount + rowCount\n\n insertCellMapByHeaderGroup(footerGroup, rowIndex)\n })\n\n return cellMap\n }, [\n enableKeyboardNavigation,\n headerGroupCount,\n mergedFooterGroups,\n mergedHeaderGroups,\n rows,\n rowCount,\n ])\n const context = useMemo(\n () => ({\n columnResizeMode,\n sortingIcon,\n table,\n resizableTriggerProps,\n sortingIconProps,\n }),\n [\n columnResizeMode,\n sortingIcon,\n sortingIconProps,\n resizableTriggerProps,\n table,\n ],\n )\n const getCell = (\n evOrEl:\n | Element\n | FocusEvent<HTMLTableElement>\n | KeyboardEvent<HTMLTableElement>\n | null\n | undefined,\n ) => {\n if (!evOrEl) return\n\n const el =\n evOrEl instanceof HTMLElement\n ? evOrEl.closest(\"th, td\")\n : \"target\" in evOrEl && evOrEl.target instanceof HTMLElement\n ? evOrEl.target.closest(\"th, td\")\n : null\n\n if (!(el instanceof HTMLTableCellElement)) return\n\n const { colindex, rowindex } = el.dataset\n const { colSpan, rowSpan } = el\n\n if (!colindex || !rowindex) return\n\n const colIndex = parseInt(colindex)\n const rowIndex = parseInt(rowindex)\n\n return { colIndex, colSpan, el, rowIndex, rowSpan }\n }\n const getShouldFocusCell = (colIndex: number, rowIndex: number) => {\n const [trulyColIndex, trulyRowIndex] =\n cellMap.get(`${colIndex}-${rowIndex}`)?.split(\"-\") ?? []\n\n if (!trulyColIndex || !trulyRowIndex) return\n\n const targetEl = ref.current?.querySelector(\n `[data-colindex=\"${trulyColIndex}\"][data-rowindex=\"${trulyRowIndex}\"]`,\n )\n\n if (!targetEl || !(targetEl instanceof HTMLTableCellElement)) return\n\n return targetEl\n }\n const removeTabIndex = (el: Element | null | undefined) => {\n if (!el || !(el instanceof HTMLElement)) return\n\n el.tabIndex = -1\n el.querySelectorAll(\"[data-focusable]\").forEach((el) => {\n if (el instanceof HTMLElement) el.tabIndex = -1\n })\n }\n const onCellFocus = (\n el: HTMLTableCellElement | null | undefined,\n colIndex: number,\n rowIndex: number,\n ) => {\n const targetEl = getShouldFocusCell(colIndex, rowIndex)\n\n if (!targetEl) return\n\n focusedCell.current = { colIndex, rowIndex }\n\n removeTabIndex(el)\n\n const shouldFocusEl =\n targetEl.querySelector(\"[data-focusable]\") ?? targetEl\n\n if (shouldFocusEl instanceof HTMLElement) {\n shouldFocusEl.tabIndex = 0\n shouldFocusEl.focus()\n }\n }\n const onFocus = (ev: FocusEvent<HTMLTableElement>) => {\n if (initialFocus.current) return\n\n initialFocus.current = true\n\n const cell = getCell(ev)\n\n if (!cell) return\n\n onCellFocus(cell.el, cell.colIndex, cell.rowIndex)\n }\n const onKeyDown = (ev: KeyboardEvent<HTMLTableElement>) => {\n if (!enableKeyboardNavigation) return\n\n const cell = getCell(ev)\n\n if (!cell) return\n\n runKeyAction(ev, {\n ArrowDown: () =>\n onCellFocus(cell.el, cell.colIndex, cell.rowIndex + cell.rowSpan),\n ArrowLeft: () => onCellFocus(cell.el, cell.colIndex - 1, cell.rowIndex),\n ArrowRight: () =>\n onCellFocus(cell.el, cell.colIndex + cell.colSpan, cell.rowIndex),\n ArrowUp: () => onCellFocus(cell.el, cell.colIndex, cell.rowIndex - 1),\n End: () => onCellFocus(cell.el, maxColIndex, cell.rowIndex),\n Home: () => onCellFocus(cell.el, 0, cell.rowIndex),\n ...(enablePagination\n ? {\n PageDown: () => {\n if (!table.getCanNextPage()) return\n\n table.setPageIndex(pageIndex + 1)\n },\n PageUp: () => {\n if (!table.getCanPreviousPage()) return\n\n table.setPageIndex(pageIndex - 1)\n },\n }\n : {}),\n })\n }\n const getTabIndex = (colIndex: number, rowIndex: number) => {\n if (!enableKeyboardNavigation) return undefined\n\n return colIndex === initialFocusableCell.colIndex &&\n rowIndex === initialFocusableCell.rowIndex\n ? 0\n : undefined\n }\n\n useUpdateEffect(() => {\n if (!enableKeyboardNavigation) return\n\n const { colIndex, rowIndex } = focusedCell.current ?? initialFocusableCell\n const targetEl = getShouldFocusCell(colIndex, rowIndex)\n\n if (targetEl) targetEl.tabIndex = 0\n }, [pageIndex, enableKeyboardNavigation])\n\n return (\n <ComponentContext value={context}>\n {header ? runIfFn(header, table) : null}\n\n <NativeTable.Root\n {...mergeProps(\n {\n ref,\n className,\n style:\n enableColumnResizing && enableAutoResizeTableWidth\n ? { width: table.getCenterTotalSize() }\n : {},\n colorScheme,\n size,\n variant,\n \"aria-colcount\": colCount,\n \"aria-multiselectable\": enableRowSelection ? \"true\" : undefined,\n \"aria-rowcount\": totalRowCount || data.length,\n highlightOnHover,\n highlightOnSelected,\n layout,\n role: \"grid\",\n stickyFooter,\n stickyHeader,\n striped,\n suppressHydrationWarning,\n withBorder,\n withColumnBorders,\n withScrollArea,\n scrollAreaProps,\n onFocus,\n onKeyDown,\n },\n tableProps ?? {},\n )()}\n >\n <NativeTable.Thead role=\"rowgroup\" {...theadProps}>\n {mergedHeaderGroups.map((headerGroup, rowIndex) => {\n let placeholderCount = 0\n\n return (\n <NativeTable.Tr\n key={headerGroup.id}\n aria-rowindex={rowIndex + 1}\n role=\"row\"\n {...runIfFn(headerGroupProps, headerGroup)}\n >\n {headerGroup.headers.map((header) => {\n const { columnDef } = header.column\n const colIndex = header.index + placeholderCount\n const tabIndex = getTabIndex(colIndex, rowIndex)\n const canSort = header.column.getCanSort()\n const sorted = header.column.getIsSorted()\n const canResize = header.column.getCanResize()\n const resizing = header.column.getIsResizing()\n const children = header.isPlaceholder\n ? null\n : flexRender(\n header.column.columnDef.header,\n header.getContext(),\n )\n\n placeholderCount += (header.colSpan || 1) - 1\n\n return (\n <NativeTable.Th\n key={header.id}\n aria-colindex={colIndex + 1}\n aria-rowindex={rowIndex + 1}\n aria-sort={\n sorted\n ? sorted === \"asc\"\n ? \"ascending\"\n : \"descending\"\n : \"none\"\n }\n data-colindex={colIndex}\n data-rowindex={rowIndex}\n colSpan={header.colSpan || undefined}\n numeric={columnDef.numeric}\n pe={\n canSort\n ? \"calc((1rem * {lineHeights.moderate}) + {space-x})\"\n : undefined\n }\n position=\"relative\"\n role=\"columnheader\"\n rowSpan={header.rowSpan || undefined}\n tabIndex={tabIndex}\n {...mergeProps(\n {\n css: {\n \"&:has([data-focusable]:focus-visible)\":\n focusRingStyle.outline,\n },\n style: enableColumnResizing\n ? { width: header.getSize() }\n : {},\n },\n runIfFn(headerProps, header) ?? {},\n columnDef.headerProps ?? {},\n )()}\n >\n <TruncatedText\n lineClamp={columnDef.lineClamp ?? lineClamp}\n suppressHydrationWarning={suppressHydrationWarning}\n truncated={columnDef.truncated ?? truncated}\n >\n {children}\n </TruncatedText>\n\n {canSort ? (\n <SortingIcon\n sorted={sorted}\n suppressHydrationWarning={suppressHydrationWarning}\n onClick={header.column.getToggleSortingHandler()}\n />\n ) : null}\n\n {canResize ? (\n <ResizableTrigger\n resizing={resizing}\n suppressHydrationWarning={suppressHydrationWarning}\n onDoubleClick={header.column.resetSize}\n onMouseDown={header.getResizeHandler()}\n onTouchStart={header.getResizeHandler()}\n />\n ) : null}\n </NativeTable.Th>\n )\n })}\n </NativeTable.Tr>\n )\n })}\n </NativeTable.Thead>\n\n <NativeTable.Tbody role=\"rowgroup\" {...tbodyProps}>\n {rows.map((row, rowIndex) => {\n rowIndex += headerGroupCount\n\n const selected = !!rowSelection[row.id]\n const disabled =\n isFunction(enableRowSelection) && !enableRowSelection(row)\n\n return (\n <NativeTable.Tr\n id={row.id}\n key={row.id}\n aria-disabled={ariaAttr(disabled)}\n aria-rowindex={rowIndex + 1}\n aria-selected={ariaAttr(selected)}\n data-disabled={dataAttr(disabled)}\n data-selected={dataAttr(selected)}\n role=\"row\"\n {...mergeProps(\n {\n onClick:\n !disabled && selectOnClickRow\n ? () => row.toggleSelected(!selected)\n : undefined,\n },\n {\n onClick: !disabled ? () => onRowClick?.(row) : undefined,\n onDoubleClick: !disabled\n ? () => onRowDoubleClick?.(row)\n : undefined,\n },\n runIfFn(rowProps, row) ?? {},\n )()}\n >\n {row.getVisibleCells().map((cell) => {\n const { columnDef } = cell.column\n const colIndex = cell.column.getIndex()\n const tabIndex = getTabIndex(colIndex, rowIndex)\n const children = flexRender(\n cell.column.columnDef.cell,\n cell.getContext(),\n )\n\n return (\n <NativeTable.Td\n key={cell.id}\n aria-colindex={colIndex + 1}\n aria-rowindex={rowIndex + 1}\n data-colindex={colIndex}\n data-rowindex={rowIndex}\n numeric={columnDef.numeric}\n role=\"gridcell\"\n tabIndex={tabIndex}\n {...mergeProps(\n {\n css: {\n \"&:has([data-focusable]:focus-visible)\":\n focusRingStyle.outline,\n },\n },\n runIfFn(cellProps, cell) ?? {},\n columnDef.cellProps ?? {},\n )()}\n >\n <TruncatedText\n lineClamp={columnDef.lineClamp ?? lineClamp}\n suppressHydrationWarning={suppressHydrationWarning}\n truncated={columnDef.truncated ?? truncated}\n >\n {children}\n </TruncatedText>\n </NativeTable.Td>\n )\n })}\n </NativeTable.Tr>\n )\n })}\n </NativeTable.Tbody>\n\n {withFooterGroups ? (\n <NativeTable.Tfoot role=\"rowgroup\" {...tfootProps}>\n {mergedFooterGroups.map((footerGroup, rowIndex) => {\n rowIndex += headerGroupCount + rowCount\n\n let placeholderCount = 0\n\n return (\n <NativeTable.Tr\n key={footerGroup.id}\n aria-rowindex={rowIndex + 1}\n role=\"row\"\n {...runIfFn(footerGroupProps, footerGroup)}\n >\n {footerGroup.headers.map((header) => {\n const { columnDef } = header.column\n const colIndex = header.index + placeholderCount\n const tabIndex = getTabIndex(colIndex, rowIndex)\n const children = header.isPlaceholder\n ? null\n : flexRender(\n header.column.columnDef.footer,\n header.getContext(),\n )\n\n placeholderCount += (header.colSpan || 1) - 1\n\n return (\n <NativeTable.Td\n key={header.id}\n aria-colindex={colIndex + 1}\n aria-rowindex={rowIndex + 1}\n data-colindex={colIndex}\n data-rowindex={rowIndex}\n colSpan={header.colSpan || undefined}\n numeric={columnDef.numeric}\n role=\"gridcell\"\n rowSpan={header.rowSpan || undefined}\n tabIndex={tabIndex}\n {...mergeProps(\n {\n css: {\n \"&:has([data-focusable]:focus-visible)\":\n focusRingStyle.outline,\n },\n },\n runIfFn(footerProps, header) ?? {},\n columnDef.footerProps ?? {},\n )()}\n >\n <TruncatedText\n lineClamp={columnDef.lineClamp ?? lineClamp}\n suppressHydrationWarning={suppressHydrationWarning}\n truncated={columnDef.truncated ?? truncated}\n >\n {children}\n </TruncatedText>\n </NativeTable.Td>\n )\n })}\n </NativeTable.Tr>\n )\n })}\n </NativeTable.Tfoot>\n ) : null}\n </NativeTable.Root>\n\n {footer ? runIfFn(footer, table) : null}\n </ComponentContext>\n )\n },\n)() as GenericsComponent<{\n <Y extends RowData>(props: TableProps<Y>): ReactElement\n}>\n\ninterface SortingIconProps extends HTMLStyledProps<\"button\"> {\n sorted: false | SortDirection\n}\n\nconst SortingIcon: FC<SortingIconProps> = ({\n sorted,\n suppressHydrationWarning,\n ...rest\n}) => {\n const { t } = useI18n(\"table\")\n const { sortingIcon, sortingIconProps = {} } = useComponentContext()\n const Icon = sorted ? ChevronUpIcon : ChevronsUpDownIcon\n\n return (\n <styled.button\n type=\"button\"\n layerStyle=\"ghost\"\n colorScheme=\"mono\"\n aria-label={t(\n sorted\n ? sorted === \"desc\"\n ? \"Sort descending\"\n : \"Sort ascending\"\n : \"Clear sorting\",\n )}\n data-focusable\n aspectRatio=\"1\"\n cursor=\"pointer\"\n display=\"center\"\n focusVisibleRing=\"none\"\n h=\"calc(1em * {lineHeights.moderate})\"\n position=\"absolute\"\n right=\"{space-x}\"\n rounded=\"l1\"\n suppressHydrationWarning={suppressHydrationWarning}\n tabIndex={-1}\n top=\"50%\"\n transform=\"translateY(-50%)\"\n transitionDuration=\"moderate\"\n transitionProperty=\"common\"\n _hover={{ layerStyle: \"ghost.hover\" }}\n {...mergeProps(rest, sortingIconProps)()}\n >\n {runIfFn(sortingIcon, sorted) ?? (\n <Icon transform={`rotate(${sorted === \"desc\" ? 180 : 0}deg)`} />\n )}\n </styled.button>\n )\n}\n\ninterface ResizableTriggerProps extends HTMLStyledProps {\n resizing: boolean\n}\n\nconst ResizableTrigger: FC<ResizableTriggerProps> = ({\n resizing,\n suppressHydrationWarning,\n ...rest\n}) => {\n const {\n columnResizeMode,\n table,\n resizableTriggerProps = {},\n } = useComponentContext()\n const offset = table.getState().columnSizingInfo.deltaOffset\n\n return (\n <styled.div\n data-active={dataAttr(resizing)}\n bg=\"colorScheme.solid\"\n cursor=\"col-resize\"\n insetY=\"0\"\n opacity={{ base: \"0\", _hover: \"1\", _active: \"1\" }}\n position=\"absolute\"\n right=\"0\"\n suppressHydrationWarning={suppressHydrationWarning}\n touchAction=\"none\"\n transform={`translateX(${columnResizeMode === \"onEnd\" && resizing && offset ? `${offset}px` : \"50%\"})`}\n userSelect=\"none\"\n w=\"1\"\n {...mergeProps(rest, resizableTriggerProps)()}\n />\n )\n}\n\ninterface TruncatedTextProps extends HTMLStyledProps<\"span\"> {}\n\nconst TruncatedText: FC<TruncatedTextProps> = ({\n children,\n lineClamp,\n suppressHydrationWarning,\n truncated,\n ...rest\n}) => {\n if (lineClamp || truncated) {\n return (\n <styled.span\n lineClamp={lineClamp}\n suppressHydrationWarning={suppressHydrationWarning}\n truncated={truncated}\n wordBreak=\"break-all\"\n {...rest}\n >\n {children}\n </styled.span>\n )\n } else {\n return children\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA8FA,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J,KAAI,aAAa,UACf,QACE,oBAAC,OAAO;EACK;EACe;EACf;EACX,WAAU;EACV,GAAI;EAEH;GACW;KAGhB,QAAO"}
|
|
@@ -3,13 +3,11 @@ import { ThemeProps } from "../../core/system/index.types.js";
|
|
|
3
3
|
import { Component, HTMLStyledProps } from "../../core/components/index.types.js";
|
|
4
4
|
import "../../core/index.js";
|
|
5
5
|
import { WithTransitionProps } from "../motion/index.types.js";
|
|
6
|
-
import "../motion/index.js";
|
|
7
6
|
import { CollapseProps } from "../collapse/collapse.js";
|
|
8
|
-
import "../collapse/index.js";
|
|
9
7
|
import "../../index.js";
|
|
10
8
|
import { AccordionStyle } from "./accordion.style.js";
|
|
11
9
|
import { UseAccordionItemProps, UseAccordionProps } from "./use-accordion.js";
|
|
12
|
-
import * as
|
|
10
|
+
import * as react164 from "react";
|
|
13
11
|
|
|
14
12
|
//#region src/components/accordion/accordion.d.ts
|
|
15
13
|
interface AccordionCallBackProps {
|
|
@@ -33,7 +31,7 @@ interface AccordionRootProps extends Omit<HTMLStyledProps, "onChange">, ThemePro
|
|
|
33
31
|
*/
|
|
34
32
|
items?: AccordionItem[];
|
|
35
33
|
}
|
|
36
|
-
declare const AccordionPropsContext:
|
|
34
|
+
declare const AccordionPropsContext: react164.Context<Partial<AccordionRootProps> | undefined>, useAccordionPropsContext: () => Partial<AccordionRootProps> | undefined;
|
|
37
35
|
/**
|
|
38
36
|
* `Accordion` is a component for a list that displays information in an expandable or collapsible manner.
|
|
39
37
|
*
|
|
@@ -2,10 +2,10 @@ import { HTMLProps, PropGetter } from "../../core/components/index.types.js";
|
|
|
2
2
|
import "../../core/index.js";
|
|
3
3
|
import { Descendant } from "../../hooks/use-descendants/index.js";
|
|
4
4
|
import "../../index.js";
|
|
5
|
-
import * as
|
|
5
|
+
import * as react165 from "react";
|
|
6
6
|
|
|
7
7
|
//#region src/components/accordion/use-accordion.d.ts
|
|
8
|
-
declare const AccordionDescendantsContext:
|
|
8
|
+
declare const AccordionDescendantsContext: react165.Context<{
|
|
9
9
|
active: (target?: HTMLButtonElement | Descendant<HTMLButtonElement, {}> | null | undefined, options?: FocusOptions) => void;
|
|
10
10
|
count: (props?: Partial<{}> | undefined) => number;
|
|
11
11
|
destroy: () => void;
|
|
@@ -24,7 +24,7 @@ declare const AccordionDescendantsContext: react89.Context<{
|
|
|
24
24
|
prevValue: (indexOrNode: number | HTMLButtonElement | Descendant<HTMLButtonElement, {}> | null, loop?: boolean, props?: Partial<{}> | undefined) => Descendant<HTMLButtonElement, {}> | undefined;
|
|
25
25
|
register: (props?: {
|
|
26
26
|
disabled?: boolean | ((node: HTMLButtonElement) => boolean) | undefined;
|
|
27
|
-
} | undefined) =>
|
|
27
|
+
} | undefined) => react165.RefCallback<HTMLButtonElement>;
|
|
28
28
|
unregister: (node?: HTMLButtonElement | null | undefined) => void;
|
|
29
29
|
value: (indexOrNode: number | HTMLButtonElement | null) => Descendant<HTMLButtonElement, {}> | undefined;
|
|
30
30
|
values: (props?: Partial<{}> | undefined) => Descendant<HTMLButtonElement, {}>[];
|
|
@@ -50,12 +50,12 @@ declare const AccordionDescendantsContext: react89.Context<{
|
|
|
50
50
|
prevValue: (indexOrNode: number | HTMLButtonElement | Descendant<HTMLButtonElement, {}> | null, loop?: boolean, props?: Partial<{}> | undefined) => Descendant<HTMLButtonElement, {}> | undefined;
|
|
51
51
|
register: (props?: {
|
|
52
52
|
disabled?: boolean | ((node: HTMLButtonElement) => boolean) | undefined;
|
|
53
|
-
} | undefined) =>
|
|
53
|
+
} | undefined) => react165.RefCallback<HTMLButtonElement>;
|
|
54
54
|
unregister: (node?: HTMLButtonElement | null | undefined) => void;
|
|
55
55
|
value: (indexOrNode: number | HTMLButtonElement | null) => Descendant<HTMLButtonElement, {}> | undefined;
|
|
56
56
|
values: (props?: Partial<{}> | undefined) => Descendant<HTMLButtonElement, {}>[];
|
|
57
57
|
};
|
|
58
|
-
register:
|
|
58
|
+
register: react165.RefCallback<HTMLButtonElement>;
|
|
59
59
|
}, useAccordionDescendants: () => {
|
|
60
60
|
active: (target?: HTMLButtonElement | Descendant<HTMLButtonElement, {}> | null | undefined, options?: FocusOptions) => void;
|
|
61
61
|
count: (props?: Partial<{}> | undefined) => number;
|
|
@@ -75,15 +75,15 @@ declare const AccordionDescendantsContext: react89.Context<{
|
|
|
75
75
|
prevValue: (indexOrNode: number | HTMLButtonElement | Descendant<HTMLButtonElement, {}> | null, loop?: boolean, props?: Partial<{}> | undefined) => Descendant<HTMLButtonElement, {}> | undefined;
|
|
76
76
|
register: (props?: {
|
|
77
77
|
disabled?: boolean | ((node: HTMLButtonElement) => boolean) | undefined;
|
|
78
|
-
} | undefined) =>
|
|
78
|
+
} | undefined) => react165.RefCallback<HTMLButtonElement>;
|
|
79
79
|
unregister: (node?: HTMLButtonElement | null | undefined) => void;
|
|
80
80
|
value: (indexOrNode: number | HTMLButtonElement | null) => Descendant<HTMLButtonElement, {}> | undefined;
|
|
81
81
|
values: (props?: Partial<{}> | undefined) => Descendant<HTMLButtonElement, {}>[];
|
|
82
82
|
};
|
|
83
83
|
interface AccordionContext extends Omit<UseAccordionReturn, "descendants" | "getRootProps"> {}
|
|
84
|
-
declare const AccordionContext:
|
|
84
|
+
declare const AccordionContext: react165.Context<AccordionContext>, useAccordionContext: () => AccordionContext;
|
|
85
85
|
interface AccordionItemContext extends Omit<UseAccordionItemReturn, "getItemProps"> {}
|
|
86
|
-
declare const AccordionItemContext:
|
|
86
|
+
declare const AccordionItemContext: react165.Context<AccordionItemContext>, useAccordionItemContext: () => AccordionItemContext;
|
|
87
87
|
interface UseAccordionProps extends Omit<HTMLProps, "onChange"> {
|
|
88
88
|
/**
|
|
89
89
|
* The initial index(es) of the accordion item to expand.
|
|
@@ -137,7 +137,7 @@ declare const useAccordion: ({
|
|
|
137
137
|
prevValue: (indexOrNode: number | HTMLButtonElement | Descendant<HTMLButtonElement, {}> | null, loop?: boolean, props?: Partial<{}> | undefined) => Descendant<HTMLButtonElement, {}> | undefined;
|
|
138
138
|
register: (props?: {
|
|
139
139
|
disabled?: boolean | ((node: HTMLButtonElement) => boolean) | undefined;
|
|
140
|
-
} | undefined) =>
|
|
140
|
+
} | undefined) => react165.RefCallback<HTMLButtonElement>;
|
|
141
141
|
unregister: (node?: HTMLButtonElement | null | undefined) => void;
|
|
142
142
|
value: (indexOrNode: number | HTMLButtonElement | null) => Descendant<HTMLButtonElement, {}> | undefined;
|
|
143
143
|
values: (props?: Partial<{}> | undefined) => Descendant<HTMLButtonElement, {}>[];
|
|
@@ -145,8 +145,8 @@ declare const useAccordion: ({
|
|
|
145
145
|
focusedIndex: number;
|
|
146
146
|
index: number | number[];
|
|
147
147
|
multiple: boolean | undefined;
|
|
148
|
-
setFocusedIndex:
|
|
149
|
-
setIndex:
|
|
148
|
+
setFocusedIndex: react165.Dispatch<react165.SetStateAction<number>>;
|
|
149
|
+
setIndex: react165.Dispatch<react165.SetStateAction<number | number[]>>;
|
|
150
150
|
toggle: boolean | undefined;
|
|
151
151
|
getRootProps: PropGetter<"div", undefined, undefined>;
|
|
152
152
|
};
|
|
@@ -4,10 +4,9 @@ import "../../core/index.js";
|
|
|
4
4
|
import { ActionBarStyle } from "./action-bar.style.js";
|
|
5
5
|
import { PortalProps } from "../portal/portal.js";
|
|
6
6
|
import { UsePopupAnimationProps } from "../popover/popover.js";
|
|
7
|
-
import "../popover/index.js";
|
|
8
7
|
import { UseActionBarProps } from "./use-action-bar.js";
|
|
9
8
|
import "../../index.js";
|
|
10
|
-
import * as
|
|
9
|
+
import * as react93 from "react";
|
|
11
10
|
import { PropsWithChildren, ReactNode } from "react";
|
|
12
11
|
|
|
13
12
|
//#region src/components/action-bar/action-bar.d.ts
|
|
@@ -29,7 +28,7 @@ interface ActionBarRootProps extends Omit<HTMLStyledProps, "content">, ThemeProp
|
|
|
29
28
|
*/
|
|
30
29
|
onCloseComplete?: () => void;
|
|
31
30
|
}
|
|
32
|
-
declare const ActionBarPropsContext:
|
|
31
|
+
declare const ActionBarPropsContext: react93.Context<Partial<ActionBarRootProps> | undefined>, useActionBarPropsContext: () => Partial<ActionBarRootProps> | undefined;
|
|
33
32
|
/**
|
|
34
33
|
* `ActionBar` is a component that is used to display a bottom action bar with a set of actions.
|
|
35
34
|
*
|
|
@@ -2,10 +2,9 @@ import { KeyframeIdent, ThemeProps } from "../../core/system/index.types.js";
|
|
|
2
2
|
import { Component } from "../../core/components/index.types.js";
|
|
3
3
|
import "../../core/index.js";
|
|
4
4
|
import { HTMLMotionProps } from "../motion/index.types.js";
|
|
5
|
-
import "../motion/index.js";
|
|
6
5
|
import { AiryStyle } from "./airy.style.js";
|
|
7
6
|
import "../../index.js";
|
|
8
|
-
import * as
|
|
7
|
+
import * as react163 from "react";
|
|
9
8
|
import { ReactNode } from "react";
|
|
10
9
|
|
|
11
10
|
//#region src/components/airy/airy.d.ts
|
|
@@ -57,7 +56,7 @@ interface AiryProps extends Omit<HTMLMotionProps<"button">, "onChange">, ThemePr
|
|
|
57
56
|
*/
|
|
58
57
|
onChange?: (value: KeyframeIdent) => void;
|
|
59
58
|
}
|
|
60
|
-
declare const AiryPropsContext:
|
|
59
|
+
declare const AiryPropsContext: react163.Context<Partial<AiryProps> | undefined>, useAiryPropsContext: () => Partial<AiryProps> | undefined;
|
|
61
60
|
/**
|
|
62
61
|
* `Airy` is a component that creates an airy animation, switching between two elements when one is clicked.
|
|
63
62
|
*
|
|
@@ -3,13 +3,10 @@ import { Component, HTMLStyledProps } from "../../core/components/index.types.js
|
|
|
3
3
|
import "../../core/index.js";
|
|
4
4
|
import { AlertStyle } from "./alert.style.js";
|
|
5
5
|
import { IconProps } from "../icon/icon.js";
|
|
6
|
-
import "../icon/index.js";
|
|
7
6
|
import { LoadingProps } from "../loading/loading.js";
|
|
8
|
-
import "../loading/index.js";
|
|
9
7
|
import { StatusScheme } from "../status/status.js";
|
|
10
|
-
import "../status/index.js";
|
|
11
8
|
import "../../index.js";
|
|
12
|
-
import * as
|
|
9
|
+
import * as react92 from "react";
|
|
13
10
|
|
|
14
11
|
//#region src/components/alert/alert.d.ts
|
|
15
12
|
interface AlertRootProps extends HTMLStyledProps, ThemeProps<AlertStyle> {
|
|
@@ -20,7 +17,7 @@ interface AlertRootProps extends HTMLStyledProps, ThemeProps<AlertStyle> {
|
|
|
20
17
|
*/
|
|
21
18
|
status?: StatusScheme;
|
|
22
19
|
}
|
|
23
|
-
declare const AlertPropsContext:
|
|
20
|
+
declare const AlertPropsContext: react92.Context<Partial<AlertRootProps> | undefined>, useAlertPropsContext: () => Partial<AlertRootProps> | undefined;
|
|
24
21
|
/**
|
|
25
22
|
* `Alert` is a component that conveys information to the user.
|
|
26
23
|
*
|
|
@@ -3,9 +3,8 @@ import { Component } from "../../core/components/index.types.js";
|
|
|
3
3
|
import "../../core/index.js";
|
|
4
4
|
import { AlphaSliderStyle } from "./alpha-slider.style.js";
|
|
5
5
|
import { HueSliderOverlayProps, HueSliderRootProps, HueSliderThumbProps, HueSliderTrackProps } from "../hue-slider/hue-slider.js";
|
|
6
|
-
import "../hue-slider/index.js";
|
|
7
6
|
import "../../index.js";
|
|
8
|
-
import * as
|
|
7
|
+
import * as react91 from "react";
|
|
9
8
|
|
|
10
9
|
//#region src/components/alpha-slider/alpha-slider.d.ts
|
|
11
10
|
interface AlphaSliderRootProps extends WithoutThemeProps<Omit<HueSliderRootProps, "color" | "max" | "step" | "thumbProps" | "trackProps">, AlphaSliderStyle> {
|
|
@@ -38,7 +37,7 @@ interface AlphaSliderRootProps extends WithoutThemeProps<Omit<HueSliderRootProps
|
|
|
38
37
|
*/
|
|
39
38
|
trackProps?: AlphaSliderTrackProps;
|
|
40
39
|
}
|
|
41
|
-
declare const AlphaSliderPropsContext:
|
|
40
|
+
declare const AlphaSliderPropsContext: react91.Context<Partial<AlphaSliderRootProps> | undefined>, useAlphaSliderPropsContext: () => Partial<AlphaSliderRootProps> | undefined;
|
|
42
41
|
/**
|
|
43
42
|
* `AlphaSlider` is a component used to allow the user to select color transparency.
|
|
44
43
|
*
|
|
@@ -2,7 +2,7 @@ import { StyleValue } from "../../core/css/index.types.js";
|
|
|
2
2
|
import { Component, HTMLStyledProps } from "../../core/components/index.types.js";
|
|
3
3
|
import "../../core/index.js";
|
|
4
4
|
import "../../index.js";
|
|
5
|
-
import * as
|
|
5
|
+
import * as react90 from "react";
|
|
6
6
|
|
|
7
7
|
//#region src/components/aspect-ratio/aspect-ratio.d.ts
|
|
8
8
|
interface AspectRatioProps extends HTMLStyledProps {
|
|
@@ -13,7 +13,7 @@ interface AspectRatioProps extends HTMLStyledProps {
|
|
|
13
13
|
*/
|
|
14
14
|
ratio?: StyleValue<number>;
|
|
15
15
|
}
|
|
16
|
-
declare const AspectRatioPropsContext:
|
|
16
|
+
declare const AspectRatioPropsContext: react90.Context<Partial<AspectRatioProps> | undefined>, useAspectRatioPropsContext: () => Partial<AspectRatioProps> | undefined;
|
|
17
17
|
/**
|
|
18
18
|
* `AspectRatio` is a component for embedding things like videos and maps while maintaining the aspect ratio.
|
|
19
19
|
*
|
|
@@ -3,16 +3,14 @@ import { ThemeProps } from "../../core/system/index.types.js";
|
|
|
3
3
|
import { Component, GenericsComponent, HTMLStyledProps } from "../../core/components/index.types.js";
|
|
4
4
|
import "../../core/index.js";
|
|
5
5
|
import { PopoverContentProps, UsePopoverStyleProps, UsePopupAnimationProps } from "../popover/popover.js";
|
|
6
|
-
import "../popover/index.js";
|
|
7
6
|
import { AutocompleteStyle } from "./autocomplete.style.js";
|
|
8
7
|
import { UseComboboxGroupProps } from "../../hooks/use-combobox/index.js";
|
|
9
8
|
import { UseInputBorderProps } from "../input/use-input-border.js";
|
|
10
9
|
import { InputElementProps } from "../input/input-element.js";
|
|
11
10
|
import { InputGroupRootProps } from "../input/input-group.js";
|
|
12
|
-
import "../input/index.js";
|
|
13
11
|
import { UseAutocompleteOptionProps, UseAutocompleteProps } from "./use-autocomplete.js";
|
|
14
12
|
import "../../index.js";
|
|
15
|
-
import * as
|
|
13
|
+
import * as react162 from "react";
|
|
16
14
|
import { ReactElement, ReactNode } from "react";
|
|
17
15
|
|
|
18
16
|
//#region src/components/autocomplete/autocomplete.d.ts
|
|
@@ -68,7 +66,7 @@ interface AutocompleteRootProps<Multiple extends boolean = false> extends Omit<H
|
|
|
68
66
|
*/
|
|
69
67
|
rootProps?: InputGroupRootProps;
|
|
70
68
|
}
|
|
71
|
-
declare const AutocompletePropsContext:
|
|
69
|
+
declare const AutocompletePropsContext: react162.Context<Partial<AutocompleteRootProps<false>> | undefined>, useAutocompletePropsContext: () => Partial<AutocompleteRootProps<false>> | undefined;
|
|
72
70
|
/**
|
|
73
71
|
* `Autocomplete` is a component used to display suggestions in response to user text input.
|
|
74
72
|
*
|
|
@@ -3,7 +3,7 @@ import { CSSPropObject, CSSSlotObject } from "../../core/css/index.types.js";
|
|
|
3
3
|
import "../../index.js";
|
|
4
4
|
|
|
5
5
|
//#region src/components/autocomplete/autocomplete.style.d.ts
|
|
6
|
-
declare const autocompleteStyle: ComponentSlotStyle<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "
|
|
6
|
+
declare const autocompleteStyle: ComponentSlotStyle<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "field" | "empty" | "indicator" | "valueText", CSSPropObject<CSSSlotObject<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "field" | "empty" | "indicator" | "valueText">>, {
|
|
7
7
|
xs: {
|
|
8
8
|
empty: {
|
|
9
9
|
gap: "1.5";
|
|
@@ -2,13 +2,11 @@ import { index_d_exports } from "../../utils/index.js";
|
|
|
2
2
|
import { HTMLProps, HTMLRefAttributes, PropGetter } from "../../core/components/index.types.js";
|
|
3
3
|
import "../../core/index.js";
|
|
4
4
|
import { UsePopoverProps } from "../popover/use-popover.js";
|
|
5
|
-
import "../popover/index.js";
|
|
6
5
|
import { FieldProps } from "../field/field.js";
|
|
7
|
-
import "../field/index.js";
|
|
8
6
|
import { Descendant, DescendantProps } from "../../hooks/use-descendants/index.js";
|
|
9
7
|
import { ComboboxDescendant, ComboboxDescendantProps, ComboboxItem, ComboboxItemWithValue, UseComboboxItemProps, UseComboboxProps } from "../../hooks/use-combobox/index.js";
|
|
10
8
|
import "../../index.js";
|
|
11
|
-
import * as
|
|
9
|
+
import * as react156 from "react";
|
|
12
10
|
import { ChangeEvent, ReactNode } from "react";
|
|
13
11
|
|
|
14
12
|
//#region src/components/autocomplete/use-autocomplete.d.ts
|
|
@@ -28,7 +26,7 @@ interface AutocompleteFilter {
|
|
|
28
26
|
}
|
|
29
27
|
type AutocompleteMatcher = typeof index_d_exports.match;
|
|
30
28
|
interface AutocompleteContext extends Pick<UseAutocompleteReturn, "max" | "value"> {}
|
|
31
|
-
declare const AutocompleteContext:
|
|
29
|
+
declare const AutocompleteContext: react156.Context<AutocompleteContext>, useAutocompleteContext: () => AutocompleteContext;
|
|
32
30
|
interface UseAutocompleteProps<Multiple extends boolean = false> extends Omit<HTMLProps, "defaultValue" | "onChange" | "ref" | "value">, Omit<UseComboboxProps, "defaultValue" | "initialFocusValue" | "onChange" | "ref" | "value">, HTMLRefAttributes<"input">, FieldProps {
|
|
33
31
|
/**
|
|
34
32
|
* If `true`, the autocomplete will allow custom value.
|
|
@@ -156,7 +154,7 @@ declare const useAutocomplete: <Multiple extends boolean = false>(props?: UseAut
|
|
|
156
154
|
lastValue: (props?: Partial<ComboboxDescendantProps> | undefined) => Descendant<HTMLDivElement, ComboboxDescendantProps> | undefined;
|
|
157
155
|
nextValue: (indexOrNode: number | HTMLDivElement | Descendant<HTMLDivElement, ComboboxDescendantProps> | null, loop?: boolean, props?: Partial<ComboboxDescendantProps> | undefined) => Descendant<HTMLDivElement, ComboboxDescendantProps> | undefined;
|
|
158
156
|
prevValue: (indexOrNode: number | HTMLDivElement | Descendant<HTMLDivElement, ComboboxDescendantProps> | null, loop?: boolean, props?: Partial<ComboboxDescendantProps> | undefined) => Descendant<HTMLDivElement, ComboboxDescendantProps> | undefined;
|
|
159
|
-
register: (props?: DescendantProps<HTMLDivElement, ComboboxDescendantProps> | undefined) =>
|
|
157
|
+
register: (props?: DescendantProps<HTMLDivElement, ComboboxDescendantProps> | undefined) => react156.RefCallback<HTMLDivElement>;
|
|
160
158
|
unregister: (node?: HTMLDivElement | null | undefined) => void;
|
|
161
159
|
value: (indexOrNode: number | HTMLDivElement | null) => Descendant<HTMLDivElement, ComboboxDescendantProps> | undefined;
|
|
162
160
|
values: (props?: Partial<ComboboxDescendantProps> | undefined) => Descendant<HTMLDivElement, ComboboxDescendantProps>[];
|
|
@@ -166,8 +164,8 @@ declare const useAutocomplete: <Multiple extends boolean = false>(props?: UseAut
|
|
|
166
164
|
items: ComboboxItem[];
|
|
167
165
|
max: number | undefined;
|
|
168
166
|
open: boolean;
|
|
169
|
-
setInputValue:
|
|
170
|
-
setValue:
|
|
167
|
+
setInputValue: react156.Dispatch<react156.SetStateAction<string>>;
|
|
168
|
+
setValue: react156.Dispatch<react156.SetStateAction<Multiple extends true ? string[] : string>>;
|
|
171
169
|
value: Multiple extends true ? string[] : string;
|
|
172
170
|
valueMap: {
|
|
173
171
|
[key: string]: ComboboxItemWithValue;
|
|
@@ -6,9 +6,9 @@ import "../../core/index.js";
|
|
|
6
6
|
import { AvatarStyle } from "./avatar.style.js";
|
|
7
7
|
import { UseAvatarProps } from "./use-avatar.js";
|
|
8
8
|
import "../../index.js";
|
|
9
|
-
import * as
|
|
9
|
+
import * as react85 from "react";
|
|
10
10
|
import { ReactElement } from "react";
|
|
11
|
-
import * as
|
|
11
|
+
import * as _yamada_ui_utils5 from "@yamada-ui/utils";
|
|
12
12
|
|
|
13
13
|
//#region src/components/avatar/avatar.d.ts
|
|
14
14
|
interface AvatarProps extends HTMLStyledProps, ThemeProps<AvatarStyle>, UseAvatarProps {
|
|
@@ -25,7 +25,7 @@ interface AvatarProps extends HTMLStyledProps, ThemeProps<AvatarStyle>, UseAvata
|
|
|
25
25
|
*/
|
|
26
26
|
imageProps?: AvatarImageProps;
|
|
27
27
|
}
|
|
28
|
-
declare const component: <H extends "fragment" | As = "div", R extends
|
|
28
|
+
declare const component: <H extends "fragment" | As = "div", R extends _yamada_ui_utils5.Dict = _yamada_ui_utils5.Dict<any>>(el: H | react85.FC<R>, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"image" | "group" | "root" | "fallback", {
|
|
29
29
|
shape: {
|
|
30
30
|
circle: {
|
|
31
31
|
root: {
|
|
@@ -148,7 +148,7 @@ declare const component: <H extends "fragment" | As = "div", R extends _yamada_u
|
|
|
148
148
|
name,
|
|
149
149
|
className,
|
|
150
150
|
...options
|
|
151
|
-
}?: ComponentOptions) => (initialProps?: InitialProps<R>, ...superProps: SuperProps<R>[]) => H extends "fragment" ?
|
|
151
|
+
}?: ComponentOptions) => (initialProps?: InitialProps<R>, ...superProps: SuperProps<R>[]) => H extends "fragment" ? react85.FunctionComponent<R> : Component<Exclude<H, "fragment">, R>, AvatarPropsContext: react85.Context<Partial<AvatarProps> | undefined>, useAvatarPropsContext: () => Partial<AvatarProps> | undefined, useRootComponentProps: <Y extends _yamada_ui_utils5.Dict = {}, R extends keyof Y = keyof Y>(props: Y, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"image" | "group" | "root" | "fallback", {
|
|
152
152
|
shape: {
|
|
153
153
|
circle: {
|
|
154
154
|
root: {
|
|
@@ -271,7 +271,7 @@ declare const component: <H extends "fragment" | As = "div", R extends _yamada_u
|
|
|
271
271
|
className,
|
|
272
272
|
withContext,
|
|
273
273
|
transferProps
|
|
274
|
-
}?: UseComponentPropsOptions<R>) => [CSSSlotObject,
|
|
274
|
+
}?: UseComponentPropsOptions<R>) => [CSSSlotObject, _yamada_ui_utils5.Merge<WithoutThemeProps<Y, ComponentSlotStyle<"image" | "group" | "root" | "fallback", {
|
|
275
275
|
shape: {
|
|
276
276
|
circle: {
|
|
277
277
|
root: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLProps, PropGetter } from "../../core/components/index.types.js";
|
|
2
2
|
import "../../core/index.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react88 from "react";
|
|
4
4
|
|
|
5
5
|
//#region src/components/avatar/use-avatar-group.d.ts
|
|
6
6
|
interface UseAvatarGroupProps extends HTMLProps {
|
|
@@ -19,7 +19,7 @@ declare const useAvatarGroup: ({
|
|
|
19
19
|
reverse,
|
|
20
20
|
...rest
|
|
21
21
|
}?: UseAvatarGroupProps) => {
|
|
22
|
-
children:
|
|
22
|
+
children: react88.ReactElement<any, string | react88.JSXElementConstructor<any>>[];
|
|
23
23
|
excess: number;
|
|
24
24
|
getRootProps: PropGetter<"div", undefined, undefined>;
|
|
25
25
|
};
|
|
@@ -3,11 +3,11 @@ import { Component, HTMLStyledProps } from "../../core/components/index.types.js
|
|
|
3
3
|
import "../../core/index.js";
|
|
4
4
|
import { BadgeStyle } from "./badge.style.js";
|
|
5
5
|
import "../../index.js";
|
|
6
|
-
import * as
|
|
6
|
+
import * as react84 from "react";
|
|
7
7
|
|
|
8
8
|
//#region src/components/badge/badge.d.ts
|
|
9
9
|
interface BadgeProps extends HTMLStyledProps<"span">, ThemeProps<BadgeStyle> {}
|
|
10
|
-
declare const BadgePropsContext:
|
|
10
|
+
declare const BadgePropsContext: react84.Context<Partial<BadgeProps> | undefined>, useBadgePropsContext: () => Partial<BadgeProps> | undefined;
|
|
11
11
|
/**
|
|
12
12
|
* `Badge` is a component that emphasizes the status of an item to make it immediately recognizable.
|
|
13
13
|
*
|