@gridui/table 3.1.2 → 4.0.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/README.md CHANGED
@@ -3,16 +3,26 @@
3
3
  Data family. Public API: `DataTable`, `DataTableBlockEdges`, `DataTableColumn`, `DataTableColumnGroup`, `DataTableInlineEdges`, `DataTablePlaceholder`, `DataTablePlaceholderProps`, `DataTableProps`, `DataTableRow`, `DataTableRowDetail`, `DataTableVariant`.
4
4
 
5
5
  Import components from `@gridui/table` and load `@gridui/table/styles.css` after Theme.
6
- Load styles for any composed dependency used by this family. Applications own routes, labels, state persistence, and branding.
6
+ Applications own routes, labels, state persistence, and branding.
7
7
 
8
8
  See [component ownership](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/component-ownership.md) and [release history](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-data/table/.changeset/history).
9
9
 
10
+ ## Styles
11
+
12
+ Load Theme once. Use `@gridui/table/styled` for automatic component CSS in
13
+ CSS-aware bundlers, or keep the CSS-free root import and load `@gridui/table/styles.css`.
14
+ Both entries expose the same root API. The standalone stylesheet includes component
15
+ dependency styles; Theme/reset remain separate. See the
16
+ [integration guide](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/usage/integration.md)
17
+ for static HTML loading, SSR limits, and avoiding duplicate CSS.
18
+
19
+
10
20
  ## Data presentation
11
21
 
12
22
  Related families and their ownership are listed in the
13
23
  [component ownership map](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/component-ownership.md).
14
24
 
15
- `@gridui/table` owns DataTable and geometry-preserving table placeholders. Metric and data cells have their own Data families. Loading surfaces, notices, and rail profiles remain Core families.
25
+ `@gridui/table` owns DataTable and geometry-preserving table placeholders. Metric and data cells have their own Data families. Loading surfaces and notices belong to Feedback; RailProfile belongs to Data.
16
26
  DataTable provides a named,
17
27
  keyboard-focusable horizontal scroll region, scoped column headers, optional
18
28
  initial rows, and a stable tbody ID. Each `DataTableColumn` defines its `label`,
@@ -22,7 +32,7 @@ sizing props. `rowHeader` makes the first body cell a scoped row header.
22
32
  `minWidth` controls the whole table; column sizing applies only to leaf headers
23
33
  and body cells, never to grouped headers. DataTable retains both `editorial` (default) and `structured` variants. Both use
24
34
  square cells with continuous horizontal and vertical grid boundaries. Editorial
25
- rows have more reading space; structured rows are compact and emphasize row
35
+ rows emphasize editorial presentation; structured rows emphasize row
26
36
  headers. Optional `columnGroups` use labeled positive integer spans that must
27
37
  cover all columns. Native colgroups and scoped group headers preserve the table
28
38
  relationships; mixed numeric alignment never applies to group headings.
@@ -53,7 +63,7 @@ monospace identifiers. DataBadge retains caller-supplied status text with neutra
53
63
  or accent tone. DataBar adds a decorative, bounded relative-volume mark without
54
64
  replacing the displayed value; partial periods use a dashed fill and still need
55
65
  a visible caller-owned coverage label. Source information uses the shared
56
- [Disclosure](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/disclosure/README.md); applications own
66
+ [Disclosure](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-controls/disclosure/README.md); applications own
57
67
  its source content and compact cell spacing. These
58
68
  components use shared semantic theme tokens, so site brand colors and appearance
59
69
  changes update both table variants together. They contain no domain copy, source
@@ -84,7 +94,8 @@ and `aria-controls`, stable row keys, and the expanded detail content.
84
94
  Optional rowLines and columnLines control internal separators independently.
85
95
  Header/body and footer boundaries remain structural separators. density accepts
86
96
  compact or comfortable; headerSurface and rowHeaderSurface accept plain or muted.
87
- Explicit options override the corresponding editorial/structured default.
97
+ Appearance does not choose density. Density defaults to comfortable for both variants;
98
+ other explicit options override the corresponding appearance default.
88
99
  striped tracks records rather than physical rows, so expanded details retain the
89
100
  owner's stripe. rows may carry selected for presentation; callers own controls
90
101
  and selection semantics. Selected and striped surfaces also cover sticky cells.
@@ -93,3 +104,14 @@ footerRows supplies keyed cell arrays for a native tfoot. Footer cells follow
93
104
  column order, numeric alignment, sizing, sticky offsets and external-edge rules.
94
105
  No aggregation is performed. Footer keys must be unique and every footer row
95
106
  must match the columns. DataTablePlaceholder accepts the same presentation props.
107
+
108
+ ## Sizing and density
109
+
110
+ density compact/comfortable is independent of editorial/structured appearance and defaults to comfortable. Cell block padding is 0.5rem/1rem respectively, and headers/body/footer/placeholders follow the selected setting. Embedded controls choose their own size and can grow a row beyond its density minimum.
111
+
112
+ See the [shared sizing contract](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/usage/sizing.md)
113
+ for native attributes, scope precedence, tokens and target behavior.
114
+
115
+ The --gridui-table-cell-padding-inline token customizes cell inline padding.
116
+ DataExplorer uses it with the selected control role when reserving its fixed
117
+ selection column, so enlarged text and pointer targets fit without squeezing.
@@ -4,6 +4,7 @@
4
4
  * @namespace DataTable
5
5
  * @description Table Types
6
6
  */
7
+ import type { Density } from "@gridui/theme";
7
8
  import type { Responsive } from "@gridui/style-utils/responsive";
8
9
  import type { ComponentPropsWithRef, CSSProperties, Key, ReactNode } from "react";
9
10
  export type DataTableVariant = "editorial" | "structured";
