@cognite/aura 1.47006.0 → 1.47181.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DESIGN.md +6 -0
- package/dist/components/ui/core/count/count.gallery.d.ts +2 -0
- package/dist/components/ui/core/count/count.gallery.js +55 -0
- package/dist/components/ui/core/count/count.gallery.js.map +1 -0
- package/dist/components/ui/core/data-grid/data-grid.js +1 -19
- package/dist/components/ui/core/data-grid/data-grid.js.map +1 -1
- package/dist/components/ui/core/separator/separator.gallery.d.ts +2 -0
- package/dist/components/ui/core/separator/separator.gallery.js +63 -0
- package/dist/components/ui/core/separator/separator.gallery.js.map +1 -0
- package/dist/components/ui/core/skeleton/skeleton.gallery.d.ts +2 -0
- package/dist/components/ui/core/skeleton/skeleton.gallery.js +22 -0
- package/dist/components/ui/core/skeleton/skeleton.gallery.js.map +1 -0
- package/dist/components/ui/core/slider/slider.gallery.d.ts +2 -0
- package/dist/components/ui/core/slider/slider.gallery.js +62 -0
- package/dist/components/ui/core/slider/slider.gallery.js.map +1 -0
- package/dist/components/ui/core/toggle/toggle.gallery.d.ts +2 -0
- package/dist/components/ui/core/toggle/toggle.gallery.js +32 -0
- package/dist/components/ui/core/toggle/toggle.gallery.js.map +1 -0
- package/dist/components/ui/core/tooltip/tooltip.gallery.d.ts +2 -0
- package/dist/components/ui/core/tooltip/tooltip.gallery.js +52 -0
- package/dist/components/ui/core/tooltip/tooltip.gallery.js.map +1 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/ui/core/count/count.md +33 -0
- package/src/components/ui/core/separator/separator.md +32 -0
- package/src/components/ui/core/skeleton/skeleton.md +33 -0
- package/src/components/ui/core/slider/slider.md +41 -0
- package/src/components/ui/core/toggle/toggle.md +39 -0
- package/src/components/ui/core/tooltip/tooltip.md +41 -0
package/DESIGN.md
CHANGED
|
@@ -1458,6 +1458,7 @@ A keyboard-first search interface for discovering and executing actions, navigat
|
|
|
1458
1458
|
#### Count
|
|
1459
1459
|
|
|
1460
1460
|
**Storybook-slug:** count
|
|
1461
|
+
**Full guidance:** [count.md](./src/components/ui/core/count/count.md)
|
|
1461
1462
|
|
|
1462
1463
|
**Definition**
|
|
1463
1464
|
A compact numeric indicator used to surface quantities inline — for example, unread messages, selected items, or totals attached to labels or tabs.
|
|
@@ -1989,6 +1990,7 @@ Enables users to choose one or more predefined options from a dropdown list. Use
|
|
|
1989
1990
|
|
|
1990
1991
|
**Storybook-slug:** separator
|
|
1991
1992
|
**Docs-slug:** separator
|
|
1993
|
+
**Full guidance:** [separator.md](./src/components/ui/core/separator/separator.md)
|
|
1992
1994
|
|
|
1993
1995
|
**Definition**
|
|
1994
1996
|
A 1px visual divider between distinct content sections. Improves readability while remaining visually subtle.
|
|
@@ -2017,6 +2019,7 @@ A 1px visual divider between distinct content sections. Improves readability whi
|
|
|
2017
2019
|
#### Skeleton
|
|
2018
2020
|
|
|
2019
2021
|
**Storybook-slug:** skeleton
|
|
2022
|
+
**Full guidance:** [skeleton.md](./src/components/ui/core/skeleton/skeleton.md)
|
|
2020
2023
|
|
|
2021
2024
|
**Definition**
|
|
2022
2025
|
A loading placeholder that mimics the shape of incoming content, reducing perceived wait time and preventing layout shift.
|
|
@@ -2044,6 +2047,7 @@ A loading placeholder that mimics the shape of incoming content, reducing percei
|
|
|
2044
2047
|
|
|
2045
2048
|
**Storybook-slug:** slider
|
|
2046
2049
|
**Docs-slug:** slider
|
|
2050
|
+
**Full guidance:** [slider.md](./src/components/ui/core/slider/slider.md)
|
|
2047
2051
|
|
|
2048
2052
|
**Definition**
|
|
2049
2053
|
An interactive control for selecting a single value or a range from a continuous scale. Provides visual feedback and quick approximate value selection.
|
|
@@ -2242,6 +2246,7 @@ Allows users to select a time value through a clock interface.
|
|
|
2242
2246
|
#### Toggle
|
|
2243
2247
|
|
|
2244
2248
|
**Storybook-slug:** toggle
|
|
2249
|
+
**Full guidance:** [toggle.md](./src/components/ui/core/toggle/toggle.md)
|
|
2245
2250
|
|
|
2246
2251
|
**Definition**
|
|
2247
2252
|
A single pressable button with active/inactive state, used to toggle one option or formatting command on or off.
|
|
@@ -2351,6 +2356,7 @@ The single, persistent navigation bar at the top of every authenticated CDF and
|
|
|
2351
2356
|
|
|
2352
2357
|
**Storybook-slug:** tooltip
|
|
2353
2358
|
**Docs-slug:** tooltip
|
|
2359
|
+
**Full guidance:** [tooltip.md](./src/components/ui/core/tooltip/tooltip.md)
|
|
2354
2360
|
|
|
2355
2361
|
**Definition**
|
|
2356
2362
|
A short hint that appears on hover or focus. No heavy interaction inside.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Count, CountUnit, CountValue } from "./count.js";
|
|
3
|
+
export function CountGallery() {
|
|
4
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
5
|
+
className: "flex items-center gap-3",
|
|
6
|
+
children: [
|
|
7
|
+
/*#__PURE__*/ _jsxs(Count, {
|
|
8
|
+
variant: "default",
|
|
9
|
+
children: [
|
|
10
|
+
/*#__PURE__*/ _jsx(CountValue, {
|
|
11
|
+
children: "19"
|
|
12
|
+
}),
|
|
13
|
+
/*#__PURE__*/ _jsx(CountUnit, {
|
|
14
|
+
children: "℃"
|
|
15
|
+
})
|
|
16
|
+
]
|
|
17
|
+
}),
|
|
18
|
+
/*#__PURE__*/ _jsxs(Count, {
|
|
19
|
+
variant: "success",
|
|
20
|
+
children: [
|
|
21
|
+
/*#__PURE__*/ _jsx(CountValue, {
|
|
22
|
+
children: "19"
|
|
23
|
+
}),
|
|
24
|
+
/*#__PURE__*/ _jsx(CountUnit, {
|
|
25
|
+
children: "℃"
|
|
26
|
+
})
|
|
27
|
+
]
|
|
28
|
+
}),
|
|
29
|
+
/*#__PURE__*/ _jsxs(Count, {
|
|
30
|
+
variant: "warning",
|
|
31
|
+
children: [
|
|
32
|
+
/*#__PURE__*/ _jsx(CountValue, {
|
|
33
|
+
children: "19"
|
|
34
|
+
}),
|
|
35
|
+
/*#__PURE__*/ _jsx(CountUnit, {
|
|
36
|
+
children: "℉"
|
|
37
|
+
})
|
|
38
|
+
]
|
|
39
|
+
}),
|
|
40
|
+
/*#__PURE__*/ _jsxs(Count, {
|
|
41
|
+
variant: "critical",
|
|
42
|
+
children: [
|
|
43
|
+
/*#__PURE__*/ _jsx(CountValue, {
|
|
44
|
+
children: "19"
|
|
45
|
+
}),
|
|
46
|
+
/*#__PURE__*/ _jsx(CountUnit, {
|
|
47
|
+
children: "℉"
|
|
48
|
+
})
|
|
49
|
+
]
|
|
50
|
+
})
|
|
51
|
+
]
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=count.gallery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/count/count.gallery.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport { Count, CountUnit, CountValue } from './count';\n\nexport function CountGallery(): ReactElement {\n return (\n <div className=\"flex items-center gap-3\">\n <Count variant=\"default\">\n <CountValue>19</CountValue>\n <CountUnit>℃</CountUnit>\n </Count>\n <Count variant=\"success\">\n <CountValue>19</CountValue>\n <CountUnit>℃</CountUnit>\n </Count>\n <Count variant=\"warning\">\n <CountValue>19</CountValue>\n <CountUnit>℉</CountUnit>\n </Count>\n <Count variant=\"critical\">\n <CountValue>19</CountValue>\n <CountUnit>℉</CountUnit>\n </Count>\n </div>\n );\n}\n"],"names":["Count","CountUnit","CountValue","CountGallery","div","className","variant"],"mappings":";AAEA,SAASA,KAAK,EAAEC,SAAS,EAAEC,UAAU,QAAQ,aAAU;AAEvD,OAAO,SAASC;IACd,qBACE,MAACC;QAAIC,WAAU;;0BACb,MAACL;gBAAMM,SAAQ;;kCACb,KAACJ;kCAAW;;kCACZ,KAACD;kCAAU;;;;0BAEb,MAACD;gBAAMM,SAAQ;;kCACb,KAACJ;kCAAW;;kCACZ,KAACD;kCAAU;;;;0BAEb,MAACD;gBAAMM,SAAQ;;kCACb,KAACJ;kCAAW;;kCACZ,KAACD;kCAAU;;;;0BAEb,MAACD;gBAAMM,SAAQ;;kCACb,KAACJ;kCAAW;;kCACZ,KAACD;kCAAU;;;;;;AAInB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { createContext, forwardRef, useContext,
|
|
2
|
+
import { createContext, forwardRef, useContext, useImperativeHandle, useMemo, useRef } from "react";
|
|
3
3
|
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
|
|
4
4
|
import { IconCheck, IconFilter, IconMinus } from "@tabler/icons-react";
|
|
5
5
|
import { getCoreRowModel, getExpandedRowModel, getFilteredRowModel, getPaginationRowModel, getSortedRowModel, useReactTable } from "@tanstack/react-table";
|
|
@@ -86,7 +86,6 @@ function DataGrid({ data, columns, getRowId, rowCount, globalFilterFn = 'auto',
|
|
|
86
86
|
});
|
|
87
87
|
const isClientSorting = enableSorting && !manualSorting;
|
|
88
88
|
const isClientPagination = hasPagination && !manualPagination;
|
|
89
|
-
useSearchPaginationReset(resolvedSearchValue, hasPagination, setResolvedPagination);
|
|
90
89
|
const columnPinning = useMemo(()=>({
|
|
91
90
|
left: pinnedColumns,
|
|
92
91
|
right: []
|
|
@@ -127,7 +126,6 @@ function DataGrid({ data, columns, getRowId, rowCount, globalFilterFn = 'auto',
|
|
|
127
126
|
// doesn't lose their place. Consumers fetching server-paged data should
|
|
128
127
|
// ensure stable `getRowId` values; otherwise expanded keys can stick to
|
|
129
128
|
// rows that no longer logically exist.
|
|
130
|
-
autoResetPageIndex: false,
|
|
131
129
|
autoResetExpanded: false,
|
|
132
130
|
enableRowSelection,
|
|
133
131
|
// Selecting a parent selects every descendant, including while it is collapsed.
|
|
@@ -487,22 +485,6 @@ function DataGridState({ type, title, description, action }) {
|
|
|
487
485
|
]
|
|
488
486
|
});
|
|
489
487
|
}
|
|
490
|
-
function useSearchPaginationReset(searchValue, hasPagination, setPagination) {
|
|
491
|
-
const previousSearchValueRef = useRef(searchValue);
|
|
492
|
-
useEffect(()=>{
|
|
493
|
-
if (previousSearchValueRef.current === searchValue) return;
|
|
494
|
-
previousSearchValueRef.current = searchValue;
|
|
495
|
-
if (!hasPagination) return;
|
|
496
|
-
setPagination((current)=>current.pageIndex === 0 ? current : {
|
|
497
|
-
...current,
|
|
498
|
-
pageIndex: 0
|
|
499
|
-
});
|
|
500
|
-
}, [
|
|
501
|
-
searchValue,
|
|
502
|
-
hasPagination,
|
|
503
|
-
setPagination
|
|
504
|
-
]);
|
|
505
|
-
}
|
|
506
488
|
const DataGridFilterTrigger = /*#__PURE__*/ forwardRef(function DataGridFilterTrigger({ activeCount = 0, label = 'Filters', activeLabel, placement = 'toolbar', className, children, ...props }, ref) {
|
|
507
489
|
const hasActiveFilters = activeCount > 0;
|
|
508
490
|
return /*#__PURE__*/ _jsx(Button, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/ui/core/data-grid/data-grid.tsx"],"sourcesContent":["import {\n type ComponentProps,\n type ComponentRef,\n type CSSProperties,\n type ForwardRefExoticComponent,\n type ReactElement,\n type ReactNode,\n type Ref,\n type RefAttributes,\n type RefObject,\n createContext,\n forwardRef,\n useContext,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n} from 'react';\n\nimport { Checkbox as CheckboxPrimitive } from '@base-ui/react/checkbox';\nimport { IconCheck, IconFilter, IconMinus } from '@tabler/icons-react';\nimport {\n type CellContext,\n type ColumnDef,\n type ColumnPinningState,\n type ColumnSizingState,\n type ExpandedState,\n type FilterFnOption,\n type PaginationState,\n type Row,\n type RowSelectionState,\n type Table,\n type SortingState,\n getCoreRowModel,\n getExpandedRowModel,\n getFilteredRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n useReactTable,\n} from '@tanstack/react-table';\nimport { useVirtualizer } from '@tanstack/react-virtual';\n\nimport { useControllableState } from '../../../../lib/use-controllable-state';\nimport { cn, focusState } from '../../../../lib/utils';\nimport { Button } from '../button/button';\nimport {\n EmptyState,\n EmptyStateActions,\n EmptyStateDescription,\n EmptyStateIcon,\n EmptyStateTitle,\n} from '../empty-state/empty-state';\nimport type { EmptyStateType } from '../empty-state/empty-state.context';\nimport { Search } from '../search/search';\nimport { Skeleton } from '../skeleton/skeleton';\n\nimport { DataGridCell } from './data-grid-cell';\nimport { DataGridHeaderRow } from './data-grid-header-row';\nimport { DataGridRow } from './data-grid-row';\nimport {\n countSelectedRowIds,\n getDataGridCheckboxState,\n selectDataGridRowTree,\n} from './data-grid-selection-state';\nimport { DataGridSelectionToolbar } from './data-grid-selection-toolbar';\nimport type { DataGridSelectionActions } from './data-grid-selection.types';\nimport { PINNED_COLUMN_Z_INDEX, getTextValue } from './data-grid.utils';\n\nconst EMPTY_PINNED_COLUMNS: string[] = [];\n\nfunction defaultDataGridCell<TData>({\n renderValue,\n}: CellContext<TData, unknown>): ReactNode {\n const text = getTextValue(renderValue());\n if (text === undefined) return null;\n\n return (\n <span className=\"block min-w-0 truncate\" title={text}>\n {text}\n </span>\n );\n}\n\nconst DEFAULT_COLUMN = {\n cell: defaultDataGridCell,\n size: undefined,\n};\n\ntype DataGridContextValue = {\n searchValue: string;\n setSearchValue: (value: string) => void;\n filteredCount?: number;\n totalCount?: number;\n};\n\nconst DataGridContext = createContext<DataGridContextValue | undefined>(\n undefined\n);\n\ntype DataGridSize = 'default' | 'compact';\ntype DataGridQueryMode = 'client' | 'server';\ntype DataGridLoadingVariant = 'skeleton' | 'none';\n\ntype DataGridStateCopyFields = {\n title: string;\n description: string;\n action: ReactNode;\n};\n\ntype AtLeastOne<T, Keys extends keyof T = keyof T> = Keys extends keyof T\n ? Pick<Required<T>, Keys> & Partial<Omit<T, Keys>>\n : never;\n\ntype DataGridStateCopy = AtLeastOne<DataGridStateCopyFields>;\n\ntype DataGridLabels = {\n clearSearch: string;\n clearFilters: string;\n};\n\nconst defaultDataGridLabels: DataGridLabels = {\n clearSearch: 'Clear search',\n clearFilters: 'Clear filters',\n};\n\ntype DataGridLoadingCellContext = {\n rowIndex: number;\n columnId: string;\n columnIndex: number;\n size: DataGridSize;\n};\n\nconst ROW_HEIGHT_MAP: Record<DataGridSize, number> = {\n default: 36,\n compact: 32,\n};\n\nconst HEADER_HEIGHT_MAP: Record<DataGridSize, number> = {\n default: 36,\n compact: 32,\n};\n\ntype DataGridHandle = {\n scrollToRow: (index: number) => void;\n resetSorting: () => void;\n resetSelection: () => void;\n resetSearch: () => void;\n};\n\ntype DataGridBaseProps<TData> = {\n data: TData[];\n columns: ColumnDef<TData>[];\n getRowId?: (originalRow: TData, index: number) => string;\n rowCount?: number;\n globalFilterFn?: FilterFnOption<TData>;\n enableRowSelection?: boolean | ((row: Row<TData>) => boolean);\n enableSorting?: boolean;\n enableColumnResizing?: boolean;\n columnGrow?: boolean;\n columnSizing?: ColumnSizingState;\n defaultColumnSizing?: ColumnSizingState;\n onColumnSizingChange?: (value: ColumnSizingState) => void;\n manualPagination?: boolean;\n manualSorting?: boolean;\n rowSelection?: RowSelectionState;\n defaultRowSelection?: RowSelectionState;\n onRowSelectionChange?: (value: RowSelectionState) => void;\n selectionActions?: DataGridSelectionActions;\n sorting?: SortingState;\n defaultSorting?: SortingState;\n onSortingChange?: (value: SortingState) => void;\n // pageIndex resets to 0 only when the search string changes. Callers reset\n // it when `data` shrinks.\n pagination?: PaginationState;\n defaultPagination?: PaginationState;\n onPaginationChange?: (value: PaginationState) => void;\n getSubRows?: (row: TData, index: number) => TData[] | undefined;\n expanded?: ExpandedState;\n defaultExpanded?: ExpandedState;\n onExpandedChange?: (value: ExpandedState) => void;\n getRowCanExpand?: (row: Row<TData>) => boolean;\n maxDepth?: number;\n pinnedColumns?: string[];\n // forwardRef cannot preserve the `TData` generic, so the imperative handle\n // is exposed via a ref-object prop instead of `forwardRef` + `useImperativeHandle`.\n // See https://github.com/facebook/react/issues/22018.\n gridRef?: RefObject<DataGridHandle | null>;\n size?: DataGridSize;\n children?: ReactNode;\n className?: string;\n onRowClick?: (row: Row<TData>) => void;\n searchValue?: string;\n defaultSearchValue?: string;\n onSearchValueChange?: (value: string) => void;\n queryMode?: DataGridQueryMode;\n loading?: boolean;\n loadingVariant?: DataGridLoadingVariant;\n loadingRowCount?: number;\n renderLoadingCell?: (ctx: DataGridLoadingCellContext) => ReactNode;\n emptyState?: ReactNode | DataGridStateCopy;\n noResultsState?: ReactNode | DataGridStateCopy;\n onClearSearch?: () => void;\n onClearFilters?: () => void;\n labels?: Partial<DataGridLabels>;\n filteredResultCount?: number;\n totalResultCount?: number;\n rowHeight?: number;\n headerHeight?: number;\n};\n\n// The grid renders with `role=\"table\"`, which requires an accessible name for\n// screen readers. It is bad practice to omit one, so the type requires at least\n// one of `aria-label` / `aria-labelledby` rather than leaving both optional.\ntype DataGridAccessibleNameProps =\n | { 'aria-label': string; 'aria-labelledby'?: string }\n | { 'aria-labelledby': string; 'aria-label'?: string };\n\ntype DataGridProps<TData> = DataGridBaseProps<TData> &\n DataGridAccessibleNameProps;\n\nfunction DataGrid<TData>({\n data,\n columns,\n getRowId,\n rowCount,\n globalFilterFn = 'auto',\n enableRowSelection = false,\n enableSorting = false,\n enableColumnResizing = false,\n columnGrow = false,\n columnSizing,\n defaultColumnSizing,\n onColumnSizingChange,\n manualPagination = false,\n manualSorting = false,\n rowSelection,\n defaultRowSelection,\n onRowSelectionChange,\n selectionActions,\n sorting,\n defaultSorting,\n onSortingChange,\n pagination,\n defaultPagination,\n onPaginationChange,\n getSubRows,\n expanded,\n defaultExpanded,\n onExpandedChange,\n getRowCanExpand,\n maxDepth = 5,\n pinnedColumns = EMPTY_PINNED_COLUMNS,\n gridRef,\n size = 'default',\n children,\n className,\n onRowClick,\n searchValue,\n defaultSearchValue,\n onSearchValueChange,\n queryMode = 'client',\n loading = false,\n loadingVariant = 'skeleton',\n loadingRowCount,\n renderLoadingCell,\n emptyState,\n noResultsState,\n filteredResultCount,\n totalResultCount,\n onClearSearch,\n onClearFilters,\n labels: labelOverrides,\n rowHeight,\n headerHeight,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n}: DataGridProps<TData>): ReactElement {\n const scrollContainerRef = useRef<HTMLDivElement>(null);\n const labels = { ...defaultDataGridLabels, ...labelOverrides };\n\n const [resolvedSearchValue, setResolvedSearchValue] = useControllableState({\n prop: searchValue,\n defaultProp: defaultSearchValue ?? '',\n onChange: onSearchValueChange,\n });\n\n const [resolvedSorting, setResolvedSorting] =\n useControllableState<SortingState>({\n prop: sorting,\n defaultProp: defaultSorting ?? [],\n onChange: onSortingChange,\n });\n\n const [resolvedRowSelection, setResolvedRowSelection] =\n useControllableState<RowSelectionState>({\n prop: rowSelection,\n defaultProp: defaultRowSelection ?? {},\n onChange: onRowSelectionChange,\n });\n\n const hasPagination =\n pagination !== undefined || defaultPagination !== undefined;\n\n const [resolvedPagination, setResolvedPagination] =\n useControllableState<PaginationState>({\n prop: pagination,\n defaultProp: defaultPagination ?? { pageIndex: 0, pageSize: 10 },\n onChange: onPaginationChange,\n });\n\n const hasExpanding = getSubRows !== undefined;\n\n const [resolvedExpanded, setResolvedExpanded] =\n useControllableState<ExpandedState>({\n prop: expanded,\n defaultProp: defaultExpanded ?? {},\n onChange: onExpandedChange,\n });\n\n const [resolvedColumnSizing, setResolvedColumnSizing] =\n useControllableState<ColumnSizingState>({\n prop: columnSizing,\n defaultProp: defaultColumnSizing ?? {},\n onChange: onColumnSizingChange,\n });\n\n const isClientSorting = enableSorting && !manualSorting;\n const isClientPagination = hasPagination && !manualPagination;\n\n useSearchPaginationReset(\n resolvedSearchValue,\n hasPagination,\n setResolvedPagination\n );\n\n const columnPinning: ColumnPinningState = useMemo(\n () => ({ left: pinnedColumns, right: [] }),\n [pinnedColumns]\n );\n\n const pinnedColumnIds = useMemo(\n () => new Set(pinnedColumns),\n [pinnedColumns]\n );\n const lastPinnedColumnId = pinnedColumns[pinnedColumns.length - 1];\n // eslint-disable-next-line react-hooks/incompatible-library -- useReactTable in the DataGrid component is intentional and stable.\n const table = useReactTable({\n data,\n columns,\n state: {\n columnPinning,\n globalFilter: resolvedSearchValue,\n sorting: resolvedSorting,\n rowSelection: resolvedRowSelection,\n columnSizing: resolvedColumnSizing,\n ...(hasPagination ? { pagination: resolvedPagination } : {}),\n ...(hasExpanding ? { expanded: resolvedExpanded } : {}),\n },\n onSortingChange: setResolvedSorting,\n onRowSelectionChange: setResolvedRowSelection,\n onColumnSizingChange: setResolvedColumnSizing,\n ...(hasPagination ? { onPaginationChange: setResolvedPagination } : {}),\n ...(hasExpanding ? { onExpandedChange: setResolvedExpanded } : {}),\n // Preserve expanded rows across `data` changes (e.g. refetches) so the user\n // doesn't lose their place. Consumers fetching server-paged data should\n // ensure stable `getRowId` values; otherwise expanded keys can stick to\n // rows that no longer logically exist.\n autoResetPageIndex: false,\n autoResetExpanded: false,\n enableRowSelection,\n // Selecting a parent selects every descendant, including while it is collapsed.\n enableSubRowSelection: true,\n enableSorting,\n enableColumnResizing,\n columnResizeMode: 'onChange',\n defaultColumn: DEFAULT_COLUMN,\n manualPagination,\n manualSorting,\n manualFiltering: queryMode === 'server',\n getCoreRowModel: getCoreRowModel(),\n getFilteredRowModel: getFilteredRowModel(),\n globalFilterFn,\n ...(isClientSorting ? { getSortedRowModel: getSortedRowModel() } : {}),\n ...(isClientPagination\n ? { getPaginationRowModel: getPaginationRowModel() }\n : {}),\n ...(hasExpanding ? { getExpandedRowModel: getExpandedRowModel() } : {}),\n getRowId,\n getSubRows,\n getRowCanExpand,\n });\n\n const { rows } = table.getRowModel();\n const headerGroups = table.getHeaderGroups();\n const visibleColumns = table.getVisibleFlatColumns();\n\n const resolvedRowHeight = rowHeight ?? ROW_HEIGHT_MAP[size];\n const resolvedHeaderHeight = headerHeight ?? HEADER_HEIGHT_MAP[size];\n const resolvedLoadingRowCount = loadingRowCount ?? 6;\n const shouldRenderSkeleton = loading && loadingVariant === 'skeleton';\n const hideRowsForLoading = loading && loadingVariant !== 'none';\n const hasActiveServerSearch =\n queryMode === 'server' && resolvedSearchValue !== '';\n const hasNoRows = !loading && data.length === 0 && !hasActiveServerSearch;\n const hasNoResults =\n !loading &&\n (hasActiveServerSearch\n ? data.length === 0\n : data.length > 0 && table.getFilteredRowModel().rows.length === 0);\n\n const virtualizer = useVirtualizer({\n count: rows.length,\n getScrollElement: () => scrollContainerRef.current,\n estimateSize: () => resolvedRowHeight,\n overscan: 10,\n });\n const bodyHeight = shouldRenderSkeleton\n ? resolvedLoadingRowCount * resolvedRowHeight\n : virtualizer.getTotalSize();\n const bodyStyle: CSSProperties & {\n '--data-grid-body-height': string;\n '--data-grid-body-min-height': string;\n } = {\n '--data-grid-body-height': `${bodyHeight}px`,\n '--data-grid-body-min-height': `${resolvedRowHeight * 4}px`,\n };\n\n useImperativeHandle(gridRef, () => ({\n scrollToRow: (index: number) => virtualizer.scrollToIndex(index),\n resetSorting: () => setResolvedSorting([]),\n resetSelection: () => setResolvedRowSelection({}),\n resetSearch: () => setResolvedSearchValue(''),\n }));\n\n const hasFlexibleColumn =\n !enableColumnResizing &&\n !columnGrow &&\n visibleColumns.some(\n (column) =>\n column.columnDef.size === undefined && !pinnedColumnIds.has(column.id)\n );\n const gridTemplateColumns = visibleColumns\n .map((column, index) => {\n const columnSize = column.getSize();\n if (enableColumnResizing || pinnedColumnIds.has(column.id)) {\n return `${columnSize}px`;\n }\n if (columnGrow) {\n return `minmax(${columnSize}px, ${columnSize}fr)`;\n }\n const isLastColumn = index === visibleColumns.length - 1;\n if (column.columnDef.size !== undefined) {\n if (!hasFlexibleColumn && isLastColumn) {\n return `minmax(${columnSize}px, 1fr)`;\n }\n return `${columnSize}px`;\n }\n return `minmax(${columnSize}px, 1fr)`;\n })\n .join(' ');\n\n const scrollContainerStyle: CSSProperties & {\n '--data-grid-template-columns': string;\n } = {\n '--data-grid-template-columns': gridTemplateColumns,\n };\n\n const isResizingColumn = Boolean(\n table.getState().columnSizingInfo.isResizingColumn\n );\n const clientFilteredCount = table.getFilteredRowModel().rows.length;\n const clientTotalCount = table.getCoreRowModel().rows.length;\n\n const contextValue = useMemo<DataGridContextValue>(\n () => ({\n searchValue: resolvedSearchValue,\n setSearchValue: setResolvedSearchValue,\n filteredCount:\n queryMode === 'client' ? clientFilteredCount : filteredResultCount,\n totalCount: queryMode === 'client' ? clientTotalCount : totalResultCount,\n }),\n [\n resolvedSearchValue,\n setResolvedSearchValue,\n queryMode,\n clientFilteredCount,\n filteredResultCount,\n clientTotalCount,\n totalResultCount,\n ]\n );\n\n const selectedRowCount = countSelectedRowIds(resolvedRowSelection);\n\n return (\n <DataGridContext.Provider value={contextValue}>\n <div\n data-slot=\"data-grid\"\n data-query-mode={queryMode}\n data-filtered-result-count={filteredResultCount}\n data-total-result-count={totalResultCount}\n className={cn(\n 'relative flex min-h-0 w-full flex-col overflow-clip rounded-xl text-sm',\n className\n )}\n >\n {children}\n <div\n ref={scrollContainerRef}\n data-slot=\"data-grid-scroll-container\"\n className=\"relative order-2 min-h-0 w-full flex-1 overflow-auto\"\n style={scrollContainerStyle}\n role=\"table\"\n aria-rowcount={\n hideRowsForLoading\n ? headerGroups.length\n : (rowCount ?? rows.length) + headerGroups.length\n }\n aria-colcount={visibleColumns.length}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n >\n <div\n className={cn(\n 'min-w-fit w-full',\n enableRowSelection !== false && selectedRowCount > 0 && 'pb-24'\n )}\n >\n <div\n role=\"rowgroup\"\n data-slot=\"data-grid-header-group\"\n className=\"contents\"\n >\n {headerGroups.map((headerGroup, headerRowIndex) => (\n <DataGridHeaderRow\n key={headerGroup.id}\n headerGroup={headerGroup}\n headerRowIndex={headerRowIndex}\n resolvedHeaderHeight={resolvedHeaderHeight}\n pinnedColumnIds={pinnedColumnIds}\n lastPinnedColumnId={lastPinnedColumnId}\n isResizingColumn={isResizingColumn}\n />\n ))}\n </div>\n\n <div\n role=\"rowgroup\"\n data-slot=\"data-grid-body\"\n className={cn(\n 'relative min-h-(--data-grid-body-min-height)',\n !hasNoRows && !hasNoResults && 'h-(--data-grid-body-height)'\n )}\n style={bodyStyle}\n >\n {shouldRenderSkeleton &&\n Array.from(\n { length: resolvedLoadingRowCount },\n (_, rowIndex) => (\n <div\n key={`skeleton-row-${rowIndex}`}\n data-slot=\"data-grid-row-loading\"\n aria-hidden=\"true\"\n className=\"absolute left-0 right-0 grid border-b bg-background\"\n style={{\n gridTemplateColumns:\n 'var(--data-grid-template-columns)',\n height: resolvedRowHeight,\n transform: `translateY(${rowIndex * resolvedRowHeight}px)`,\n }}\n >\n {visibleColumns.map((column, colIndex) => {\n const isPinned = pinnedColumnIds.has(column.id);\n const isLastPinned =\n isPinned && lastPinnedColumnId === column.id;\n return (\n <DataGridCell\n key={column.id}\n isPinned={isPinned}\n isLastPinned={isLastPinned}\n colIndex={colIndex + 1}\n style={\n isPinned\n ? {\n position: 'sticky',\n left: column.getStart('left'),\n zIndex: PINNED_COLUMN_Z_INDEX,\n }\n : undefined\n }\n >\n {renderLoadingCell?.({\n rowIndex,\n columnId: column.id,\n columnIndex: colIndex,\n size,\n }) ??\n (column.id === 'select' ? (\n <Skeleton className=\"h-4 w-4 rounded\" />\n ) : (\n <Skeleton\n className={cn(\n 'h-4 max-w-full',\n colIndex === 0 ? 'w-3/4' : 'w-2/3'\n )}\n />\n ))}\n </DataGridCell>\n );\n })}\n </div>\n )\n )}\n\n {!hideRowsForLoading &&\n !hasNoRows &&\n !hasNoResults &&\n virtualizer\n .getVirtualItems()\n .map((virtualRow) => (\n <DataGridRow\n key={rows[virtualRow.index].id}\n row={rows[virtualRow.index]}\n virtualRow={virtualRow}\n headerGroupCount={headerGroups.length}\n pinnedColumnIds={pinnedColumnIds}\n lastPinnedColumnId={lastPinnedColumnId}\n maxDepth={maxDepth}\n hasExpanding={hasExpanding}\n onRowClick={onRowClick}\n />\n ))}\n\n {!loading && hasNoRows && emptyState != null && (\n <div className=\"pt-2\">\n <div className=\"flex items-center justify-center rounded-lg bg-medium-background\">\n {renderDataGridState(emptyState, {\n type: 'new-object',\n title: 'No rows yet',\n description: 'Add data to populate this table.',\n })}\n </div>\n </div>\n )}\n\n {!loading && hasNoResults && (\n <div className=\"pt-2\">\n <div className=\"flex items-center justify-center bg-background\">\n {renderDataGridState(noResultsState, {\n type: 'no-results',\n title: 'No results found',\n description:\n queryMode === 'server'\n ? 'Apply a different query or clear filters.'\n : 'Try a different search term or clear filters.',\n action:\n onClearSearch || onClearFilters ? (\n <div className=\"mt-2 flex items-center justify-center gap-2\">\n {onClearSearch ? (\n <Button\n size=\"sm\"\n variant=\"secondary\"\n onClick={onClearSearch}\n >\n {labels.clearSearch}\n </Button>\n ) : null}\n {onClearFilters ? (\n <Button\n size=\"sm\"\n variant=\"secondary\"\n onClick={onClearFilters}\n >\n {labels.clearFilters}\n </Button>\n ) : null}\n </div>\n ) : undefined,\n })}\n </div>\n </div>\n )}\n </div>\n </div>\n {enableRowSelection !== false ? (\n <DataGridSelectionToolbar\n // The count includes every selected id.\n // That covers parents and their children, rows on other pages, and rows hidden by search.\n selectedCount={selectedRowCount}\n rowSelection={resolvedRowSelection}\n selectionActions={selectionActions}\n onClear={() => setResolvedRowSelection({})}\n />\n ) : null}\n </div>\n </div>\n </DataGridContext.Provider>\n );\n}\n\ntype DataGridCheckboxProps = {\n checked: boolean | 'indeterminate';\n onCheckedChange: (checked: boolean | 'indeterminate') => void;\n disabled?: boolean;\n 'aria-label'?: string;\n};\n\nfunction DataGridCheckbox({\n checked,\n onCheckedChange,\n disabled,\n 'aria-label': checkboxAriaLabel,\n}: DataGridCheckboxProps): ReactElement {\n const isIndeterminate = checked === 'indeterminate';\n const isChecked = checked === true;\n\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n checked={isIndeterminate ? false : isChecked}\n indeterminate={isIndeterminate}\n disabled={disabled}\n onCheckedChange={(next) => onCheckedChange(next)}\n aria-label={checkboxAriaLabel}\n className={cn(\n 'peer relative size-4 shrink-0 rounded-sm border-[1.5px] border-muted-foreground bg-transparent text-foreground-on-primary outline-none transition-colors',\n '[&:is([data-checked],[data-indeterminate]):not([data-disabled])]:border-transparent [&:is([data-checked],[data-indeterminate]):not([data-disabled])]:bg-primary-background',\n 'hover:data-unchecked:not-data-disabled:border-muted-foreground-hover',\n 'data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:border-transparent data-disabled:bg-disabled-background data-disabled:text-disabled-foreground data-disabled:data-unchecked:border-border',\n '[&[data-checked]_[data-slot=checkbox-check]]:block [&[data-indeterminate]_[data-slot=checkbox-dash]]:block',\n focusState\n )}\n >\n <CheckboxPrimitive.Indicator className=\"grid size-full place-content-center text-current transition-none\">\n <IconCheck\n aria-hidden=\"true\"\n data-slot=\"checkbox-check\"\n className=\"hidden size-3\"\n stroke={3}\n />\n <IconMinus\n aria-hidden=\"true\"\n data-slot=\"checkbox-dash\"\n className=\"hidden size-3\"\n stroke={3.5}\n />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n\nfunction DataGridCheckboxHeader<TData>({\n table,\n}: {\n table: Table<TData>;\n}): ReactElement {\n const allSelected = table.getIsAllPageRowsSelected();\n const someSelected = table.getIsSomePageRowsSelected();\n const checked = allSelected ? true : someSelected ? 'indeterminate' : false;\n\n return (\n <DataGridCheckbox\n checked={checked}\n onCheckedChange={() => table.toggleAllPageRowsSelected(!allSelected)}\n aria-label=\"Select all rows\"\n />\n );\n}\n\nfunction DataGridCheckboxCell<TData>({\n row,\n}: {\n row: Row<TData>;\n}): ReactElement {\n return (\n <DataGridCheckbox\n checked={getDataGridCheckboxState(row)}\n disabled={!row.getCanSelect()}\n onCheckedChange={(next) => {\n if (next === true) {\n selectDataGridRowTree(row);\n return;\n }\n row.toggleSelected(false);\n }}\n aria-label=\"Select row\"\n />\n );\n}\n\ntype DataGridSearchProps = Omit<\n ComponentProps<typeof Search>,\n 'value' | 'onChange' | 'onClear'\n>;\n\nconst DataGridSearch: ForwardRefExoticComponent<\n DataGridSearchProps & RefAttributes<ComponentRef<typeof Search>>\n> = forwardRef<ComponentRef<typeof Search>, DataGridSearchProps>(\n function DataGridSearch(\n { className, placeholder = 'Search', ...props },\n ref\n ) {\n const { searchValue, setSearchValue } = useDataGridContext();\n\n return (\n <Search\n ref={ref}\n value={searchValue}\n onChange={(event) => setSearchValue(event.target.value)}\n onClear={() => setSearchValue('')}\n placeholder={placeholder}\n className={cn('py-4', className)}\n {...props}\n />\n );\n }\n);\nDataGridSearch.displayName = 'DataGridSearch';\n\ntype DataGridResultCountBadgeProps = ComponentProps<'span'> & {\n label?: ReactNode;\n};\n\nconst DataGridResultCountBadge: ForwardRefExoticComponent<\n DataGridResultCountBadgeProps & RefAttributes<HTMLSpanElement>\n> = forwardRef<ComponentRef<'span'>, DataGridResultCountBadgeProps>(\n function DataGridResultCountBadge({ label, className, ...props }, ref) {\n const { filteredCount, totalCount } = useDataGridContext();\n\n const content =\n label ??\n (filteredCount === undefined\n ? null\n : totalCount !== undefined\n ? `${filteredCount} of ${totalCount} results`\n : `${filteredCount} results`);\n\n if (content == null) return null;\n\n return (\n <span\n ref={ref}\n data-slot=\"data-grid-result-count-badge\"\n className={cn(\n 'inline-flex h-5 shrink-0 items-center rounded-sm border border-border bg-muted-background px-1.5 text-xs font-medium text-muted-foreground',\n className\n )}\n {...props}\n >\n {content}\n </span>\n );\n }\n);\nDataGridResultCountBadge.displayName = 'DataGridResultCountBadge';\n\nfunction renderDataGridState(\n state: ReactNode | DataGridStateCopy | undefined,\n fallback: { type: EmptyStateType } & Pick<\n DataGridStateCopyFields,\n 'title' | 'description'\n > &\n Partial<Pick<DataGridStateCopyFields, 'action'>>\n): ReactNode {\n if (isDataGridStateCopy(state)) {\n return (\n <DataGridState\n type={fallback.type}\n title={state.title ?? fallback.title}\n description={state.description ?? fallback.description}\n action={state.action !== undefined ? state.action : fallback.action}\n />\n );\n }\n\n if (state !== undefined) return state;\n\n return (\n <DataGridState\n type={fallback.type}\n title={fallback.title}\n description={fallback.description}\n action={fallback.action}\n />\n );\n}\n\nfunction isDataGridStateCopy(value: unknown): value is DataGridStateCopy {\n return (\n typeof value === 'object' &&\n value !== null &&\n !('type' in value) &&\n ('title' in value || 'description' in value || 'action' in value)\n );\n}\n\nfunction DataGridState({\n type,\n title,\n description,\n action,\n}: { type: EmptyStateType } & Pick<\n DataGridStateCopyFields,\n 'title' | 'description'\n> &\n Partial<Pick<DataGridStateCopyFields, 'action'>>): ReactElement {\n return (\n <EmptyState type={type} className=\"p-10\">\n <EmptyStateIcon />\n <EmptyStateTitle as=\"p\">{title}</EmptyStateTitle>\n <EmptyStateDescription>{description}</EmptyStateDescription>\n {action ? <EmptyStateActions>{action}</EmptyStateActions> : null}\n </EmptyState>\n );\n}\nfunction useSearchPaginationReset(\n searchValue: string,\n hasPagination: boolean,\n setPagination: (\n next: PaginationState | ((prev: PaginationState) => PaginationState)\n ) => void\n): void {\n const previousSearchValueRef = useRef(searchValue);\n\n useEffect(() => {\n if (previousSearchValueRef.current === searchValue) return;\n previousSearchValueRef.current = searchValue;\n if (!hasPagination) return;\n setPagination((current) =>\n current.pageIndex === 0 ? current : { ...current, pageIndex: 0 }\n );\n }, [searchValue, hasPagination, setPagination]);\n}\n\ntype DataGridFilterTriggerProps = ComponentProps<typeof Button> & {\n activeCount?: number;\n label?: string;\n activeLabel?: (activeCount: number) => string;\n placement?: 'toolbar' | 'column-header';\n};\n\nconst DataGridFilterTrigger: ForwardRefExoticComponent<\n DataGridFilterTriggerProps & RefAttributes<ComponentRef<typeof Button>>\n> = forwardRef<ComponentRef<typeof Button>, DataGridFilterTriggerProps>(\n function DataGridFilterTrigger(\n {\n activeCount = 0,\n label = 'Filters',\n activeLabel,\n placement = 'toolbar',\n className,\n children,\n ...props\n }: DataGridFilterTriggerProps,\n ref: Ref<ComponentRef<typeof Button>>\n ) {\n const hasActiveFilters = activeCount > 0;\n\n return (\n <Button\n ref={ref}\n data-slot=\"data-grid-filter-trigger\"\n data-placement={placement}\n data-active-count={activeCount}\n size={placement === 'column-header' ? 'icon-sm' : 'icon'}\n variant={hasActiveFilters ? 'secondary' : 'ghost'}\n className={cn('min-w-0', className)}\n aria-label={\n hasActiveFilters\n ? (activeLabel?.(activeCount) ?? `${label}, ${activeCount} active`)\n : label\n }\n {...props}\n >\n {children ?? (\n <IconFilter className=\"size-4 shrink-0\" aria-hidden=\"true\" />\n )}\n </Button>\n );\n }\n);\nDataGridFilterTrigger.displayName = 'DataGridFilterTrigger';\n\nfunction useDataGridContext(): DataGridContextValue {\n const context = useContext(DataGridContext);\n if (!context) {\n throw new Error('useDataGridContext must be used within a DataGrid');\n }\n return context;\n}\nexport {\n DataGrid,\n DataGridCheckboxCell,\n DataGridCheckboxHeader,\n DataGridResultCountBadge,\n DataGridFilterTrigger,\n DataGridSearch,\n useDataGridContext,\n type DataGridContextValue,\n type DataGridHandle,\n type DataGridLabels,\n};\nexport {\n DataGridFilterPanel,\n type DataGridFilterColumn,\n type DataGridFilterPanelLabels,\n} from './data-grid-filter-panel';\nexport {\n DataGridFooter,\n DataGridFooterEnd,\n DataGridFooterStart,\n} from './data-grid-footer';\nexport {\n DataGridHeader,\n DataGridHeaderActions,\n DataGridHeaderEnd,\n DataGridHeaderStart,\n DataGridSubtitle,\n DataGridTitle,\n} from './data-grid-header';\n"],"names":["createContext","forwardRef","useContext","useEffect","useImperativeHandle","useMemo","useRef","Checkbox","CheckboxPrimitive","IconCheck","IconFilter","IconMinus","getCoreRowModel","getExpandedRowModel","getFilteredRowModel","getPaginationRowModel","getSortedRowModel","useReactTable","useVirtualizer","useControllableState","cn","focusState","Button","EmptyState","EmptyStateActions","EmptyStateDescription","EmptyStateIcon","EmptyStateTitle","Search","Skeleton","DataGridCell","DataGridHeaderRow","DataGridRow","countSelectedRowIds","getDataGridCheckboxState","selectDataGridRowTree","DataGridSelectionToolbar","PINNED_COLUMN_Z_INDEX","getTextValue","EMPTY_PINNED_COLUMNS","defaultDataGridCell","renderValue","text","undefined","span","className","title","DEFAULT_COLUMN","cell","size","DataGridContext","defaultDataGridLabels","clearSearch","clearFilters","ROW_HEIGHT_MAP","default","compact","HEADER_HEIGHT_MAP","DataGrid","data","columns","getRowId","rowCount","globalFilterFn","enableRowSelection","enableSorting","enableColumnResizing","columnGrow","columnSizing","defaultColumnSizing","onColumnSizingChange","manualPagination","manualSorting","rowSelection","defaultRowSelection","onRowSelectionChange","selectionActions","sorting","defaultSorting","onSortingChange","pagination","defaultPagination","onPaginationChange","getSubRows","expanded","defaultExpanded","onExpandedChange","getRowCanExpand","maxDepth","pinnedColumns","gridRef","children","onRowClick","searchValue","defaultSearchValue","onSearchValueChange","queryMode","loading","loadingVariant","loadingRowCount","renderLoadingCell","emptyState","noResultsState","filteredResultCount","totalResultCount","onClearSearch","onClearFilters","labels","labelOverrides","rowHeight","headerHeight","ariaLabel","ariaLabelledBy","scrollContainerRef","resolvedSearchValue","setResolvedSearchValue","prop","defaultProp","onChange","resolvedSorting","setResolvedSorting","resolvedRowSelection","setResolvedRowSelection","hasPagination","resolvedPagination","setResolvedPagination","pageIndex","pageSize","hasExpanding","resolvedExpanded","setResolvedExpanded","resolvedColumnSizing","setResolvedColumnSizing","isClientSorting","isClientPagination","useSearchPaginationReset","columnPinning","left","right","pinnedColumnIds","Set","lastPinnedColumnId","length","table","state","globalFilter","autoResetPageIndex","autoResetExpanded","enableSubRowSelection","columnResizeMode","defaultColumn","manualFiltering","rows","getRowModel","headerGroups","getHeaderGroups","visibleColumns","getVisibleFlatColumns","resolvedRowHeight","resolvedHeaderHeight","resolvedLoadingRowCount","shouldRenderSkeleton","hideRowsForLoading","hasActiveServerSearch","hasNoRows","hasNoResults","virtualizer","count","getScrollElement","current","estimateSize","overscan","bodyHeight","getTotalSize","bodyStyle","scrollToRow","index","scrollToIndex","resetSorting","resetSelection","resetSearch","hasFlexibleColumn","some","column","columnDef","has","id","gridTemplateColumns","map","columnSize","getSize","isLastColumn","join","scrollContainerStyle","isResizingColumn","Boolean","getState","columnSizingInfo","clientFilteredCount","clientTotalCount","contextValue","setSearchValue","filteredCount","totalCount","selectedRowCount","Provider","value","div","data-slot","data-query-mode","data-filtered-result-count","data-total-result-count","ref","style","role","aria-rowcount","aria-colcount","aria-label","aria-labelledby","headerGroup","headerRowIndex","Array","from","_","rowIndex","aria-hidden","height","transform","colIndex","isPinned","isLastPinned","position","getStart","zIndex","columnId","columnIndex","getVirtualItems","virtualRow","row","headerGroupCount","renderDataGridState","type","description","action","variant","onClick","selectedCount","onClear","DataGridCheckbox","checked","onCheckedChange","disabled","checkboxAriaLabel","isIndeterminate","isChecked","Root","indeterminate","next","Indicator","stroke","DataGridCheckboxHeader","allSelected","getIsAllPageRowsSelected","someSelected","getIsSomePageRowsSelected","toggleAllPageRowsSelected","DataGridCheckboxCell","getCanSelect","toggleSelected","DataGridSearch","placeholder","props","useDataGridContext","event","target","displayName","DataGridResultCountBadge","label","content","fallback","isDataGridStateCopy","DataGridState","as","setPagination","previousSearchValueRef","DataGridFilterTrigger","activeCount","activeLabel","placement","hasActiveFilters","data-placement","data-active-count","context","Error","DataGridFilterPanel","DataGridFooter","DataGridFooterEnd","DataGridFooterStart","DataGridHeader","DataGridHeaderActions","DataGridHeaderEnd","DataGridHeaderStart","DataGridSubtitle","DataGridTitle"],"mappings":";AAAA,SAUEA,aAAa,EACbC,UAAU,EACVC,UAAU,EACVC,SAAS,EACTC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,QACD,QAAQ;AAEf,SAASC,YAAYC,iBAAiB,QAAQ,0BAA0B;AACxE,SAASC,SAAS,EAAEC,UAAU,EAAEC,SAAS,QAAQ,sBAAsB;AACvE,SAYEC,eAAe,EACfC,mBAAmB,EACnBC,mBAAmB,EACnBC,qBAAqB,EACrBC,iBAAiB,EACjBC,aAAa,QACR,wBAAwB;AAC/B,SAASC,cAAc,QAAQ,0BAA0B;AAEzD,SAASC,oBAAoB,QAAQ,4CAAyC;AAC9E,SAASC,EAAE,EAAEC,UA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C,SACEC,cAAc,EACdC,iBAAiB,EACjBC,mBAAmB,QACd,wBAAqB;AAC5B,SACEC,cAAc,EACdC,qBAAqB,EACrBC,iBAAiB,EACjBC,mBAAmB,EACnBC,gBAAgB,EAChBC,aAAa,QACR,wBAAqB"}
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/data-grid/data-grid.tsx"],"sourcesContent":["import {\n type ComponentProps,\n type ComponentRef,\n type CSSProperties,\n type ForwardRefExoticComponent,\n type ReactElement,\n type ReactNode,\n type Ref,\n type RefAttributes,\n type RefObject,\n createContext,\n forwardRef,\n useContext,\n useImperativeHandle,\n useMemo,\n useRef,\n} from 'react';\n\nimport { Checkbox as CheckboxPrimitive } from '@base-ui/react/checkbox';\nimport { IconCheck, IconFilter, IconMinus } from '@tabler/icons-react';\nimport {\n type CellContext,\n type ColumnDef,\n type ColumnPinningState,\n type ColumnSizingState,\n type ExpandedState,\n type FilterFnOption,\n type PaginationState,\n type Row,\n type RowSelectionState,\n type Table,\n type SortingState,\n getCoreRowModel,\n getExpandedRowModel,\n getFilteredRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n useReactTable,\n} from '@tanstack/react-table';\nimport { useVirtualizer } from '@tanstack/react-virtual';\n\nimport { useControllableState } from '../../../../lib/use-controllable-state';\nimport { cn, focusState } from '../../../../lib/utils';\nimport { Button } from '../button/button';\nimport {\n EmptyState,\n EmptyStateActions,\n EmptyStateDescription,\n EmptyStateIcon,\n EmptyStateTitle,\n} from '../empty-state/empty-state';\nimport type { EmptyStateType } from '../empty-state/empty-state.context';\nimport { Search } from '../search/search';\nimport { Skeleton } from '../skeleton/skeleton';\n\nimport { DataGridCell } from './data-grid-cell';\nimport { DataGridHeaderRow } from './data-grid-header-row';\nimport { DataGridRow } from './data-grid-row';\nimport {\n countSelectedRowIds,\n getDataGridCheckboxState,\n selectDataGridRowTree,\n} from './data-grid-selection-state';\nimport { DataGridSelectionToolbar } from './data-grid-selection-toolbar';\nimport type { DataGridSelectionActions } from './data-grid-selection.types';\nimport { PINNED_COLUMN_Z_INDEX, getTextValue } from './data-grid.utils';\n\nconst EMPTY_PINNED_COLUMNS: string[] = [];\n\nfunction defaultDataGridCell<TData>({\n renderValue,\n}: CellContext<TData, unknown>): ReactNode {\n const text = getTextValue(renderValue());\n if (text === undefined) return null;\n\n return (\n <span className=\"block min-w-0 truncate\" title={text}>\n {text}\n </span>\n );\n}\n\nconst DEFAULT_COLUMN = {\n cell: defaultDataGridCell,\n size: undefined,\n};\n\ntype DataGridContextValue = {\n searchValue: string;\n setSearchValue: (value: string) => void;\n filteredCount?: number;\n totalCount?: number;\n};\n\nconst DataGridContext = createContext<DataGridContextValue | undefined>(\n undefined\n);\n\ntype DataGridSize = 'default' | 'compact';\ntype DataGridQueryMode = 'client' | 'server';\ntype DataGridLoadingVariant = 'skeleton' | 'none';\n\ntype DataGridStateCopyFields = {\n title: string;\n description: string;\n action: ReactNode;\n};\n\ntype AtLeastOne<T, Keys extends keyof T = keyof T> = Keys extends keyof T\n ? Pick<Required<T>, Keys> & Partial<Omit<T, Keys>>\n : never;\n\ntype DataGridStateCopy = AtLeastOne<DataGridStateCopyFields>;\n\ntype DataGridLabels = {\n clearSearch: string;\n clearFilters: string;\n};\n\nconst defaultDataGridLabels: DataGridLabels = {\n clearSearch: 'Clear search',\n clearFilters: 'Clear filters',\n};\n\ntype DataGridLoadingCellContext = {\n rowIndex: number;\n columnId: string;\n columnIndex: number;\n size: DataGridSize;\n};\n\nconst ROW_HEIGHT_MAP: Record<DataGridSize, number> = {\n default: 36,\n compact: 32,\n};\n\nconst HEADER_HEIGHT_MAP: Record<DataGridSize, number> = {\n default: 36,\n compact: 32,\n};\n\ntype DataGridHandle = {\n scrollToRow: (index: number) => void;\n resetSorting: () => void;\n resetSelection: () => void;\n resetSearch: () => void;\n};\n\ntype DataGridBaseProps<TData> = {\n data: TData[];\n columns: ColumnDef<TData>[];\n getRowId?: (originalRow: TData, index: number) => string;\n rowCount?: number;\n globalFilterFn?: FilterFnOption<TData>;\n enableRowSelection?: boolean | ((row: Row<TData>) => boolean);\n enableSorting?: boolean;\n enableColumnResizing?: boolean;\n columnGrow?: boolean;\n columnSizing?: ColumnSizingState;\n defaultColumnSizing?: ColumnSizingState;\n onColumnSizingChange?: (value: ColumnSizingState) => void;\n manualPagination?: boolean;\n manualSorting?: boolean;\n rowSelection?: RowSelectionState;\n defaultRowSelection?: RowSelectionState;\n onRowSelectionChange?: (value: RowSelectionState) => void;\n selectionActions?: DataGridSelectionActions;\n sorting?: SortingState;\n defaultSorting?: SortingState;\n onSortingChange?: (value: SortingState) => void;\n pagination?: PaginationState;\n defaultPagination?: PaginationState;\n onPaginationChange?: (value: PaginationState) => void;\n getSubRows?: (row: TData, index: number) => TData[] | undefined;\n expanded?: ExpandedState;\n defaultExpanded?: ExpandedState;\n onExpandedChange?: (value: ExpandedState) => void;\n getRowCanExpand?: (row: Row<TData>) => boolean;\n maxDepth?: number;\n pinnedColumns?: string[];\n // forwardRef cannot preserve the `TData` generic, so the imperative handle\n // is exposed via a ref-object prop instead of `forwardRef` + `useImperativeHandle`.\n // See https://github.com/facebook/react/issues/22018.\n gridRef?: RefObject<DataGridHandle | null>;\n size?: DataGridSize;\n children?: ReactNode;\n className?: string;\n onRowClick?: (row: Row<TData>) => void;\n searchValue?: string;\n defaultSearchValue?: string;\n onSearchValueChange?: (value: string) => void;\n queryMode?: DataGridQueryMode;\n loading?: boolean;\n loadingVariant?: DataGridLoadingVariant;\n loadingRowCount?: number;\n renderLoadingCell?: (ctx: DataGridLoadingCellContext) => ReactNode;\n emptyState?: ReactNode | DataGridStateCopy;\n noResultsState?: ReactNode | DataGridStateCopy;\n onClearSearch?: () => void;\n onClearFilters?: () => void;\n labels?: Partial<DataGridLabels>;\n filteredResultCount?: number;\n totalResultCount?: number;\n rowHeight?: number;\n headerHeight?: number;\n};\n\n// The grid renders with `role=\"table\"`, which requires an accessible name for\n// screen readers. It is bad practice to omit one, so the type requires at least\n// one of `aria-label` / `aria-labelledby` rather than leaving both optional.\ntype DataGridAccessibleNameProps =\n | { 'aria-label': string; 'aria-labelledby'?: string }\n | { 'aria-labelledby': string; 'aria-label'?: string };\n\ntype DataGridProps<TData> = DataGridBaseProps<TData> &\n DataGridAccessibleNameProps;\n\nfunction DataGrid<TData>({\n data,\n columns,\n getRowId,\n rowCount,\n globalFilterFn = 'auto',\n enableRowSelection = false,\n enableSorting = false,\n enableColumnResizing = false,\n columnGrow = false,\n columnSizing,\n defaultColumnSizing,\n onColumnSizingChange,\n manualPagination = false,\n manualSorting = false,\n rowSelection,\n defaultRowSelection,\n onRowSelectionChange,\n selectionActions,\n sorting,\n defaultSorting,\n onSortingChange,\n pagination,\n defaultPagination,\n onPaginationChange,\n getSubRows,\n expanded,\n defaultExpanded,\n onExpandedChange,\n getRowCanExpand,\n maxDepth = 5,\n pinnedColumns = EMPTY_PINNED_COLUMNS,\n gridRef,\n size = 'default',\n children,\n className,\n onRowClick,\n searchValue,\n defaultSearchValue,\n onSearchValueChange,\n queryMode = 'client',\n loading = false,\n loadingVariant = 'skeleton',\n loadingRowCount,\n renderLoadingCell,\n emptyState,\n noResultsState,\n filteredResultCount,\n totalResultCount,\n onClearSearch,\n onClearFilters,\n labels: labelOverrides,\n rowHeight,\n headerHeight,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledBy,\n}: DataGridProps<TData>): ReactElement {\n const scrollContainerRef = useRef<HTMLDivElement>(null);\n const labels = { ...defaultDataGridLabels, ...labelOverrides };\n\n const [resolvedSearchValue, setResolvedSearchValue] = useControllableState({\n prop: searchValue,\n defaultProp: defaultSearchValue ?? '',\n onChange: onSearchValueChange,\n });\n\n const [resolvedSorting, setResolvedSorting] =\n useControllableState<SortingState>({\n prop: sorting,\n defaultProp: defaultSorting ?? [],\n onChange: onSortingChange,\n });\n\n const [resolvedRowSelection, setResolvedRowSelection] =\n useControllableState<RowSelectionState>({\n prop: rowSelection,\n defaultProp: defaultRowSelection ?? {},\n onChange: onRowSelectionChange,\n });\n\n const hasPagination =\n pagination !== undefined || defaultPagination !== undefined;\n\n const [resolvedPagination, setResolvedPagination] =\n useControllableState<PaginationState>({\n prop: pagination,\n defaultProp: defaultPagination ?? { pageIndex: 0, pageSize: 10 },\n onChange: onPaginationChange,\n });\n\n const hasExpanding = getSubRows !== undefined;\n\n const [resolvedExpanded, setResolvedExpanded] =\n useControllableState<ExpandedState>({\n prop: expanded,\n defaultProp: defaultExpanded ?? {},\n onChange: onExpandedChange,\n });\n\n const [resolvedColumnSizing, setResolvedColumnSizing] =\n useControllableState<ColumnSizingState>({\n prop: columnSizing,\n defaultProp: defaultColumnSizing ?? {},\n onChange: onColumnSizingChange,\n });\n\n const isClientSorting = enableSorting && !manualSorting;\n const isClientPagination = hasPagination && !manualPagination;\n\n const columnPinning: ColumnPinningState = useMemo(\n () => ({ left: pinnedColumns, right: [] }),\n [pinnedColumns]\n );\n\n const pinnedColumnIds = useMemo(\n () => new Set(pinnedColumns),\n [pinnedColumns]\n );\n const lastPinnedColumnId = pinnedColumns[pinnedColumns.length - 1];\n // eslint-disable-next-line react-hooks/incompatible-library -- useReactTable in the DataGrid component is intentional and stable.\n const table = useReactTable({\n data,\n columns,\n state: {\n columnPinning,\n globalFilter: resolvedSearchValue,\n sorting: resolvedSorting,\n rowSelection: resolvedRowSelection,\n columnSizing: resolvedColumnSizing,\n ...(hasPagination ? { pagination: resolvedPagination } : {}),\n ...(hasExpanding ? { expanded: resolvedExpanded } : {}),\n },\n onSortingChange: setResolvedSorting,\n onRowSelectionChange: setResolvedRowSelection,\n onColumnSizingChange: setResolvedColumnSizing,\n ...(hasPagination ? { onPaginationChange: setResolvedPagination } : {}),\n ...(hasExpanding ? { onExpandedChange: setResolvedExpanded } : {}),\n // Preserve expanded rows across `data` changes (e.g. refetches) so the user\n // doesn't lose their place. Consumers fetching server-paged data should\n // ensure stable `getRowId` values; otherwise expanded keys can stick to\n // rows that no longer logically exist.\n autoResetExpanded: false,\n enableRowSelection,\n // Selecting a parent selects every descendant, including while it is collapsed.\n enableSubRowSelection: true,\n enableSorting,\n enableColumnResizing,\n columnResizeMode: 'onChange',\n defaultColumn: DEFAULT_COLUMN,\n manualPagination,\n manualSorting,\n manualFiltering: queryMode === 'server',\n getCoreRowModel: getCoreRowModel(),\n getFilteredRowModel: getFilteredRowModel(),\n globalFilterFn,\n ...(isClientSorting ? { getSortedRowModel: getSortedRowModel() } : {}),\n ...(isClientPagination\n ? { getPaginationRowModel: getPaginationRowModel() }\n : {}),\n ...(hasExpanding ? { getExpandedRowModel: getExpandedRowModel() } : {}),\n getRowId,\n getSubRows,\n getRowCanExpand,\n });\n\n const { rows } = table.getRowModel();\n const headerGroups = table.getHeaderGroups();\n const visibleColumns = table.getVisibleFlatColumns();\n\n const resolvedRowHeight = rowHeight ?? ROW_HEIGHT_MAP[size];\n const resolvedHeaderHeight = headerHeight ?? HEADER_HEIGHT_MAP[size];\n const resolvedLoadingRowCount = loadingRowCount ?? 6;\n const shouldRenderSkeleton = loading && loadingVariant === 'skeleton';\n const hideRowsForLoading = loading && loadingVariant !== 'none';\n const hasActiveServerSearch =\n queryMode === 'server' && resolvedSearchValue !== '';\n const hasNoRows = !loading && data.length === 0 && !hasActiveServerSearch;\n const hasNoResults =\n !loading &&\n (hasActiveServerSearch\n ? data.length === 0\n : data.length > 0 && table.getFilteredRowModel().rows.length === 0);\n\n const virtualizer = useVirtualizer({\n count: rows.length,\n getScrollElement: () => scrollContainerRef.current,\n estimateSize: () => resolvedRowHeight,\n overscan: 10,\n });\n const bodyHeight = shouldRenderSkeleton\n ? resolvedLoadingRowCount * resolvedRowHeight\n : virtualizer.getTotalSize();\n const bodyStyle: CSSProperties & {\n '--data-grid-body-height': string;\n '--data-grid-body-min-height': string;\n } = {\n '--data-grid-body-height': `${bodyHeight}px`,\n '--data-grid-body-min-height': `${resolvedRowHeight * 4}px`,\n };\n\n useImperativeHandle(gridRef, () => ({\n scrollToRow: (index: number) => virtualizer.scrollToIndex(index),\n resetSorting: () => setResolvedSorting([]),\n resetSelection: () => setResolvedRowSelection({}),\n resetSearch: () => setResolvedSearchValue(''),\n }));\n\n const hasFlexibleColumn =\n !enableColumnResizing &&\n !columnGrow &&\n visibleColumns.some(\n (column) =>\n column.columnDef.size === undefined && !pinnedColumnIds.has(column.id)\n );\n const gridTemplateColumns = visibleColumns\n .map((column, index) => {\n const columnSize = column.getSize();\n if (enableColumnResizing || pinnedColumnIds.has(column.id)) {\n return `${columnSize}px`;\n }\n if (columnGrow) {\n return `minmax(${columnSize}px, ${columnSize}fr)`;\n }\n const isLastColumn = index === visibleColumns.length - 1;\n if (column.columnDef.size !== undefined) {\n if (!hasFlexibleColumn && isLastColumn) {\n return `minmax(${columnSize}px, 1fr)`;\n }\n return `${columnSize}px`;\n }\n return `minmax(${columnSize}px, 1fr)`;\n })\n .join(' ');\n\n const scrollContainerStyle: CSSProperties & {\n '--data-grid-template-columns': string;\n } = {\n '--data-grid-template-columns': gridTemplateColumns,\n };\n\n const isResizingColumn = Boolean(\n table.getState().columnSizingInfo.isResizingColumn\n );\n const clientFilteredCount = table.getFilteredRowModel().rows.length;\n const clientTotalCount = table.getCoreRowModel().rows.length;\n\n const contextValue = useMemo<DataGridContextValue>(\n () => ({\n searchValue: resolvedSearchValue,\n setSearchValue: setResolvedSearchValue,\n filteredCount:\n queryMode === 'client' ? clientFilteredCount : filteredResultCount,\n totalCount: queryMode === 'client' ? clientTotalCount : totalResultCount,\n }),\n [\n resolvedSearchValue,\n setResolvedSearchValue,\n queryMode,\n clientFilteredCount,\n filteredResultCount,\n clientTotalCount,\n totalResultCount,\n ]\n );\n\n const selectedRowCount = countSelectedRowIds(resolvedRowSelection);\n\n return (\n <DataGridContext.Provider value={contextValue}>\n <div\n data-slot=\"data-grid\"\n data-query-mode={queryMode}\n data-filtered-result-count={filteredResultCount}\n data-total-result-count={totalResultCount}\n className={cn(\n 'relative flex min-h-0 w-full flex-col overflow-clip rounded-xl text-sm',\n className\n )}\n >\n {children}\n <div\n ref={scrollContainerRef}\n data-slot=\"data-grid-scroll-container\"\n className=\"relative order-2 min-h-0 w-full flex-1 overflow-auto\"\n style={scrollContainerStyle}\n role=\"table\"\n aria-rowcount={\n hideRowsForLoading\n ? headerGroups.length\n : (rowCount ?? rows.length) + headerGroups.length\n }\n aria-colcount={visibleColumns.length}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n >\n <div\n className={cn(\n 'min-w-fit w-full',\n enableRowSelection !== false && selectedRowCount > 0 && 'pb-24'\n )}\n >\n <div\n role=\"rowgroup\"\n data-slot=\"data-grid-header-group\"\n className=\"contents\"\n >\n {headerGroups.map((headerGroup, headerRowIndex) => (\n <DataGridHeaderRow\n key={headerGroup.id}\n headerGroup={headerGroup}\n headerRowIndex={headerRowIndex}\n resolvedHeaderHeight={resolvedHeaderHeight}\n pinnedColumnIds={pinnedColumnIds}\n lastPinnedColumnId={lastPinnedColumnId}\n isResizingColumn={isResizingColumn}\n />\n ))}\n </div>\n\n <div\n role=\"rowgroup\"\n data-slot=\"data-grid-body\"\n className={cn(\n 'relative min-h-(--data-grid-body-min-height)',\n !hasNoRows && !hasNoResults && 'h-(--data-grid-body-height)'\n )}\n style={bodyStyle}\n >\n {shouldRenderSkeleton &&\n Array.from(\n { length: resolvedLoadingRowCount },\n (_, rowIndex) => (\n <div\n key={`skeleton-row-${rowIndex}`}\n data-slot=\"data-grid-row-loading\"\n aria-hidden=\"true\"\n className=\"absolute left-0 right-0 grid border-b bg-background\"\n style={{\n gridTemplateColumns:\n 'var(--data-grid-template-columns)',\n height: resolvedRowHeight,\n transform: `translateY(${rowIndex * resolvedRowHeight}px)`,\n }}\n >\n {visibleColumns.map((column, colIndex) => {\n const isPinned = pinnedColumnIds.has(column.id);\n const isLastPinned =\n isPinned && lastPinnedColumnId === column.id;\n return (\n <DataGridCell\n key={column.id}\n isPinned={isPinned}\n isLastPinned={isLastPinned}\n colIndex={colIndex + 1}\n style={\n isPinned\n ? {\n position: 'sticky',\n left: column.getStart('left'),\n zIndex: PINNED_COLUMN_Z_INDEX,\n }\n : undefined\n }\n >\n {renderLoadingCell?.({\n rowIndex,\n columnId: column.id,\n columnIndex: colIndex,\n size,\n }) ??\n (column.id === 'select' ? (\n <Skeleton className=\"h-4 w-4 rounded\" />\n ) : (\n <Skeleton\n className={cn(\n 'h-4 max-w-full',\n colIndex === 0 ? 'w-3/4' : 'w-2/3'\n )}\n />\n ))}\n </DataGridCell>\n );\n })}\n </div>\n )\n )}\n\n {!hideRowsForLoading &&\n !hasNoRows &&\n !hasNoResults &&\n virtualizer\n .getVirtualItems()\n .map((virtualRow) => (\n <DataGridRow\n key={rows[virtualRow.index].id}\n row={rows[virtualRow.index]}\n virtualRow={virtualRow}\n headerGroupCount={headerGroups.length}\n pinnedColumnIds={pinnedColumnIds}\n lastPinnedColumnId={lastPinnedColumnId}\n maxDepth={maxDepth}\n hasExpanding={hasExpanding}\n onRowClick={onRowClick}\n />\n ))}\n\n {!loading && hasNoRows && emptyState != null && (\n <div className=\"pt-2\">\n <div className=\"flex items-center justify-center rounded-lg bg-medium-background\">\n {renderDataGridState(emptyState, {\n type: 'new-object',\n title: 'No rows yet',\n description: 'Add data to populate this table.',\n })}\n </div>\n </div>\n )}\n\n {!loading && hasNoResults && (\n <div className=\"pt-2\">\n <div className=\"flex items-center justify-center bg-background\">\n {renderDataGridState(noResultsState, {\n type: 'no-results',\n title: 'No results found',\n description:\n queryMode === 'server'\n ? 'Apply a different query or clear filters.'\n : 'Try a different search term or clear filters.',\n action:\n onClearSearch || onClearFilters ? (\n <div className=\"mt-2 flex items-center justify-center gap-2\">\n {onClearSearch ? (\n <Button\n size=\"sm\"\n variant=\"secondary\"\n onClick={onClearSearch}\n >\n {labels.clearSearch}\n </Button>\n ) : null}\n {onClearFilters ? (\n <Button\n size=\"sm\"\n variant=\"secondary\"\n onClick={onClearFilters}\n >\n {labels.clearFilters}\n </Button>\n ) : null}\n </div>\n ) : undefined,\n })}\n </div>\n </div>\n )}\n </div>\n </div>\n {enableRowSelection !== false ? (\n <DataGridSelectionToolbar\n // The count includes every selected id.\n // That covers parents and their children, rows on other pages, and rows hidden by search.\n selectedCount={selectedRowCount}\n rowSelection={resolvedRowSelection}\n selectionActions={selectionActions}\n onClear={() => setResolvedRowSelection({})}\n />\n ) : null}\n </div>\n </div>\n </DataGridContext.Provider>\n );\n}\n\ntype DataGridCheckboxProps = {\n checked: boolean | 'indeterminate';\n onCheckedChange: (checked: boolean | 'indeterminate') => void;\n disabled?: boolean;\n 'aria-label'?: string;\n};\n\nfunction DataGridCheckbox({\n checked,\n onCheckedChange,\n disabled,\n 'aria-label': checkboxAriaLabel,\n}: DataGridCheckboxProps): ReactElement {\n const isIndeterminate = checked === 'indeterminate';\n const isChecked = checked === true;\n\n return (\n <CheckboxPrimitive.Root\n data-slot=\"checkbox\"\n checked={isIndeterminate ? false : isChecked}\n indeterminate={isIndeterminate}\n disabled={disabled}\n onCheckedChange={(next) => onCheckedChange(next)}\n aria-label={checkboxAriaLabel}\n className={cn(\n 'peer relative size-4 shrink-0 rounded-sm border-[1.5px] border-muted-foreground bg-transparent text-foreground-on-primary outline-none transition-colors',\n '[&:is([data-checked],[data-indeterminate]):not([data-disabled])]:border-transparent [&:is([data-checked],[data-indeterminate]):not([data-disabled])]:bg-primary-background',\n 'hover:data-unchecked:not-data-disabled:border-muted-foreground-hover',\n 'data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:border-transparent data-disabled:bg-disabled-background data-disabled:text-disabled-foreground data-disabled:data-unchecked:border-border',\n '[&[data-checked]_[data-slot=checkbox-check]]:block [&[data-indeterminate]_[data-slot=checkbox-dash]]:block',\n focusState\n )}\n >\n <CheckboxPrimitive.Indicator className=\"grid size-full place-content-center text-current transition-none\">\n <IconCheck\n aria-hidden=\"true\"\n data-slot=\"checkbox-check\"\n className=\"hidden size-3\"\n stroke={3}\n />\n <IconMinus\n aria-hidden=\"true\"\n data-slot=\"checkbox-dash\"\n className=\"hidden size-3\"\n stroke={3.5}\n />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n );\n}\n\nfunction DataGridCheckboxHeader<TData>({\n table,\n}: {\n table: Table<TData>;\n}): ReactElement {\n const allSelected = table.getIsAllPageRowsSelected();\n const someSelected = table.getIsSomePageRowsSelected();\n const checked = allSelected ? true : someSelected ? 'indeterminate' : false;\n\n return (\n <DataGridCheckbox\n checked={checked}\n onCheckedChange={() => table.toggleAllPageRowsSelected(!allSelected)}\n aria-label=\"Select all rows\"\n />\n );\n}\n\nfunction DataGridCheckboxCell<TData>({\n row,\n}: {\n row: Row<TData>;\n}): ReactElement {\n return (\n <DataGridCheckbox\n checked={getDataGridCheckboxState(row)}\n disabled={!row.getCanSelect()}\n onCheckedChange={(next) => {\n if (next === true) {\n selectDataGridRowTree(row);\n return;\n }\n row.toggleSelected(false);\n }}\n aria-label=\"Select row\"\n />\n );\n}\n\ntype DataGridSearchProps = Omit<\n ComponentProps<typeof Search>,\n 'value' | 'onChange' | 'onClear'\n>;\n\nconst DataGridSearch: ForwardRefExoticComponent<\n DataGridSearchProps & RefAttributes<ComponentRef<typeof Search>>\n> = forwardRef<ComponentRef<typeof Search>, DataGridSearchProps>(\n function DataGridSearch(\n { className, placeholder = 'Search', ...props },\n ref\n ) {\n const { searchValue, setSearchValue } = useDataGridContext();\n\n return (\n <Search\n ref={ref}\n value={searchValue}\n onChange={(event) => setSearchValue(event.target.value)}\n onClear={() => setSearchValue('')}\n placeholder={placeholder}\n className={cn('py-4', className)}\n {...props}\n />\n );\n }\n);\nDataGridSearch.displayName = 'DataGridSearch';\n\ntype DataGridResultCountBadgeProps = ComponentProps<'span'> & {\n label?: ReactNode;\n};\n\nconst DataGridResultCountBadge: ForwardRefExoticComponent<\n DataGridResultCountBadgeProps & RefAttributes<HTMLSpanElement>\n> = forwardRef<ComponentRef<'span'>, DataGridResultCountBadgeProps>(\n function DataGridResultCountBadge({ label, className, ...props }, ref) {\n const { filteredCount, totalCount } = useDataGridContext();\n\n const content =\n label ??\n (filteredCount === undefined\n ? null\n : totalCount !== undefined\n ? `${filteredCount} of ${totalCount} results`\n : `${filteredCount} results`);\n\n if (content == null) return null;\n\n return (\n <span\n ref={ref}\n data-slot=\"data-grid-result-count-badge\"\n className={cn(\n 'inline-flex h-5 shrink-0 items-center rounded-sm border border-border bg-muted-background px-1.5 text-xs font-medium text-muted-foreground',\n className\n )}\n {...props}\n >\n {content}\n </span>\n );\n }\n);\nDataGridResultCountBadge.displayName = 'DataGridResultCountBadge';\n\nfunction renderDataGridState(\n state: ReactNode | DataGridStateCopy | undefined,\n fallback: { type: EmptyStateType } & Pick<\n DataGridStateCopyFields,\n 'title' | 'description'\n > &\n Partial<Pick<DataGridStateCopyFields, 'action'>>\n): ReactNode {\n if (isDataGridStateCopy(state)) {\n return (\n <DataGridState\n type={fallback.type}\n title={state.title ?? fallback.title}\n description={state.description ?? fallback.description}\n action={state.action !== undefined ? state.action : fallback.action}\n />\n );\n }\n\n if (state !== undefined) return state;\n\n return (\n <DataGridState\n type={fallback.type}\n title={fallback.title}\n description={fallback.description}\n action={fallback.action}\n />\n );\n}\n\nfunction isDataGridStateCopy(value: unknown): value is DataGridStateCopy {\n return (\n typeof value === 'object' &&\n value !== null &&\n !('type' in value) &&\n ('title' in value || 'description' in value || 'action' in value)\n );\n}\n\nfunction DataGridState({\n type,\n title,\n description,\n action,\n}: { type: EmptyStateType } & Pick<\n DataGridStateCopyFields,\n 'title' | 'description'\n> &\n Partial<Pick<DataGridStateCopyFields, 'action'>>): ReactElement {\n return (\n <EmptyState type={type} className=\"p-10\">\n <EmptyStateIcon />\n <EmptyStateTitle as=\"p\">{title}</EmptyStateTitle>\n <EmptyStateDescription>{description}</EmptyStateDescription>\n {action ? <EmptyStateActions>{action}</EmptyStateActions> : null}\n </EmptyState>\n );\n}\n\ntype DataGridFilterTriggerProps = ComponentProps<typeof Button> & {\n activeCount?: number;\n label?: string;\n activeLabel?: (activeCount: number) => string;\n placement?: 'toolbar' | 'column-header';\n};\n\nconst DataGridFilterTrigger: ForwardRefExoticComponent<\n DataGridFilterTriggerProps & RefAttributes<ComponentRef<typeof Button>>\n> = forwardRef<ComponentRef<typeof Button>, DataGridFilterTriggerProps>(\n function DataGridFilterTrigger(\n {\n activeCount = 0,\n label = 'Filters',\n activeLabel,\n placement = 'toolbar',\n className,\n children,\n ...props\n }: DataGridFilterTriggerProps,\n ref: Ref<ComponentRef<typeof Button>>\n ) {\n const hasActiveFilters = activeCount > 0;\n\n return (\n <Button\n ref={ref}\n data-slot=\"data-grid-filter-trigger\"\n data-placement={placement}\n data-active-count={activeCount}\n size={placement === 'column-header' ? 'icon-sm' : 'icon'}\n variant={hasActiveFilters ? 'secondary' : 'ghost'}\n className={cn('min-w-0', className)}\n aria-label={\n hasActiveFilters\n ? (activeLabel?.(activeCount) ?? `${label}, ${activeCount} active`)\n : label\n }\n {...props}\n >\n {children ?? (\n <IconFilter className=\"size-4 shrink-0\" aria-hidden=\"true\" />\n )}\n </Button>\n );\n }\n);\nDataGridFilterTrigger.displayName = 'DataGridFilterTrigger';\n\nfunction useDataGridContext(): DataGridContextValue {\n const context = useContext(DataGridContext);\n if (!context) {\n throw new Error('useDataGridContext must be used within a DataGrid');\n }\n return context;\n}\nexport {\n DataGrid,\n DataGridCheckboxCell,\n DataGridCheckboxHeader,\n DataGridResultCountBadge,\n DataGridFilterTrigger,\n DataGridSearch,\n useDataGridContext,\n type DataGridContextValue,\n type DataGridHandle,\n type DataGridLabels,\n};\nexport {\n DataGridFilterPanel,\n type DataGridFilterColumn,\n type DataGridFilterPanelLabels,\n} from './data-grid-filter-panel';\nexport {\n DataGridFooter,\n DataGridFooterEnd,\n DataGridFooterStart,\n} from './data-grid-footer';\nexport {\n DataGridHeader,\n DataGridHeaderActions,\n DataGridHeaderEnd,\n DataGridHeaderStart,\n DataGridSubtitle,\n DataGridTitle,\n} from './data-grid-header';\n"],"names":["createContext","forwardRef","useContext","useImperativeHandle","useMemo","useRef","Checkbox","CheckboxPrimitive","IconCheck","IconFilter","IconMinus","getCoreRowModel","getExpandedRowModel","getFilteredRowModel","getPaginationRowModel","getSortedRowModel","useReactTable","useVirtualizer","useControllableState","cn","focusState","Button","EmptyState","EmptyStateActions","EmptyStateDescription","EmptyStateIcon","EmptyStateTitle","Search","Skeleton","DataGridCell","DataGridHeaderRow","DataGridRow","countSelectedRowIds","getDataGridCheckboxState","selectDataGridRowTree","DataGridSelectionToolbar","PINNED_COLUMN_Z_INDEX","getTextValue","EMPTY_PINNED_COLUMNS","defaultDataGridCell","renderValue","text","undefined","span","className","title","DEFAULT_COLUMN","cell","size","DataGridContext","defaultDataGridLabels","clearSearch","clearFilters","ROW_HEIGHT_MAP","default","compact","HEADER_HEIGHT_MAP","DataGrid","data","columns","getRowId","rowCount","globalFilterFn","enableRowSelection","enableSorting","enableColumnResizing","columnGrow","columnSizing","defaultColumnSizing","onColumnSizingChange","manualPagination","manualSorting","rowSelection","defaultRowSelection","onRowSelectionChange","selectionActions","sorting","defaultSorting","onSortingChange","pagination","defaultPagination","onPaginationChange","getSubRows","expanded","defaultExpanded","onExpandedChange","getRowCanExpand","maxDepth","pinnedColumns","gridRef","children","onRowClick","searchValue","defaultSearchValue","onSearchValueChange","queryMode","loading","loadingVariant","loadingRowCount","renderLoadingCell","emptyState","noResultsState","filteredResultCount","totalResultCount","onClearSearch","onClearFilters","labels","labelOverrides","rowHeight","headerHeight","ariaLabel","ariaLabelledBy","scrollContainerRef","resolvedSearchValue","setResolvedSearchValue","prop","defaultProp","onChange","resolvedSorting","setResolvedSorting","resolvedRowSelection","setResolvedRowSelection","hasPagination","resolvedPagination","setResolvedPagination","pageIndex","pageSize","hasExpanding","resolvedExpanded","setResolvedExpanded","resolvedColumnSizing","setResolvedColumnSizing","isClientSorting","isClientPagination","columnPinning","left","right","pinnedColumnIds","Set","lastPinnedColumnId","length","table","state","globalFilter","autoResetExpanded","enableSubRowSelection","columnResizeMode","defaultColumn","manualFiltering","rows","getRowModel","headerGroups","getHeaderGroups","visibleColumns","getVisibleFlatColumns","resolvedRowHeight","resolvedHeaderHeight","resolvedLoadingRowCount","shouldRenderSkeleton","hideRowsForLoading","hasActiveServerSearch","hasNoRows","hasNoResults","virtualizer","count","getScrollElement","current","estimateSize","overscan","bodyHeight","getTotalSize","bodyStyle","scrollToRow","index","scrollToIndex","resetSorting","resetSelection","resetSearch","hasFlexibleColumn","some","column","columnDef","has","id","gridTemplateColumns","map","columnSize","getSize","isLastColumn","join","scrollContainerStyle","isResizingColumn","Boolean","getState","columnSizingInfo","clientFilteredCount","clientTotalCount","contextValue","setSearchValue","filteredCount","totalCount","selectedRowCount","Provider","value","div","data-slot","data-query-mode","data-filtered-result-count","data-total-result-count","ref","style","role","aria-rowcount","aria-colcount","aria-label","aria-labelledby","headerGroup","headerRowIndex","Array","from","_","rowIndex","aria-hidden","height","transform","colIndex","isPinned","isLastPinned","position","getStart","zIndex","columnId","columnIndex","getVirtualItems","virtualRow","row","headerGroupCount","renderDataGridState","type","description","action","variant","onClick","selectedCount","onClear","DataGridCheckbox","checked","onCheckedChange","disabled","checkboxAriaLabel","isIndeterminate","isChecked","Root","indeterminate","next","Indicator","stroke","DataGridCheckboxHeader","allSelected","getIsAllPageRowsSelected","someSelected","getIsSomePageRowsSelected","toggleAllPageRowsSelected","DataGridCheckboxCell","getCanSelect","toggleSelected","DataGridSearch","placeholder","props","useDataGridContext","event","target","displayName","DataGridResultCountBadge","label","content","fallback","isDataGridStateCopy","DataGridState","as","DataGridFilterTrigger","activeCount","activeLabel","placement","hasActiveFilters","data-placement","data-active-count","context","Error","DataGridFilterPanel","DataGridFooter","DataGridFooterEnd","DataGridFooterStart","DataGridHeader","DataGridHeaderActions","DataGridHeaderEnd","DataGridHeaderStart","DataGridSubtitle","DataGridTitle"],"mappings":";AAAA,SAUEA,aAAa,EACbC,UAAU,EACVC,UAAU,EACVC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,QACD,QAAQ;AAEf,SAASC,YAAYC,iBAAiB,QA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C,gBAAgB,EAChBC,aAAa,QACR,wBAAqB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Separator } from "./separator.js";
|
|
3
|
+
export function SeparatorGallery() {
|
|
4
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
5
|
+
className: "space-y-8",
|
|
6
|
+
children: [
|
|
7
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
8
|
+
children: [
|
|
9
|
+
/*#__PURE__*/ _jsx("h3", {
|
|
10
|
+
className: "text-sm font-medium mb-4",
|
|
11
|
+
children: "Horizontal"
|
|
12
|
+
}),
|
|
13
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
14
|
+
className: "w-75 space-y-4",
|
|
15
|
+
children: [
|
|
16
|
+
/*#__PURE__*/ _jsx("p", {
|
|
17
|
+
className: "text-sm",
|
|
18
|
+
children: "Content above"
|
|
19
|
+
}),
|
|
20
|
+
/*#__PURE__*/ _jsx(Separator, {
|
|
21
|
+
orientation: "horizontal"
|
|
22
|
+
}),
|
|
23
|
+
/*#__PURE__*/ _jsx("p", {
|
|
24
|
+
className: "text-sm",
|
|
25
|
+
children: "Content below"
|
|
26
|
+
})
|
|
27
|
+
]
|
|
28
|
+
})
|
|
29
|
+
]
|
|
30
|
+
}),
|
|
31
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
32
|
+
children: [
|
|
33
|
+
/*#__PURE__*/ _jsx("h3", {
|
|
34
|
+
className: "text-sm font-medium mb-4",
|
|
35
|
+
children: "Vertical"
|
|
36
|
+
}),
|
|
37
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
38
|
+
className: "flex h-5 items-center space-x-4 text-sm",
|
|
39
|
+
children: [
|
|
40
|
+
/*#__PURE__*/ _jsx("span", {
|
|
41
|
+
children: "Item 1"
|
|
42
|
+
}),
|
|
43
|
+
/*#__PURE__*/ _jsx(Separator, {
|
|
44
|
+
orientation: "vertical"
|
|
45
|
+
}),
|
|
46
|
+
/*#__PURE__*/ _jsx("span", {
|
|
47
|
+
children: "Item 2"
|
|
48
|
+
}),
|
|
49
|
+
/*#__PURE__*/ _jsx(Separator, {
|
|
50
|
+
orientation: "vertical"
|
|
51
|
+
}),
|
|
52
|
+
/*#__PURE__*/ _jsx("span", {
|
|
53
|
+
children: "Item 3"
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
})
|
|
57
|
+
]
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
//# sourceMappingURL=separator.gallery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/separator/separator.gallery.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport { Separator } from './separator';\n\nexport function SeparatorGallery(): ReactElement {\n return (\n <div className=\"space-y-8\">\n <div>\n <h3 className=\"text-sm font-medium mb-4\">Horizontal</h3>\n <div className=\"w-75 space-y-4\">\n <p className=\"text-sm\">Content above</p>\n <Separator orientation=\"horizontal\" />\n <p className=\"text-sm\">Content below</p>\n </div>\n </div>\n <div>\n <h3 className=\"text-sm font-medium mb-4\">Vertical</h3>\n <div className=\"flex h-5 items-center space-x-4 text-sm\">\n <span>Item 1</span>\n <Separator orientation=\"vertical\" />\n <span>Item 2</span>\n <Separator orientation=\"vertical\" />\n <span>Item 3</span>\n </div>\n </div>\n </div>\n );\n}\n"],"names":["Separator","SeparatorGallery","div","className","h3","p","orientation","span"],"mappings":";AAEA,SAASA,SAAS,QAAQ,iBAAc;AAExC,OAAO,SAASC;IACd,qBACE,MAACC;QAAIC,WAAU;;0BACb,MAACD;;kCACC,KAACE;wBAAGD,WAAU;kCAA2B;;kCACzC,MAACD;wBAAIC,WAAU;;0CACb,KAACE;gCAAEF,WAAU;0CAAU;;0CACvB,KAACH;gCAAUM,aAAY;;0CACvB,KAACD;gCAAEF,WAAU;0CAAU;;;;;;0BAG3B,MAACD;;kCACC,KAACE;wBAAGD,WAAU;kCAA2B;;kCACzC,MAACD;wBAAIC,WAAU;;0CACb,KAACI;0CAAK;;0CACN,KAACP;gCAAUM,aAAY;;0CACvB,KAACC;0CAAK;;0CACN,KAACP;gCAAUM,aAAY;;0CACvB,KAACC;0CAAK;;;;;;;;AAKhB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Skeleton } from "./skeleton.js";
|
|
3
|
+
export function SkeletonGallery() {
|
|
4
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
5
|
+
className: "flex flex-col gap-4 items-start",
|
|
6
|
+
role: "status",
|
|
7
|
+
"aria-label": "Loading skeleton",
|
|
8
|
+
children: [
|
|
9
|
+
/*#__PURE__*/ _jsx(Skeleton, {
|
|
10
|
+
className: "w-100 h-4"
|
|
11
|
+
}),
|
|
12
|
+
/*#__PURE__*/ _jsx(Skeleton, {
|
|
13
|
+
className: "size-12 rounded-full"
|
|
14
|
+
}),
|
|
15
|
+
/*#__PURE__*/ _jsx(Skeleton, {
|
|
16
|
+
className: "w-75 h-32"
|
|
17
|
+
})
|
|
18
|
+
]
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=skeleton.gallery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/skeleton/skeleton.gallery.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport { Skeleton } from './skeleton';\n\nexport function SkeletonGallery(): ReactElement {\n return (\n <div\n className=\"flex flex-col gap-4 items-start\"\n role=\"status\"\n aria-label=\"Loading skeleton\"\n >\n <Skeleton className=\"w-100 h-4\" />\n <Skeleton className=\"size-12 rounded-full\" />\n <Skeleton className=\"w-75 h-32\" />\n </div>\n );\n}\n"],"names":["Skeleton","SkeletonGallery","div","className","role","aria-label"],"mappings":";AAEA,SAASA,QAAQ,QAAQ,gBAAa;AAEtC,OAAO,SAASC;IACd,qBACE,MAACC;QACCC,WAAU;QACVC,MAAK;QACLC,cAAW;;0BAEX,KAACL;gBAASG,WAAU;;0BACpB,KAACH;gBAASG,WAAU;;0BACpB,KAACH;gBAASG,WAAU;;;;AAG1B"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { Label } from "../label/label.js";
|
|
4
|
+
import { Slider } from "./slider.js";
|
|
5
|
+
export function SliderGallery() {
|
|
6
|
+
const id = useId();
|
|
7
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
8
|
+
className: "w-80 space-y-6",
|
|
9
|
+
children: [
|
|
10
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
11
|
+
className: "grid gap-2",
|
|
12
|
+
children: [
|
|
13
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
14
|
+
id: `${id}-volume`,
|
|
15
|
+
children: "Volume"
|
|
16
|
+
}),
|
|
17
|
+
/*#__PURE__*/ _jsx(Slider, {
|
|
18
|
+
defaultValue: [
|
|
19
|
+
50
|
|
20
|
+
],
|
|
21
|
+
"aria-labelledby": `${id}-volume`
|
|
22
|
+
})
|
|
23
|
+
]
|
|
24
|
+
}),
|
|
25
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
26
|
+
className: "grid gap-2",
|
|
27
|
+
children: [
|
|
28
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
29
|
+
id: `${id}-price`,
|
|
30
|
+
children: "Price range"
|
|
31
|
+
}),
|
|
32
|
+
/*#__PURE__*/ _jsx(Slider, {
|
|
33
|
+
defaultValue: [
|
|
34
|
+
20,
|
|
35
|
+
80
|
|
36
|
+
],
|
|
37
|
+
"aria-labelledby": `${id}-price`
|
|
38
|
+
})
|
|
39
|
+
]
|
|
40
|
+
}),
|
|
41
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
42
|
+
className: "group grid gap-2",
|
|
43
|
+
"data-disabled": "true",
|
|
44
|
+
children: [
|
|
45
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
46
|
+
id: `${id}-brightness`,
|
|
47
|
+
children: "Brightness"
|
|
48
|
+
}),
|
|
49
|
+
/*#__PURE__*/ _jsx(Slider, {
|
|
50
|
+
defaultValue: [
|
|
51
|
+
30
|
|
52
|
+
],
|
|
53
|
+
"aria-labelledby": `${id}-brightness`,
|
|
54
|
+
disabled: true
|
|
55
|
+
})
|
|
56
|
+
]
|
|
57
|
+
})
|
|
58
|
+
]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
//# sourceMappingURL=slider.gallery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/ui/core/slider/slider.gallery.tsx"],"sourcesContent":["import { type ReactElement, useId } from 'react';\n\nimport { Label } from '../label/label';\n\nimport { Slider } from './slider';\n\nexport function SliderGallery(): ReactElement {\n const id = useId();\n\n return (\n <div className=\"w-80 space-y-6\">\n <div className=\"grid gap-2\">\n <Label id={`${id}-volume`}>Volume</Label>\n <Slider defaultValue={[50]} aria-labelledby={`${id}-volume`} />\n </div>\n <div className=\"grid gap-2\">\n <Label id={`${id}-price`}>Price range</Label>\n <Slider defaultValue={[20, 80]} aria-labelledby={`${id}-price`} />\n </div>\n <div className=\"group grid gap-2\" data-disabled=\"true\">\n <Label id={`${id}-brightness`}>Brightness</Label>\n <Slider\n defaultValue={[30]}\n aria-labelledby={`${id}-brightness`}\n disabled\n />\n </div>\n </div>\n );\n}\n"],"names":["useId","Label","Slider","SliderGallery","id","div","className","defaultValue","aria-labelledby","data-disabled","disabled"],"mappings":";AAAA,SAA4BA,KAAK,QAAQ,QAAQ;AAEjD,SAASC,KAAK,QAAQ,oBAAiB;AAEvC,SAASC,MAAM,QAAQ,cAAW;AAElC,OAAO,SAASC;IACd,MAAMC,KAAKJ;IAEX,qBACE,MAACK;QAAIC,WAAU;;0BACb,MAACD;gBAAIC,WAAU;;kCACb,KAACL;wBAAMG,IAAI,GAAGA,GAAG,OAAO,CAAC;kCAAE;;kCAC3B,KAACF;wBAAOK,cAAc;4BAAC;yBAAG;wBAAEC,mBAAiB,GAAGJ,GAAG,OAAO,CAAC;;;;0BAE7D,MAACC;gBAAIC,WAAU;;kCACb,KAACL;wBAAMG,IAAI,GAAGA,GAAG,MAAM,CAAC;kCAAE;;kCAC1B,KAACF;wBAAOK,cAAc;4BAAC;4BAAI;yBAAG;wBAAEC,mBAAiB,GAAGJ,GAAG,MAAM,CAAC;;;;0BAEhE,MAACC;gBAAIC,WAAU;gBAAmBG,iBAAc;;kCAC9C,KAACR;wBAAMG,IAAI,GAAGA,GAAG,WAAW,CAAC;kCAAE;;kCAC/B,KAACF;wBACCK,cAAc;4BAAC;yBAAG;wBAClBC,mBAAiB,GAAGJ,GAAG,WAAW,CAAC;wBACnCM,QAAQ;;;;;;AAKlB"}
|