@@ -35,7 +36,7 @@ export type DataTableRow = {
35
36
  export type DataTablePresentation = {
36
37
  readonly rowLines?: boolean;
37
38
  readonly columnLines?: boolean;
38
- readonly density?: "comfortable" | "compact";
39
+ readonly density?: Density | undefined;
39
40
  readonly headerSurface?: "plain" | "muted";
40
41
  readonly rowHeaderSurface?: "plain" | "muted";
41
42
  readonly striped?: boolean;
package/dist/index.js CHANGED
@@ -59,7 +59,7 @@ var DataTable = (props) => {
59
59
  footerRows = [],
60
60
  rowLines,
61
61
  columnLines,
62
- density,
62
+ density = "comfortable",
63
63
  headerSurface,
64
64
  rowHeaderSurface,
65
65
  striped = false,
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/data-table/style.ts", "../src/data-table/data-table.tsx", "../src/data-table-placeholder/style.ts", "../src/data-table-placeholder/data-table-placeholder.tsx"],
4
- "sourcesContent": ["/**\n * @author WMXPY\n * @package Table\n * @namespace DataTable\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const tableScrollStyles = cva(cn(\n \"gridui-table-scroll\",\n \"gridui-u-table--min-w-0 gridui-u-table--max-w-full gridui-u-table--overflow-x-auto\",\n));\n\nexport const tableStyles = cva(cn(\n \"gridui-table\",\n \"gridui-u-table--w-full gridui-u-table--border-collapse gridui-u-table--type-data gridui-u-table--text-left gridui-u-table--text-foreground gridui-u-table--bg-background\",\n \"gridui-u-table--[&>thead>tr>th]:text-left gridui-u-table--[&>thead>tr>th]:text-muted gridui-u-table--[&>thead>tr>th]:font-medium\",\n \"gridui-u-table--[&>:is(thead,tbody,tfoot)>tr>:is(th,td)]:align-middle gridui-u-table--[&>:is(thead,tbody,tfoot)>tr>:is(th,td)]:wrap-anywhere\",\n \"gridui-u-table--[&>tbody>tr>th]:text-left gridui-u-table--[&>tbody>tr>th]:font-normal\",\n \"gridui-u-table--[&>thead>.gridui-table-groups>th]:text-left gridui-u-table--[&>thead>.gridui-table-groups>th]:text-foreground gridui-u-table--[&>thead>.gridui-table-groups>th]:type-eyebrow\",\n \"gridui-u-table--[&>:is(thead,tbody,tfoot)>tr>.gridui-table-numeric]:text-right gridui-u-table--[&>:is(thead,tbody,tfoot)>tr>.gridui-table-numeric]:tabular-nums\",\n));\n\nexport const tableCellStyles = cva(\"\", {\n variants: {\n numeric: {\n false: null,\n true: \"gridui-table-numeric\",\n },\n sticky: {\n start: \"gridui-u-table--[--gridui-table-cell-position:sticky] gridui-u-table--[--gridui-table-cell-start:var(--gridui-table-cell-offset)]\",\n end: \"gridui-u-table--[--gridui-table-cell-position:sticky] gridui-u-table--[--gridui-table-cell-end:var(--gridui-table-cell-offset)]\",\n },\n },\n defaultVariants: { numeric: false },\n});\n\nexport const tableEditorialStyles = cva(cn(\"gridui-table-editorial\"));\n\nexport const tableStructuredStyles = cva(cn(\"gridui-table-structured\"));\n\nexport const tableVariants = cva(tableStyles(), {\n variants: {\n variant: {\n editorial: tableEditorialStyles(),\n structured: tableStructuredStyles(),\n },\n },\n defaultVariants: {\n variant: \"editorial\",\n },\n});\n", "/**\n * @author WMXPY\n * @package Table\n * @namespace DataTable\n * @description Data Table\n */\n\nimport { tableCellStyles, tableScrollStyles, tableVariants } from \"./style\";\nimport type { DataTableColumn, DataTableOptions } from \"./table-types\";\nimport { useInteractionOutline, useScrollbars } from \"@gridui/overlay\";\nimport { cn } from \"@gridui/style-utils\";\nimport { resolveResponsive } from \"@gridui/style-utils/responsive\";\nimport { type CSSProperties, type FC, Fragment } from \"react\";\n\nexport type DataTableProps = DataTableOptions;\n\nexport const DataTable: FC<DataTableProps> = (props: DataTableProps) => {\n const {\n label,\n columns,\n columnGroups,\n variant = \"editorial\",\n bodyId,\n rows = [],\n rowHeader = false,\n footerRows = [],\n rowLines,\n columnLines,\n density,\n headerSurface,\n rowHeaderSurface,\n striped = false,\n minWidth,\n inlineEdges = \"both\",\n blockEdges = \"both\",\n className,\n style,\n ...restProps\n } = props;\n const scrollbarRef = useScrollbars<HTMLDivElement>();\n const ref = useInteractionOutline({ ref: scrollbarRef });\n const block = resolveResponsive(blockEdges);\n const edges = resolveResponsive(inlineEdges);\n const rowKeys = rows.map((row, index) => {\n return row.key === undefined ? `position:${index}` : `key:${String(row.key)}`;\n });\n if (new Set(rowKeys).size !== rowKeys.length) {\n throw new Error(\"DataTable row keys must be unique.\");\n }\n if ([\n ...rows,\n ...footerRows,\n ].some((row) => {\n return row.cells.length !== columns.length;\n })) {\n throw new RangeError(\"DataTable rows must match the declared columns.\");\n }\n if (columnGroups && (columnGroups.some((group) => {\n return !Number.isInteger(group.span) || group.span < 1;\n }) || columnGroups.reduce((total, group) => {\n return total + group.span;\n }, 0) !== columns.length)) {\n throw new Error(\"DataTable column groups must cover every column with positive integer spans.\");\n }\n const footerKeys = footerRows.map((row, index) => {\n return row.key === undefined ? `position:${index}` : `key:${String(row.key)}`;\n });\n if (new Set(footerKeys).size !== footerKeys.length) {\n throw new Error(\"DataTable footer row keys must be unique.\");\n }\n const detailIds = rows.flatMap(row => {\n return row.detail ? [row.detail.id] : [];\n });\n if (detailIds.length > 0 && columns.length === 0) {\n throw new RangeError(\"DataTable details need at least one column.\");\n }\n if (detailIds.some(id => {\n return !id;\n }) || new Set(detailIds).size !== detailIds.length) {\n throw new Error(\"DataTable detail IDs must be nonempty and unique.\");\n }\n const columnKeys = columns.map((column, index) => {\n return column.key === undefined ? `position:${index}` : `key:${String(column.key)}`;\n });\n if (new Set(columnKeys).size !== columnKeys.length) {\n throw new Error(\"DataTable column keys must be unique.\");\n }\n const columnStyle = (column: DataTableColumn | undefined): (CSSProperties & {\n \"--gridui-table-cell-offset\"?: string;\n }) | undefined => {\n if (!column?.sticky) {\n return column?.sizing;\n }\n const offset = column.stickyOffset ?? 0;\n if (!Number.isFinite(offset) || offset < 0) {\n throw new RangeError(\"Sticky column offsets must be finite and nonnegative.\");\n }\n return {\n ...column.sizing,\n \"--gridui-table-cell-offset\": `${offset}px`,\n position: \"var(--gridui-table-cell-position)\" as CSSProperties[\"position\"],\n ...(column.sticky === \"start\" ? {\n insetInlineStart: \"var(--gridui-table-cell-start)\",\n } : {\n insetInlineEnd: \"var(--gridui-table-cell-end)\",\n }),\n };\n };\n return (<div\n ref={ref}\n className={cn(tableScrollStyles())}\n role=\"region\"\n aria-label={label}\n tabIndex={0}\n >\n <table\n {...restProps}\n aria-label={label}\n data-row-lines={rowLines}\n data-column-lines={columnLines}\n data-density={density}\n data-header-surface={headerSurface}\n data-row-header-surface={rowHeaderSurface}\n data-block-edges={block.base}\n data-block-edges-sm={block.sm}\n data-block-edges-md={block.md}\n data-block-edges-lg={block.lg}\n data-inline-edges={edges.base}\n data-inline-edges-sm={edges.sm}\n data-inline-edges-md={edges.md}\n data-inline-edges-lg={edges.lg}\n style={{\n minWidth,\n ...style,\n }}\n className={cn(tableVariants({\n variant,\n }), className)}\n >\n {columnGroups?.map((group, index) => {\n return (<colgroup\n key={index}\n span={group.span}\n />);\n })}\n <thead>\n {columnGroups && (<tr\n className=\"gridui-table-groups\"\n >\n {columnGroups.map((group, index) => {\n return (<th\n key={index}\n scope=\"colgroup\"\n colSpan={group.span}\n >\n {group.label}\n </th>);\n })}\n </tr>)}\n <tr>\n {columns.map((column, index) => {\n return (<th\n key={columnKeys[index]}\n scope=\"col\"\n style={columnStyle(column)}\n data-sticky={column.sticky}\n className={tableCellStyles({\n numeric: column.numeric,\n sticky: column.sticky,\n }) || undefined}\n >\n {column.header ?? column.label}\n </th>);\n })}\n </tr>\n </thead>\n <tbody\n id={bodyId}\n >\n {rows.map((row, index) => {\n const { cells, detail } = row;\n return (<Fragment\n key={rowKeys[index]}\n >\n <tr\n data-selected={row.selected || undefined}\n data-striped={striped && index % 2 === 1 || undefined}\n >\n {cells.map((cell, cellIndex) => {\n const Cell = rowHeader && cellIndex === 0 ? \"th\" : \"td\";\n return (<Cell\n key={columnKeys[cellIndex]}\n scope={Cell === \"th\" ? \"row\" : undefined}\n style={columnStyle(columns[cellIndex])}\n data-sticky={columns[cellIndex]?.sticky}\n className={tableCellStyles({\n numeric: columns[cellIndex]?.numeric,\n sticky: columns[cellIndex]?.sticky,\n }) || undefined}\n >\n {cell}\n </Cell>);\n })}\n </tr>\n {detail && (<tr\n id={detail.id}\n data-selected={row.selected || undefined}\n data-striped={striped && index % 2 === 1 || undefined}\n className=\"gridui-table-detail\"\n >\n <td\n colSpan={columns.length}\n >\n {detail.content}\n </td>\n </tr>)}\n </Fragment>);\n })}\n </tbody>\n {footerRows.length > 0 && (<tfoot>\n {footerRows.map((row, index) => {\n return (<tr\n key={footerKeys[index]}\n >\n {row.cells.map((cell, cellIndex) => {\n const Cell = cellIndex === 0 ? \"th\" : \"td\";\n return (<Cell\n key={columnKeys[cellIndex]}\n scope={cellIndex === 0 ? \"row\" : undefined}\n style={columnStyle(columns[cellIndex])}\n data-sticky={columns[cellIndex]?.sticky}\n className={tableCellStyles({\n numeric: columns[cellIndex]?.numeric,\n sticky: columns[cellIndex]?.sticky,\n }) || undefined}\n >\n {cell}\n </Cell>);\n })}\n </tr>);\n })}\n </tfoot>)}\n </table>\n </div>);\n};\n", "/**\n * @author WMXPY\n * @package Table\n * @namespace DataTablePlaceholder\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const tablePlaceholderStyles = cva(cn(\n \"gridui-table-placeholder\",\n \"gridui-u-table--pointer-events-none\",\n));\n", "/**\n * @author WMXPY\n * @package Table\n * @namespace DataTablePlaceholder\n * @description Data Table Placeholder\n */\n\nimport { DataTable } from \"../data-table/data-table\";\nimport type { DataTableOptions } from \"../data-table/table-types\";\nimport { tablePlaceholderStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { FC } from \"react\";\n\nexport type DataTablePlaceholderProps = Omit<DataTableOptions, \"rows\"> & {\n readonly rowCount?: number;\n};\n\nexport const DataTablePlaceholder: FC<DataTablePlaceholderProps> = (props: DataTablePlaceholderProps) => {\n const { rowCount = 5, ...restProps } = props;\n return (<div\n className={cn(tablePlaceholderStyles())}\n aria-hidden=\"true\"\n inert\n >\n <DataTable\n {...restProps}\n rows={Array.from({ length: rowCount }, () => {\n return {\n cells: restProps.columns.map(() => {\n return \"\u2014\";\n }),\n };\n })}\n />\n </div>);\n};\n"],
5
- "mappings": ";AAOA,SAAS,UAAU;AACnB,SAAS,WAAW;AAEb,IAAM,oBAAoB,IAAI;AAAA,EACjC;AAAA,EACA;AACJ,CAAC;AAEM,IAAM,cAAc,IAAI;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ,CAAC;AAEM,IAAM,kBAAkB,IAAI,IAAI;AAAA,EACnC,UAAU;AAAA,IACN,SAAS;AAAA,MACL,OAAO;AAAA,MACP,MAAM;AAAA,IACV;AAAA,IACA,QAAQ;AAAA,MACJ,OAAO;AAAA,MACP,KAAK;AAAA,I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KAAK;AAAA,cAiBzB;AAAA,YACJ,CAAC,GACL;AAAA;AAAA;AAAA,MACJ;AAAA;AAAA,EACJ;AACJ;;;AC7OA,SAAS,MAAAC,WAAU;AACnB,SAAS,OAAAC,YAAW;AAEb,IAAM,yBAAyBA,KAAID;AAAA,EACtC;AAAA,EACA;AACJ,CAAC;;;ACHD,SAAS,MAAAE,WAAU;AAcX,gBAAAC,YAAA;AAPD,IAAM,uBAAsD,CAAC,UAAqC;AACrG,QAAM,EAAE,WAAW,GAAG,GAAG,UAAU,IAAI;AACvC,SAAQ,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACL,WAAWD,IAAG,uBAAuB,CAAC;AAAA,MACtC,eAAY;AAAA,MACZ,OAAK;AAAA,MAEL,0BAAAC;AAAA,QAAC;AAAA;AAAA,UACI,GAAG;AAAA,UACJ,MAAM,MAAM,KAAK,EAAE,QAAQ,SAAS,GAAG,MAAM;AACzC,mBAAO;AAAA,cACH,OAAO,UAAU,QAAQ,IAAI,MAAM;AAC/B,uBAAO;AAAA,cACX,CAAC;AAAA,YACL;AAAA,UACJ,CAAC;AAAA;AAAA,MACL;AAAA;AAAA,EACJ;AACJ;",
4
+ "sourcesContent": ["/**\n * @author WMXPY\n * @package Table\n * @namespace DataTable\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const tableScrollStyles = cva(cn(\n \"gridui-table-scroll\",\n \"gridui-u-table--min-w-0 gridui-u-table--max-w-full gridui-u-table--overflow-x-auto\",\n));\n\nexport const tableStyles = cva(cn(\n \"gridui-table\",\n \"gridui-u-table--w-full gridui-u-table--border-collapse gridui-u-table--type-data gridui-u-table--text-left gridui-u-table--text-foreground gridui-u-table--bg-background\",\n \"gridui-u-table--[&>thead>tr>th]:text-left gridui-u-table--[&>thead>tr>th]:text-muted gridui-u-table--[&>thead>tr>th]:font-medium\",\n \"gridui-u-table--[&>:is(thead,tbody,tfoot)>tr>:is(th,td)]:align-middle gridui-u-table--[&>:is(thead,tbody,tfoot)>tr>:is(th,td)]:wrap-anywhere\",\n \"gridui-u-table--[&>tbody>tr>th]:text-left gridui-u-table--[&>tbody>tr>th]:font-normal\",\n \"gridui-u-table--[&>thead>.gridui-table-groups>th]:text-left gridui-u-table--[&>thead>.gridui-table-groups>th]:text-foreground gridui-u-table--[&>thead>.gridui-table-groups>th]:type-eyebrow\",\n \"gridui-u-table--[&>:is(thead,tbody,tfoot)>tr>.gridui-table-numeric]:text-right gridui-u-table--[&>:is(thead,tbody,tfoot)>tr>.gridui-table-numeric]:tabular-nums\",\n));\n\nexport const tableCellStyles = cva(\"\", {\n variants: {\n numeric: {\n false: null,\n true: \"gridui-table-numeric\",\n },\n sticky: {\n start: \"gridui-u-table--[--gridui-table-cell-position:sticky] gridui-u-table--[--gridui-table-cell-start:var(--gridui-table-cell-offset)]\",\n end: \"gridui-u-table--[--gridui-table-cell-position:sticky] gridui-u-table--[--gridui-table-cell-end:var(--gridui-table-cell-offset)]\",\n },\n },\n defaultVariants: { numeric: false },\n});\n\nexport const tableEditorialStyles = cva(cn(\"gridui-table-editorial\"));\n\nexport const tableStructuredStyles = cva(cn(\"gridui-table-structured\"));\n\nexport const tableVariants = cva(tableStyles(), {\n variants: {\n variant: {\n editorial: tableEditorialStyles(),\n structured: tableStructuredStyles(),\n },\n },\n defaultVariants: {\n variant: \"editorial\",\n },\n});\n", "/**\n * @author WMXPY\n * @package Table\n * @namespace DataTable\n * @description Data Table\n */\n\nimport { tableCellStyles, tableScrollStyles, tableVariants } from \"./style\";\nimport type { DataTableColumn, DataTableOptions } from \"./table-types\";\nimport { useInteractionOutline, useScrollbars } from \"@gridui/overlay\";\nimport { cn } from \"@gridui/style-utils\";\nimport { resolveResponsive } from \"@gridui/style-utils/responsive\";\nimport { type CSSProperties, type FC, Fragment } from \"react\";\n\nexport type DataTableProps = DataTableOptions;\n\nexport const DataTable: FC<DataTableProps> = (props: DataTableProps) => {\n const {\n label,\n columns,\n columnGroups,\n variant = \"editorial\",\n bodyId,\n rows = [],\n rowHeader = false,\n footerRows = [],\n rowLines,\n columnLines,\n density = \"comfortable\",\n headerSurface,\n rowHeaderSurface,\n striped = false,\n minWidth,\n inlineEdges = \"both\",\n blockEdges = \"both\",\n className,\n style,\n ...restProps\n } = props;\n const scrollbarRef = useScrollbars<HTMLDivElement>();\n const ref = useInteractionOutline({ ref: scrollbarRef });\n const block = resolveResponsive(blockEdges);\n const edges = resolveResponsive(inlineEdges);\n const rowKeys = rows.map((row, index) => {\n return row.key === undefined ? `position:${index}` : `key:${String(row.key)}`;\n });\n if (new Set(rowKeys).size !== rowKeys.length) {\n throw new Error(\"DataTable row keys must be unique.\");\n }\n if ([\n ...rows,\n ...footerRows,\n ].some((row) => {\n return row.cells.length !== columns.length;\n })) {\n throw new RangeError(\"DataTable rows must match the declared columns.\");\n }\n if (columnGroups && (columnGroups.some((group) => {\n return !Number.isInteger(group.span) || group.span < 1;\n }) || columnGroups.reduce((total, group) => {\n return total + group.span;\n }, 0) !== columns.length)) {\n throw new Error(\"DataTable column groups must cover every column with positive integer spans.\");\n }\n const footerKeys = footerRows.map((row, index) => {\n return row.key === undefined ? `position:${index}` : `key:${String(row.key)}`;\n });\n if (new Set(footerKeys).size !== footerKeys.length) {\n throw new Error(\"DataTable footer row keys must be unique.\");\n }\n const detailIds = rows.flatMap(row => {\n return row.detail ? [row.detail.id] : [];\n });\n if (detailIds.length > 0 && columns.length === 0) {\n throw new RangeError(\"DataTable details need at least one column.\");\n }\n if (detailIds.some(id => {\n return !id;\n }) || new Set(detailIds).size !== detailIds.length) {\n throw new Error(\"DataTable detail IDs must be nonempty and unique.\");\n }\n const columnKeys = columns.map((column, index) => {\n return column.key === undefined ? `position:${index}` : `key:${String(column.key)}`;\n });\n if (new Set(columnKeys).size !== columnKeys.length) {\n throw new Error(\"DataTable column keys must be unique.\");\n }\n const columnStyle = (column: DataTableColumn | undefined): (CSSProperties & {\n \"--gridui-table-cell-offset\"?: string;\n }) | undefined => {\n if (!column?.sticky) {\n return column?.sizing;\n }\n const offset = column.stickyOffset ?? 0;\n if (!Number.isFinite(offset) || offset < 0) {\n throw new RangeError(\"Sticky column offsets must be finite and nonnegative.\");\n }\n return {\n ...column.sizing,\n \"--gridui-table-cell-offset\": `${offset}px`,\n position: \"var(--gridui-table-cell-position)\" as CSSProperties[\"position\"],\n ...(column.sticky === \"start\" ? {\n insetInlineStart: \"var(--gridui-table-cell-start)\",\n } : {\n insetInlineEnd: \"var(--gridui-table-cell-end)\",\n }),\n };\n };\n return (<div\n ref={ref}\n className={cn(tableScrollStyles())}\n role=\"region\"\n aria-label={label}\n tabIndex={0}\n >\n <table\n {...restProps}\n aria-label={label}\n data-row-lines={rowLines}\n data-column-lines={columnLines}\n data-density={density}\n data-header-surface={headerSurface}\n data-row-header-surface={rowHeaderSurface}\n data-block-edges={block.base}\n data-block-edges-sm={block.sm}\n data-block-edges-md={block.md}\n data-block-edges-lg={block.lg}\n data-inline-edges={edges.base}\n data-inline-edges-sm={edges.sm}\n data-inline-edges-md={edges.md}\n data-inline-edges-lg={edges.lg}\n style={{\n minWidth,\n ...style,\n }}\n className={cn(tableVariants({\n variant,\n }), className)}\n >\n {columnGroups?.map((group, index) => {\n return (<colgroup\n key={index}\n span={group.span}\n />);\n })}\n <thead>\n {columnGroups && (<tr\n className=\"gridui-table-groups\"\n >\n {columnGroups.map((group, index) => {\n return (<th\n key={index}\n scope=\"colgroup\"\n colSpan={group.span}\n >\n {group.label}\n </th>);\n })}\n </tr>)}\n <tr>\n {columns.map((column, index) => {\n return (<th\n key={columnKeys[index]}\n scope=\"col\"\n style={columnStyle(column)}\n data-sticky={column.sticky}\n className={tableCellStyles({\n numeric: column.numeric,\n sticky: column.sticky,\n }) || undefined}\n >\n {column.header ?? column.label}\n </th>);\n })}\n </tr>\n </thead>\n <tbody\n id={bodyId}\n >\n {rows.map((row, index) => {\n const { cells, detail } = row;\n return (<Fragment\n key={rowKeys[index]}\n >\n <tr\n data-selected={row.selected || undefined}\n data-striped={striped && index % 2 === 1 || undefined}\n >\n {cells.map((cell, cellIndex) => {\n const Cell = rowHeader && cellIndex === 0 ? \"th\" : \"td\";\n return (<Cell\n key={columnKeys[cellIndex]}\n scope={Cell === \"th\" ? \"row\" : undefined}\n style={columnStyle(columns[cellIndex])}\n data-sticky={columns[cellIndex]?.sticky}\n className={tableCellStyles({\n numeric: columns[cellIndex]?.numeric,\n sticky: columns[cellIndex]?.sticky,\n }) || undefined}\n >\n {cell}\n </Cell>);\n })}\n </tr>\n {detail && (<tr\n id={detail.id}\n data-selected={row.selected || undefined}\n data-striped={striped && index % 2 === 1 || undefined}\n className=\"gridui-table-detail\"\n >\n <td\n colSpan={columns.length}\n >\n {detail.content}\n </td>\n </tr>)}\n </Fragment>);\n })}\n </tbody>\n {footerRows.length > 0 && (<tfoot>\n {footerRows.map((row, index) => {\n return (<tr\n key={footerKeys[index]}\n >\n {row.cells.map((cell, cellIndex) => {\n const Cell = cellIndex === 0 ? \"th\" : \"td\";\n return (<Cell\n key={columnKeys[cellIndex]}\n scope={cellIndex === 0 ? \"row\" : undefined}\n style={columnStyle(columns[cellIndex])}\n data-sticky={columns[cellIndex]?.sticky}\n className={tableCellStyles({\n numeric: columns[cellIndex]?.numeric,\n sticky: columns[cellIndex]?.sticky,\n }) || undefined}\n >\n {cell}\n </Cell>);\n })}\n </tr>);\n })}\n </tfoot>)}\n </table>\n </div>);\n};\n", "/**\n * @author WMXPY\n * @package Table\n * @namespace DataTablePlaceholder\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const tablePlaceholderStyles = cva(cn(\n \"gridui-table-placeholder\",\n \"gridui-u-table--pointer-events-none\",\n));\n", "/**\n * @author WMXPY\n * @package Table\n * @namespace DataTablePlaceholder\n * @description Data Table Placeholder\n */\n\nimport { DataTable } from \"../data-table/data-table\";\nimport type { DataTableOptions } from \"../data-table/table-types\";\nimport { tablePlaceholderStyles } from \"./style\";\nimport { cn } from \"@gridui/style-utils\";\nimport type { FC } from \"react\";\n\nexport type DataTablePlaceholderProps = Omit<DataTableOptions, \"rows\"> & {\n readonly rowCount?: number;\n};\n\nexport const DataTablePlaceholder: FC<DataTablePlaceholderProps> = (props: DataTablePlaceholderProps) => {\n const { rowCount = 5, ...restProps } = props;\n return (<div\n className={cn(tablePlaceholderStyles())}\n aria-hidden=\"true\"\n inert\n >\n <DataTable\n {...restProps}\n rows={Array.from({ length: rowCount }, () => {\n return {\n cells: restProps.columns.map(() => {\n return \"\u2014\";\n }),\n };\n })}\n />\n </div>);\n};\n"],
5
+ "mappings": ";AAOA,SAAS,UAAU;AACnB,SAAS,WAAW;AAEb,IAAM,oBAAoB,IAAI;AAAA,EACjC;AAAA,EACA;AACJ,CAAC;AAEM,IAAM,cAAc,IAAI;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ,CAAC;AAEM,IAAM,kBAAkB,IAAI,IAAI;AAAA,EACnC,UAAU;AAAA,IACN,SAAS;AAAA,MACL,OAAO;AAAA,MACP,MAAM;AAAA,IACV;AAAA,IACA,QAAQ;AAAA,MACJ,OAAO;AAAA,MACP,KAAK;AAAA,IACT;AAAA,EACJ;AAAA,EACA,iBAAiB,EAAE,SAAS,MAAM;AACtC,CAAC;AAEM,IAAM,uBAAuB,IAAI,GAAG,wBAAwB,CAAC;AAE7D,IAAM,wBAAwB,IAAI,GAAG,yBAAyB,CAAC;AAE/D,IAAM,gBAAgB,IAAI,YAAY,GAAG;AAAA,EAC5C,UAAU;AAAA,IACN,SAAS;AAAA,MACL,WAAW,qBAAqB;AAAA,MAChC,YAAY,sBAAsB;AAAA,IACtC;AAAA,EACJ;AAAA,EACA,iBAAiB;AAAA,IACb,SAAS;AAAA,EACb;AACJ,CAAC;;;AC5CD,SAAS,uBAAuB,qBAAqB;AACrD,SAAS,MAAAA,WAAU;AACnB,SAAS,yBAAyB;AAClC,SA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;AAAA,MAEL,0BAAAC;AAAA,QAAC;AAAA;AAAA,UACI,GAAG;AAAA,UACJ,MAAM,MAAM,KAAK,EAAE,QAAQ,SAAS,GAAG,MAAM;AACzC,mBAAO;AAAA,cACH,OAAO,UAAU,QAAQ,IAAI,MAAM;AAC/B,uBAAO;AAAA,cACX,CAAC;AAAA,YACL;AAAA,UACJ,CAAC;AAAA;AAAA,MACL;AAAA;AAAA,EACJ;AACJ;",
6
6
  "names": ["cn", "cn", "cva", "cn", "jsx"]
7
7
  }
package/dist/styled.js ADDED
@@ -0,0 +1,3 @@
1
+ import "@gridui/overlay/styled";
2
+ import "./styles.local.css";
3
+ export * from "./index.js";
package/dist/styles.css CHANGED
@@ -1,3 +1,200 @@
1
+ /*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
2
+ @layer properties;
3
+ @layer theme, base, components, utilities;
4
+ @layer utilities {
5
+ .gridui-u-overlay--z-\(--gridui-z-popover\) {
6
+ z-index: var(--gridui-z-popover);
7
+ }
8
+ .gridui-u-overlay--flex {
9
+ display: flex;
10
+ }
11
+ .gridui-u-overlay--inline-flex {
12
+ display: inline-flex;
13
+ }
14
+ .gridui-u-overlay--size-gridui-16 {
15
+ width: var(--gridui-space-16);
16
+ height: var(--gridui-space-16);
17
+ }
18
+ .gridui-u-overlay--min-w-0 {
19
+ min-width: 0px;
20
+ }
21
+ .gridui-u-overlay--shrink-0 {
22
+ flex-shrink: 0;
23
+ }
24
+ .gridui-u-overlay--cursor-pointer {
25
+ cursor: pointer;
26
+ }
27
+ .gridui-u-overlay--items-center {
28
+ align-items: center;
29
+ }
30
+ .gridui-u-overlay--justify-center {
31
+ justify-content: center;
32
+ }
33
+ .gridui-u-overlay--gap-gridui-8 {
34
+ gap: var(--gridui-space-8);
35
+ }
36
+ .gridui-u-overlay--rounded-control {
37
+ border-radius: var(--gridui-control-radius);
38
+ }
39
+ .gridui-u-overlay--border {
40
+ border-style: var(--tw-border-style);
41
+ border-width: 1px;
42
+ }
43
+ .gridui-u-overlay--border-solid {
44
+ --tw-border-style: solid;
45
+ border-style: solid;
46
+ }
47
+ .gridui-u-overlay--border-border {
48
+ border-color: var(--gridui-border);
49
+ }
50
+ .gridui-u-overlay--bg-background {
51
+ background-color: var(--gridui-background);
52
+ }
53
+ .gridui-u-overlay--p-0 {
54
+ padding: 0px;
55
+ }
56
+ .gridui-u-overlay--px-gridui-8 {
57
+ padding-inline: var(--gridui-space-8);
58
+ }
59
+ .gridui-u-overlay--type-data {
60
+ font: var(--gridui-type-data);
61
+ font-family: var(--gridui-font-body);
62
+ letter-spacing: normal;
63
+ font-variant-numeric: tabular-nums;
64
+ }
65
+ .gridui-u-overlay--type-caption {
66
+ font: var(--gridui-type-caption);
67
+ font-family: var(--gridui-font-body);
68
+ letter-spacing: normal;
69
+ }
70
+ .gridui-u-overlay--wrap-anywhere {
71
+ overflow-wrap: anywhere;
72
+ }
73
+ .gridui-u-overlay--whitespace-normal {
74
+ white-space: normal;
75
+ }
76
+ .gridui-u-overlay--text-foreground {
77
+ color: var(--gridui-foreground);
78
+ }
79
+ .gridui-u-overlay--text-inherit {
80
+ color: inherit;
81
+ }
82
+ .gridui-u-overlay--text-muted {
83
+ color: var(--gridui-muted);
84
+ }
85
+ .gridui-u-overlay--no-underline {
86
+ text-decoration-line: none;
87
+ }
88
+ .gridui-u-overlay--aria-selected\:bg-selection-background[aria-selected="true"] {
89
+ background-color: var(--gridui-selection-background);
90
+ }
91
+ .gridui-u-overlay--aria-\[current\=page\]\:bg-selection-background[aria-current="page"] {
92
+ background-color: var(--gridui-selection-background);
93
+ }
94
+ .gridui-u-overlay--data-disabled\:pointer-events-none[data-disabled] {
95
+ pointer-events: none;
96
+ }
97
+ .gridui-u-overlay--data-disabled\:opacity-50[data-disabled] {
98
+ opacity: 50%;
99
+ }
100
+ .gridui-u-overlay--data-\[state\=checked\]\:bg-selection-background[data-state="checked"] {
101
+ background-color: var(--gridui-selection-background);
102
+ }
103
+ }
104
+ @layer components {
105
+ .gridui-overlay-surface {
106
+ --gridui-surface-offset-x: 0px;
107
+ --gridui-surface-offset-y: 0px;
108
+ --gridui-overlay-enter-duration: var(--gridui-motion-duration-normal);
109
+ --gridui-overlay-fill-mode: both;
110
+ transform-origin: var(--gridui-overlay-origin, center);
111
+ }
112
+ .gridui-overlay-dialog {
113
+ --gridui-overlay-fill-mode: none;
114
+ transform-origin: center;
115
+ }
116
+ .gridui-overlay-tooltip {
117
+ --gridui-overlay-enter-duration: var(--gridui-motion-duration-quick);
118
+ }
119
+ .gridui-overlay-floating[data-side="bottom"] {
120
+ --gridui-surface-offset-y: calc(-1 * var(--gridui-motion-distance));
121
+ }
122
+ .gridui-overlay-floating[data-side="top"] {
123
+ --gridui-surface-offset-y: var(--gridui-motion-distance);
124
+ }
125
+ .gridui-overlay-floating[data-side="left"] {
126
+ --gridui-surface-offset-x: var(--gridui-motion-distance);
127
+ }
128
+ .gridui-overlay-floating[data-side="right"] {
129
+ --gridui-surface-offset-x: calc(-1 * var(--gridui-motion-distance));
130
+ }
131
+ .gridui-overlay-surface[data-state="closed"] {
132
+ pointer-events: none;
133
+ }
134
+ .gridui-overlay-surface:not([data-side="none"]):is([data-state="open"], [data-state="delayed-open"], [data-state="instant-open"]) {
135
+ animation: var(--gridui-motion-animation, gridui-surface-enter calc(var(--gridui-overlay-enter-duration) * var(--gridui-motion-factor, 1)) var(--gridui-motion-ease-out) var(--gridui-overlay-fill-mode));
136
+ }
137
+ .gridui-overlay-surface:not([data-side="none"])[data-state="closed"] {
138
+ animation: var(--gridui-motion-animation, gridui-surface-exit calc(var(--gridui-motion-duration-quick) * var(--gridui-motion-factor, 1)) var(--gridui-motion-ease-in) var(--gridui-overlay-fill-mode));
139
+ }
140
+ .gridui-overlay-backdrop {
141
+ background: var(--gridui-backdrop);
142
+ @supports (color: color-mix(in lab, red, red)) {
143
+ background: color-mix(in srgb, var(--gridui-backdrop) var(--gridui-backdrop-opacity), transparent);
144
+ }
145
+ --gridui-overlay-enter-duration: var(--gridui-motion-duration-normal);
146
+ --gridui-overlay-exit-duration: var(--gridui-motion-duration-quick);
147
+ --gridui-overlay-fill-mode: none;
148
+ }
149
+ .gridui-overlay-backdrop-deliberate {
150
+ --gridui-overlay-enter-duration: var(--gridui-motion-duration-deliberate);
151
+ --gridui-overlay-exit-duration: var(--gridui-motion-duration-normal);
152
+ --gridui-overlay-fill-mode: both;
153
+ }
154
+ .gridui-overlay-backdrop[data-state="open"] {
155
+ animation: var(--gridui-motion-animation, gridui-fade-enter calc(var(--gridui-overlay-enter-duration) * var(--gridui-motion-factor, 1)) var(--gridui-motion-ease-out) var(--gridui-overlay-fill-mode));
156
+ }
157
+ .gridui-overlay-backdrop[data-state="closed"] {
158
+ animation: var(--gridui-motion-animation, gridui-fade-exit calc(var(--gridui-overlay-exit-duration) * var(--gridui-motion-factor, 1)) var(--gridui-motion-ease-in) var(--gridui-overlay-fill-mode));
159
+ }
160
+ @media (prefers-reduced-motion: reduce) {
161
+ .gridui-overlay-surface:not([data-side="none"])[data-state], .gridui-overlay-backdrop[data-state] {
162
+ animation: none;
163
+ }
164
+ }
165
+ .gridui-overlay-list {
166
+ --gridui-overlay-row-min: var(--gridui-control-min-height-medium);
167
+ --gridui-overlay-row-padding: var(--gridui-space-8);
168
+ }
169
+ .gridui-overlay-density-compact {
170
+ --gridui-overlay-row-min: var(--gridui-control-min-height-small);
171
+ --gridui-overlay-row-padding: var(--gridui-space-4);
172
+ }
173
+ .gridui-overlay-density-comfortable {
174
+ --gridui-overlay-row-min: var(--gridui-control-min-height-medium);
175
+ --gridui-overlay-row-padding: var(--gridui-space-8);
176
+ }
177
+ .gridui-overlay-list-item {
178
+ min-block-size: max(var(--gridui-overlay-row-min, var(--gridui-control-min-height-medium)), var(--gridui-target-min-size));
179
+ padding-block: var(--gridui-overlay-row-padding, var(--gridui-space-8));
180
+ }
181
+ .gridui-overlay-list-label {
182
+ padding-block: var(--gridui-overlay-row-padding, var(--gridui-space-8));
183
+ }
184
+ }
185
+ @property --tw-border-style {
186
+ syntax: "*";
187
+ inherits: false;
188
+ initial-value: solid;
189
+ }
190
+ @layer properties {
191
+ @supports ((-webkit-hyphens: none) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
192
+ *, ::before, ::after, ::backdrop {
193
+ --tw-border-style: solid;
194
+ }
195
+ }
196
+ }
197
+
1
198
  /*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
2
199
  @layer properties;
3
200
  @layer theme, base, components, utilities;
@@ -94,7 +291,7 @@
94
291
  }
95
292
  @layer components {
96
293
  .gridui-table > :is(thead, tbody, tfoot) > tr > :is(th, td) {
97
- padding: 1rem;
294
+ padding: 1rem var(--gridui-table-cell-padding-inline, var(--gridui-space-16));
98
295
  border: 1px solid var(--gridui-border);
99
296
  }
100
297
  .gridui-table > :is(thead, tbody, tfoot) > tr > :is(th, td):first-child {
@@ -106,14 +303,11 @@
106
303
  .gridui-table > thead > tr > th {
107
304
  background: var(--gridui-surface);
108
305
  }
109
- .gridui-table-editorial > tbody > tr > :is(th, td) {
110
- padding-block: 1.5rem;
111
- }
112
306
  .gridui-table-structured > tbody > tr > th, .gridui-table > tbody > tr:hover > :is(th, td) {
113
307
  background: var(--gridui-surface);
114
308
  }
115
309
  .gridui-table > thead > .gridui-table-groups > th {
116
- padding-block: 0.5rem;
310
+ padding-block: var(--gridui-space-8);
117
311
  background: var(--gridui-selection-background);
118
312
  }
119
313
  .gridui-table > thead > tr:first-child > th {
@@ -194,10 +388,10 @@
194
388
  z-index: 2;
195
389
  }
196
390
  .gridui-table[data-density="compact"] > :is(thead, tbody, tfoot) > tr > :is(th, td) {
197
- padding-block: 0.5rem;
391
+ padding-block: var(--gridui-space-8);
198
392
  }
199
393
  .gridui-table[data-density="comfortable"] > :is(thead, tbody, tfoot) > tr > :is(th, td) {
200
- padding-block: 1.5rem;
394
+ padding-block: var(--gridui-space-16);
201
395
  }
202
396
  .gridui-table[data-row-lines="false"] > tbody > tr:not(:last-child) > :is(th, td) {
203
397
  border-block-end-width: 0;
@@ -0,0 +1,283 @@
1
+ /*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
2
+ @layer properties;
3
+ @layer theme, base, components, utilities;
4
+ @layer theme {
5
+ :root, :host {
6
+ --font-weight-normal: 400;
7
+ --font-weight-medium: 500;
8
+ }
9
+ }
10
+ @layer utilities {
11
+ .gridui-u-table--pointer-events-none {
12
+ pointer-events: none;
13
+ }
14
+ .gridui-u-table--w-full {
15
+ width: 100%;
16
+ }
17
+ .gridui-u-table--max-w-full {
18
+ max-width: 100%;
19
+ }
20
+ .gridui-u-table--min-w-0 {
21
+ min-width: 0px;
22
+ }
23
+ .gridui-u-table--border-collapse {
24
+ border-collapse: collapse;
25
+ }
26
+ .gridui-u-table--overflow-x-auto {
27
+ overflow-x: auto;
28
+ }
29
+ .gridui-u-table--bg-background {
30
+ background-color: var(--gridui-background);
31
+ }
32
+ .gridui-u-table--text-left {
33
+ text-align: left;
34
+ }
35
+ .gridui-u-table--type-data {
36
+ font: var(--gridui-type-data);
37
+ font-family: var(--gridui-font-body);
38
+ letter-spacing: normal;
39
+ font-variant-numeric: tabular-nums;
40
+ }
41
+ .gridui-u-table--text-foreground {
42
+ color: var(--gridui-foreground);
43
+ }
44
+ .gridui-u-table--\[--gridui-table-cell-end\:var\(--gridui-table-cell-offset\)\] {
45
+ --gridui-table-cell-end: var(--gridui-table-cell-offset);
46
+ }
47
+ .gridui-u-table--\[--gridui-table-cell-position\:sticky\] {
48
+ --gridui-table-cell-position: sticky;
49
+ }
50
+ .gridui-u-table--\[--gridui-table-cell-start\:var\(--gridui-table-cell-offset\)\] {
51
+ --gridui-table-cell-start: var(--gridui-table-cell-offset);
52
+ }
53
+ .gridui-u-table--\[\&\>\:is\(thead\,tbody\,tfoot\)\>tr\>\.gridui-table-numeric\]\:text-right > :is(thead, tbody, tfoot) > tr > .gridui-table-numeric {
54
+ text-align: right;
55
+ }
56
+ .gridui-u-table--\[\&\>\:is\(thead\,tbody\,tfoot\)\>tr\>\.gridui-table-numeric\]\:tabular-nums > :is(thead, tbody, tfoot) > tr > .gridui-table-numeric {
57
+ --tw-numeric-spacing: tabular-nums;
58
+ font-variant-numeric: var(--tw-ordinal, ) var(--tw-slashed-zero, ) var(--tw-numeric-figure, ) var(--tw-numeric-spacing, ) var(--tw-numeric-fraction, );
59
+ }
60
+ .gridui-u-table--\[\&\>\:is\(thead\,tbody\,tfoot\)\>tr\>\:is\(th\,td\)\]\:align-middle > :is(thead, tbody, tfoot) > tr > :is(th, td) {
61
+ vertical-align: middle;
62
+ }
63
+ .gridui-u-table--\[\&\>\:is\(thead\,tbody\,tfoot\)\>tr\>\:is\(th\,td\)\]\:wrap-anywhere > :is(thead, tbody, tfoot) > tr > :is(th, td) {
64
+ overflow-wrap: anywhere;
65
+ }
66
+ .gridui-u-table--\[\&\>tbody\>tr\>th\]\:text-left > tbody > tr > th {
67
+ text-align: left;
68
+ }
69
+ .gridui-u-table--\[\&\>tbody\>tr\>th\]\:font-normal > tbody > tr > th {
70
+ --tw-font-weight: var(--font-weight-normal);
71
+ font-weight: var(--font-weight-normal);
72
+ }
73
+ .gridui-u-table--\[\&\>thead\>\.gridui-table-groups\>th\]\:text-left > thead > .gridui-table-groups > th {
74
+ text-align: left;
75
+ }
76
+ .gridui-u-table--\[\&\>thead\>\.gridui-table-groups\>th\]\:type-eyebrow > thead > .gridui-table-groups > th {
77
+ font: var(--gridui-type-eyebrow);
78
+ font-family: var(--gridui-font-mono);
79
+ letter-spacing: 0.08em;
80
+ }
81
+ .gridui-u-table--\[\&\>thead\>\.gridui-table-groups\>th\]\:text-foreground > thead > .gridui-table-groups > th {
82
+ color: var(--gridui-foreground);
83
+ }
84
+ .gridui-u-table--\[\&\>thead\>tr\>th\]\:text-left > thead > tr > th {
85
+ text-align: left;
86
+ }
87
+ .gridui-u-table--\[\&\>thead\>tr\>th\]\:font-medium > thead > tr > th {
88
+ --tw-font-weight: var(--font-weight-medium);
89
+ font-weight: var(--font-weight-medium);
90
+ }
91
+ .gridui-u-table--\[\&\>thead\>tr\>th\]\:text-muted > thead > tr > th {
92
+ color: var(--gridui-muted);
93
+ }
94
+ }
95
+ @layer components {
96
+ .gridui-table > :is(thead, tbody, tfoot) > tr > :is(th, td) {
97
+ padding: 1rem var(--gridui-table-cell-padding-inline, var(--gridui-space-16));
98
+ border: 1px solid var(--gridui-border);
99
+ }
100
+ .gridui-table > :is(thead, tbody, tfoot) > tr > :is(th, td):first-child {
101
+ border-inline-start-width: var(--gridui-table-inline-edge-width);
102
+ }
103
+ .gridui-table > :is(thead, tbody, tfoot) > tr > :is(th, td):last-child {
104
+ border-inline-end-width: var(--gridui-table-inline-edge-width);
105
+ }
106
+ .gridui-table > thead > tr > th {
107
+ background: var(--gridui-surface);
108
+ }
109
+ .gridui-table-structured > tbody > tr > th, .gridui-table > tbody > tr:hover > :is(th, td) {
110
+ background: var(--gridui-surface);
111
+ }
112
+ .gridui-table > thead > .gridui-table-groups > th {
113
+ padding-block: var(--gridui-space-8);
114
+ background: var(--gridui-selection-background);
115
+ }
116
+ .gridui-table > thead > tr:first-child > th {
117
+ border-block-start-width: var(--gridui-table-block-edge-width);
118
+ }
119
+ .gridui-table > tbody > tr:last-child > :is(th, td), .gridui-table:has(> tbody:empty) > thead > tr:last-child > th {
120
+ border-block-end-width: var(--gridui-table-block-edge-width);
121
+ }
122
+ .gridui-table {
123
+ --gridui-table-inline-edge-width: 1px;
124
+ --gridui-table-selection-offset: 2px;
125
+ }
126
+ .gridui-table:dir(rtl) {
127
+ --gridui-table-selection-offset: -2px;
128
+ }
129
+ .gridui-table[data-inline-edges="none"] {
130
+ --gridui-table-inline-edge-width: 0px;
131
+ }
132
+ @media (min-width: 40rem) {
133
+ .gridui-table[data-inline-edges-sm="both"] {
134
+ --gridui-table-inline-edge-width: 1px;
135
+ }
136
+ .gridui-table[data-inline-edges-sm="none"] {
137
+ --gridui-table-inline-edge-width: 0px;
138
+ }
139
+ }
140
+ @media (min-width: 48rem) {
141
+ .gridui-table[data-inline-edges-md="both"] {
142
+ --gridui-table-inline-edge-width: 1px;
143
+ }
144
+ .gridui-table[data-inline-edges-md="none"] {
145
+ --gridui-table-inline-edge-width: 0px;
146
+ }
147
+ }
148
+ @media (min-width: 64rem) {
149
+ .gridui-table[data-inline-edges-lg="both"] {
150
+ --gridui-table-inline-edge-width: 1px;
151
+ }
152
+ .gridui-table[data-inline-edges-lg="none"] {
153
+ --gridui-table-inline-edge-width: 0px;
154
+ }
155
+ }
156
+ .gridui-table {
157
+ --gridui-table-block-edge-width: 1px;
158
+ }
159
+ .gridui-table[data-block-edges="none"] {
160
+ --gridui-table-block-edge-width: 0px;
161
+ }
162
+ @media (min-width: 40rem) {
163
+ .gridui-table[data-block-edges-sm="both"] {
164
+ --gridui-table-block-edge-width: 1px;
165
+ }
166
+ .gridui-table[data-block-edges-sm="none"] {
167
+ --gridui-table-block-edge-width: 0px;
168
+ }
169
+ }
170
+ @media (min-width: 48rem) {
171
+ .gridui-table[data-block-edges-md="both"] {
172
+ --gridui-table-block-edge-width: 1px;
173
+ }
174
+ .gridui-table[data-block-edges-md="none"] {
175
+ --gridui-table-block-edge-width: 0px;
176
+ }
177
+ }
178
+ @media (min-width: 64rem) {
179
+ .gridui-table[data-block-edges-lg="both"] {
180
+ --gridui-table-block-edge-width: 1px;
181
+ }
182
+ .gridui-table[data-block-edges-lg="none"] {
183
+ --gridui-table-block-edge-width: 0px;
184
+ }
185
+ }
186
+ .gridui-table > tbody > tr > [data-sticky] {
187
+ z-index: 1;
188
+ background: var(--gridui-background);
189
+ }
190
+ .gridui-table > thead > tr > [data-sticky] {
191
+ z-index: 2;
192
+ }
193
+ .gridui-table[data-density="compact"] > :is(thead, tbody, tfoot) > tr > :is(th, td) {
194
+ padding-block: var(--gridui-space-8);
195
+ }
196
+ .gridui-table[data-density="comfortable"] > :is(thead, tbody, tfoot) > tr > :is(th, td) {
197
+ padding-block: var(--gridui-space-16);
198
+ }
199
+ .gridui-table[data-row-lines="false"] > tbody > tr:not(:last-child) > :is(th, td) {
200
+ border-block-end-width: 0;
201
+ }
202
+ .gridui-table[data-row-lines="false"] > tbody > tr:not(:first-child) > :is(th, td) {
203
+ border-block-start-width: 0;
204
+ }
205
+ .gridui-table[data-column-lines="false"] > :is(thead, tbody, tfoot) > tr > :is(th, td):not(:first-child) {
206
+ border-inline-start-width: 0;
207
+ }
208
+ .gridui-table[data-column-lines="false"] > :is(thead, tbody, tfoot) > tr > :is(th, td):not(:last-child) {
209
+ border-inline-end-width: 0;
210
+ }
211
+ .gridui-table[data-header-surface="plain"] > thead > tr > th {
212
+ background: var(--gridui-background);
213
+ }
214
+ .gridui-table[data-header-surface="muted"] > thead > tr > th {
215
+ background: var(--gridui-surface);
216
+ }
217
+ .gridui-table[data-row-header-surface="plain"] > tbody > tr > th {
218
+ background: var(--gridui-background);
219
+ }
220
+ .gridui-table[data-row-header-surface="muted"] > tbody > tr > th {
221
+ background: var(--gridui-surface);
222
+ }
223
+ .gridui-table > tbody > tr[data-striped] > :is(th, td) {
224
+ background: var(--gridui-surface);
225
+ }
226
+ .gridui-table > tbody > tr[data-selected] > :is(th, td) {
227
+ background: var(--gridui-accent-background);
228
+ @supports (color: color-mix(in lab, red, red)) {
229
+ background: color-mix(in srgb, var(--gridui-accent-background) 10%, var(--gridui-background));
230
+ }
231
+ }
232
+ .gridui-table > tbody > tr[data-selected] > :is(th, td):first-child {
233
+ box-shadow: inset var(--gridui-table-selection-offset) 0 var(--gridui-accent-background);
234
+ }
235
+ .gridui-table > tfoot > tr > :is(th, td) {
236
+ background: var(--gridui-surface);
237
+ }
238
+ .gridui-table > tfoot > tr > [data-sticky] {
239
+ z-index: 1;
240
+ }
241
+ .gridui-table:has(> tfoot) > tbody > tr:last-child > :is(th, td), .gridui-table:has(> tfoot):has(> tbody:empty) > thead > tr:last-child > th {
242
+ border-block-end-width: 1px;
243
+ }
244
+ .gridui-table > tfoot > tr:last-child > :is(th, td) {
245
+ border-block-end-width: var(--gridui-table-block-edge-width);
246
+ }
247
+ }
248
+ @property --tw-ordinal {
249
+ syntax: "*";
250
+ inherits: false;
251
+ }
252
+ @property --tw-slashed-zero {
253
+ syntax: "*";
254
+ inherits: false;
255
+ }
256
+ @property --tw-numeric-figure {
257
+ syntax: "*";
258
+ inherits: false;
259
+ }
260
+ @property --tw-numeric-spacing {
261
+ syntax: "*";
262
+ inherits: false;
263
+ }
264
+ @property --tw-numeric-fraction {
265
+ syntax: "*";
266
+ inherits: false;
267
+ }
268
+ @property --tw-font-weight {
269
+ syntax: "*";
270
+ inherits: false;
271
+ }
272
+ @layer properties {
273
+ @supports ((-webkit-hyphens: none) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
274
+ *, ::before, ::after, ::backdrop {
275
+ --tw-ordinal: initial;
276
+ --tw-slashed-zero: initial;
277
+ --tw-numeric-figure: initial;
278
+ --tw-numeric-spacing: initial;
279
+ --tw-numeric-fraction: initial;
280
+ --tw-font-weight: initial;
281
+ }
282
+ }
283
+ }
package/docs/catalog.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "name": "@gridui/table",
4
- "version": "3.1.2",
4
+ "version": "4.0.0",
5
5
  "category": "data",
6
6
  "description": "GridUI React table",
7
7
  "usage": "Related families and their ownership are listed in the component ownership map.",
@@ -83,6 +83,7 @@
83
83
  "@gridui/overlay/styles.css",
84
84
  "@gridui/table/styles.css"
85
85
  ],
86
+ "styledImport": "@gridui/table/styled",
86
87
  "examples": [
87
88
  "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-data/table/stories/getting-started.mdx",
88
89
  "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-data/table/stories/loading-details.mdx",
@@ -59,6 +59,10 @@ Called when the corresponding interaction occurs; inspect the arguments in Actio
59
59
 
60
60
  Called when the corresponding interaction occurs; inspect the arguments in Actions.
61
61
 
62
+ ### density
63
+
64
+ ``Density | undefined`` · Optional
65
+
62
66
  ### minWidth
63
67
 
64
68
  ``Property.MinWidth<string | number> | undefined`` · Optional
@@ -75,10 +79,6 @@ Called when the corresponding interaction occurs; inspect the arguments in Actio
75
79
 
76
80
  ``boolean | undefined`` · Optional
77
81
 
78
- ### density
79
-
80
- ``"compact" | "comfortable" | undefined`` · Optional
81
-
82
82
  ### headerSurface
83
83
 
84
84
  ``"plain" | "muted" | undefined`` · Optional
@@ -29,7 +29,9 @@ The public Props type is the source of these signatures. Defaults below are expl
29
29
 
30
30
  ### density
31
31
 
32
- ``"compact" | "comfortable" | undefined`` · Optional
32
+ ``Density | undefined`` · Optional
33
+
34
+ Default: ``"comfortable"``
33
35
 
34
36
  ### headerSurface
35
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridui/table",
3
- "version": "3.1.2",
3
+ "version": "4.0.0",
4
4
  "description": "GridUI React table",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -10,14 +10,19 @@
10
10
  "docs"
11
11
  ],
12
12
  "sideEffects": [
13
- "**/*.css"
13
+ "**/*.css",
14
+ "./dist/styled.js"
14
15
  ],
15
16
  "exports": {
16
17
  ".": {
17
18
  "types": "./dist/index.d.ts",
18
19
  "import": "./dist/index.js"
19
20
  },
20
- "./styles.css": "./dist/styles.css"
21
+ "./styles.css": "./dist/styles.css",
22
+ "./styled": {
23
+ "types": "./dist/index.d.ts",
24
+ "import": "./dist/styled.js"
25
+ }
21
26
  },
22
27
  "publishConfig": {
23
28
  "access": "public"
@@ -27,15 +32,15 @@
27
32
  "react-dom": "^19.2.0"
28
33
  },
29
34
  "dependencies": {
30
- "@gridui/overlay": "^2.3.0",
31
- "@gridui/style-utils": "^4.0.0",
32
- "@gridui/theme": "^3.0.0",
35
+ "@gridui/overlay": "^2.5.0",
36
+ "@gridui/style-utils": "^4.1.0",
37
+ "@gridui/theme": "^5.0.0",
33
38
  "class-variance-authority": "0.7.1"
34
39
  },
35
40
  "devDependencies": {
36
41
  "@gridui-internal/configuration": "0.0.0-internal",
37
- "@gridui/data-cell": "1.1.2",
38
- "@gridui/loading-surface": "1.2.0",
42
+ "@gridui/data-cell": "1.3.0",
43
+ "@gridui/loading-surface": "1.3.1",
39
44
  "@jest/globals": "30.5.2",
40
45
  "@storybook/react-vite": "10.6.7",
41
46
  "@types/jest": "30.0.0",